I’m not very experienced with Linux.
I really need hardware accelerated video in a browser, at least YouTube.
What do I have:
- Manjaro 21.3
- KDE Plasma 5.24.5
- X11
- Firefox 102.0.1 (64-bit)
- NVIDIA GeForce GTX 1060 6GB
- No integrated video card
- Nvidia Driver Version: 515.57
According to the article “wiki(dot)archlinux(dot)org/title/Firefox#Hardware_video_acceleration” , the only way to get it work with NVIDIA’s proprietary driver is using “nvidia-vaapi-driver”.
So I installed it from AUR ( libva-nvidia-driver v0.0.6-1 ).
“vainfo” shows this:
vainfo: VA-API version: 1.14 (libva 2.14.0)
vainfo: Driver version: VA-API NVDEC driver
vainfo: Supported profile and entrypoints
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileVC1Simple : VAEntrypointVLD
VAProfileVC1Main : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD
<unknown profile> : VAEntrypointVLD
VAProfileH264Main : VAEntrypointVLD
VAProfileH264High : VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileHEVCMain : VAEntrypointVLD
VAProfileVP9Profile0 : VAEntrypointVLD
Everything seems to be ok. ( ? )
Then I did everything that is said in the readme:
This library requires that the
nvidia_drm
kernel module is configured with the parameternvidia-drm.modeset=1
I’m not quite sure how to do it correctly, but after some googling, I did this:
in file
/etc/default/grub
set
GRUB_CMDLINE_LINUX_DEFAULT=“nvidia-drm.modeset=1”
then ran command
sudo update-grub
Then I set these settings in Firefox:
media.ffmpeg.vaapi.enabled = true
media.rdd-ffmpeg.enabled = true
media.av1.enabled = false
gfx.x11-egl.force-enabled = true
widget.dmabuf.force-enabled = true
Saved it, closed Firefox, then launched it with command:
MOZ_DISABLE_RDD_SANDBOX=1 LIBVA_DRIVER_NAME=nvidia firefox
Firefox info (about:support):
Graphics info in Firefox
Compositing WebRender
GPU #1
Active Yes
Description NVIDIA GeForce GTX 1060 6GB/PCIe/SSE2
Vendor ID 0x10de
Device ID 0x1c03
Driver Vendor nvidia/unknown
Driver Version 515.57.0.0
RAM 0
Then open any YouTube video and get >40% CPU usage (> 100% on 4k videos), and 0% “Video Engine Utilization” in NVIDIA Settings info
It feels like I’m the only one with this problem. I’m doing something wrong, but I can’t figure out what I’m doing wrong.
I would be grateful for any help.