You are not logged in.
Well sorry for posting too much in these days, but i would to set my main requirements to work. Also this is the first forum where i found real expert collaboration so I exploit it.
Coming to the problem, i would enable hardware acceleration video decoding (and encoding if possible) with my NVIDIA gpu. My system is a laptop (Dell G5590) with an Intel UHD Graphics 630 and a NVIDIA GeForce GTX 1660 Ti Mobile . I successfully configured the PRIME render offloading and i run my wanted-gpu application with prime-run as prefix.
I don't care which browser I've to use (i would prefer Firefox) but the hardware acceleration with dGPU must work because my iGPU performs bad and overheats the laptop.
I've read this: https://wiki.archlinux.org/title/Hardwa … celeration and i installed nvidia-utils as i'm using the NVIDIA proprietary driver.
Then i setted those two global variable (and i rebooted):
LIBVA_DRIVER_NAME=nvidia
VDPAU_DRIVER=nvidiavainfo:
vaInitialize failed with error code -1 (unknown libva error),exitvdpauinfo:
display: :0 screen: 0
Error creating VDPAU device: 1sudo journalctl -b --grep='vdpau | dri driver' :
ott 18 13:12:12 MARKVII /usr/lib/gdm-x-session[863]: (II) modeset(0): [DRI2] DRI driver: iris
ott 18 13:12:12 MARKVII /usr/lib/gdm-x-session[863]: (II) modeset(0): [DRI2] VDPAU driver: va_gl
ott 18 13:12:12 MARKVII /usr/lib/gdm-x-session[863]: (II) NVIDIA(G0): [DRI2] VDPAU driver: nvidia
ott 18 16:04:28 MARKVII dbus-daemon[753]: [system] Activating via systemd: service name='org.freedesktop.home1' unit='dbus-o>
ott 18 16:04:32 MARKVII sudo[15506]: leonida12 : TTY=pts/0 ; PWD=/home/leonida12 ; USER=root ; COMMAND=/usr/bin/journalctl ->
lines 1-5/5 (END)I guess the vainfo output is correct, as the NVIDIA closed source driver doesn't support VA-API natively. However this driver supports VDPAU, NVDECODE and NVENCODE (the latter requires the nvidia_uvm module and an udev rule) and the vdpauinfo command should work correctly.
Then i tried both libva-vdpau-driver and libva-nvidia-driver traslation layers following the instruction provided for Firefox but it still use the iGPU. The vainfo with libva-nvidia-driver is correctly showed, instead with libva-vdpau-driver vainfo gives a floating point error.
Thanks in advance.
Last edited by Leonida12 (2022-10-18 14:15:22)
Offline
Then i set those two global variable
Don't. It collides w/
i run my wanted-gpu application with prime-run as prefix
prime-run is a bash script that sets some environment variables.
Try
LIBVA_DRIVER_NAME=nvidia VDPAU_DRIVER=nvidia DRI_PRIME=1 __NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=NVIDIA_only __GLX_VENDOR_LIBRARY_NAME=nvidia vainfo
LIBVA_DRIVER_NAME=nvidia VDPAU_DRIVER=nvidia DRI_PRIME=1 __NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=NVIDIA_only __GLX_VENDOR_LIBRARY_NAME=nvidia vdpauinfoOffline
I removed the global variables and I've rebooted but i got the same errors:
LIBVA_DRIVER_NAME=nvidia VDPAU_DRIVER=nvidia DRI_PRIME=1 __NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=NVIDIA_only __GLX_VENDOR_LIBRARY_NAME=nvidia vainfo
vaInitialize failed with error code -1 (unknown libva error),exitLIBVA_DRIVER_NAME=nvidia VDPAU_DRIVER=nvidia DRI_PRIME=1 __NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=NVIDIA_only __GLX_VENDOR_LIBRARY_NAME=nvidia vdpauinfo
display: :0 screen: 0
Error creating VDPAU device: 1I've also checked that bot the variables are empty.
Also i know that prime-run is a script that sets some variables, but it should not set LIBVA_DRIVER_NAME and VDPAU_DRIVER right?
Last edited by Leonida12 (2022-10-19 12:12:10)
Offline
It doesn't.
Please post your xorg log, https://wiki.archlinux.org/title/Xorg#General and the output of "prime-run glxinfo -B"
Do you https://wiki.archlinux.org/title/NVIDIA … de_setting ?
Offline
Xorg.0.log: https://pastebin.com/raw/1kP8PWRJ
Xorg.1.log: https://pastebin.com/raw/JdExm0B2
prime-run glxinfo -B: https://pastebin.com/raw/Fnse53ER
Of course I set the drm kernel parameter:
cat /proc/cmdline
rw quiet bgrt_disable cryptdevice=UUID=eb86bdea-161b-4388-ba2a-f5efc4a85963:cryptlvm root=/dev/MyVolGroup/root nvidia_drm.modeset=1I've to precise that I've no libva translation layer installed at the moment.
PS: I don't know why I have two Xorg log, I've only the laptop monitor xD.
Offline
export VDPAU_TRACE=2
export VDPAU_NVIDIA_DEBUG=3
export VDPAU_TRACE_FILE=vdpau.log
export VDPAU_DRIVER=nvidia
export DRI_PRIME=1
prime-run vdpauinfoand check the vdpau.log
Offline
vdpauinfo
display: :0 screen: 0
Error creating VDPAU device: 1cat vdpau.log
VDPAU capture: Enabled
vdp_imp_device_create_x11(0x565332789f40, 0, -, -)
-> 1Offline
Does it worl if you ring the X11 server on the nvidia GPU?
Edit: https://wiki.archlinux.org/title/NVIDIA … phics_only
Last edited by seth (2022-10-19 16:11:46)
Offline
I'll try the NVIDIA Graphics only configuration. However it's not well suitable for a laptop... is it not better to try to enable the CUDA NVDECODE based backend for VA-API with the libva-nvidia-driver?
Offline
If you're running the browser on the nvidia chip anyway, how much time would the GPU actually be powered down?
The most battery conserving way would likely be to deactivate the IGP in the BIOS (if possible)
afaiu vaapi didn't work either?
Offline
Well i would run the browser with the dGPU only when I've to watch series or films.
With NVIDIA Graphics only:
vainfo: https://pastebin.com/raw/DtnzAtvD
vdpauinfo: https://pastebin.com/raw/M8KbsgwK
However, my temps are noticeably higher, and I can't run the laptop in this mode all day. Moreover, I checked that I can't disable the iGPU in the BIOS so i I'll be back to PRIME Offloading.
Offline
Are you sure the IGP is used at all when "watch series or films" and you're not decoding in software?
eg. if the video is AV1, because that's not supported by the nvidia decoder, maybe post vainfo and vdpauinfo for the IGP and nb. that just because HW acceleration works, that doesn't mean at all that your browser is using it.
Try to play a video w/ mpv and see what impact that has in comparism.
Offline
Few days ago I succesfully enabled VA-API for iGPU and I checked that It works in video larger than 720p with both intel_gpu_top and developer tools. Then i disabled It because the iGPU just can't hold high quality videos (the videos play well but with frequent stutters).
I'll try to do some checks with mpv.
Offline
After some tests i can confirm that the NVIDIA vdpau library works with both mpv and vlc (prepending prime-run). However i still can't get it to work with Firefox. I tried all the translations layers but none of those work with Firefox. I don't know if they work with Chromium but I'm using Firefox also on mobile so I stay with this.
I just configured VA-API for iGPU and so Firefox, and VDPAU/NVDEC with dGPU for all the rest of applications.
I don't know if I should consider this post solved...
Offline