No Linux XWayland currently working
Now that I have sway running in general, I'd like to make the linuxolator work again, too.
But all Linux-X11-apps (32 and 64bit) run with llvmpipe instead.
Here's what I have installed:
# pkg info | grep nvidia
libva-nvidia-driver-0.0.13 NVDEC-based backend for VAAPI
linux-nvidia-libs-570.124.04 NVidia graphics libraries and programs (Linux version)
nvidia-driver-570.124.04.1401000 NVidia graphics card binary drivers for hardware OpenGL rendering
nvidia-drm-61-kmod-570.124.04.1401000_1 NVIDIA DRM Kernel Module
nvidia-drm-kmod-570.124.04 NVIDIA DRM Kernel Module
nvidia-settings-535.146.02_1 Display Control Panel for X NVidia driver
and a fairly large linux-rl9 with linux-rl9-9.5, linux-rl9-wayland-1.21.0_1 and linux-rl9-xorg-libs-7.7_3.
The linux-compat works with X11, but under Wayland everything runs on the CPU.
Is this a single-GPU NVIDIA system? I haven't tried the new linux-rl9 stuff myself yet, but I wonder if linux-nvidia-libs even installs things for it properly yet.
Is this a single-GPU NVIDIA system?
Yep
I haven't tried the new linux-rl9 stuff myself yet, but I wonder if linux-nvidia-libs even installs things for it properly yet.
I installed it manually from the ports and it didn't complain, but I haven't actually looked into it, yet.
I have to correct myself: I think this is unrelated to the linux-compat.
It seems that under Sway/Wayland, glx always come from llvmpipe:
Glxinfo:
OpenGL vendor string: Mesa
OpenGL renderer string: llvmpipe (LLVM 19.1.7, 256 bits)
OpenGL core profile version string: 4.5 (Core Profile) Mesa 24.1.7
OpenGL core profile shading language version string: 4.50
Curiously, vulkaninfo prints this:
=================
VK_LAYER_NV_optimus (NVIDIA Optimus layer) Vulkan version 1.4.303, layer version 1:
Layer Extensions: count = 0
Devices: count = 2
GPU id = 0 (NVIDIA GeForce RTX 2060 SUPER)
Layer-Device Extensions: count = 0
GPU id = 1 (llvmpipe (LLVM 19.1.7, 256 bits))
Layer-Device Extensions: count = 0
This is the first time that vulkaninfo works for me on FreeBSD. However, there is not "optimus" setup, because there is no other GPU. Is there a benchmark or FreeBSD-native game that has a Vulkan-renderer?
How can I debug this further?
Here are some more infos from the system:
% kldstat | grep nvidia
16 1 0xffffffff83884000 149c0 nvidia-drm.ko
22 2 0xffffffff83a00000 52ef728 nvidia.ko
23 1 0xffffffff88cf0000 1507d8 nvidia-modeset.ko
% dmesg | grep -i nvidia
hdac0: <NVIDIA (0x10f9) HDA Controller> mem 0xfc080000-0xfc083fff irq 55 at device 0.1 on pci10
xhci2: <NVIDIA TU106 USB 3.1 controller> mem 0xe2000000-0xe203ffff,0xe2040000-0xe204ffff irq 52 at device 0.2 on pci10
hdacc0: <NVIDIA (0x0093) HDA CODEC> at cad 0 on hdac0
hdaa0: <NVIDIA (0x0093) Audio Function Group> at nid 1 on hdacc0
pcm0: <NVIDIA (0x0093) (HDMI/DP 8ch)> at nid 4 on hdaa0
pcm1: <NVIDIA (0x0093) (HDMI/DP 8ch)> at nid 5 on hdaa0
pcm2: <NVIDIA (0x0093) (HDMI/DP 8ch)> at nid 6 on hdaa0
pcm3: <NVIDIA (0x0093) (HDMI/DP 8ch)> at nid 7 on hdaa0
nvidia0: <NVIDIA GeForce RTX 2060 SUPER> on vgapci0
vgapci0: child nvidia0 requested pci_enable_io
vgapci0: child nvidia0 requested pci_enable_io
nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms 570.124.04 Tue Feb 25 03:39:05 UTC 2025
[drm] [nvidia-drm] [GPU ID 0x00000a00] Loading driver
[drm] Initialized nvidia-drm 0.0.0 20160202 for nvidia0 on minor 0
[drm ERROR :nv_drm_atomic_commit] [nvidia-drm] [GPU ID 0x00000a00] Failed to apply atomic modeset. Error code: -22
[drm ERROR :nv_drm_atomic_commit] [nvidia-drm] [GPU ID 0x00000a00] Failed to apply atomic modeset. Error code: -22
[drm ERROR :nv_drm_atomic_commit] [nvidia-drm] [GPU ID 0x00000a00] Flip event timeout on head 0
[drm ERROR :nv_drm_atomic_commit] [nvidia-drm] [GPU ID 0x00000a00] Flip event timeout on head 0
Note also that I have some random flickering here and there (especially in Thunderbird for some reason).
edit:
% grep nvidia /boot/loader.conf
hw.nvidiadrm.modeset=1
nvidia_drm_load="YES"
% grep nvidia /etc/rc.conf
kld_list="nvidia-drm amdtemp cpuctl"
This is glxinfo from Xorg (but also nvidia-drm):
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: NVIDIA GeForce RTX 2060 SUPER/PCIe/SSE2
OpenGL core profile version string: 4.6.0 NVIDIA 570.124.04
OpenGL core profile shading language version string: 4.60 NVIDIA
Vuulkaninfo seems the same, however, vkcube runs super smooth in an Xorg session and with low fps in Wayland.
OK, adding export __GLX_VENDOR_LIBRARY_NAME=nvidia before loading Sway makes all apps use the Nvidia GL, even Linux apps.
However, the performance seems even worse than with llvmpipe and there is horrible tearing in the picture.