我应该如何调试 Ubuntu 笔记本电脑的硬锁定

我应该如何调试 Ubuntu 笔记本电脑的硬锁定

我已经在 Thinkpad T450s 上运行 Ubuntu 一段时间了。

每隔一段时间,系统就会对我进行硬锁定。例如,鼠标不会移动,ctrl-alt-f#不会带我到普通终端,等等。

我还没有尝试过神奇的 sysreq 键,下次我会尝试,但我并不乐观。

这是当时来自 Journalctl 的片段(我启用了持久日志记录,以便可以解决此问题):

Jul 07 16:53:27 gothputer systemd[1]: Starting Cleanup of Temporary Directories...
Jul 07 16:53:27 gothputer systemd-tmpfiles[5215]: [/usr/lib/tmpfiles.d/var.conf:14] Duplicate line for path "/var/log", ignoring.
Jul 07 16:53:27 gothputer systemd[1]: Started Cleanup of Temporary Directories.
Jul 07 16:55:13 gothputer kernel: perf interrupt took too long (5045 > 5000), lowering kernel.perf_event_max_sample_rate to 25000
Jul 07 16:57:59 gothputer systemd-timesyncd[786]: Timed out waiting for reply from 91.189.94.4:123 (ntp.ubuntu.com).
Jul 07 16:57:59 gothputer systemd-timesyncd[786]: Synchronized to time server 91.189.89.199:123 (ntp.ubuntu.com).
Jul 07 17:12:40 gothputer kernel: thinkpad_acpi: EC reports that Thermal Table has changed
Jul 07 17:17:01 gothputer CRON[6044]: pam_unix(cron:session): session opened for user root by (uid=0)
Jul 07 17:17:01 gothputer CRON[6045]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Jul 07 17:17:01 gothputer CRON[6044]: pam_unix(cron:session): session closed for user root
Jul 07 17:25:13 gothputer wpa_supplicant[1206]: wlp3s0: WPA: Group rekeying completed with e0:3f:49:e2:3f:c4 [GTK=CCMP]
Jul 07 17:41:35 gothputer sudo[7819]: pam_ecryptfs: pam_sm_authenticate: /home/zee is already mounted
Jul 07 17:41:35 gothputer sudo[7819]:      zee : TTY=pts/1 ; PWD=/home/zee/Downloads ; USER=root ; COMMAND=/usr/bin/gdebi N1.deb
Jul 07 17:41:35 gothputer sudo[7819]: pam_unix(sudo:session): session opened for user root by zee(uid=0)
Jul 07 17:41:43 gothputer sudo[7819]: pam_unix(sudo:session): session closed for user root
-- Reboot --
Jul 07 17:48:21 gothputer systemd-journald[313]: Runtime journal (/run/log/journal/) is 8.0M, max 118.9M, 110.9M free.
Jul 07 17:48:21 gothputer kernel: Initializing cgroup subsys cpuset
Jul 07 17:48:21 gothputer kernel: Initializing cgroup subsys cpu
Jul 07 17:48:21 gothputer kernel: Initializing cgroup subsys cpuacct
Jul 07 17:48:21 gothputer kernel: Linux version 4.4.0-28-generic (buildd@lcy01-13) (gcc version 5.3.1 20160413 (Ubuntu 5.3.1-14ubuntu2.1) ) #47-Ubuntu SMP Fri Jun 24 10:09:13 UTC 2016 (Ubuntu
Jul 07 17:48:21 gothputer kernel: Command line: BOOT_IMAGE=/boot/vmlinuz-4.4.0-28-generic.efi.signed root=UUID=3862c22d-6f33-42a1-8bde-d05dc9f1af16 ro quiet splash vt.handoff=7
Jul 07 17:48:21 gothputer kernel: KERNEL supported cpus:
Jul 07 17:48:21 gothputer kernel:   Intel GenuineIntel
Jul 07 17:48:21 gothputer kernel:   AMD AuthenticAMD
Jul 07 17:48:21 gothputer kernel:   Centaur CentaurHauls
Jul 07 17:48:21 gothputer kernel: x86/fpu: xstate_offset[2]:  576, xstate_sizes[2]:  256
Jul 07 17:48:21 gothputer kernel: x86/fpu: Supporting XSAVE feature 0x01: 'x87 floating point registers'
Jul 07 17:48:21 gothputer kernel: x86/fpu: Supporting XSAVE feature 0x02: 'SSE registers'
Jul 07 17:48:21 gothputer kernel: x86/fpu: Supporting XSAVE feature 0x04: 'AVX registers'
Jul 07 17:48:21 gothputer kernel: x86/fpu: Enabled xstate features 0x7, context size is 832 bytes, using 'standard' format.

在这次特定的锁定期间,我桌面上的时钟冻结在 17:47:40,以供参考。

接下来的步骤是什么?除了阅读我能找到的每条日志之外,我不太确定从哪里开始,因为并不清楚“什么”失败了。

答案1

当没有任何明显原因导致锁定时可以尝试的事情

  • 从制造商处了解 CPU 的最高工作温度是多少
  • 检查您的 BIOS 或板载诊断程序(如果有)是否检测到任何错误(电压、风扇速度、温度、智能错误)
  • 关闭 X(类似sudo service lightdm stop或类似)以将图形等排除在外,并允许您查看控制台错误消息
  • 安装lm-sensors包并配置它。从那里也看到一切都很好
  • 保持传感器像这样运行:watch -n1 sensors
  • 留意dmesg输出,它会告诉你有关内核的所有信息
  • ALT-F1(F2,F3)切换屏幕
  • 在应用程序中运行 CPU 烧录stress或其他程序来加热 CPU 和sensors输出。确保它使用 CPU 上的所有内核。
  • 安装smartmontools并运行 smartctl 来查询您的硬盘并执行自检
  • 尝试memtest86或其他可启动应用程序来检查您的 RAM。或者如果您必须memtester在 Linux 内尝试
  • 尝试一下bonnie++dd或者给你的硬盘施加压力

如果所有这些事情似乎都进展顺利,我会怀疑 X,尤其是图形硬件或驱动程序(仅根据过去的经验)。如果您使用 Nvidia 驱动程序,我知道您可以从提供的 GUI 实用程序中查看温度和风扇速度。

相关内容