暂停/恢复仅工作一次

暂停/恢复仅工作一次

问题:暂停/恢复只起作用一次。尝试第二次暂停会导致机器挂起。
显示器按预期关闭电源并进入待机状态,但系统单元风扇仍在运行,并且偶尔会有磁盘活动。电源灯亮起且稳定。

机器对我通常的唤醒信号(键盘上的空格键)没有反应;除非我按住电源按钮 5 秒钟并强制关闭机器,否则电源按钮不会有任何反应。无法从另一台机器通过 ssh 访问该机器。为了恢复可用性,我需要进行硬重置,或关闭电源再打开;这当然会给我一个新启动的系统,它将挂起一次,然后冻结。

机器和诊断信息:

从 uname -a:

Linux machine-a 4.15.0-46-generic #49~16.04.1-Ubuntu SMP Tue Feb 12 17:45:24 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

来自 lspci:

00:00.0 RAM memory: NVIDIA Corporation MCP55 Memory Controller (rev a1)
00:01.0 ISA bridge: NVIDIA Corporation MCP55 LPC Bridge (rev a2)
00:01.1 SMBus: NVIDIA Corporation MCP55 SMBus Controller (rev a2)
00:01.2 RAM memory: NVIDIA Corporation MCP55 Memory Controller (rev a2)
00:02.0 USB controller: NVIDIA Corporation MCP55 USB Controller (rev a1)
00:02.1 USB controller: NVIDIA Corporation MCP55 USB Controller (rev a2)
00:04.0 IDE interface: NVIDIA Corporation MCP55 IDE (rev a1)
00:05.0 IDE interface: NVIDIA Corporation MCP55 SATA Controller (rev a2)
00:05.1 IDE interface: NVIDIA Corporation MCP55 SATA Controller (rev a2)
00:05.2 IDE interface: NVIDIA Corporation MCP55 SATA Controller (rev a2)
00:06.0 PCI bridge: NVIDIA Corporation MCP55 PCI bridge (rev a2)
00:06.1 Audio device: NVIDIA Corporation MCP55 High Definition Audio (rev a2)
00:08.0 Bridge: NVIDIA Corporation MCP55 Ethernet (rev a2)
00:0a.0 PCI bridge: NVIDIA Corporation MCP55 PCI Express bridge (rev a2)
00:0b.0 PCI bridge: NVIDIA Corporation MCP55 PCI Express bridge (rev a2)
00:0c.0 PCI bridge: NVIDIA Corporation MCP55 PCI Express bridge (rev a2)
00:0d.0 PCI bridge: NVIDIA Corporation MCP55 PCI Express bridge (rev a2)
**00:0e.0 PCI bridge: NVIDIA Corporation MCP55 PCI Express bridge (rev a2)**
00:0f.0 PCI bridge: NVIDIA Corporation MCP55 PCI Express bridge (rev a2)
00:18.0 Host bridge: Advanced Micro Devices, Inc. [AMD] K8 [Athlon64/Opteron] HyperTransport Technology Configuration
00:18.1 Host bridge: Advanced Micro Devices, Inc. [AMD] K8 [Athlon64/Opteron] Address Map
00:18.2 Host bridge: Advanced Micro Devices, Inc. [AMD] K8 [Athlon64/Opteron] DRAM Controller
00:18.3 Host bridge: Advanced Micro Devices, Inc. [AMD] K8 [Athlon64/Opteron] Miscellaneous Control
01:07.0 Communication controller: LSI Corporation Lucent V.92 Data/Fax Modem
07:00.0 VGA compatible controller: NVIDIA Corporation GP108 [GeForce GT 1030] (rev a1)
07:00.1 Audio device: NVIDIA Corporation GP108 High Definition Audio Controller (rev a1)

来自“lshw -c video”:

  *-display               
       description: VGA compatible controller
       product: GP108 [GeForce GT 1030]
       vendor: NVIDIA Corporation
       physical id: 0
       bus info: pci@0000:07:00.0
       version: a1
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress vga_controller bus_master cap_list rom
       configuration: **driver=nvidia** latency=0
       resources: irq:25 memory:fb000000-fbffffff memory:d0000000-dfffffff memory:ee000000-efffffff ioport:9c00(size=128) memory:c0000-dffff

我按照 Ubuntu wiki 中的说明进行操作这里

从 dmesg 输出:

[    1.493699] ima: No TPM chip found, activating TPM-bypass! (rc=-19)
[    1.493705] ima: Allocated hash algorithm: sha1
[    1.493728] evm: HMAC attrs: 0x1
[    1.494027]   **Magic number: 0:607:178**
[    1.494030]   hash matches /build/linux-hwe-6Ul5JQ/linux-hwe-4.15.0/drivers/base/power/main.c:1209
[    1.494098] **acpi device:0e: hash matches**
[    1.494110]  platform: hash matches
[    1.494166] rtc_cmos 00:02: setting system clock to 2068-04-23 12:10:18 UTC (3102408618)
[    1.494409] powernow_k8: fid 0x12 (2600 MHz), vid 0x8
[    1.494410] powernow_k8: fid 0x10 (2400 MHz), vid 0xa

如果我正确理解了 wiki,那么“罪魁祸首”就是“魔法数字”之后第一次出现的“哈希匹配”。因此,有问题的设备是“0e”(?)。根据 lspci 输出,它是几个 PCI Express 桥接器之一。

来自 ls -l /sys/devices/pci0000:00/0000:00:0e.0:

total 0
drwxr-xr-x 3 root root    0 Mar 28 15:15 0000:00:0e.0:pcie008
-rw-r--r-- 1 root root 4096 Mar 28 15:15 broken_parity_status
-r--r--r-- 1 root root 4096 Mar 28 15:15 class
-rw-r--r-- 1 root root 4096 Mar 28 15:15 config
-r--r--r-- 1 root root 4096 Mar 28 15:15 consistent_dma_mask_bits
-r--r--r-- 1 root root 4096 Mar 28 15:15 current_link_speed
-r--r--r-- 1 root root 4096 Mar 28 15:15 current_link_width
-rw-r--r-- 1 root root 4096 Mar 28 15:15 d3cold_allowed
-r--r--r-- 1 root root 4096 Mar 28 15:15 device
-r--r--r-- 1 root root 4096 Mar 28 15:15 dma_mask_bits
lrwxrwxrwx 1 root root    0 Mar 28 15:15 driver -> ../../../bus/pci/drivers/pcieport
-rw-r--r-- 1 root root 4096 Mar 28 15:15 driver_override
-rw-r--r-- 1 root root 4096 Mar 28 15:15 enable
lrwxrwxrwx 1 root root    0 Mar 28 15:15 firmware_node -> ../../LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:24
-r--r--r-- 1 root root 4096 Mar 28 15:15 irq
-r--r--r-- 1 root root 4096 Mar 28 15:15 local_cpulist
-r--r--r-- 1 root root 4096 Mar 28 15:15 local_cpus
-r--r--r-- 1 root root 4096 Mar 28 15:15 max_link_speed
-r--r--r-- 1 root root 4096 Mar 28 15:15 max_link_width
-r--r--r-- 1 root root 4096 Mar 28 15:15 modalias
-rw-r--r-- 1 root root 4096 Mar 28 15:15 msi_bus
-rw-r--r-- 1 root root 4096 Mar 28 15:15 numa_node
drwxr-xr-x 3 root root    0 Mar 28 15:15 pci_bus
drwxr-xr-x 2 root root    0 Mar 28 15:15 power
--w--w---- 1 root root 4096 Mar 28 15:15 remove
--w--w---- 1 root root 4096 Mar 28 15:15 rescan
--w------- 1 root root 4096 Mar 28 15:15 reset
-r--r--r-- 1 root root 4096 Mar 28 15:15 resource
-r--r--r-- 1 root root 4096 Mar 28 15:15 revision
-r--r--r-- 1 root root 4096 Mar 28 15:15 secondary_bus_number
-r--r--r-- 1 root root 4096 Mar 28 15:15 subordinate_bus_number
lrwxrwxrwx 1 root root    0 Mar 28 15:15 subsystem -> ../../../bus/pci
-r--r--r-- 1 root root 4096 Mar 28 15:15 subsystem_device
-r--r--r-- 1 root root 4096 Mar 28 15:15 subsystem_vendor
-rw-r--r-- 1 root root 4096 Mar 28 15:15 uevent
-r--r--r-- 1 root root 4096 Mar 28 15:15 vendor

问题:那么我接下来该去哪里呢?

原因与 machine-a 本身有关。我有另一台配置非常相似的机器 - 我们称之为 machine-b - 它可以毫无问题地挂起和恢复。然而 machine-a 却不行。无论我使用哪种命令/方法(pm-suspend、systemctl suspend、s2ram),结果都是一样的:工作一次,然后机器就冻结了。两台机器之间的区别:

  • 机器 a 是有线以太网,机器 b 是无线以太网
  • 机器 a 有 GT 1030 Nvidia 显卡,机器 b 有 GT 730 Nvidia 显卡。
  • 机器 a 正在使用 nvidia 驱动程序 415.27(从 384.130 升级以尝试解决此问题);机器 b 正在使用 384。
  • 两者都运行相同的内核和 16.04 LTS

有人能建议如何解决这个问题吗?我被难住了。

PS 还有一个奇怪的现象...这是来自一次冻结暂停的系统日志片段。它似乎显示系统同时暂停和恢复(??)。查看索引 134.641788 和 134.641873,它们出现在同一个时间戳秒内:

Mar 26 11:40:16 machine-a kernel: [  134.191571] Freezing user space processes ... (elapsed 0.012 seconds) done.
Mar 26 11:40:16 machine-a kernel: [  134.204236] OOM killer disabled.
Mar 26 11:40:16 machine-a kernel: [  134.204237] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
Mar 26 11:40:16 machine-a kernel: [  134.205834] Suspending console(s) (use no_console_suspend to debug)
Mar 26 11:40:16 machine-a kernel: [  134.227518] au0828: Suspend
Mar 26 11:40:16 machine-a kernel: [  134.227520] au0828: stopping V4L2
Mar 26 11:40:16 machine-a kernel: [  134.228520] parport_pc 00:04: disabled
Mar 26 11:40:16 machine-a kernel: [  134.228983] serial 00:03: disabled
Mar 26 11:40:16 machine-a kernel: [  134.250210] sd 0:0:0:0: [sda] Synchronizing SCSI cache
Mar 26 11:40:16 machine-a kernel: [  134.250295] sd 1:0:0:0: [sdb] Synchronizing SCSI cache
Mar 26 11:40:16 machine-a kernel: [  134.250392] sd 0:0:0:0: [sda] Stopping disk
Mar 26 11:40:16 machine-a kernel: [  134.250471] sd 1:0:0:0: [sdb] Stopping disk
Mar 26 11:40:16 machine-a kernel: [  134.252727] au0828: au0828_dvb_suspend(): Suspending DVB fe 0
Mar 26 11:40:16 machine-a kernel: [  134.520351] ACPI: Preparing to enter system sleep state S3
Mar 26 11:40:16 machine-a kernel: [  134.627675] PM: Saving platform NVS memory
Mar 26 11:40:16 machine-a kernel: [  134.627730] Disabling non-boot CPUs ...
Mar 26 11:40:16 machine-a kernel: [  134.640737] IRQ 21: no longer affine to CPU1
Mar 26 11:40:16 machine-a kernel: [  134.640749] IRQ 22: no longer affine to CPU1
Mar 26 11:40:16 machine-a kernel: [  134.640759] IRQ 23: no longer affine to CPU1
Mar 26 11:40:16 machine-a kernel: [  134.640766] IRQ 25: no longer affine to CPU1
**Mar 26 11:40:16 machine-a kernel: [  134.641788] smpboot: CPU 1 is now offline
Mar 26 11:40:16 machine-a kernel: [  134.641873] ACPI: Low-level resume complete**
Mar 26 11:40:16 machine-a kernel: [  134.641873] PM: Restoring platform NVS memory
Mar 26 11:40:16 machine-a kernel: [  134.641873] PCI-DMA: Resuming GART IOMMU
Mar 26 11:40:16 machine-a kernel: [  134.641873] PCI-DMA: Restoring GART aperture settings
Mar 26 11:40:16 machine-a kernel: [  134.641873] Enabling non-boot CPUs ...
Mar 26 11:40:16 machine-a kernel: [  134.641873] x86: Booting SMP configuration:
Mar 26 11:40:16 machine-a kernel: [  134.641873] smpboot: Booting Node 0 Processor 1 APIC 0x1
Mar 26 11:40:16 machine-a kernel: [  134.642916]  cache: parent cpu1 should not be sleeping
Mar 26 11:40:16 machine-a kernel: [  134.643519] CPU1 is up
Mar 26 11:40:16 machine-a kernel: [  134.643957] ACPI: Waking up from system sleep state S3
Mar 26 11:40:16 machine-a kernel: [  134.644738] pcieport 0000:00:0a.0: Enabling HT MSI Mapping
Mar 26 11:40:16 machine-a kernel: [  134.644738] pcieport 0000:00:0b.0: Enabling HT MSI Mapping
Mar 26 11:40:16 machine-a kernel: [  134.644738] pcieport 0000:00:0c.0: Enabling HT MSI Mapping
Mar 26 11:40:16 machine-a kernel: [  134.644738] pcieport 0000:00:0d.0: Enabling HT MSI Mapping
Mar 26 11:40:16 machine-a kernel: [  134.644738] pcieport 0000:00:0e.0: Enabling HT MSI Mapping
Mar 26 11:40:16 machine-a kernel: [  134.644738] pcieport 0000:00:0f.0: Enabling HT MSI Mapping
Mar 26 11:40:16 machine-a kernel: [  134.660321] snd_hda_intel 0000:00:06.1: Enabling HT MSI Mapping
Mar 26 11:40:16 machine-a kernel: [  134.660385] forcedeth 0000:00:08.0: Enabling HT MSI Mapping
Mar 26 11:40:16 machine-a kernel: [  134.660514] sata_nv 0000:00:05.2: Enabling HT MSI Mapping

答案1

好的。machine-a 又活过来了。换上新的 PSU、CMOS 电池和……新的 BIOS 芯片后,该机器现在能够正常 POST 和启动。

附加奖励:暂停/恢复现在可以正常工作!

鉴于暂停/恢复曾经成功,但在后续尝试中失败,我认为不稳定的 PSU 只是个让人恼火的干扰因素。原始 BIOS 肯定存在错误,我将原因归咎于此。

所以,简单来说,解决这个问题的方法就是:升级BIOS。

相关内容