Trying to turn on GPU acceleration in Firefox 115 snap.
Ubuntu 22.04.2 LTS
NVIDIA Corporation GP106 [GeForce GTX 1060 6GB]
NVIDIA Driver Version: 535.54.03
layers.acceleration.force-enabled = true
layers.offmainthreadcomposition.enabled = true (this key was missing, created it)
I restarted Firefox, rebooted system.
To check if it works I started nvidia-smi dmon
, played youtube and local h264.mp4
with Firefox to see if there is anything other than 0 in dec
column of terminal output. When I play a video with VLC, it shows some % of decoding load with GPU, but Firefox refuse to use GPU. Any ideas how to fix it? Thank you!
UPDATE
Thanks to Raffa's answer, I've changed some other settings, here they are:
gfx.webrender.all false -> true
dom.webgpu.enabled false -> true
layers.gpu-process.enabled false -> true
layers.mlgpu.enabled add
media.gpu-process-decoder false -> true
media.ffmpeg.vaapi.enabled true (no change)
No success. Also tried the same tests with Chromium, no success.
In Firefox about:support
I have found a lot of failures, here are some of them:
WebGPU adapter by default "navigator.gpu.requestAdapter({})": { "not_supported": "WebGPU is not yet available in Release or Beta builds."
GPU_PROCESS Disabled by default = Enabled via layers.gpu-process.enabled = Blocked; error code FEATURE_FAILURE_DISABLED
WEBRENDER_COMPOSITOR Disabled by default = Cannot be enabled in release or beta = Blocked; error code FEATURE_FAILURE_DISABLE_RELEASE_OR_BETA
WEBGPU WebGPU cannot be enabled in release or beta = Blocked; error code WEBGPU_DISABLE_RELEASE_OR_BETA
HARDWARE_VIDEO_DECODING default = available ; user = force_enabled ; runtime = unavailable = Force disabled by gfxInfo = Blocked; error code FEATURE_FAILURE_VIDEO_DECODING_TEST_FAILED
Now i wonder, maybe i should try some alpha build?
UPDATE 2
So I have tried Firefox Nightly which is early alpha build. And yes, some failure strings from about:support
gone, for example this one:
WebGPU adapter by default "wgpuBackend": "Vulkan", "wgpuDevice": 7171, "wgpuDeviceType": "DiscreteGpu", "wgpuDriver": "NVIDIA", "wgpuDriverInfo": "535.54.03", "wgpuName": "NVIDIA GeForce GTX 1060 6GB", "wgpuVendor": 4318
But still HARDWARE_VIDEO_DECODING says Force disabled by gfxInfo ; FEATURE_FAILURE_VIDEO_DECODING_TEST_FAILED
After changing setting media.hardware-video-decoding.force-enabled = true
and restarting Firefox Nightly i see in terminal output [GFX1-]: vaapitest: ERROR [GFX1-]: vaapitest: VA-API test failed: failed to initialise VAAPI connection.
So far what I found is that VA-API can not work with proprietary Nvidia drivers that I need to encode video with GPU (NVENC). It seems I have to stop here, hope someone will find a solution.