Ubuntu 20.04 在我的联想 Thinkpad L15 Gen2 上随机冻结

Ubuntu 20.04 在我的联想 Thinkpad L15 Gen2 上随机冻结

我不知道为什么,但是计算机的 gnome 会话随机冻结,只有鼠标继续工作。

CTRL还尝试使用+ ALT+切换到另一个终端F3,这可以正常工作,但无法重新启动桌面。

版本:

  • Ubuntu 是 20.04
  • Gnome-shell 3.36

这是我捕获的最后一条日志数据,但不同的冻结会留下不同的日志:

ago 26 14:25:01 laptop1 CRON[22482]: pam_unix(cron:session): session opened for user root by (uid=0)
ago 26 14:25:01 laptop1 CRON[22483]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
ago 26 14:25:01 laptop1 CRON[22482]: pam_unix(cron:session): session closed for user root
ago 26 14:25:27 laptop1 filebeat[7354]: 2021-08-26T14:25:27.246-0300        INFO        [monitoring]        log/log.go:145        Non-zero metrics in the last 30s        {"monitoring": {"metrics": {"beat":>
ago 26 14:25:38 laptop1 wpa_supplicant[1021]: wlp9s0: CTRL-EVENT-BEACON-LOSS
ago 26 14:25:57 laptop1 filebeat[7354]: 2021-08-26T14:25:57.247-0300        INFO        [monitoring]        log/log.go:145        Non-zero metrics in the last 30s        {"monitoring": {"metrics": {"beat":>
ago 26 14:26:42 laptop1 /usr/lib/gdm3/gdm-x-session[1233]: (**) Option "fd" "26"
ago 26 14:26:42 laptop1 /usr/lib/gdm3/gdm-x-session[1233]: (II) event2  - Power Button: device removed
ago 26 14:26:42 laptop1 /usr/lib/gdm3/gdm-x-session[1233]: (**) Option "fd" "29"
ago 26 14:26:42 laptop1 /usr/lib/gdm3/gdm-x-session[1233]: (II) event4  - Video Bus: device removed
ago 26 14:26:42 laptop1 /usr/lib/gdm3/gdm-x-session[1233]: (**) Option "fd" "30"
ago 26 14:26:42 laptop1 /usr/lib/gdm3/gdm-x-session[1233]: (II) event0  - Sleep Button: device removed
ago 26 14:26:42 laptop1 /usr/lib/gdm3/gdm-x-session[1233]: (**) Option "fd" "31"
ago 26 14:26:42 laptop1 /usr/lib/gdm3/gdm-x-session[1233]: (II) event8  - Integrated Camera: Integrated C: device removed
ago 26 14:26:42 laptop1 /usr/lib/gdm3/gdm-x-session[1233]: (**) Option "fd" "32"
ago 26 14:26:42 laptop1 /usr/lib/gdm3/gdm-x-session[1233]: (II) event3  - AT Translated Set 2 keyboard: device removed
ago 26 14:26:42 laptop1 /usr/lib/gdm3/gdm-x-session[1233]: (**) Option "fd" "33"
ago 26 14:26:42 laptop1 /usr/lib/gdm3/gdm-x-session[1233]: (II) event5  - SynPS/2 Synaptics TouchPad: device removed
ago 26 14:26:42 laptop1 /usr/lib/gdm3/gdm-x-session[1233]: (**) Option "fd" "34"
ago 26 14:26:42 laptop1 /usr/lib/gdm3/gdm-x-session[1233]: (II) event6  - TPPS/2 Elan TrackPoint: device removed
ago 26 14:26:42 laptop1 /usr/lib/gdm3/gdm-x-session[1233]: (**) Option "fd" "35"
ago 26 14:26:42 laptop1 /usr/lib/gdm3/gdm-x-session[1233]: (II) event7  - ThinkPad Extra Buttons: device removed
ago 26 14:26:42 laptop1 /usr/lib/gdm3/gdm-x-session[1233]: (**) Option "fd" "87"
ago 26 14:26:42 laptop1 /usr/lib/gdm3/gdm-x-session[1233]: (II) event16 - Kingston HyperX Cloud Stinger Core (Wireless) – PS Consumer Control: device removed
ago 26 14:26:42 laptop1 /usr/lib/gdm3/gdm-x-session[1233]: (**) Option "fd" "72"
ago 26 14:26:42 laptop1 /usr/lib/gdm3/gdm-x-session[1233]: (**) Option "fd" "72"
ago 26 14:26:42 laptop1 /usr/lib/gdm3/gdm-x-session[1233]: (II) event14 - Logitech Wireless Keyboard PID:4023: device removed
ago 26 14:26:42 laptop1 /usr/lib/gdm3/gdm-x-session[1233]: (**) Option "fd" "93"
ago 26 14:26:42 laptop1 /usr/lib/gdm3/gdm-x-session[1233]: (II) event15 - Logitech Wireless Mouse: device removed
ago 26 14:26:42 laptop1 /usr/lib/gdm3/gdm-x-session[1233]: (II) AIGLX: Suspending AIGLX clients for VT switch
ago 26 14:26:42 laptop1 /usr/lib/gdm3/gdm-x-session[1233]: (II) systemd-logind: got pause for 226:0
ago 26 14:26:42 laptop1 /usr/lib/gdm3/gdm-x-session[1233]: (II) systemd-logind: got pause for 13:71
ago 26 14:26:42 laptop1 /usr/lib/gdm3/gdm-x-session[1233]: (II) systemd-logind: got pause for 13:70
ago 26 14:26:42 laptop1 /usr/lib/gdm3/gdm-x-session[1233]: (II) systemd-logind: got pause for 13:79
ago 26 14:26:42 laptop1 /usr/lib/gdm3/gdm-x-session[1233]: (II) systemd-logind: got pause for 13:78
ago 26 14:26:42 laptop1 /usr/lib/gdm3/gdm-x-session[1233]: (II) systemd-logind: got pause for 13:67
ago 26 14:26:42 laptop1 /usr/lib/gdm3/gdm-x-session[1233]: (II) systemd-logind: got pause for 13:64
ago 26 14:26:42 laptop1 /usr/lib/gdm3/gdm-x-session[1233]: (II) systemd-logind: got pause for 13:69
ago 26 14:26:42 laptop1 /usr/lib/gdm3/gdm-x-session[1233]: (II) systemd-logind: got pause for 13:68
ago 26 14:26:42 laptop1 /usr/lib/gdm3/gdm-x-session[1233]: (II) systemd-logind: got pause for 13:80
ago 26 14:26:42 laptop1 /usr/lib/gdm3/gdm-x-session[1233]: (II) systemd-logind: got pause for 13:66
ago 26 14:26:42 laptop1 /usr/lib/gdm3/gdm-x-session[1233]: (II) systemd-logind: got pause for 13:72


答案1

系统“冻结”通常是由于运行过多、过大的程序,导致可用内存不足造成的。使用free来查看是否有交换空间,阅读man mkswap swapon fstab来创建一些交换空间。交换空间必须是连续的。使用mkswapfallocate,而不是dd。传统上,建议使用 1.5 × RAM 的交换空间,但 YMMV。如果您不打算让系统休眠,则可以拥有少于 1.0 × RAM 的空间。

相关内容