This is an update on the troubleshooting progress, specifically
regarding hardware video acceleration (VA-API) and media player issues
on my system (Ubuntu 24.04, NVIDIA RTX 3060, Driver 550.120).

1. VA-API Initialization Failure:

Symptom: Attempts to initialize VA-API failed system-wide, confirmed by the 
vainfo command returning errors like libva error: vaGetDriverNames() failed 
with unknown libva error and vaInitialize failed with error code -1.
Action Taken:
Installed the required VA-API backend driver package: sudo apt install 
nvidia-vaapi-driver.
Set the environment variable LIBVA_DRIVER_NAME=nvidia system-wide (by adding it 
to /etc/environment and rebooting) because automatic detection was failing even 
with the driver installed.
Outcome: vainfo now runs successfully, confirms initialization of the "VA-API 
NVDEC driver", and lists supported hardware decoding profiles (H264, HEVC, VP9, 
AV1 etc.). VA-API appears functional system-wide when the driver name is 
explicitly provided via the environment variable.
2. mpv Playback Failure:

Symptom: After fixing vainfo, the mpv media player failed to play videos 
(showed a black screen) when attempting to use the default VA-API hardware 
decoding (hwdec=vaapi), despite vainfo reporting success. Verbose logs 
indicated mpv hung during VA-API surface initialization.
Action Taken: Configured mpv to use NVIDIA's native NVDEC interface instead of 
the VA-API bridge. This was done by adding the line hwdec=nvdec-copy to the 
~/.config/mpv/mpv.conf file.
Outcome: mpv now successfully plays videos using hardware acceleration via 
NVDEC, confirmed by checking playback statistics (Shift+i shows HW Dec: nvdec 
(nvdec-copy)).
Summary:

The issues preventing VA-API initialization and causing mpv playback
failures with hardware acceleration appear to be resolved through the
installation of the nvidia-vaapi-driver package combined with setting
the LIBVA_DRIVER_NAME=nvidia environment variable, and configuring mpv
to use nvdec-copy.

Note: I am still monitoring a separate issue where opening the Network
Manager applet causes temporary system lag, which might be related to
the rtl8821au WiFi driver.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2107235

Title:
  pc freeze for a seconds, vlc lag, terminal lag, chrome lag

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/2107235/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to