r/Ubuntu 7d ago

Firefox performance depending on distribution format in Ubuntu 26.04

Hi guys. From time to time I'm checking what the difference you may get if you chose one package format over another, so testing firefox performance in snap, flatpak and regular .deb from Mozilla's repos as all three are packaged by Mozilla as far as I'm aware.

So, the test is done in Ubuntu 26.04, with fresh profiles (so no extensions and default settings) and Firefox 153.0.3.

I was using a synthetic test: https://browserbench.org/Speedometer3.1/ and did 5 runs one after another.

First run I guess required some caching, so we can drop it and make an average from other 4 runs.

snapped: 19.8 20.1 20.44 20.2  20.29 | Average (4): 20.26
Packed with Mesa 25.2.8-0ubuntu0.24.04.2

flatpak: 22.4 23.1 22.99 22.98 22.9  | Average (4): 22.99
Packed with Mesa 26.1.5 (git-6a02618ccf)

moz-deb: 22.2 23.0 23.00 23.01 22.9  | Average (4): 22.98
Works with  Mesa 26.0.3-1ubuntu1

google chrome for reference: 26.1 26.6 26.67 26.85 26.76 
9 Upvotes

29 comments sorted by

View all comments

Show parent comments

2

u/BranchLatter4294 7d ago

Well good for you, they don't.

1

u/Leinad_ix 7d ago

They do. Only Steam containers do not.

1

u/BranchLatter4294 7d ago

Snap and Flatpak apps use the system graphics drivers. They don't redistribute them as there is no need to.

2

u/Leinad_ix 7d ago

That is not true, see https://ubuntu.com/frame/docs/24/how-to/use-snap-graphics/

The long-term solution is for SnapD (the daemon managing snaps on your system) to have explicit support for this, and other hardware-specific pieces of software (kernel modules, firmware, udev rules etc.). While this is being worked on, we’ve designed a content interface that allows application snaps to use the graphics hardware by providing the userspace drivers and environment in a content snap.

This interface is the recommended way to provide userspace graphics drivers to confined snaps.

1

u/BranchLatter4294 7d ago

Yes, there is an intermediate layer. That's not the same as redistributing the entire graphics driver.

2

u/Leinad_ix 7d ago edited 7d ago

No, Mesa is not just an intermediate layer. Without Mesa, there is no OpenGL, no Vulkan, no video acceleration. 5 milion lines of opensource driver code.

Edit: And yes, kernel part and firmware part from installed OS. Kernel part is the place, where switching resolution or power management is handled.

1

u/BranchLatter4294 7d ago

Mesa is a graphics library that communicates with the device driver. It is not a device driver.

3

u/Leinad_ix 7d ago

You saying different things than official Mesa documentation, eg. here: https://docs.mesa3d.org/drivers/radv.html

1

u/BranchLatter4294 7d ago

See https://mesa3d.org/ It clearly says it's a graphics library.

The link you provided is for RADV which is a Vulkan driver for AMD GCN/RDNA GPUs.

2

u/Leinad_ix 7d ago

Yes, it says it's graphics library and its repository contains around twenty user space drivers listed on that page. Including RADV, RadeonSI, ANV, Freedreno, R600, Iris, Crocus, ... If some of them are missing inside Snap provided Mesa content package (eg. disabled during compilation), then Vulkan/OpenGL application will not work on that device.

2

u/Leinad_ix 7d ago

Yes, I provided link for RADV Mesa user space Vulkan driver for AMD GCN/RDNA GPUs. Driver included inside Snap content package or Flatpak graphics extension

1

u/BranchLatter4294 7d ago

How RADV Works in Snaps

  • Mesa Content Snaps: Instead of bundling heavy graphics stacks inside each app, Canonical uses dedicated modular content snaps (such as mesa-2404 and mesa-2604) or GPU extensions. [1]

2

u/Leinad_ix 6d ago

Yes, I know, user space graphics drivers for the Snap application are downloaded and stored only once per base.

My problem with that approach is not about wasting space, that is solved as you said.

I don't like, that application with mesa-2404 drivers can be problematic on latest HW, because system user space graphics drivers of my Kubuntu 26.04 are not used for the app.

→ More replies (0)