Firefox not closing correctly on system shutdown

Just installed Zorin 17.1 core. Found that firefox never seems to exit correctly after I shutdown the system. When you start up firefox again it prompts to restore last session. This didn't happen on zorin 16.3. This maybe a firefox thing and nothing to do with zorin but I thought I would raise the issue here first.

Version of firefox is 124.0.2 flatpak edition.

It might be the kind of package.

On 16.3 Firefox is a native Debian package. On 17.1 it is a Flatpak.

That doesn't affect how Firefox behaves at runtime, and also doesn't change what happens when the system is shut down or rebooted.

When that happens, it will send running apps the SIGTERM signal, which tells an application to Terminate what it's doing. This doesn't kill the app outright, it gives it the opportunity to shut down itself.

If it takes too long for a program to shutdown gracefully, the OS eventually pulls the plug. Some people have complained that Firefox is slow when using the Flatpak version.

Does this happen even when you close Firefox first, and then shutdown your system? Are there any other signs that Firefox is slow?

1 Like

No it doesn't happen if you close down firefox first. No signs that firefox is slow - seems just as fast as running under 16.3. I will try the debian package of firefox. However, I imagine that the zorin developers moved from debian package to flatpak for a reason so it may have other issues.

1 Like

The reason behind Flatpak has nothing to do with features or bug fixes, and Mozilla provides their own official builds of Firefox.

But this may be a bug within Firefox itself, or something else that is irrelevant to the package format. I'm seeing a lot of older bug reports on this issue with Firefox so this may be still a thing.

1 Like

The reason they went with the Flatpak version is two-fold.

  1. The default Ubuntu version is based on a Snap package which has been known to be slow at first start but has improved a while back. So, it seems Zorin chose to default to the Flatpak version which has less issues suppposedly and seems more reliable and is kept current. However, shortly after Zorin released Zorin 17 with the new Flatpak version, Mozilla announced they will release their own up-to-date Debian/Ubuntu version.

  2. The Debian repository version is an Extended Support Release version with only security upgrades. You won't get feature updates until Debian 13 with the next ESR version of Firefox. For some people, having the latest features is very important.

Mozilla is going to release an up-to-date Debian version soon which will be maintained at their own repository. I think they are still in testing of some kind. It will be like Google Chrome's Debian package which Google has their own repository for.


Thanks for the info. I may well try the debian package version.

I found another bug with firefox on zorin 17.1 - it cannot resolve ".local" addresses.

I also went back to use Firefox on Zorin 16.3. This was running Firefox "124.0.2" / "Mozilla firefox for ubuntu" (which I assume was the snap version).

This did not have the issue with ".local" addresses or closing incorrectly during system shutdown.

Since I was running the same version (124.0.2) on both systems it looks like the 2 issues I have found are with how Firefox runs when packaged as a flatpak.

16.3 did not have a Snap version. Yes, I know, this is all confusing.

Sort of the reason I like Linux Mint Debian Edition. Only Debian packages augmented by Flatpaks. Also, the Mint team made their own Debian package of Firefox. Not needed now so much but Mint keeps things humming along.

1 Like

Interesting, I have had the same issue on this machine regardless of distribution and browser, from Firefox on Ubuntu (I think it started before the snapification) to my current choice of Brave (Flatpak) on Zorin Core. I have always been running things off an NVME SSD, and nothing feels outrageously slow.

I have found reports that Firefox thinks it crashes during Linux reboots going all the way back to 2010: 566212 - closing Firefox by shutting down Ubuntu makes session be restored

There are also reports about this for Chrome: chrome needs to restore tabs on every reboot - Ask Ubuntu

Not sure if this issue is still worth diving into, or if Wayland will accidentally solve it in the next couple of years...

Is it just Firefox or other browsers as well? This will depend on how the OS was configured, and I suspect in recent versions of Ubuntu .local requests are prevented from going out to the network for security purposes.

A quick workaround to this would be to add an entry to the /etc/hostsfile. This way the address is resolved locally on your computer.


The other browser I have installed is Edge and that handles ".local" addresses fine.

Thanks for the workaround.

And did using the .deb version of Firefox help with this? Another option you can try is going to Preferences -> General -> Network Settings, and add an exception in the "No Proxy For" area.

Yes it did! Installing the .deb package solved both issues I was having:-

  1. Not existing correctly during system shutdown.
  2. Not recognising ".local" addresses.

It installed 124.0.2 (same version as flatpak)

I used these instructions:-


Good to know, although strange that Flatpak got in the way of resolving DNS names even if in this case that should be the expected behavior anyway.