我的系统上安装了 Ubuntu 22.04,有 16GB RAM 和 1TB 磁盘空间。
运行大量占用大量资源的应用程序/进程确实(从逻辑上讲也应该如此)会导致系统冻结/挂断,此后必须重新启动系统。
但在运行 Firefox 时,无论其他后台应用程序的资源消耗有多低,系统都会极有可能卡死,有时打开的标签页甚至只有 3 个。如果浏览器缓存是个问题,我倾向于最常使用隐私模式浏览,但这并不能阻止系统崩溃。
我一直在系统监视器中跟踪 CPU 消耗情况,我的系统崩溃过几次,但内存使用率都没有超过 20%。Firefox 也没有收到这些情况的崩溃报告。我尝试了 Mozilla 建议的几种修复方法(关闭硬件加速等),但都没有改善我的情况。我记得我运行了 4-5 个窗口,每个窗口至少有 5 个选项卡,但从未遇到过崩溃。请帮我解决这个问题。
请查看下面系统日志的最后几行。由于系统死机,我在最后一行之后使用电源按钮强制关机。
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
答案1
@Jos 在评论中的建议解决了我的问题。总之,我的系统已systemd-oomd
禁用。我通过界面启用了它systemctl
,此后我的系统再也没有崩溃过。这需要一行代码,如下所示。
sudo systemctl enable systemd-oomd.service
当 Firefox 中的选项卡或窗口过多时,有时可能会出现延迟,但这些延迟不会像以前那样导致整个系统冻结。
我还建议尝试添加交换空间,正如@Matigo 所建议的那样,因为它可以减轻 RAM 的负担,尤其是当 RAM 不足以处理 Firefox、Chrome 或 Brave 等 Web 浏览器的过度需求时。