Open Bug 1966290 Opened 3 months ago Updated 2 days ago

Firefox over Snap does not support hardware decoding for various codecs.

Categories

(Firefox Build System :: Third Party Packaging, defect)

Firefox 138
defect

Tracking

(Not tracked)

People

(Reporter: miqote.petter, Assigned: gerard-majax)

References

(Blocks 2 open bugs)

Details

Attachments

(1 file)

Attached image firefox.png โ€”

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

Steps to reproduce:

Checked About:Settings, scrolled down to codecs.

Actual results:

Firefox over Snap does not appear to have Hardware Decoding available, listed as Unsupported.

Expected results:

Firefox should have Hardware support under Snap. I became aware of this issue through this reddit post; I am not the poster of this post, but submitting the bug report so somebody does have it reported.

https://old.reddit.com/r/Ubuntu/comments/1klv7w7/firefox_snap_hardware_decoding/

My system info, unrelated to the reddit post, is:

OS: Ubuntu 24.10 oracular
Kernel: x86_64 Linux 6.11.0-1013-lowlatency
Shell: bash 5.2.32
DE: KDE
CPU: AMD Ryzen 7 5700X3D 8-Core @ 16x 4.149GHz
GPU: AMD Radeon RX 6900 XT (radeonsi, navi21, LLVM 19.1.1, DRM 3.59, 6.11.0-1013-lowlatency)

The Bugbug bot thinks this bug should belong to the 'Firefox Build System::Third Party Packaging' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Third Party Packaging
Product: Firefox → Firefox Build System

Firefox snap package has no hardware decoding on AMD GPUs.

Name Firefox
Version 138.0.3
Build ID 20250512223554
Distribution ID canonical-002

OSs: Ubuntu 24.04, Kubuntu 24.04, and Ubuntu 25.04.
Kernels: 6.11.0-25-generic (on 24.04 Ubuntu and Kubuntu) and 6.14.0-15-generic (on 25.04 Ubuntu)
Shells: bash 5.2.21 and bash 5.2.37
DE: KDE & Gnome
Compositor: X11 on Kubuntu & Wayland on Ubuntu

Systems:
Kubuntu 24.04: Threadripper 2950X & RX Vega 64 8GB (Mesa 24.2.8)
Ubuntu 24.04: Ryzen 5 2500U & RX Vega 8 iGPU (Mesa 24.2.8)
Ubuntu 25.04: Ryzen 5700X3D & RX 9070 XT (Mesa 25.0.3)

On all AMD GPU and iGPU systems the Firefox snap has no hardware video decoding as shown on about:support as reproduced below:

Codec Name Software Decoding Hardware Decoding
H264 Supported Unsupported
VP9 Supported Unsupported
VP8 Supported Unsupported
AV1 Supported Unsupported
HEVC Supported Unsupported

This has been compared with an Intel system as below:

Ubuntu 24.04 with i5 7200U & Intelยฎ HD Graphics 620 running
Kernels: 6.11.0-25-generic
Shells: bash 5.2.21
DE: Gnome
Compositor: Wayland

On that system hardware decoding shows as below in about:support.

Codec Name Software Decoding Hardware Decoding
H264 Supported Supported
VP9 Supported Supported
VP8 Supported Supported
AV1 Supported Unsupported
HEVC Supported Supported

Unsure if this bug is down to Mozilla or Canonical to fix as it relates only to snap package Firefox. The .deb and flatpak both work as intended with hardware decoding enabled.

The severity field is not set for this bug.
:gerard-majax, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(lissyx+mozillians)

Pretty sure you are just hitting core22 limitations here? The fact that it works with deb/tar on 24.04 makes it likely.

Try $ sudo snap refresh --amend --channel=latest/candidate/core24 firefox so it installs the core24 version

Blocks: snap
Flags: needinfo?(miqote.petter)
Flags: needinfo?(lissyx+mozillians)
Flags: needinfo?(francoperlak)

(at least locally i do reproduce with core22 and it works with core24)

You can verify with:

$ snap connections firefox|grep gnome
content[gnome-46-2404]  firefox:gnome-46-2404            gnome-46-2404:gnome-46-2404     -

(In reply to :gerard-majax from comment #4)

Pretty sure you are just hitting core22 limitations here? The fact that it works with deb/tar on 24.04 makes it likely.

Try $ sudo snap refresh --amend --branch=latest/candidate/core24 firefox so it installs the core24 version

I tried this and just get an "error: unknown flag `branch'" returned.

Also in reply to your other comment:

$ snap connections firefox|grep gnome
content[gnome-42-2204] firefox:gnome-42-2204 gnome-42-2204:gnome-42-2204 -

Definitely isn't using 2404, but I can't seem to get it to do so.

Also updated Firefox to 139.0.1 and the problem persists. It is likely a Snap problem rather that Firefox directly.

Flags: needinfo?(francoperlak)

sorry it's --channel=

Flags: needinfo?(francoperlak)

(In reply to :gerard-majax from comment #8)

sorry it's --channel=

That did it and it now has hardware video decoding support.

$ sudo snap refresh --amend --channel=latest/candidate/core24 firefox[sudo] password for tyr: 
firefox (candidate/core24) 139.0-2 from Mozillaโœ“ refreshed
$ snap connections firefox|grep gnome
content[gnome-46-2404]  firefox:gnome-46-2404            gnome-46-2404:gnome-46-2404     -

It did roll back to a version 139 with no updates available to 139.0.1 yet though.

Flags: needinfo?(francoperlak)

(In reply to Daniel Perlak from comment #9)

(In reply to :gerard-majax from comment #8)

sorry it's --channel=

That did it and it now has hardware video decoding support.

$ sudo snap refresh --amend --channel=latest/candidate/core24 firefox[sudo] password for tyr: 
firefox (candidate/core24) 139.0-2 from Mozillaโœ“ refreshed
$ snap connections firefox|grep gnome
content[gnome-46-2404]  firefox:gnome-46-2404            gnome-46-2404:gnome-46-2404     -

It did roll back to a version 139 with no updates available to 139.0.1 yet though.

139.0.1 should make it soon, but thanks for confirming

Redirect a needinfo that is pending on an inactive user to the triage owner.
:gerard-majax, since the bug has recent activity, could you please find another way to get the information or close the bug as INCOMPLETE if it is not actionable?

For more information, please visit BugBot documentation.

Flags: needinfo?(miqote.petter) → needinfo?(lissyx+mozillians)

We're still dependant on Canonical to move to core24 by default here.

Assignee: nobody → lissyx+mozillians
Severity: -- → S3
Flags: needinfo?(lissyx+mozillians)
Duplicate of this bug: 1974579
Status: UNCONFIRMED → NEW
Ever confirmed: true

Just want to confirm that the linked bug is still fixable with the same solution as identified further up.

This big keeps reappearing because Canonical are reverting to Core 22 on updates from the App Centre. The fix may need to be applied after each update to the Firefox Snap. I can confirm the fix works with Firefox 140.

I question this bug's severity. The bug affects the distribution's pre-installed browser when using the recommended driver for arguably the most common graphics card vendor. The effect is really bad browser performance which could turn off newcomers. I think the bug should be S2 and the workaround is out of question for non-heavy users (I am still glad it exists).

(In reply to maik.himstedt from comment #15)

I question this bug's severity. The bug affects the distribution's pre-installed browser when using the recommended driver for arguably the most common graphics card vendor. The effect is really bad browser performance which could turn off newcomers. I think the bug should be S2 and the workaround is out of question for non-heavy users (I am still glad it exists).

This is unfortunately out of my hands. The decision lies on Canonical and was blocked due to a very severe bug on snapd side.

Flags: needinfo?(nathan.teodosio)

(In reply to maik.himstedt from comment #15)

I question this bug's severity. The bug affects the distribution's pre-installed browser when using the recommended driver for arguably the most common graphics card vendor. The effect is really bad browser performance which could turn off newcomers. I think the bug should be S2 and the workaround is out of question for non-heavy users (I am still glad it exists).

On top of the performance issues, it also affects battery life of laptops significantly.

(In reply to :gerard-majax from comment #16)

(In reply to maik.himstedt from comment #15)

I question this bug's severity. The bug affects the distribution's pre-installed browser when using the recommended driver for arguably the most common graphics card vendor. The effect is really bad browser performance which could turn off newcomers. I think the bug should be S2 and the workaround is out of question for non-heavy users (I am still glad it exists).

Not only the performance hit, but also battery life of laptops would be significantly affected. It is a bad out of the box experience and not something a novice user would even realise.

This is unfortunately out of my hands. The decision lies on Canonical and was blocked due to a very severe bug on snapd side.

Yeah, Canonical and the Snap package maintenance are the main issue.

(In reply to Daniel Perlak from comment #17)

(In reply to maik.himstedt from comment #15)

I question this bug's severity. The bug affects the distribution's pre-installed browser when using the recommended driver for arguably the most common graphics card vendor. The effect is really bad browser performance which could turn off newcomers. I think the bug should be S2 and the workaround is out of question for non-heavy users (I am still glad it exists).

On top of the performance issues, it also affects battery life of laptops significantly.

(In reply to :gerard-majax from comment #16)

(In reply to maik.himstedt from comment #15)

I question this bug's severity. The bug affects the distribution's pre-installed browser when using the recommended driver for arguably the most common graphics card vendor. The effect is really bad browser performance which could turn off newcomers. I think the bug should be S2 and the workaround is out of question for non-heavy users (I am still glad it exists).

Not only the performance hit, but also battery life of laptops would be significantly affected. It is a bad out of the box experience and not something a novice user would even realise.

This is unfortunately out of my hands. The decision lies on Canonical and was blocked due to a very severe bug on snapd side.

Yeah, Canonical and the Snap package maintenance are the main issue.

All of those points are true, but there's a real nasty hard-to-fix issue on snapd that has been the root cause of why core24 has not been made default. I have lost the issue related to that, but Nathan can share it, as much as I remember a part of the issue has been fixed but not everything.

So let's be respectful.

Indeed, that is https://launchpad.net/bugs/2043993. Snapd team told me they might be able to fix it August, but that it is technically challenging.

Flags: needinfo?(nathan.teodosio)

(In reply to :gerard-majax from comment #18)

All of those points are true, but there's a real nasty hard-to-fix issue on snapd that has been the root cause of why core24 has not been made default. I have lost the issue related to that, but Nathan can share it, as much as I remember a part of the issue has been fixed but not everything.

So let's be respectful.

Oh, no disrespect intended. Just that they are the principal maintainers of the relevant packages. As such a lot of the responsibility around this falls to them fixing their bugs first rather than this being the responsibility of Mozilla and their contributors.

(In reply to Nathan Teodosio :nteodosio from comment #19)

Indeed, that is https://launchpad.net/bugs/2043993. Snapd team told me they might be able to fix it August, but that it is technically challenging.

Yes, the sooner Core 24 is working as intended and the default then that should prevent this bug reappearing.

(In reply to :gerard-majax from comment #8)

sorry it's --channel=

Indeed fixed same issue for me. Anybody here know why exactly core22 is worse at utilizing GPU for such tasks?

(In reply to general2.w5r0e from comment #21)

(In reply to :gerard-majax from comment #8)

sorry it's --channel=

Indeed fixed same issue for me. Anybody here know why exactly core22 is worse at utilizing GPU for such tasks?

Because it bundles/depends on graphics stacks from Ubuntu 22.04 vs Ubuntu 24.04 for core24, so older.

(In reply to :gerard-majax from comment #22)

(In reply to general2.w5r0e from comment #21)

(In reply to :gerard-majax from comment #8)

sorry it's --channel=

Indeed fixed same issue for me. Anybody here know why exactly core22 is worse at utilizing GPU for such tasks?

Because it bundles/depends on graphics stacks from Ubuntu 22.04 vs Ubuntu 24.04 for core24, so older.

The thing is Core22 is still being used for Firefox on Ubuntu 24.04 and 25.04 derived distributions. As such the bug will remain persistent and reappearing on AMD GPU systems.

If or not snap core 24 is enabled for Firefox, so it dont make hardware acceleration for Firefox on Nvidia.
In both cases, Core 24 only solves web rendering acceleration.
All hw codecs is saying unsupported with snap.
vs
Vainfo reporting hw acceleration for codecs is succesfull.
Same (reporting hw accel. enabled but not using gpu for video decoding) for snap Chromium.

For DEB version FF this not happened. All working good.
For most other linux distributions, since they don't have a default firefox as snap, video decoding acceleration also works.

To make things even more confusing, nvidia-vaapi version 0.0.14 fixes the feature with driver version 575. Supposedly.

VA-API is a different problem: bug 1949040

Did the latest/candidate/core24 channel revert to core22?

$ snap info firefox
name:      firefox
summary:   Mozilla Firefox web browser
publisher: Mozillaโœ“
store-url: https://snapcraft.io/firefox
contact:   https://support.mozilla.org/kb/file-bug-report-or-feature-request-mozilla
license:   unset
description: |
  Firefox is a powerful, extensible web browser with support for modern web application
  technologies.
commands:
  - firefox
  - firefox.geckodriver
snap-id:      3wdHCAVyZEmYsCMFDE9qt92UV8rC8Wdk
tracking:     latest/candidate/core24
refresh-date: yesterday at 21:04 EDT
channels:
  latest/stable:    141.0.3-1     2025-08-09 (6638) 257MB -
  latest/candidate: 142.0b9-1     2025-08-13 (6664) 258MB -
  latest/beta:      142.0b9-1     2025-08-08 (6645) 258MB -
  latest/edge:      143.0a1       2025-08-14 (6666) 294MB -
  esr/stable:       128.13.0esr-1 2025-07-22 (6551) 284MB -
  esr/candidate:    128.13.0esr-1 2025-07-16 (6551) 284MB -
  esr/beta:         โ†‘                                     
  esr/edge:         โ†‘                                     
installed:          142.0b9-1                (6664) 258MB -
$ snap connections firefox|grep gnome
content[gnome-42-2204]  firefox:gnome-42-2204            gnome-42-2204:gnome-42-2204     -
Flags: needinfo?(nathan.teodosio)

It did. Sorry, the branches expire every 30 days without warning. I've added Firefox snap to my warning bot so that it doesn't happen again, and re-released the 141 build to candidate/core24. 142 should make it to candidate/core24 soon.

Flags: needinfo?(nathan.teodosio)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: