Closed Bug 1766517 Opened 2 years ago Closed 2 years ago

Firefox snap on Ubuntu 22.04 unable to use hardware acceleration decoding for videos

Categories

(Core :: Widget: Gtk, defect)

Firefox 100
defect

Tracking

()

RESOLVED DUPLICATE of bug 1751363

People

(Reporter: umayr23, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:100.0) Gecko/20100101 Firefox/100.0

Steps to reproduce:

Use Firefox snap installed by default on Ubuntu 22.04. Set media.ffmpeg.vaapi.enabled to true. Try playing a Youtube video.

Actual results:

Observed CPU is being leveraged for decoding and not the GPU. Can confirm this by running sudo intel_gpu_top and the Video 'engine' not showing any activity as well as high CPU usage by Firefox.

Expected results:

Hardware acceleration should work resulting in lower CPU usage and subsequently lower power consumption. On Ubuntu 21.10 I recall hardware acceleration working as expected.

It may be caused by Bug 1751363 - you need to set MOZ_DISABLE_RDD_SANDBOX=1 env variable to bypass RDD sanbdox.
So please run with

MOZ_LOG="PlatformDecoderModule:5" MOZ_DISABLE_RDD_SANDBOX=1

env variabled ans attach the log here.
Thanks.

Flags: needinfo?(umayr23)

Just tested locally and I can confirm that when disabling the RDD sandbox the firefox snap is able to use the GPU to decode youtube videos.

No longer blocks: egl-linux-vaapi, snap
Status: UNCONFIRMED → RESOLVED
Closed: 2 years ago
Flags: needinfo?(umayr23)
Resolution: --- → DUPLICATE

Yep similarly disabling the RDD sandbox I get hardware acceleration on certain videos. I don't get acceleration on VP9 and AVI encoded videos but I suspect my iGPU doesn't support it?

CPU: Intel® Core™ i5-5257U CPU
GPU: Mesa Intel® Iris(R) Graphics 6100 (BDW GT3)

[RDD 82084: MediaPDecoder #1]: D/PlatformDecoderModule FFVPX:   FFmpeg decoder init successful.
[Child 81971: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 81971: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 81971: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 81971: MediaPDecoder #1]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[RDD 82084: MediaSupervisor #1]: D/PlatformDecoderModule FFVPX: FFmpegVideoDecoder::FFmpegVideoDecoder MIME video/av1 Codec ID 226
[RDD 82084: MediaPDecoder #1]: D/PlatformDecoderModule FFVPX: Initialising VA-API FFmpeg decoder
[RDD 82084: MediaPDecoder #1]: D/PlatformDecoderModule FFVPX:   Format av1 is not accelerated
[RDD 82084: MediaPDecoder #1]: D/PlatformDecoderModule FFVPX: Initialising FFmpeg decoder
[RDD 82084: MediaPDecoder #1]: D/PlatformDecoderModule FFVPX:   codec libdav1d : dav1d AV1 decoder by VideoLAN
[RDD 82084: MediaPDecoder #1]: D/PlatformDecoderModule FFVPX: Set get_buffer2 for customized buffer allocation
[libdav1d @ 0x7fcd73c64b00] Requested frame threading with a custom get_buffer2() implementation which is not marked as thread safe. This is not supported anymore, make your callback thread-safe.
[libdav1d @ 0x7fcd73c64b00] libdav1d 0.9.2-170-g28a9c46
[libdav1d @ 0x7fcd73c64b00] Using 3 threads, 3 max_frame_delay
[RDD 82084: MediaPDecoder #1]: D/PlatformDecoderModule FFVPX:   FFmpeg decoder init successful.
[Child 81971: Main Thread]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[Child 81971: MediaPDecoder #2]: D/PlatformDecoderModule Sandbox RDD decoder supports requested type
[RDD 82084: MediaSupervisor #1]: D/PlatformDecoderModule FFVPX: FFmpegVideoDecoder::FFmpegVideoDecoder MIME video/vp9 Codec ID 167
[RDD 82084: MediaPDecoder #1]: D/PlatformDecoderModule FFVPX: Initialising VA-API FFmpeg decoder
[RDD 82084: MediaPDecoder #1]: D/PlatformDecoderModule FFVPX:   Format vp9 is not accelerated
[RDD 82084: MediaPDecoder #1]: D/PlatformDecoderModule FFVPX: Initialising FFmpeg decoder
[RDD 82084: MediaPDecoder #1]: D/PlatformDecoderModule FFVPX:   codec vp9 : Google VP9
[RDD 82084: MediaPDecoder #1]: D/PlatformDecoderModule FFVPX: Set get_buffer2 for customized buffer allocation
[vp9 @ 0x7fcd73c64b00] Requested frame threading with a custom get_buffer2() implementation which is not marked as thread safe. This is not supported anymore, make your callback thread-safe.

(In reply to Umayr Saghir from comment #4)

but I suspect my iGPU doesn't support it?

GPU: Mesa Intel® Iris(R) Graphics 6100 (BDW GT3)

I have the same GPU/APU: It only supports H264 and VP8. No AV1, VP9, H265.

(In reply to Darkspirit from comment #5)

(In reply to Umayr Saghir from comment #4)

but I suspect my iGPU doesn't support it?

GPU: Mesa Intel® Iris(R) Graphics 6100 (BDW GT3)

I have the same GPU/APU: It only supports H264 and VP8. No AV1, VP9, H265.

Thanks for confirming

You need to log in before you can comment on or make changes to this bug.