IndexOutOfBoundsException Asked: 2024-10-12 22:55:42 +0800 CST2024-10-12 22:55:42 +0800 CST 2024-10-12 22:55:42 +0800 CST 系统偶尔不会暂停 772 我的系统时不时无法正常挂起。关闭盖子、选择从图形界面挂起或运行命令都会关闭屏幕,但系统会在几秒钟后重新启动。运行故障排除显示某些设备阻止系统挂起。如何才能让我的系统挂起? suspend 1 个回答 Voted Best Answer IndexOutOfBoundsException 2024-10-12T22:55:42+08:002024-10-12T22:55:42+08:00 可能是某个特定设备阻止了您的系统挂起,因此几秒钟后系统会再次启动。为了避免这种情况,请尝试禁用一些可能导致唤醒的设备,以便您的系统可以正常挂起。 以下是我的情况: echo mem | sudo tee /sys/power/state尝试暂停(也可以以root 身份运行命令) 以 root身份运行journalctl -b。 识别表示设备阻止系统关闭的条目。在我的例子中,有问题的输出是这样的: Oct 12 16:01:40 Machine kernel: sof-audio-pci-intel-mtl 0000:00:1f.3: ------------[ DSP dump start ]------------ Oct 12 16:01:40 Machine kernel: sof-audio-pci-intel-mtl 0000:00:1f.3: Firmware boot failure due to timeout Oct 12 16:01:40 Machine kernel: sof-audio-pci-intel-mtl 0000:00:1f.3: fw_state: SOF_FW_BOOT_IN_PROGRESS (3) Oct 12 16:01:40 Machine kernel: sof-audio-pci-intel-mtl 0000:00:1f.3: ROM status: 0x5, ROM error: 0x0 Oct 12 16:01:40 Machine kernel: sof-audio-pci-intel-mtl 0000:00:1f.3: ROM debug status: 0x50000005, ROM debug error: 0x0 Oct 12 16:01:40 Machine kernel: sof-audio-pci-intel-mtl 0000:00:1f.3: ROM feature bit enabled Oct 12 16:01:40 Machine kernel: sof-audio-pci-intel-mtl 0000:00:1f.3: ------------[ DSP dump end ]------------ Oct 12 16:01:40 Machine kernel: sof-audio-pci-intel-mtl 0000:00:1f.3: error: failed to boot DSP firmware after resume -5 Oct 12 16:01:40 Machine kernel: e1000e 0000:00:1f.6: PM: pci_pm_suspend(): e1000e_pm_suspend+0x0/0xa0 [e1000e] returns -2 Oct 12 16:01:40 Machine kernel: e1000e 0000:00:1f.6: PM: dpm_run_callback(): pci_pm_suspend+0x0/0x1b0 returns -2 Oct 12 16:01:40 Machine kernel: e1000e 0000:00:1f.6: PM: failed to suspend async: error -2 Oct 12 16:01:40 Machine kernel: PM: Some devices failed to suspend, or early wake event detected 搜索可以唤醒设备的设备,或者,由于这个错误,可能会阻止设备挂起。为此,请查看 的内容/proc/acpi/wakeup(例如使用cat /proc/acpi/wakeup)。您应该会得到一个设备列表,其中一些设备发出disabled信号表示它们无法唤醒您的机器,其他设备则发出信号enabled。我的文件如下所示: Device S-state Status Sysfs node AWAC S4 *enabled platform:ACPI000E:00 XDCI S4 *disabled GLAN S4 *disabled pci:0000:00:1f.6 XHCI S3 *enabled pci:0000:00:14.0 HDAS S4 *enabled pci:0000:00:1f.3 I3C0 S4 *disabled CNVW S4 *disabled pci:0000:00:14.3 RP01 S4 *enabled pci:0000:00:1c.0 PXSX S4 *disabled RP02 S4 *disabled PXSX S4 *disabled RP03 S4 *disabled PXSX S4 *disabled RP04 S4 *disabled PXSX S4 *disabled RP05 S4 *disabled PXSX S4 *disabled RP06 S4 *disabled PXSX S4 *disabled RP07 S4 *disabled PXSX S4 *disabled PXSX S4 *disabled RP09 S4 *enabled pci:0000:00:06.0 PXSX S4 *disabled RP10 S4 *enabled pci:0000:00:06.1 PXSX S4 *disabled pci:0000:04:00.0 RP11 S4 *disabled PXSX S4 *disabled RP12 S4 *disabled PXSX S4 *disabled TXHC S4 *enabled pci:0000:00:0d.0 TDM0 S4 *enabled pci:0000:00:0d.2 TDM1 S4 *enabled pci:0000:00:0d.3 TRP0 S4 *enabled pci:0000:00:07.0 PXSX S4 *disabled TRP1 S4 *disabled PXSX S4 *disabled TRP2 S4 *enabled pci:0000:00:07.2 PXSX S4 *disabled TRP3 S4 *disabled PXSX S4 *disabled SLPB S3 *enabled platform:PNP0C0E:00 LID S4 *enabled platform:PNP0C0D:00 将阻止挂起的设备的输出与设备列表进行比较。如果有任何标识符指向 的设备enable,请考虑disabling它们。为此,请以 root 身份编辑文本文件,并将此特定设备 替换为disabled。enabled(我对 进行了替换HDAS)。 尝试暂停你的机器。 奖励: 要了解阻止挂起的设备,请lspci以 root 身份运行。 就我而言,我得到: 00:00.0 Host bridge: Intel Corporation Device 7d02 (rev 04) 00:02.0 VGA compatible controller: Intel Corporation Meteor Lake-P [Intel Graphics] (rev 08) 00:04.0 Signal processing controller: Intel Corporation Device 7d03 (rev 04) 00:06.0 PCI bridge: Intel Corporation Device 7e4d (rev 20) 00:06.1 PCI bridge: Intel Corporation Device 7eca (rev 10) 00:07.0 PCI bridge: Intel Corporation Meteor Lake-P Thunderbolt 4 PCI Express Root Port #0 (rev 02) 00:07.2 PCI bridge: Intel Corporation Meteor Lake-P Thunderbolt 4 PCI Express Root Port #2 (rev 02) 00:0a.0 Signal processing controller: Intel Corporation Device 7d0d (rev 01) 00:0b.0 Processing accelerators: Intel Corporation Meteor Lake NPU (rev 04) 00:0d.0 USB controller: Intel Corporation Meteor Lake-P Thunderbolt 4 USB Controller (rev 02) 00:0d.2 USB controller: Intel Corporation Meteor Lake-P Thunderbolt 4 NHI #0 (rev 02) 00:0d.3 USB controller: Intel Corporation Meteor Lake-P Thunderbolt 4 NHI #1 (rev 02) 00:14.0 USB controller: Intel Corporation Meteor Lake-P USB 3.2 Gen 2x1 xHCI Host Controller (rev 20) 00:14.2 RAM memory: Intel Corporation Device 7e7f (rev 20) 00:14.3 Network controller: Intel Corporation Meteor Lake PCH CNVi WiFi (rev 20) 00:15.0 Serial bus controller: Intel Corporation Meteor Lake-P Serial IO I2C Controller #0 (rev 20) 00:16.0 Communication controller: Intel Corporation Device 7e70 (rev 20) 00:1c.0 PCI bridge: Intel Corporation Device 7e38 (rev 20) 00:1f.0 ISA bridge: Intel Corporation Device 7e03 (rev 20) 00:1f.3 Audio device: Intel Corporation Meteor Lake-P HD Audio Controller (rev 20) 00:1f.4 SMBus: Intel Corporation Meteor Lake-P SMBus Controller (rev 20) 00:1f.5 Serial bus controller: Intel Corporation Meteor Lake-P SPI Controller (rev 20) 00:1f.6 Ethernet controller: Intel Corporation Device 550b (rev 20) 04:00.0 Non-Volatile memory controller: Sandisk Corp WD Black SN770 / PC SN740 256GB / PC SN560 (DRAM-less) NVMe SSD (rev 01) 有问题的设备是00:1f.6,我得出的结论是以太网控制器阻止了系统暂停。 注意:当然还有其他问题导致无法暂停系统。这只是旨在补充现有解释的贡献。
可能是某个特定设备阻止了您的系统挂起,因此几秒钟后系统会再次启动。为了避免这种情况,请尝试禁用一些可能导致唤醒的设备,以便您的系统可以正常挂起。
以下是我的情况:
echo mem | sudo tee /sys/power/state
尝试暂停(也可以以root 身份运行命令)journalctl -b
。/proc/acpi/wakeup
(例如使用cat /proc/acpi/wakeup
)。您应该会得到一个设备列表,其中一些设备发出disabled
信号表示它们无法唤醒您的机器,其他设备则发出信号enabled
。我的文件如下所示:enable
,请考虑disabling
它们。为此,请以 root 身份编辑文本文件,并将此特定设备 替换为disabled
。enabled
(我对 进行了替换HDAS
)。奖励: 要了解阻止挂起的设备,请
lspci
以 root 身份运行。就我而言,我得到:
有问题的设备是
00:1f.6
,我得出的结论是以太网控制器阻止了系统暂停。注意:当然还有其他问题导致无法暂停系统。这只是旨在补充现有解释的贡献。