Systemd 重新启动我的电脑而不是关闭它

Systemd 重新启动我的电脑而不是关闭它

我刚刚安装了 Arch Linux,每当我尝试关闭我的电脑时,它都会重新启动。我见过很多类似的问题(这里)但他们的解决方案都不起作用。另外,我有一种感觉,我面临的问题有所不同。因为 systemd 正在发送重启命令。我已经尝试过:

  • 不同的关机命令:shutdown now -hsystemctl poweroffsystemctl --force poweroff
  • 禁用网络唤醒/类似选项
  • 杀死 X 并尝试关闭

事实上,我注意到在系统“关闭”之前,终端会打印该行Started Reboot.我刚刚发现这个问题已经讨论过了这里,但是没有人提出解决方案。下面是我的部分内容journalctl -b 1,您可以修改这些行:systemd-reboot.service:成功并开始重新启动接近日志的末尾。有人能帮我吗?

Dec 12 16:25:47 Minami systemd[1]: Unmounted /boot.
Dec 12 16:25:47 Minami systemd[1]: tmp.mount: Succeeded.
Dec 12 16:25:47 Minami systemd[1]: Unmounted Temporary Directory (/tmp).
Dec 12 16:25:47 Minami systemd[1]: Stopped target Swap.
Dec 12 16:25:47 Minami systemd[1]: Deactivating swap /dev/disk/by-id/ata-WDC_WD10EZEX-22RKKA0_WD-WCC1S5355790-part1...
Dec 12 16:25:47 Minami systemd[1]: dev-disk-by\x2dpath-pci\x2d0000:00:1f.2\x2data\x2d2\x2dpart1.swap: Succeeded.
Dec 12 16:25:47 Minami systemd[1]: Deactivated swap /dev/disk/by-path/pci-0000:00:1f.2-ata-2-part1.
Dec 12 16:25:47 Minami systemd[1]: dev-disk-by\x2dpartuuid-1b2952aa\x2d01.swap: Succeeded.
Dec 12 16:25:47 Minami systemd[1]: Deactivated swap /dev/disk/by-partuuid/1b2952aa-01.
Dec 12 16:25:47 Minami systemd[1]: dev-disk-by\x2did-wwn\x2d0x50014ee208f0cacb\x2dpart1.swap: Succeeded.
Dec 12 16:25:47 Minami systemd[1]: Deactivated swap /dev/disk/by-id/wwn-0x50014ee208f0cacb-part1.
Dec 12 16:25:47 Minami systemd[1]: dev-disk-by\x2did-ata\x2dWDC_WD10EZEX\x2d22RKKA0_WD\x2dWCC1S5355790\x2dpart1.swap: Succeeded.
Dec 12 16:25:47 Minami systemd[1]: Deactivated swap /dev/disk/by-id/ata-WDC_WD10EZEX-22RKKA0_WD-WCC1S5355790-part1.
Dec 12 16:25:47 Minami systemd[1]: dev-sdb1.swap: Succeeded.
Dec 12 16:25:47 Minami systemd[1]: Deactivated swap /dev/sdb1.
Dec 12 16:25:47 Minami systemd[1]: dev-disk-by\x2duuid-389bc3ae\x2d2f0b\x2d4fe1\x2d8c8a\x2d5a73ecd53ede.swap: Succeeded.
Dec 12 16:25:47 Minami systemd[1]: Deactivated swap /dev/disk/by-uuid/389bc3ae-2f0b-4fe1-8c8a-5a73ecd53ede.
Dec 12 16:25:47 Minami systemd[1]: home.mount: Succeeded.
Dec 12 16:25:47 Minami systemd[1]: Unmounted /home.
Dec 12 16:25:47 Minami systemd[1]: Reached target Unmount All Filesystems.
Dec 12 16:25:47 Minami systemd[1]: systemd-fsck@dev-disk-by\x2duuid-1f356231\x2d99ac\x2d4451\x2da6b6\x2d491338f88a98.service: Succeeded.
Dec 12 16:25:47 Minami systemd[1]: Stopped File System Check on /dev/disk/by-uuid/1f356231-99ac-4451-a6b6-491338f88a98.
Dec 12 16:25:47 Minami audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-fsck@dev-disk-by\x2duuid-1f356231\x2d99ac\x2d4451\x2da6b6\x2d491338f88a98 comm="systemd" exe="/usr/lib/sy>
Dec 12 16:25:47 Minami systemd[1]: Removed slice system-systemd\x2dfsck.slice.
Dec 12 16:25:47 Minami systemd[1]: Stopped target Local File Systems (Pre).
Dec 12 16:25:47 Minami systemd[1]: systemd-tmpfiles-setup-dev.service: Succeeded.
Dec 12 16:25:47 Minami systemd[1]: Stopped Create Static Device Nodes in /dev.
Dec 12 16:25:47 Minami audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-tmpfiles-setup-dev comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Dec 12 16:25:47 Minami systemd[1]: systemd-sysusers.service: Succeeded.
Dec 12 16:25:47 Minami audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-sysusers comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Dec 12 16:25:47 Minami systemd[1]: Stopped Create System Users.
Dec 12 16:25:47 Minami audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-remount-fs comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Dec 12 16:25:47 Minami systemd[1]: systemd-remount-fs.service: Succeeded.
Dec 12 16:25:47 Minami systemd[1]: Stopped Remount Root and Kernel File Systems.
Dec 12 16:25:47 Minami systemd[1]: Reached target Shutdown.
Dec 12 16:25:47 Minami systemd[1]: Reached target Final Step.
Dec 12 16:25:47 Minami systemd[1]: systemd-reboot.service: Succeeded.
Dec 12 16:25:47 Minami systemd[1]: Started Reboot.
Dec 12 16:25:47 Minami audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-reboot comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Dec 12 16:25:47 Minami audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-reboot comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Dec 12 16:25:47 Minami systemd[1]: Reached target Reboot.
Dec 12 16:25:47 Minami systemd[1]: Shutting down.
Dec 12 16:25:47 Minami systemd[1]: Hardware watchdog 'iamt_wdt', version 1
Dec 12 16:25:47 Minami systemd[1]: Set hardware watchdog to 10min.
Dec 12 16:25:47 Minami systemd-shutdown[1]: Syncing filesystems and block devices.
Dec 12 16:25:47 Minami systemd-journald[283]: Journal stopped

答案1

对于关闭,你似乎混合了时间和选项顺序

   shutdown [OPTIONS...] [TIME] [WALL...]

所以我希望你的命令shutdown now -h给出“-h”作为关闭消息(但在我的系统上它仍然会导致断电......但这可能可以改变。因此尝试

shutdown --halt now

为了更好的效果。简短的形式(在我的系统上是--halt-H-h识别的。

然而,这一切可能不是问题,而是内核设置由于一些硬件细节,需要由 grub 传递:

xhcd_hcd.quirks=270336

相关内容