Known issues with Firefox Snap?

this was announced (missing support for electronic IDs due to missing “native messaging” support) in the release notes and will be fixed soon … there was just a status report about it yesterday, see the “Native Messaging” paragraph at:

3 Likes

What would be an appropriate way to measure startup performance on Kubuntu or anywhere else where the Application Startup Time Measure extension is not avaiable? Is using a stop watch sufficient?

as usual, snap has something built in for this already :wink:

snap run --trace-exec firefox

after you close the app, snap will print out the startup times of all the different exec calls it did and a summary of the total startup time …

5 Likes

Wow, that’s actually really useful, it should be popularised more.

1 Like

Agreed, I’ll add it to Part 2 of the blog :slight_smile:

1 Like

Ok, here is my setup:

  • Kubuntu 22.04 Wayland session (all updates installed)
  • Board: Gigabyte P35-DS3
  • Intel Core2Quad Q9550
  • 8 GB RAM
  • ASUS AMD Radeon R7 240
  • SSD: Crucial CT1000BX500SSD1

Test results with the default firefox snap:

Cold purge

Gtk-Message: 20:27:53.523: Failed to load module "window-decorations-gtk-module"
Gtk-Message: 20:27:53.527: Failed to load module "colorreload-gtk-module"
ATTENTION: default value of option mesa_glthread overridden by environment.
ATTENTION: default value of option mesa_glthread overridden by environment.
Slowest 10 exec calls during snap run:
  1.621s /snap/firefox/1377/gnome-platform/usr/lib/x86_64-linux-gnu/glib-2.0/gio-querymodules
  5.962s /snap/firefox/1377/snap/command-chain/desktop-launch
  5.574s /snap/firefox/1377/usr/lib/firefox/firefox
  11.535s /snap/firefox/1377/usr/lib/firefox/firefox
  1.837s /snap/firefox/1377/usr/lib/firefox/firefox
  12.298s /snap/firefox/1377/usr/lib/firefox/firefox
  1.441s /snap/firefox/1377/usr/lib/firefox/firefox
  1.486s /snap/firefox/1377/usr/lib/firefox/pingsender
  1.568s /snap/firefox/1377/usr/lib/firefox/pingsender
  29.768s /snap/firefox/1377/usr/lib/firefox/firefox
Total time: 54.049s

Cold

Gtk-Message: 20:30:18.366: Failed to load module "window-decorations-gtk-module"
Gtk-Message: 20:30:18.383: Failed to load module "colorreload-gtk-module"
ATTENTION: default value of option mesa_glthread overridden by environment.
ATTENTION: default value of option mesa_glthread overridden by environment.
ATTENTION: default value of option mesa_glthread overridden by environment.
Slowest 10 exec calls during snap run:
  0.319s /snap/snapd/15904/usr/lib/snapd/snap-confine
  1.141s /snap/firefox/1377/snap/command-chain/desktop-launch
  0.855s /usr/bin/dbus-send
  0.968s /usr/bin/xdg-settings
  6.194s /snap/firefox/1377/usr/lib/firefox/firefox
  4.530s /snap/firefox/1377/usr/lib/firefox/firefox
  11.356s /snap/firefox/1377/usr/lib/firefox/firefox
  4.607s /snap/firefox/1377/usr/lib/firefox/firefox
  4.462s /snap/firefox/1377/usr/lib/firefox/firefox
  14.690s /snap/firefox/1377/usr/lib/firefox/firefox
Total time: 37.695s

Warm

Gtk-Message: 20:31:58.609: Failed to load module "window-decorations-gtk-module"
Gtk-Message: 20:31:58.613: Failed to load module "colorreload-gtk-module"
ATTENTION: default value of option mesa_glthread overridden by environment.
ATTENTION: default value of option mesa_glthread overridden by environment.
ATTENTION: default value of option mesa_glthread overridden by environment.

###!!! [Parent][PImageBridgeParent] Error: RunMessage(msgname=PImageBridge::Msg_WillClose) Channel closing: too late to send/recv, messages will be lost

Slowest 10 exec calls during snap run:
  0.729s /snap/firefox/1377/snap/command-chain/desktop-launch
  3.751s /snap/firefox/1377/usr/lib/firefox/firefox
  4.706s /snap/firefox/1377/usr/lib/firefox/firefox
  7.660s /snap/firefox/1377/usr/lib/firefox/firefox
  4.619s /snap/firefox/1377/usr/lib/firefox/firefox
  4.542s /snap/firefox/1377/usr/lib/firefox/firefox
  0.356s /snap/firefox/1377/usr/lib/firefox/pingsender
  0.402s /snap/firefox/1377/usr/lib/firefox/pingsender
  0.428s /snap/firefox/1377/usr/lib/firefox/pingsender
  10.042s /snap/firefox/1377/usr/lib/firefox/firefox
Total time: 12.897s

Test results after running 'sudo snap refresh firefox --channel=latest/stable/jammy-release’

Cold purge

Gtk-Message: 20:39:34.453: Failed to load module "window-decorations-gtk-module"
Gtk-Message: 20:39:34.459: Failed to load module "colorreload-gtk-module"
ATTENTION: default value of option mesa_glthread overridden by environment.
ATTENTION: default value of option mesa_glthread overridden by environment.
Slowest 10 exec calls during snap run:
  0.778s /snap/firefox/1232/gnome-platform/usr/lib/x86_64-linux-gnu/glib-2.0/gio-querymodules
  3.791s /snap/firefox/1232/snap/command-chain/desktop-launch
  6.144s /snap/firefox/1232/usr/lib/firefox/firefox
  8.759s /snap/firefox/1232/usr/lib/firefox/firefox
  10.553s /snap/firefox/1232/usr/lib/firefox/firefox
  0.695s /snap/firefox/1232/usr/lib/firefox/firefox
  0.624s /snap/firefox/1232/usr/lib/firefox/firefox
  1.762s /snap/firefox/1232/usr/lib/firefox/pingsender
  1.857s /snap/firefox/1232/usr/lib/firefox/pingsender
  1.719s /snap/firefox/1232/usr/lib/firefox/pingsender
Total time: 48.261s

Cold

Gtk-Message: 20:40:49.000: Failed to load module "window-decorations-gtk-module"
Gtk-Message: 20:40:49.051: Failed to load module "colorreload-gtk-module"
ATTENTION: default value of option mesa_glthread overridden by environment.
ATTENTION: default value of option mesa_glthread overridden by environment.
ATTENTION: default value of option mesa_glthread overridden by environment.
Slowest 10 exec calls during snap run:
  0.318s /snap/snapd/15904/usr/lib/snapd/snap-confine
  0.302s /usr/bin/snapctl
  0.951s /snap/firefox/1232/snap/command-chain/desktop-launch
  0.596s /usr/bin/cut
  0.732s /usr/bin/xdg-settings
  8.317s /snap/firefox/1232/usr/lib/firefox/firefox
  12.292s /snap/firefox/1232/usr/lib/firefox/firefox
  10.252s /snap/firefox/1232/usr/lib/firefox/firefox
  10.058s /snap/firefox/1232/usr/lib/firefox/firefox
  10.355s /snap/firefox/1232/usr/lib/firefox/firefox
Total time: 38.925s

Warm

Gtk-Message: 20:41:47.019: Failed to load module "window-decorations-gtk-module"
Gtk-Message: 20:41:47.023: Failed to load module "colorreload-gtk-module"
ATTENTION: default value of option mesa_glthread overridden by environment.
ATTENTION: default value of option mesa_glthread overridden by environment.
ATTENTION: default value of option mesa_glthread overridden by environment.

###!!! [Parent][PImageBridgeParent] Error: RunMessage(msgname=PImageBridge::Msg_WillClose) Channel closing: too late to send/recv, messages will be lost

Slowest 10 exec calls during snap run:
  0.448s /snap/firefox/1232/snap/command-chain/desktop-launch
  0.130s /usr/bin/xdg-settings
  2.536s /snap/firefox/1232/usr/lib/firefox/firefox
  6.014s /snap/firefox/1232/usr/lib/firefox/firefox
  4.796s /snap/firefox/1232/usr/lib/firefox/firefox
  4.622s /snap/firefox/1232/usr/lib/firefox/firefox
  4.577s /snap/firefox/1232/usr/lib/firefox/firefox
  0.371s /snap/firefox/1232/usr/lib/firefox/pingsender
  0.438s /snap/firefox/1232/usr/lib/firefox/pingsender
  0.396s /snap/firefox/1232/usr/lib/firefox/pingsender
Total time: 11.135s
1 Like

How’s it going gang. I just wanted to update this thread to share our latest post on the Firefox snap performance process. Keep sharing your issues and benchmarks as we work to improve the user experience :slight_smile:

6 Likes

There’s any progress about the firefox.tmp in ~/Downloads ??

It’s really annoying

That’s fixed in the latest version as far as I know

1 Like

Fixed in version 101.0 as per Mozilla bug report:
https://bugzilla.mozilla.org/show_bug.cgi?id=1733750

Is anyone working on making the snap firefox work if you use NFS or SSHFS home directories? [ It doesn’t start at all in this case, see https://bugs.launchpad.net/snapd/+bug/1973321 and others ].

If not, the NFS how-tos on ubuntu documentation should probably warn people that trying to do so will stop Firefox from working on 22.04. I am happy to do this if this is helpful, but I am not sure who to talk to about modifying such docs.

2 Likes

Hi folks! Me again with our latest update :slight_smile:

We’ve made very positive progress since the last post and all our fixes have landed in stable, so you should see the benefit today! Please do let us know your latest timings. It’s a huge help.

There is still further to go of course, but luckily we still have 2-3 promising routes to bringing the start times down even further.

5 Likes

Nice to see the gnome content snap getting some LZO love. For the record, the KDE snaps have been doing this for quite some time, too: https://invent.kde.org/packaging/snap-kf5/-/commit/088904526d7e3cdaefc333cc194c7ae828376a39

5 Likes

Firefox snap performance test(new user account):

  • Cold – Purge: 2388, 2406. Average: 2397 ms (I removed ~/snap/firefox folder)
  • Cold: 2816, 2796. Average: 2806 ms
  • Warm: 1353, 1369, 1369, 1401, 1355. Average: 1369,4 ms

Firefox snap performance test(28 tabs, some extension, what I use on a daily basis):

  • Cold: 2284, 2660, 2537. Average: 2494 ms
  • Warm: 1541, 1516, 1863, 1539, 1537, 2528, 1789, 1772, 1755, 1772, 1744, 1762. Average: 1759 ms

Additional info:

  • Firefox snap 103.0b6 (64-bit)
  • Ubuntu 22.04 (fully updated), kernel 5.15.0-25-generic, Wayland, Performance mode: Balanced
  • Hardware: ideapad 5 Pro-14ACN6 Laptop - Type 82L7, 16,0 GiB, AMD® Ryzen 7 5800u with radeon graphics × 16, NVIDIA GeForce MX450.

I use beta version because on stable pinch to zoom isn’t working.

3 Likes

When will we see this update on Ubuntu 22.04?

I’m really impress with this improvements, in Ubuntu 22.04 with snap FireFox 102.0.2-1 in my Thinkpad t14s gen 1 went from a cold start of 4-5s to 1.3s this is amazing! (no extensive testing)

Thanks for all the work! :heart:

I hope that all the learning is reflected in documentation of good practices and how to optimize snaps and that also all the improvements also work for the entire snap ecosystem

7 Likes

Firefox snap broken in Guest Account on Xubuntu 22.04 (Jammy)

As I couldn’t find any other place mentioning this problem with Firefox snap, I’ll mention it here. If any body know a more appropriate place I’d be happy to hear it.

My laptop is sometimes used by visitors. They want to browse the internet. So I setup the guest-account. I found out that the Firefox snap is broken on guest-accounts.

When opening Firefox nothing happens. When starting FF from the command line of the guest-account I found out the following:

$ firefox
2022/07/12 00:46:01.906615 tool_linux.go:82: cannot open snapd info file “/snap/snapd/current/usr/lib/snapd/info”: open /snap/snapd/current/usr/lib/snapd/info: permission denied

Did anybody come across this problem or is it being resolved?

(running: Xubuntu 22.04)

Is Xubuntu using (or enabling the use of) LightDM?
It’s probably a problem with the guest session running under a very restrictive apparmor profile that doesn’t even allow snaps to start. And it looks similar to this old thread on the snapcraft forum.

3 Likes

This is in fact an old issue with all snaps (not just firefox) when running a lightdm guest session.

1 Like

It may be old, but not obsolete. Guest sessions still come in very handy.
Now that Ubuntu 16.04 LTS is retired, users are forced to lose using their guest-session abilities.
That’s why it has become un-circumvent-able now and a prominent problem.
I found multiple bugs, dating back 6 years that point out the problems, but don’t get fixed.


2 Likes