Closed ZhangTianrong closed 1 year ago
That's a difficult one to suggest a fix for. The issue seems to be more related to Firefox than the driver. You might try running MOZ_LOG="PlatformDecoderModule:5 Dmabuf:5" firefox
(without any instances of Firefox running) and see what it outputs.
That's a difficult one to suggest a fix for. The issue seems to be more related to Firefox than the driver. You might try running
MOZ_LOG="PlatformDecoderModule:5 Dmabuf:5" firefox
(without any instances of Firefox running) and see what it outputs.
Thanks for the reply. I ran NVD_LOG=1 NVD_BACKEND=direct MOZ_LOG="PlatformDecoderModule:5 Dmabuf:5" firefox > firefox.log 2>&1
, went to YouTube and played a video for a few seconds. The log file is here for Firefox installed with snap and here for Firefox installed with deb. I am not sure if this would be helpful, but here is the content of the about:support
page in Firefox.
I have a similar issue, and following Fedora Wiki checked about:support
. Some things stand out:
Reading the issue, it seems that there's a bug in nVidia drivers, and it will be fixed in next release.
I just removed everything (including configs, addons, etc.) and then reinstalled Firefox today using apt. I did no other changes, but somehow it manages to get away with the [GFX1-]: glxtest: VA-API test failed: failed to initialise VAAPI connection.
error now. (There have been a few reboots since I saw thar error and posted this issue.)
Instead I see Firefox having trouble locating the correct device and falls back to software decoding as is shown below:
[Child 14034: RemVidChild]: D/PlatformDecoderModule RemoteMediaDataDecoder[7f6316ba2c10] ::RemoteMediaDataDecoder: 7f6316ba2c10 is created
[RDD 14140: MediaPDecoder #1]: D/PlatformDecoderModule FFVPX: Initialising VA-API FFmpeg decoder
[RDD 14140: MediaPDecoder #1]: D/PlatformDecoderModule FFVPX: codec vp9 : Google VP9
[RDD 14140: MediaPDecoder #1]: D/Dmabuf DMABufDevice::Configure()
[RDD 14140: MediaPDecoder #1]: D/Dmabuf Loading DMABuf system library libgbm.so.1 ...
[RDD 14140: MediaPDecoder #1]: D/Dmabuf We're missing DRM render device!
[RDD 14140: MediaPDecoder #1]: D/PlatformDecoderModule FFVPX: Can't get DRM VA-API display.
[RDD 14140: MediaPDecoder #1]: D/PlatformDecoderModule FFVPX: Failed to create VA-API device context
[RDD 14140: MediaPDecoder #1]: D/PlatformDecoderModule FFVPX: Initialising FFmpeg decoder
[RDD 14140: MediaPDecoder #1]: D/PlatformDecoderModule FFVPX: codec vp9 : Google VP9
[RDD 14140: MediaPDecoder #1]: D/PlatformDecoderModule FFVPX: Set get_buffer2 for customized buffer allocation
[RDD 14140: MediaPDecoder #1]: D/PlatformDecoderModule FFVPX: FFmpeg decoder init successful.
So I just manually specifies the device to use by setting MOZ_DRM_DEVICE=/dev/dri/renderD128
. Now things are working just fine and in nvidia-smi
, it shows
Sat Aug 26 18:31:24 2023
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 535.86.10 Driver Version: 535.86.10 CUDA Version: 12.2 |
|-----------------------------------------+----------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+======================+======================|
| 0 NVIDIA GeForce RTX 2080 Ti On | 00000000:00:05.0 On | N/A |
| 35% 42C P2 83W / 260W | 1549MiB / 22528MiB | 37% Default |
| | | N/A |
+-----------------------------------------+----------------------+----------------------+
+---------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=======================================================================================|
| 0 N/A N/A 1212 G /usr/lib/xorg/Xorg 237MiB |
| 0 N/A N/A 1366 C+G ...libexec/gnome-remote-desktop-daemon 604MiB |
| 0 N/A N/A 1404 G /usr/bin/gnome-shell 160MiB |
| 0 N/A N/A 2359 G /usr/lib/firefox/firefox 187MiB |
| 0 N/A N/A 2711 C+G /usr/lib/firefox/firefox 352MiB |
+---------------------------------------------------------------------------------------+
Eventually, I set the following environment variables
#/etc/environment
PATH="/usr/local/cuda-12.2/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin"
LD_LIBRARY_PATH="/usr/local/lib"
MOZ_DISABLE_RDD_SANDBOX="1"
LIBVA_DRIVER_NAME="nvidia"
NVD_BACKEND="direct"
MOZ_DRM_DEVICE="/dev/dri/renderD128"
I have read a few issues regarding this and tried almost every solution mentioned but am still stuck with this error.
As to the environment variables, I have
The output of
vainfo
:The
ffmpeg
being used isThe driver version is
nvidia-smi
output with Firefox running:About the kernel parameter: