I've discovered the source of the problem. Both user accounts on the system had hardware acceleration enabled in Firefox. Apparently, only one session can utilize the GPU/hw acceleration at a time, and so when switching between accounts, the firefox process gets suspended in some manner. That explains the significant delay in Firefox responsiveness when "resuming" the previous session.
By unchecking "Use hardware acceleration when available" in Firefox settings, followed by a Firefox restart, the problem has gone away. I find it a bit puzzling that more people are not experiencing this. I would think that the number of Ubuntu installations using xorg with multiple desktop user sessions that also use Firefox with hardware acceleration would not be insignificant. I suppose there could be a bug here if my conclusions are completely wrong, and firefox should better handle this. I don't know enough about xorg/hw acceleration/gpus to say for sure, so I will leave it to someone who does. For me, though, the problem is resolved and I hope this helps someone in the future. -- You received this bug notification because you are a member of Desktop Packages, which is subscribed to firefox in Ubuntu. https://bugs.launchpad.net/bugs/1989821 Title: Firefox hangs, unable to reload tabs for up to 2min after switching to session that was idle for several hours Status in firefox package in Ubuntu: Expired Bug description: I am not sure when exactly this started. I feel like it was around FF v99. System is always on. 2 user accounts (mine, wife's). We keep the desktop sessions logged-in, just switch between accounts whenever needed. Firefox stays open since it's heavily used. When an active session is unlocked or switched to after being unused for several hours (not rigorously measured but I'd say more than 6-8 hours), we observe the following behavior in Firefox: * Gmail tab will show a message at the top of the page along the lines of "Not connected, retrying in 3:00" with the timer counting down * For the first 10-20s, clicking on another tab will have no effect - FF doesn't switch to the tab * From 20s to between 1-2 minutes: - Switching tabs will work albeit slowly. - Reloading an existing tab does nothing except cause the side-to-side loading indicator on the tab to cycle - I am able to open a new tab via ctrl-T - I can enter a URL into a new tab, but the site doesn't load. The loading indicator cycles in the tab title. - I cannot open about:performance to troubleshoot After some period of time, as short as 30-40s and as long as 2 minutes, FF becomes usable again. Sites can be loaded/reloaded, etc. What I have tried, but has not resolved the issue: * Restart FF in troubleshooting mode * Upgrade to new releases as they are available in the package manager * Run in non-troubleshooting mode but with all extensions removed * Refresh the browser * Set browser.tabs.unloadOnLowMemory = false * rm -rf ~/.mozilla and start with a fresh profile Workaround: killall -9 firefox, then relaunch firefox Again, this seems to have started suddenly at some point possibly around the v99 timeframe. Prior to that, I did not observe this problem. Hardware, and to the best of my knowledge the usage habits of the 2 users, have not changed in quite some time. I've attached the output of a "vmstat 1" command that I launched when I unlocked a session that was idle for approximately 40h, before interacting with the existing firefox session. The firefox issue manifested for about 1min 20s. Once firefox became usable, I stopped the vmstat command. ProblemType: Bug DistroRelease: Ubuntu 20.04 Package: firefox 104.0+build3-0ubuntu0.20.04.1 ProcVersionSignature: Ubuntu 5.4.0-124.140-generic 5.4.195 Uname: Linux 5.4.0-124-generic x86_64 AddonCompatCheckDisabled: False ApportVersion: 2.20.11-0ubuntu27.24 Architecture: amd64 AudioDevicesInUse: USER PID ACCESS COMMAND /dev/snd/controlC0: tyr 743015 F.... pulseaudio /dev/snd/controlC1: tyr 743015 F.... pulseaudio BuildID: 20220818191623 CasperMD5CheckResult: skip Channel: Unavailable CurrentDesktop: XFCE Date: Thu Sep 15 18:38:25 2022 Extensions: extensions.sqlite corrupt or missing ForcedLayersAccel: False IfupdownConfig: # interfaces(5) file used by ifup(8) and ifdown(8) auto lo iface lo inet loopback IncompatibleExtensions: Unavailable (corrupt or non-existant compatibility.ini or extensions.sqlite) InstallationDate: Installed on 2016-01-05 (2444 days ago) InstallationMedia: Xubuntu 14.04.3 LTS "Trusty Tahr" - Beta amd64 (20150805) IpRoute: default via 192.168.1.1 dev eth0 proto static metric 100 192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.100 metric 100 Locales: extensions.sqlite corrupt or missing PrefErrors: Unexpected character ',' before close parenthesis @ /usr/lib/firefox/omni.ja:greprefs.js:302 PrefSources: prefs.js Profiles: Profile0 (Default) - LastVersion=104.0/20220818191623 (In use) RunningIncompatibleAddons: False SourcePackage: firefox Themes: extensions.sqlite corrupt or missing UpgradeStatus: Upgraded to focal on 2021-02-04 (588 days ago) dmi.bios.date: 11/11/2015 dmi.bios.vendor: American Megatrends Inc. dmi.bios.version: 2801 dmi.board.asset.tag: To be filled by O.E.M. dmi.board.name: Z97-A dmi.board.vendor: ASUSTeK COMPUTER INC. dmi.board.version: Rev 1.xx dmi.chassis.asset.tag: To Be Filled By O.E.M. dmi.chassis.type: 3 dmi.chassis.vendor: To Be Filled By O.E.M. dmi.chassis.version: To Be Filled By O.E.M. dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvr2801:bd11/11/2015:svnASUS:pnAllSeries:pvrSystemVersion:rvnASUSTeKCOMPUTERINC.:rnZ97-A:rvrRev1.xx:cvnToBeFilledByO.E.M.:ct3:cvrToBeFilledByO.E.M.: dmi.product.family: ASUS MB dmi.product.name: All Series dmi.product.sku: All dmi.product.version: System Version dmi.sys.vendor: ASUS To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/1989821/+subscriptions -- Mailing list: https://launchpad.net/~desktop-packages Post to : desktop-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~desktop-packages More help : https://help.launchpad.net/ListHelp