Score:2

Ubuntu 22.04 freeze due to Firefox (sometimes with as low as 3 tabs)

cn flag

I have Ubuntu 22.04 installed on my system with 16GB RAM and 1TB disk space.

Running a large number of resource-heavy apps/processes does (and should, logically) cause system freezes/hangups, after which the system must be rebooted.

But when running Firefox, no matter how low the resource consumption from other background apps, the system freezes with a high probability, sometimes with as low as 3 open tabs. If browser cache is a problem, I tend to browse in Private Mode most often, yet that does not stop a system crash.

I have kept track of CPU consumption in the System Monitor, and my system has crashed several times without there having been more than 20% RAM usage. Firefox also doesn't have any crash reports from these instances. I have tried several fixes suggested by Mozilla (turning off hardware acceleration etc) but none have resulted in any improvements in my situation. I remember running 4-5 windows each with at least 5 tabs without ever encountering a crash. Please help me fix this issue.

Please find the last few lines from the system log below. I forced shutdown after the last line using the power button because of a system freeze.

May 18 10:03:02 jonsmith kernel: [  290.566068] ACPI Error: Aborting method \_SB.PCI0.PEG0.PEGP.BRT6 due to previous error (AE_NOT_FOUND) (20220331/psparse-529)
May 18 10:03:02 jonsmith kernel: [  290.566228] ACPI Error: Aborting method \EV5 due to previous error (AE_NOT_FOUND) (20220331/psparse-529)
May 18 10:03:02 jonsmith kernel: [  290.566389] ACPI Error: Aborting method \SMEE due to previous error (AE_NOT_FOUND) (20220331/psparse-529)
May 18 10:03:02 jonsmith kernel: [  290.566550] ACPI Error: Aborting method \SMIE due to previous error (AE_NOT_FOUND) (20220331/psparse-529)
May 18 10:03:02 jonsmith kernel: [  290.566708] ACPI Error: Aborting method \NEVT due to previous error (AE_NOT_FOUND) (20220331/psparse-529)
May 18 10:03:02 jonsmith kernel: [  290.566899] ACPI Error: Aborting method \_SB.PCI0.LPCB.ECDV._Q66 due to previous error (AE_NOT_FOUND) (20220331/psparse-529)
May 18 10:03:02 jonsmith kernel: [  290.694431] ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PCI0.PEG0.PEGP.BRT6.LCD], AE_NOT_FOUND (20220331/psargs-330)
May 18 10:03:02 jonsmith kernel: [  290.694455] 
May 18 10:03:02 jonsmith kernel: [  290.694458] No Local Variables are initialized for Method [BRT6]
May 18 10:03:02 jonsmith kernel: [  290.694460] 
May 18 10:03:02 jonsmith kernel: [  290.694463] Initialized Arguments for Method [BRT6]:  (2 arguments defined for method invocation)
May 18 10:03:02 jonsmith kernel: [  290.694465]   Arg0:   00000000409b1dbf <Obj>           Integer 0000000000000001
May 18 10:03:02 jonsmith kernel: [  290.694477]   Arg1:   00000000ad7ffa02 <Obj>           Integer 0000000000000000
May 18 10:03:02 jonsmith kernel: [  290.694486] 
May 18 10:03:02 jonsmith kernel: [  290.694490] ACPI Error: Aborting method \_SB.PCI0.PEG0.PEGP.BRT6 due to previous error (AE_NOT_FOUND) (20220331/psparse-529)
May 18 10:03:02 jonsmith kernel: [  290.694650] ACPI Error: Aborting method \EV5 due to previous error (AE_NOT_FOUND) (20220331/psparse-529)
May 18 10:03:02 jonsmith kernel: [  290.694810] ACPI Error: Aborting method \SMEE due to previous error (AE_NOT_FOUND) (20220331/psparse-529)
May 18 10:03:02 jonsmith kernel: [  290.695006] ACPI Error: Aborting method \SMIE due to previous error (AE_NOT_FOUND) (20220331/psparse-529)
May 18 10:03:02 jonsmith kernel: [  290.695174] ACPI Error: Aborting method \NEVT due to previous error (AE_NOT_FOUND) (20220331/psparse-529)
May 18 10:03:02 jonsmith kernel: [  290.695348] ACPI Error: Aborting method \_SB.PCI0.LPCB.ECDV._Q66 due to previous error (AE_NOT_FOUND) (20220331/psparse-529)
May 18 10:03:03 jonsmith kernel: [  291.373091] audit: type=1107 audit(1684384383.334:60): pid=1089 uid=102 auid=4294967295 ses=4294967295 subj=unconfined msg='apparmor="DENIED" operation="dbus_method_call"  bus="system" path="/org/freedesktop/PolicyKit1/Authority" interface="org.freedesktop.DBus.Properties" member="GetAll" mask="send" name=":1.9" pid=2650 label="snap.snap-store.ubuntu-software" peer_pid=1111 peer_label="unconfined"
May 18 10:03:03 jonsmith kernel: [  291.373091]  exe="/usr/bin/dbus-daemon" sauid=102 hostname=? addr=? terminal=?'
May 18 10:03:03 jonsmith kernel: [  291.373813] audit: type=1107 audit(1684384383.334:61): pid=1089 uid=102 auid=4294967295 ses=4294967295 subj=unconfined msg='apparmor="DENIED" operation="dbus_method_call"  bus="system" path="/org/freedesktop/PolicyKit1/Authority" interface="org.freedesktop.PolicyKit1.Authority" member="CheckAuthorization" mask="send" name=":1.9" pid=2650 label="snap.snap-store.ubuntu-software" peer_pid=1111 peer_label="unconfined"
May 18 10:03:03 jonsmith kernel: [  291.373813]  exe="/usr/bin/dbus-daemon" sauid=102 hostname=? addr=? terminal=?'
May 18 10:03:03 jonsmith kernel: [  291.377907] audit: type=1107 audit(1684384383.338:62): pid=1089 uid=102 auid=4294967295 ses=4294967295 subj=unconfined msg='apparmor="DENIED" operation="dbus_method_call"  bus="system" path="/org/freedesktop/PolicyKit1/Authority" interface="org.freedesktop.DBus.Properties" member="GetAll" mask="send" name=":1.9" pid=2650 label="snap.snap-store.ubuntu-software" peer_pid=1111 peer_label="unconfined"
May 18 10:03:03 jonsmith kernel: [  291.377907]  exe="/usr/bin/dbus-daemon" sauid=102 hostname=? addr=? terminal=?'
May 18 10:03:03 jonsmith kernel: [  291.378569] audit: type=1107 audit(1684384383.338:63): pid=1089 uid=102 auid=4294967295 ses=4294967295 subj=unconfined msg='apparmor="DENIED" operation="dbus_method_call"  bus="system" path="/org/freedesktop/PolicyKit1/Authority" interface="org.freedesktop.PolicyKit1.Authority" member="CheckAuthorization" mask="send" name=":1.9" pid=2650 label="snap.snap-store.ubuntu-software" peer_pid=1111 peer_label="unconfined"
May 18 10:03:03 jonsmith kernel: [  291.378569]  exe="/usr/bin/dbus-daemon" sauid=102 hostname=? addr=? terminal=?'
May 18 10:03:04 jonsmith kernel: [  292.511267] audit: type=1400 audit(1684384384.470:64): apparmor="DENIED" operation="open" class="file" profile="snap.snap-store.ubuntu-software" name="/etc/appstream.conf" pid=2650 comm="snap-store" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
May 18 10:03:07 jonsmith kernel: [  295.988293] audit: type=1400 audit(1684384387.949:65): apparmor="DENIED" operation="capable" class="cap" profile="/snap/snapd/19122/usr/lib/snapd/snap-confine" pid=3545 comm="snap-confine" capability=12  capname="net_admin"
May 18 10:03:07 jonsmith kernel: [  295.988305] audit: type=1400 audit(1684384387.949:66): apparmor="DENIED" operation="capable" class="cap" profile="/snap/snapd/19122/usr/lib/snapd/snap-confine" pid=3545 comm="snap-confine" capability=38  capname="perfmon"
May 18 10:03:08 jonsmith kernel: [  296.689793] audit: type=1400 audit(1684384388.653:67): apparmor="DENIED" operation="open" class="file" profile="snap-update-ns.firefox" name="/var/lib/" pid=3623 comm="5" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
May 18 10:03:08 jonsmith kernel: [  296.690038] audit: type=1400 audit(1684384388.653:68): apparmor="DENIED" operation="open" class="file" profile="snap-update-ns.firefox" name="/var/lib/" pid=3623 comm="5" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
May 18 10:03:08 jonsmith kernel: [  296.690251] audit: type=1400 audit(1684384388.653:69): apparmor="DENIED" operation="open" class="file" profile="snap-update-ns.firefox" name="/var/lib/" pid=3623 comm="5" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
May 18 10:03:08 jonsmith kernel: [  296.690442] audit: type=1400 audit(1684384388.653:70): apparmor="DENIED" operation="open" class="file" profile="snap-update-ns.firefox" name="/var/lib/" pid=3623 comm="5" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
May 18 10:03:25 jonsmith kernel: [  313.441774] audit: type=1326 audit(1684384405.400:71): auid=1000 uid=1000 gid=1000 ses=3 subj=snap.firefox.firefox pid=3545 comm="firefox" exe="/snap/firefox/2667/usr/lib/firefox/firefox" sig=0 arch=c000003e syscall=314 compat=0 ip=0x7faa5b0c873d code=0x50000
May 18 10:03:40 jonsmith kernel: [  328.153613] audit: type=1326 audit(1684384420.108:72): auid=1000 uid=1000 gid=1000 ses=3 subj=snap.firefox.firefox pid=4460 comm="firefox" exe="/snap/firefox/2667/usr/lib/firefox/firefox" sig=0 arch=c000003e syscall=314 compat=0 ip=0x7fca7451473d code=0x50000
in flag
Silly question, but is that 1TB disk NVMe? I've found the Firefox snap to be very dependent on swap space regardless of how much RAM is installed. Have you verified that the system isn't running out of swap when Firefox is sluggish?
question_quasar avatar
cn flag
It's a 1TB SATA. I don't use hibernation so I was told I could skip having swap space entirely, which I did. I'll try adding some swap space.
in flag
Hibernation requires a swap partition. Swap files are generally good for handling buffers
uz flag
Jos
Also, do you have `systemd-oomd` running? In case your system runs out of memory, just Firefox will be killed, not the whole system.
question_quasar avatar
cn flag
@Jos My whole system freezes. When this happens, I am unable to open other applications or switch workspaces etc. Only option is to force shutdown and restart.
question_quasar avatar
cn flag
@matigo I added 4GiB of swap space for my 16GB RAM, but Firefox still causes system-wide freezes as before. Do your have any other fixes in mind?
uz flag
Jos
To be clear, `systemd-oomd` is a service that starts up at boot time. You don't activate it yourself, it kicks in whenever it is needed.
question_quasar avatar
cn flag
@Jos I get it now. You're suggesting I ensure `systemd-oomd` is active to potentially solve the problem. I'll try it out and report the results.
Score:0
cn flag

The suggestion from @Jos in the comments has solved my problem. In summary, my system had systemd-oomd disabled. I enabled it through the systemctl interface, and my system has not crashed since. When there are too many tabs or windows in Firefox, sometimes there may be lags, but none of these lags ever spiral into a system-wide freeze, as it used to happen previously.

I also recommend trying to add swap space, as recommended by @Matigo, as it would ease the burden on the RAM, especially when RAM is deficient in handling the excessive demands of web browsers such as Firefox, Chrome or Brave.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.