With Ubuntu Plucky, what does it take (if it’s even possible) to get hardware accelerated video playback in youtube and google meet with the browsers:
- google chrome upstream deb
- chromium snap
- firefox snap
On xorg, and wayland. Or is only one possible? I’m still hitting issues with wayland in plucky, but that’s a topic for another post.
Last time I had that working was in Oracular, and that was after a lot of messing around with packages and different combinations. And IIRC it only worked in chromium with a special release snap channel. Then never again.
I only know about Firefox (on Wayland):
Up until recently it required toggling the about:config
flag media.ffmpeg.vaapi.enabled
, at least on AMD while google tells me Intel was already enabled by default. Then Firefox 136 enabled it by default for AMD too.
However it is now failing for me with “Blocklisted; failure code FEATURE_FAILURE_VIDEO_DECODING_TEST_FAILED”; probably the libva version from the core22 snap is too old and this will resume working once we can finally transition to a core24 snap.
You can check your status in Firefox at about:support
and look for HARDWARE_VIDEO_DECODING
and Codec Support Information
.
Thanks for the wayland reminder, I edited my post.
So, plucky debs are ahead of the snap? Have you tried the firefox upstream binary tarball? Or does it also ship with its own copies of libva?
Which firefox debs?
Anyways I have just tried on a self-compiled Firefox Nightly and it works.
ogra
6
I vagueley remember hearing that the edge channel for firefox has the core24 build … perhaps try that ?
EDIT: also … @nteodosio … might be able to give hints
Be careful if you do that to not let it override your profile, because Firefox (and Thunderbird) do not support downgrading version later. Firefox has a profile manager for that. Although I guess snap revert
might also help to recover an older profile.
ogra
8
I fear snap revert
would only partially work since FF and TB both do not properly use the SNAP_USER_DATA dirs that are designed for this but both put their data into SNAP_USER_COMMON
1 Like
I meant plucky libva debs
Lots of good firefox suggestions, I’ll try it, but I can’t use firefox snap for all my tasks as it doesn’t work with the smart card my government issued (Comment #82 : Bug #1967632 : Bugs : firefox package : Ubuntu). I haven’t tried again, though, so maybt it’s time.
And what about chrome and chromium snap, any hints there? I would really love to be able to use only one browser.
ogra
11
Well, chrome is a deb … that will just use your OS libs I guess … (but indeed you need to seek support for any issues with it at google)
3v1n0
12
@nteodosio maybe we should consider doing a migration?
3v1n0
13
Check this Comment #95 : Bug #1967632 : Bugs : firefox package : Ubuntu as it may just work (and inside a container, at least) as it did for my girlfriend gov card too (sadly I couldn’t support it in OpenSC easily since they use some encryption to expose the certificates, and despite some time with Ghidra, it wasn’t clear how to find out the encryption key and algorithm they are using in the driver blob)…
ogra
14
Well, the problem is that you then double up data on disk (it will keep the old revision data around to roll back to), doing that for caches and all your mail is probably not a good idea …
A proper solution would be to split profile data from payload data but both apps are sadly not doing that OOTB … (you actually want your payload data to live in SNAP_USER_COMMON, but everything tied to a version of the app should be in SNAP_USER_DATA which is tied to the package revision)
3v1n0
15
Sure I was thinking that, but while I see the point for thunderbird, the firefox case may handled by just symlinking the caches paths (it implies a bit annoying to maintain startup script, though)?
1 Like
ogra
16
Yeah, that would work … but would need some clever design for a wrapper (best done by someone with deep insight into what is relevant and what isn’t I suspect) …
Check this Comment #95 : Bug #1967632 : Bugs : firefox package : Ubuntu as it may just work
I tried that in comment #80, but it didn’t work back then. That was before your comment, so maybe something changed later and now it works? I’ll try again.
3v1n0
18
On AMD here too, but runnig vainfo
in the snap seems to work fine:
❯ snap run --shell firefox
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.
marco@tricky:/home/marco$ vainfo
bash: vainfo: command not found
marco@tricky:/home/marco$ /run/user/1000/snap.firefox
bash: /run/user/1000/snap.firefox: Is a directory
marco@tricky:/home/marco$ /run/user/1000/snap.firefox/vainfo
libva info: VA-API version 1.20.0
libva info: Trying to open /snap/firefox/6259/gnome-platform/usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_14
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.20 (libva 2.12.0)
vainfo: Driver version: Mesa Gallium driver 23.2.1-1ubuntu3.1~22.04.3 for GFX1103_R1 (gfx1103_r1, LLVM 15.0.7, DRM 3.57, 6.8.0-60-generic)
vainfo: Supported profile and entrypoints
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointEncSlice
VAProfileH264High : VAEntrypointVLD
VAProfileH264High : VAEntrypointEncSlice
VAProfileHEVCMain : VAEntrypointVLD
VAProfileHEVCMain : VAEntrypointEncSlice
VAProfileHEVCMain10 : VAEntrypointVLD
VAProfileHEVCMain10 : VAEntrypointEncSlice
VAProfileJPEGBaseline : VAEntrypointVLD
VAProfileVP9Profile0 : VAEntrypointVLD
VAProfileVP9Profile2 : VAEntrypointVLD
VAProfileAV1Profile0 : VAEntrypointVLD
VAProfileAV1Profile0 : VAEntrypointEncSlice
VAProfileNone : VAEntrypointVideoProc
Although I get a different error: FEATURE_HARDWARE_VIDEO_DECODING_AMD_DISABLE
that is caused by something else though: https://searchfox.org/mozilla-release/source/widget/gtk/GfxInfo.cpp#1105-1112
So… Details at https://bugzilla.mozilla.org/show_bug.cgi?id=1837140
Thus ideally newer core should help
Yeah vainfo
from the Firefox snap works here too, and yet…
Weird how I don’t hit your FEATURE_HARDWARE_VIDEO_DECODING_AMD_DISABLE
error.
3v1n0
20
Ok, that’s because you likely don’t have enabled the media.hardware-video-decoding.force-enabled
key in about:config
EDIT: also using firefox edge (and so core24), enables it so it’s definitely just a driver versioning issue at this point