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 Desktop
Packages, which is subscribed to gnome-shell in Ubuntu.
https://bugs.launchpad.net/bugs/2107235

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

Status in gnome-shell package in Ubuntu:
  Incomplete

Bug description:
  Ubuntu 24.04.2 LTS. Gnome 46.0

  Issue Summary:
  This report outlines recurring performance problems encountered while using 
the Ubuntu operating system. The primary issue is frequent system freezes or 
lags, where the entire system becomes unresponsive for short periods.

  Detailed Description of the Problem:
  My Ubuntu system frequently experiences brief periods of unresponsiveness, 
manifesting as freezes or lags. These interruptions typically last between 1 to 
3 seconds, although occasionally they can extend for up to 10 seconds. During 
these moments, mouse movement may stutter or stop, keyboard input is ignored, 
and application interfaces become temporarily unresponsive.

  Conditions Under Which the Issue Occurs:
  These performance issues are most noticeable and consistently occur when I am 
performing the following tasks simultaneously:

  Running Google Chrome web browser.
  Watching videos using VLC media player.
  It is important to note that my usage of Google Chrome often involves running 
multiple profiles concurrently (typically 3 to 4 profiles).

  Comparative Experience:
  I have observed that running a similar workload on a Windows operating system 
does not produce the same lagging or freezing behavior. Even with 3-4 Chrome 
profiles open and a media player running, the Windows system maintains 
responsiveness without these noticeable pauses. This suggests the issue might 
be specific to the Ubuntu environment, its configuration, or its interaction 
with my hardware under this specific workload.

  Conclusion:
  The frequent freezing and lagging significantly impact the usability and 
productivity of my Ubuntu system, particularly when multitasking with Google 
Chrome (using multiple profiles) and VLC. This contrasts with the smoother 
performance experienced under similar conditions on Windows. Further 
investigation or troubleshooting may be required to identify the root cause and 
potential solutions.

  ProblemType: Bug
  DistroRelease: Ubuntu 24.04
  Package: gnome-shell 46.0-0ubuntu6~24.04.8
  ProcVersionSignature: Ubuntu 6.11.0-21.21~24.04.1-generic 6.11.11
  Uname: Linux 6.11.0-21-generic x86_64
  NonfreeKernelModules: nvidia_modeset nvidia
  ApportVersion: 2.28.1-0ubuntu3.5
  Architecture: amd64
  CasperMD5CheckResult: unknown
  CurrentDesktop: ubuntu:GNOME
  Date: Sat Apr 12 16:23:15 2025
  DisplayManager: gdm3
  ProcEnviron:
   LANG=en_US.UTF-8
   PATH=(custom, no user)
   SHELL=/bin/bash
   TERM=xterm-256color
   XDG_RUNTIME_DIR=<set>
  RelatedPackageVersions: mutter-common 46.2-1ubuntu0.24.04.7
  SourcePackage: gnome-shell
  UpgradeStatus: No upgrade log present (probably fresh install)

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


-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to