You are not logged in.
Hello Arch Friends,
Perhaps i have relatively speaking high expectations of Wayland in it's current form but is it possible to get Hardware Acceleration with Nvidia to work on Wayland? Because I had no success in it so far.
My GPU is a GTX 1080 Ti and it falls under the proprietary nvidia drivers for either "nvidia" or "nvidia-dkms" package. I am using nvidia-dkms here.
My current Linux kernel version and nvidia driver version are linux (non-lts) 6.13.2.arch1-1 and nvidia-dkms 570.86.16-2
but i have also tried to get it to work *before* performing pacman -Syu with no difference either using nvidia-dkms 560 with it's respective kernel version linux-6.11.9.arch1-1. I mention *before* because this is relevant to what's changed.
I tried some things.
installing nvidia-vulkan from AUR using yay:
make[4]: *** [/usr/lib/modules/6.13.2-arch1-1/build/scripts/Makefile.build:196: nvidia/os-mlock.o] Error 1
make[3]: *** [/usr/lib/modules/6.13.2-arch1-1/build/Makefile:1989: .] Error 2
make[2]: *** [/usr/lib/modules/6.13.2-arch1-1/build/Makefile:251: __sub-make] Error 2
make[2]: Leaving directory '/home/motherfucker_big_scorpio/.cache/yay/nvidia-vulkan/src/NVIDIA-Linux-x86_64-535.43.09/kernel'
make[1]: *** [Makefile:251: __sub-make] Error 2
make[1]: Leaving directory '/usr/lib/modules/6.13.2-arch1-1/build'
make: *** [Makefile:82: modules] Error 2
==> ERROR: A failure occurred in build().
Aborting...
-> error making: nvidia-vulkan-exit status 4
-> Failed to install the following packages. Manual intervention is required:
nvidia-vulkan-utils - exit status 4
nvidia-vulkan - exit status 4
from my attempts to debug this i found this from MPV
mpv --hwdec=auto not_porn.mkv
● Video --vid=1 (hevc 2560x1440 60 fps)
● Audio --aid=1 'Track1' (opus 2ch 48000 Hz)
[vaapi] libva: /usr/lib/dri/nvidia_drv_video.so init failed
[ffmpeg] AVHWDeviceContext: cu->cuInit(0) failed -> CUDA_ERROR_COMPAT_NOT_SUPPORTED_ON_DEVICE: forward compatibility was attempted on non supported HW
[vaapi] libva: /usr/lib/dri/nvidia_drv_video.so init failed
[ffmpeg/video] hevc: Device does not support the VK_KHR_video_decode_queue extension!
[ffmpeg/video] hevc: Failed setup for format vulkan: hwaccel initialisation returned error.
Using hardware decoding (qsv-copy).
AO: [pipewire] 48000Hz stereo 2ch floatp
VO: [gpu] 2560x1440 nv12
AV: 00:00:03 / 00:00:03 (99%) A-V: 0.000 Dropped: 1
Exiting... (End of file)
Output from vulkaninfo
[motherfucker_big_scorpio@Nexus ~]$ vulkaninfo --summary
WARNING: [Loader Message] Code 0 : Layer VK_LAYER_MESA_device_select uses API version 1.3 which is older than the application specified API version of 1.4. May cause issues.
==========
VULKANINFO
==========
Vulkan Instance Version: 1.4.303
Instance Extensions: count = 25
-------------------------------
VK_EXT_acquire_drm_display : extension revision 1
VK_EXT_acquire_xlib_display : extension revision 1
VK_EXT_debug_report : extension revision 10
VK_EXT_debug_utils : extension revision 2
VK_EXT_direct_mode_display : extension revision 1
VK_EXT_display_surface_counter : extension revision 1
VK_EXT_headless_surface : extension revision 1
VK_EXT_surface_maintenance1 : extension revision 1
VK_EXT_swapchain_colorspace : extension revision 5
VK_KHR_device_group_creation : extension revision 1
VK_KHR_display : extension revision 23
VK_KHR_external_fence_capabilities : extension revision 1
VK_KHR_external_memory_capabilities : extension revision 1
VK_KHR_external_semaphore_capabilities : extension revision 1
VK_KHR_get_display_properties2 : extension revision 1
VK_KHR_get_physical_device_properties2 : extension revision 2
VK_KHR_get_surface_capabilities2 : extension revision 1
VK_KHR_portability_enumeration : extension revision 1
VK_KHR_surface : extension revision 25
VK_KHR_surface_protected_capabilities : extension revision 1
VK_KHR_wayland_surface : extension revision 6
VK_KHR_xcb_surface : extension revision 6
VK_KHR_xlib_surface : extension revision 6
VK_LUNARG_direct_driver_loading : extension revision 1
VK_NV_display_stereo : extension revision 1
Instance Layers: count = 9
--------------------------
VK_LAYER_INTEL_nullhw INTEL NULL HW 1.1.73 version 1
VK_LAYER_MESA_device_select Linux device selection layer 1.3.211 version 1
VK_LAYER_MESA_overlay Mesa Overlay layer 1.3.211 version 1
VK_LAYER_MESA_screenshot Mesa Screenshot layer 1.3.211 version 1
VK_LAYER_NV_optimus NVIDIA Optimus layer 1.4.303 version 1
VK_LAYER_VALVE_steam_fossilize_32 Steam Pipeline Caching Layer 1.3.207 version 1
VK_LAYER_VALVE_steam_fossilize_64 Steam Pipeline Caching Layer 1.3.207 version 1
VK_LAYER_VALVE_steam_overlay_32 Steam Overlay Layer 1.3.207 version 1
VK_LAYER_VALVE_steam_overlay_64 Steam Overlay Layer 1.3.207 version 1
Devices:
========
GPU0:
apiVersion = 1.3.296
driverVersion = 24.3.4
vendorID = 0x8086
deviceID = 0x1912
deviceType = PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU
deviceName = Intel(R) HD Graphics 530 (SKL GT2)
driverID = DRIVER_ID_INTEL_OPEN_SOURCE_MESA
driverName = Intel open-source Mesa driver
driverInfo = Mesa 24.3.4-arch1.1
conformanceVersion = 1.3.6.0
deviceUUID = 86801219-0600-0000-0002-000000000000
driverUUID = 4a385d89-2a0a-49d7-f263-43c1e5335f32
To me it looks like a vulkan <---> nvidia (dkms?) driver problem. More so I don't see my GTX 1080 Ti listed here anymore (i saw it when i had the linux kernel version matching the nvidia driver version 565).
What's weird is that ffmpeg CAN encode & decode video files using nvenc and nvdec (using the Nvidia GPU to perform video conversions from or to H265 codec). OBS Studio was able to encode video captures using nvenc H265 but since i performed pacman -Syu this encoding option has been lost.
I have not yet tested this using the normal X11 display thingy.
I have heard several things such as nvidia proprietary drivers having terrible support for linux (that or wayland having issues with that) or that driver version 570 broke HW acceleration ( from https://bbs.archlinux.org/viewtopic.php?id=303202 )
What can I do? Should i start using the normal and what I think is a less flexible "nvidia" package over the DKMS variant?
Update:
Just booted up on my LTS kernel linux-lts 6.12.13-1 and nvidia-dkms 570.86.16-2 (as it is displayed from pacman -Q). Vulkaninfo now correctly lists my discrete 1080 Ti. Plus mpv shows less errors but one remains.
Devices:
========
GPU0:
apiVersion = 1.3.296
driverVersion = 24.3.4
vendorID = 0x8086
deviceID = 0x1912
deviceType = PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU
deviceName = Intel(R) HD Graphics 530 (SKL GT2)
driverID = DRIVER_ID_INTEL_OPEN_SOURCE_MESA
driverName = Intel open-source Mesa driver
driverInfo = Mesa 24.3.4-arch1.1
conformanceVersion = 1.3.6.0
deviceUUID = 86801219-0600-0000-0002-000000000000
driverUUID = 4a385d89-2a0a-49d7-f263-43c1e5335f32
GPU1:
apiVersion = 1.4.303
driverVersion = 570.86.16.0
vendorID = 0x10de
deviceID = 0x1b06
deviceType = PHYSICAL_DEVICE_TYPE_DISCRETE_GPU
deviceName = NVIDIA GeForce GTX 1080 Ti
driverID = DRIVER_ID_NVIDIA_PROPRIETARY
driverName = NVIDIA
driverInfo = 570.86.16
conformanceVersion = 1.4.1.0
deviceUUID = 53d43949-6a13-e9b2-7da2-e5b953fec214
driverUUID = 5429646d-3d95-54e1-b807-75d58fc2ef85
mpv --hwdec=auto not_porn.mkv
● Video --vid=1 (hevc 2560x1440 60 fps)
● Audio --aid=1 'Track1' (opus 2ch 48000 Hz)
[vaapi] libva: /usr/lib/dri/nvidia_drv_video.so init failed
Using hardware decoding (nvdec-copy).
AO: [pipewire] 48000Hz stereo 2ch floatp
VO: [gpu] 2560x1440 nv12
AV: 00:00:03 / 00:00:03 (99%) A-V: 0.000 Dropped: 2
Exiting... (End of file)
So it looks like HW acceleration works on the LTS kernel since I see the Using hardware decoding text but I'm not sure if i must worry about vaapi because it's text is in red color and it looks like a nvidia driver initialization has failed.
Also something got screwed up since I performed pacman -Syu for Linux kernel 6.13 - specifically it boots up with a kernel panic: not syncing: No working init found (missing init= option to kernel). That's a separate issue with the kernel however.
Update 2:
Just regarding the kernel panic error, i actually ran out of space for my encrypted boot partition mounted under /boot having only 512 Megabytes *facepalm*
==> Generating module dependencies
==> Creating zstd-compressed initcpio image: '/boot/initramfs-linux-fallback.img'
cat: write error: No space left on device
bsdtar: Write error
bsdtar: Write error
==> ERROR: Early uncompressed CPIO image generation FAILED: 'sort' reported an error
Last edited by Big Scorpio (2025-02-14 10:27:36)
Offline
As from my updates to my original post, i seem to have magically solved it myself and the worst part is i don't even know what I did except rebooting the system after running pacman -Syu, which got my nvidia-dkms driver version to 570 and linux non-lts kernel to 6.13 - it so happened, that mkinitcpio during the pacman -Syu operation was unsuccessful because my /boot partition ran out of space.
In the meantime i doubled my /boot partition size and mkinitcpio worked through.
While I don't see HW acceleration being available to Firefox, at least on Steam it works. And MPV reports successfully too.
mpv --hwdec=auto not_porn.mkv
● Video --vid=1 (hevc 2560x1440 60 fps)
● Audio --aid=1 'Track1' (opus 2ch 48000 Hz)
[vaapi] libva: /usr/lib/dri/nvidia_drv_video.so init failed
Using hardware decoding (nvdec-copy).
AO: [pipewire] 48000Hz stereo 2ch floatp
VO: [gpu] 2560x1440 nv12
Last edited by Big Scorpio (2025-02-14 10:33:11)
Offline