nvidia and GeForce 3060 on FreeBSD 14.4 - not a happy experience

In my continuing adventures (see here and here) to get my workstation working at an acceptable level with FreeBSD 14.x, I took out the Sapphire Radeon R7 240 4G DDR3 graphics card, an put in a MSI GeForce RTX 3060 Ventus 2X 12G OC instead.
It shows up like this in pciconf -lv output
Code:
vgapci0@pci0:7:0:0: class=0x030000 rev=0xa1 hdr=0x00 vendor=0x10de device=0x2504 subvendor=0x1462 subdevice=0x397d
    vendor     = 'NVIDIA Corporation'
    device     = 'GA106 [GeForce RTX 3060 Lite Hash Rate]'
    class      = display
    subclass   = VGA
before replacing the graphics card I had installed the necessary nvidia packages, from /var/log/messages
Code:
Aug  5 19:27:08 kg-core2 pkg[55814]: egl-wayland-1.1.21 installed
Aug  5 19:27:08 kg-core2 pkg[55814]: egl-wayland2-1.0.1 installed
Aug  5 19:27:08 kg-core2 pkg[55814]: egl-x11-1.0.5 installed
Aug  5 19:27:09 kg-core2 pkg[55814]: nvidia-kmod-595.84.1404000 installed
Aug  5 19:27:10 kg-core2 pkg[55814]: nvidia-driver-595.84 installed
Aug  5 19:27:10 kg-core2 pkg[55814]: nvidia-drm-61-kmod-595.84.1404000_1 installed
and configured kld_list like this
Code:
root@kg-core2:~ # sysrc kld_list
kld_list: nvidia-modeset nvidia-drm
and added this to /boot/loader.conf:
Code:
root@kg-core2:~ # cat /boot/loader.conf
hw.nvidiadrm.modeset=1
Upon boot, the console is garbled / unreadable, so I have to login blind, and type startxfce4 --with-ck-launch blind. I can live with that.
Once Xorg has started, glxinfo reports
Code:
tingo@kg-core2:~ $ glxinfo -B
name of display: :0.0
display: :0  screen: 0
direct rendering: Yes
Memory info (GL_NVX_gpu_memory_info):
    Dedicated video memory: 12288 MB
    Total available memory: 12288 MB
    Currently available dedicated video memory: 464 MB
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: NVIDIA GeForce RTX 3060/PCIe/SSE2
OpenGL core profile version string: 4.6.0 NVIDIA 595.84
OpenGL core profile shading language version string: 4.60 NVIDIA
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 4.6.0 NVIDIA 595.84
OpenGL shading language version string: 4.60 NVIDIA
OpenGL context flags: (none)
OpenGL profile mask: (none)

OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 595.84
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20

and most operations (switching windows using Alt-Tab, switching workspaces, etc) are fast enough.
However, when switching between firefox windows I experience a horrible lag. For a simple Alt-Tab it is two seconds or more, in some cases it is in the order of minutes before the new window becomes usable.

There most be something I've done wrong, it is not supposed to be like this for a relatively modern graphics card with 12G memory?
 
oh, nvidia-smi reports like this
Code:
tingo@kg-core2:~ $ nvidia-smi
Thu Aug  6 22:31:08 2026      
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 595.84                 Driver Version: 595.84         CUDA Version: N/A      |
+-----------------------------------------+------------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
|                                         |                        |               MIG M. |
|=========================================+========================+======================|
|   0  NVIDIA GeForce RTX 3060        Off |   00000000:07:00.0  On |                  N/A |
| 35%   53C    P5             20W /  170W |   11492MiB /  12288MiB |     31%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+

+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI              PID   Type   Process name                        GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|  No running processes found                                                             |
+-----------------------------------------------------------------------------------------+
 
Back
Top