Multi GPU multi monitor video hardware acceleration (repost)

Sorry to repost here but i think this maybe the more appropriate forum for it.

Im using KDE 6 with wayland. Garuda Linux / Arch based. My setup got an nvidia gpu 555 beta drivers. Also an intel-igpu. 2 physical screens connected to the intel i-gpu and the gaming screen is connected to the nvidia gpu. All three dispalys work. But apparently the nvidia card does all the work. Lets say i put a video on one of the displays connected to the intel i-gpu. I would expect the intel i-gpu to do the video decoding / hardware acceleration. But in fact the nvidia card does. Any clues about this behavior?

Thanks :slight_smile:

Deciding which gpu does the decoding is set at driver level with LIBVA_DRIVER_NAME environment variable Hardware video acceleration - ArchWiki . I think making applications force which driver is using for decoding will require each application to control this manually wouldn’t it?

A workaround I can think of is making a custom desktop launcher that overrides the driver to use before starting the application e.g. LIBVA_DRIVER_NAME=iHD firefox-nightly maybe that will work.

Thanks for your reply! :slight_smile: You also told me the correct driver name according to the arch wiki :slight_smile:
But the terminal does:

LIBVA_DRIVER_NAME=iHD kodi
DRM_IOCTL_VERSION, unsupported drm device by media driver: nvid
DRM_IOCTL_VERSION, unsupported drm device by media driver: nvid
libva error: /usr/lib/dri/iHD_drv_video.so init failed

Any clues? Nvidia driver beeing rude?

Found this libva issue An alternative to MOZ_DRM_DEVICE for libva "LIBVA_DRM_DEVICE" · Issue #752 · intel/libva · GitHub looks like it fails to find the device. Does the same happen if you try with mpv?

Again thanks for the reply, i tried vlc player and got the following interesting lines:
LIBVA_DRIVER_NAME=iHD vlc
libEGL warning: egl: failed to create dri2 screen
DRM_IOCTL_VERSION, unsupported drm device by media driver: nvid
libva error: /usr/lib/dri/iHD_drv_video.so init failed
[000074d9f0001fa0] glconv_vaapi_x11 gl error: vaInitialize: invalid parameter
[000074d9f0001fa0] glconv_vaapi_drm gl error: vaInitialize: invalid parameter
Xlib: extension “DRI2” missing on display “:1”.
libva error: vaGetDriverNames() failed with operation failed
MESA: error: zink: display server doesn’t support DRI3 modifiers and driver can’t handle INVALID<->LINEAR!
[000074d9f80985a0] main video output error: video output creation failed
[000074da04c080f0] main decoder error: failed to create video output
[000074da04c080f0] avcodec decoder: Using NVIDIA VDPAU Driver Shared Library 555.52.04 Tue Jun 4 13:18:26 UTC 2024 for hardware decoding

And i got the following:
LIBVA_DRIVER_NAME=iHD mpv “some file”
Using hardware decoding (nvdec)

but no errors

Hmm, it looks to me the linked issue must be addressed to be able to do what you need. The only other workaround that may work is changing the main gpu for KWin as described in this reddit post https://www.reddit.com/r/kde/comments/1ainwf5/how_i_worked_around_poor_performance_with/