You are not logged in.

#1 2022-01-23 14:36:24

millionheadscollide
Member
Registered: 2021-08-03
Posts: 15

[SOLVED] Hardware Acceleration on GNOME Wayland

Hi all,

I have recently been trying out GNOME on Wayland but seem to been running into issues with hardware video acceleration. Firefox/Alacritty stutters frequently, videos are unwatchable.

After doing some searching I came across this bug report which is likely the cause.

Anything I can do or just switch back to Xorg and wait for a fix?

The error:

~ $ vainfo
Xlib:  extension "NV-GLX" missing on display ":1".
Xlib:  extension "NV-GLX" missing on display ":1".
zsh: floating point exception (core dumped)  vainfo

Also seeing this:

$ journalctl | grep nvidia | head
Jan 23 03:16:16 desktop kernel: [drm:__nv_drm_gem_nvkms_map [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000900] Failed to map NvKmsKapiMemory 0x00000000d3c7af21
Jan 23 03:16:16 desktop kernel: [drm:__nv_drm_gem_nvkms_map [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000900] Failed to map NvKmsKapiMemory 0x000000008d07d2b4
Jan 23 03:16:16 desktop kernel: [drm:__nv_drm_gem_nvkms_map [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000900] Failed to map NvKmsKapiMemory 0x000000000abbcf7a
Jan 23 03:16:16 desktop kernel: [drm:__nv_drm_gem_nvkms_map [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000900] Failed to map NvKmsKapiMemory 0x00000000a2542580
Jan 23 03:16:16 desktop kernel: [drm:__nv_drm_gem_nvkms_map [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000900] Failed to map NvKmsKapiMemory 0x000000008cfb10cc
Jan 23 03:16:16 desktop kernel: [drm:__nv_drm_gem_nvkms_map [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000900] Failed to map NvKmsKapiMemory 0x000000007af25e9f
Jan 23 03:16:16 desktop kernel: [drm:__nv_drm_gem_nvkms_map [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000900] Failed to map NvKmsKapiMemory 0x00000000bcb5b9c8
Jan 23 03:16:16 desktop kernel: [drm:__nv_drm_gem_nvkms_map [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000900] Failed to map NvKmsKapiMemory 0x0000000076ee3892
Jan 23 03:16:16 desktop kernel: [drm:__nv_drm_gem_nvkms_map [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000900] Failed to map NvKmsKapiMemory 0x000000006c227a28
Jan 23 03:16:16 desktop kernel: [drm:__nv_drm_gem_nvkms_map [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000900] Failed to map NvKmsKapiMemory 0x00000000844f0c47

Related info:

OS: Arch Linux x86_64
Host: X570 AORUS ELITE -CF
Kernel: 5.16.2-arch1-1
Uptime: 26 mins
Packages: 877 (pacman)
Shell: zsh 5.8
Resolution: 2560x1440
Terminal: alacritty
CPU: AMD Ryzen 5 5600X (12) @ 3.700GHz
GPU: NVIDIA GeForce RTX 3090
Memory: 2092MiB / 32106MiB
~ $ glxinfo -B
name of display: :1
display: :1  screen: 0
direct rendering: Yes
Memory info (GL_NVX_gpu_memory_info):
    Dedicated video memory: 24576 MB
    Total available memory: 24576 MB
    Currently available dedicated video memory: 23786 MB
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: NVIDIA GeForce RTX 3090/PCIe/SSE2
OpenGL core profile version string: 4.6.0 NVIDIA 495.46
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 495.46
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 495.46
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
~ $ yay -Q | grep -E "nvidia|libva|vdpau|mutter"
lib32-nvidia-utils 495.46-1
libva 2.13.0-1
libva-utils 2.13.0-1
libva-vdpau-driver 0.7.4-5
libvdpau 1.4-1
mutter 41.3-2
nvidia 495.46-10
nvidia-settings 495.46-2
nvidia-utils 495.46-2
vdpauinfo 1.4-1
~ $ env | grep -E "LIBVA|VDPAU"
LIBVA_DRIVER_NAME=vdpau
VDPAU_DRIVER=nvidia

Thanks

Last edited by millionheadscollide (2022-02-08 13:44:51)

Offline

#2 2022-01-23 17:02:43

Strike0
Member
From: Germany
Registered: 2011-09-05
Posts: 1,429

Re: [SOLVED] Hardware Acceleration on GNOME Wayland

The last comment on the bug report you quote claims it is fixed by the current nvidia 510 beta. You can try that via the AUR already.

Offline

#3 2022-01-23 17:43:20

millionheadscollide
Member
Registered: 2021-08-03
Posts: 15

Re: [SOLVED] Hardware Acceleration on GNOME Wayland

Strike0 wrote:

The last comment on the bug report you quote claims it is fixed by the current nvidia 510 beta. You can try that via the AUR already.

Wasn't aware it was available, have given it a try and it has removed the NvKmsKapiMemory errors but vainfo is still returning the same error. Perhaps they were unrelated?

~ $ yay -Q | grep nvidia
lib32-nvidia-utils-beta 510.39.01-1
nvidia-beta 510.39.01-1
nvidia-settings-beta 510.39.01-1
nvidia-utils-beta 510.39.01-1

journalctl ('/var/run/nvidia-xdriver-c2031406' Permission denied ?):

Jan 23 17:29:51 desktop kernel: Command line: BOOT_IMAGE=/vmlinuz-linux root=UUID=fc51ca42-e086-4da5-ac1b-380daafa0162 rw loglevel=0 quiet nvidia-drm.modeset=1
Jan 23 17:29:51 desktop kernel: Kernel command line: BOOT_IMAGE=/vmlinuz-linux root=UUID=fc51ca42-e086-4da5-ac1b-380daafa0162 rw loglevel=0 quiet nvidia-drm.modeset=1
Jan 23 17:29:51 desktop kernel: nvidia: loading out-of-tree module taints kernel.
Jan 23 17:29:51 desktop kernel: nvidia: module license 'NVIDIA' taints kernel.
Jan 23 17:29:51 desktop kernel: nvidia: module verification failed: signature and/or required key missing - tainting kernel
Jan 23 17:29:51 desktop kernel: nvidia-nvlink: Nvlink Core is being initialized, major device number 235
Jan 23 17:29:51 desktop kernel: nvidia 0000:09:00.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=none:owns=io+mem
Jan 23 17:29:51 desktop kernel: nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms  510.39.01  Fri Dec 31 10:52:52 UTC 2021
Jan 23 17:29:51 desktop kernel: nvidia_uvm: module uses symbols from proprietary module nvidia, inheriting taint.
Jan 23 17:29:51 desktop kernel: nvidia-uvm: Loaded the UVM driver, major device number 511.
Jan 23 17:29:51 desktop kernel: [drm] [nvidia-drm] [GPU ID 0x00000900] Loading driver
Jan 23 17:29:51 desktop kernel: caller _nv000649rm+0x1ad/0x200 [nvidia] mapping multiple BARs
Jan 23 17:29:51 desktop kernel: [drm] Initialized nvidia-drm 0.0.0 20160202 for 0000:09:00.0 on minor 0
Jan 23 17:29:51 desktop systemd-udevd[378]: nvidia: Process '/usr/bin/bash -c '/usr/bin/mknod -Z -m 666 /dev/nvidiactl c $(grep nvidia-frontend /proc/devices | cut -d \  -f 1) 255'' failed with exit code 1.
Jan 23 17:29:51 desktop systemd-udevd[385]: nvidia: Process '/usr/bin/bash -c 'for i in $(cat /proc/driver/nvidia/gpus/*/information | grep Minor | cut -d \  -f 4); do /usr/bin/mknod -Z -m 666 /dev/nvidia${i} c $(grep nvidia-frontend /proc/devices | cut -d \  -f 1) ${i}; done'' failed with exit code 1.
Jan 23 17:29:56 desktop /usr/lib/gdm-x-session[671]: Kernel command line: BOOT_IMAGE=/vmlinuz-linux root=UUID=fc51ca42-e086-4da5-ac1b-380daafa0162 rw loglevel=0 quiet nvidia-drm.modeset=1
Jan 23 17:29:56 desktop /usr/lib/gdm-x-session[671]: (**) OutputClass "nvidia" ModulePath extended to "/usr/lib/nvidia/xorg,/usr/lib/xorg/modules,/usr/lib/xorg/modules"
Jan 23 17:29:56 desktop /usr/lib/gdm-x-session[671]: (II) LoadModule: "nvidia"
Jan 23 17:29:56 desktop /usr/lib/gdm-x-session[671]: (II) Loading /usr/lib/xorg/modules/drivers/nvidia_drv.so
Jan 23 17:29:56 desktop /usr/lib/gdm-x-session[671]: (II) Module nvidia: vendor="NVIDIA Corporation"
Jan 23 17:29:56 desktop /usr/lib/gdm-x-session[671]: (II) Applying OutputClass "nvidia" options to /dev/dri/card0
Jan 23 17:29:56 desktop /usr/lib/gdm-x-session[671]: (**) NVIDIA(0): Option "nvidiaXineramaInfoOrder" "DFP-5"
Jan 23 17:29:56 desktop /usr/lib/gdm-x-session[671]: (**) NVIDIA(0): Option "MetaModes" "DP-4: 2560x1440_144 +1080+251, HDMI-0: nvidia-auto-select +0+0 {rotation=left, ForceCompositionPipeline=On}"
Jan 23 17:29:56 desktop /usr/lib/gdm-x-session[671]: (II) Loading sub module "glxserver_nvidia"
Jan 23 17:29:56 desktop /usr/lib/gdm-x-session[671]: (II) LoadModule: "glxserver_nvidia"
Jan 23 17:29:56 desktop /usr/lib/gdm-x-session[671]: (II) Loading /usr/lib/nvidia/xorg/libglxserver nvidia.so
Jan 23 17:29:56 desktop /usr/lib/gdm-x-session[671]: (II) Module glxserver_nvidia: vendor="NVIDIA Corporation"
Jan 23 17:29:56 desktop /usr/lib/gdm-x-session[671]: (II) NVIDIA(0):     "DP-4:2560x1440_144+1080+251,HDMI-0:nvidia-auto-select+0+0{rotation=left,ForceCompositionPipeline=On}"
Jan 23 17:29:56 desktop /usr/lib/gdm-x-session[671]: (WW) NVIDIA:     '/var/run/nvidia-xdriver-c2031406' Permission denied
Jan 23 17:29:57 desktop /usr/lib/gdm-x-session[671]: (II) NVIDIA(0): Setting mode "DP-4:2560x1440_144+1080+251,HDMI-0:nvidia-auto-select+0+0{rotation=left,ForceCompositionPipeline=On}"
Jan 23 17:29:57 desktop /usr/lib/gdm-x-session[671]: (II) NVIDIA(0): [DRI2]   VDPAU driver: nvidia
Jan 23 17:29:57 desktop /usr/lib/gdm-x-session[671]: (II) NVIDIA(0): Setting mode "DP-4: nvidia-auto-select @2560x1440 +1080+251 {ViewPortIn=2560x1440, ViewPortOut=2560x1440+0+0}, HDMI-0: nvidia-auto-select @1080x1920 +0+0 {ViewPortIn=1080x1920, ViewPortOut=1920x1080+0+0, Rotation=90, ForceCompositionPipeline=On}"
Jan 23 17:30:22 desktop gnome-shell[953]: Added device '/dev/dri/card0' (nvidia-drm) using non-atomic mode setting.
Jan 23 17:30:22 desktop gnome-shell[953]: Disabling DMA buffer screen sharing for driver 'nvidia-drm'.
                                                Module libvdpau_nvidia.so.1 with build-id 868487b5adb480cfcc0cd21d0a6f38e0d0de6bb5

Offline

#4 2022-01-23 19:45:21

Strike0
Member
From: Germany
Registered: 2011-09-05
Posts: 1,429

Re: [SOLVED] Hardware Acceleration on GNOME Wayland

I don't think the warning is the cause. That one probably occurs due to the /var/run symlink.
Have a read at the second link to gnome mutter bug mentioned in: https://wiki.archlinux.org/title/Wayland#Requirements
The users there report choked firefox video streams as well.

Offline

#5 2022-02-08 12:22:04

millionheadscollide
Member
Registered: 2021-08-03
Posts: 15

Re: [SOLVED] Hardware Acceleration on GNOME Wayland

UPDATE:

vainfo will never work under Wayland as it uses xlib. Hindsight is a wonderful thing.

I saw someone suggest trying Firefox nightly on Wayland and it works. So the issue lies with Firefox.

Offline

#6 2022-02-08 13:44:26

millionheadscollide
Member
Registered: 2021-08-03
Posts: 15

Re: [SOLVED] Hardware Acceleration on GNOME Wayland

Fixed in firefox 96.x by adding:

env MOZ_ENABLE_WAYLAND=1

to firefox.desktop as described here.

Offline

Board footer

Powered by FluxBB