在 arch linux 上遇到休眠问题

在 arch linux 上遇到休眠问题

我的系统在休眠后无法恢复 我的钩子

cat /etc/mkinitcpio.conf | grep resume
HOOKS="base udev autodetect modconf block resume filesystems keyboard fsck"

然后我做了

mkinitcpio -p linux

我将恢复参数添加到内核参数中

$ cat /boot/loader/entries/arch.conf 
title       Arch Linux
linux       /vmlinuz-linux
initrd      /intel-ucode.img
initrd      /initramfs-linux.img
options     root=PARTUUID=07b10be9-f06a-4501-9259-00f1d1bc1157 resume=/dev/sda6 rw

我也尝试过使用UUID,但没有成功。

在journalctl -b 中启动系统后,我有

PM: Starting manual resume from disk
Jul 27 21:45:56 LIKAN-PC kernel: PM: Hibernation image partition 8:6 present
Jul 27 21:45:56 LIKAN-PC kernel: PM: Looking for hibernation image.
Jul 27 21:45:56 LIKAN-PC kernel: PM: Image not found (code -22)
Jul 27 21:45:56 LIKAN-PC kernel: PM: Hibernation image not present or could not be loaded.

由于休眠过程持续时间太长(大约5分钟),我假设将休眠映像写入交换分区时会遇到一些麻烦。查看journalctl -b 1,我发现交换分区存在一些问题

Jun 16 20:24:48 LIKAN-PC systemd[1]: Stopped Apply Kernel Variables.
Jun 16 20:24:48 LIKAN-PC systemd[1]: Removed slice system-dhcpcd.slice.
Jun 16 20:24:48 LIKAN-PC systemd[1]: Unmounting /boot...
Jun 16 20:24:48 LIKAN-PC systemd[1]: Removed slice User and Session Slice.
Jun 16 20:24:48 LIKAN-PC systemd[1]: Stopped target Emergency Mode.
Jun 16 20:24:48 LIKAN-PC systemd[1]: Stopping Emergency Shell...
Jun 16 20:24:48 LIKAN-PC systemd[1]: Stopped target Timers.
Jun 16 20:24:48 LIKAN-PC systemd[1]: Stopped target Sockets.
Jun 16 20:24:48 LIKAN-PC systemd[1]: Stopped Emergency Shell.
Jun 16 20:24:48 LIKAN-PC systemd[1]: Stopped Load/Save Screen Backlight Brightness of backlight:acpi_video1.
Jun 16 20:24:48 LIKAN-PC systemd[1]: Stopped Load/Save Random Seed.
Jun 16 20:24:48 LIKAN-PC systemd[1]: Stopped Load/Save Screen Backlight Brightness of backlight:acpi_video0.
Jun 16 20:24:48 LIKAN-PC systemd[1]: Unmounted Temporary Directory.
Jun 16 20:24:48 LIKAN-PC systemd[1]: Stopped target Swap.
Jun 16 20:24:48 LIKAN-PC systemd[1]: Deactivating swap /dev/disk/by-id/ata-TOSHIBA_MK7575GSX_Z29FP24ST-part6...
Jun 16 20:24:48 LIKAN-PC systemd[1]: Deactivating swap /dev/sda6...
Jun 16 20:24:48 LIKAN-PC systemd[1]: Removed slice system-systemd\x2dbacklight.slice.
Jun 16 20:24:48 LIKAN-PC systemd[1]: Stopped Update UTMP about System Boot/Shutdown.
Jun 16 20:24:48 LIKAN-PC swapoff[420]: swapoff: /dev/disk/by-uuid/35193a16-2f67-4153-b75a-a38836d92b8d: swapoff failed: Invalid argument
Jun 16 20:24:48 LIKAN-PC systemd[1]: dev-disk-by\x2duuid-35193a16\x2d2f67\x2d4153\x2db75a\x2da38836d92b8d.swap: Swap process exited, code=exited status=255
Jun 16 20:24:48 LIKAN-PC systemd[1]: Deactivated swap /dev/disk/by-uuid/35193a16-2f67-4153-b75a-a38836d92b8d.
Jun 16 20:24:48 LIKAN-PC systemd[1]: dev-disk-by\x2duuid-35193a16\x2d2f67\x2d4153\x2db75a\x2da38836d92b8d.swap: Unit entered failed state.
Jun 16 20:24:48 LIKAN-PC systemd[1]: Deactivated swap /dev/disk/by-path/pci-0000:00:1f.2-ata-1-part6.
Jun 16 20:24:48 LIKAN-PC systemd[1]: Deactivated swap /dev/disk/by-partuuid/9db227e2-7d8d-4427-9277-054ac914ac05.
Jun 16 20:24:48 LIKAN-PC systemd[1]: Deactivated swap /dev/disk/by-id/wwn-0x5000039472882700-part6.
Jun 16 20:24:48 LIKAN-PC systemd[1]: Deactivated swap /dev/disk/by-id/ata-TOSHIBA_MK7575GSX_Z29FP24ST-part6.
Jun 16 20:24:48 LIKAN-PC systemd[1]: Deactivated swap /dev/sda6.
Jun 16 20:24:48 LIKAN-PC systemd[1]: Unmounted /boot.
Jun 16 20:24:48 LIKAN-PC systemd[1]: Reached target Unmount All Filesystems.
Jun 16 20:24:48 LIKAN-PC systemd[1]: Stopped target Local File Systems (Pre).
Jun 16 20:24:48 LIKAN-PC systemd[1]: Stopped Create Static Device Nodes in /dev.
Jun 16 20:24:48 LIKAN-PC systemd[1]: Stopped Create System Users.
Jun 16 20:24:48 LIKAN-PC systemd[1]: Stopped Remount Root and Kernel File Systems.
Jun 16 20:24:48 LIKAN-PC mkinitcpio[404]: ==> Starting build: none
Jun 16 20:24:48 LIKAN-PC mkinitcpio[404]:   -> Running build hook: [sd-shutdown]
Jun 16 20:24:48 LIKAN-PC mkinitcpio[404]: ==> Build complete.
Jun 16 20:24:48 LIKAN-PC systemd[1]: Started Generate shutdown-ramfs.
Jun 16 20:24:48 LIKAN-PC systemd[1]: Reached target Shutdown.
Jun 16 20:24:48 LIKAN-PC systemd[1]: Reached target Final Step.
Jun 16 20:24:48 LIKAN-PC systemd[1]: Starting Reboot...
Jun 16 20:24:48 LIKAN-PC systemd[1]: Shutting down.
Jun 16 20:24:48 LIKAN-PC systemd[1]: Hardware watchdog 'iTCO_wdt', version 0
Jun 16 20:24:48 LIKAN-PC systemd[1]: Set hardware watchdog to 10min.
Jun 16 20:24:48 LIKAN-PC kernel: watchdog: watchdog0: watchdog did not stop!
Jun 16 20:24:48 LIKAN-PC systemd-shutdown[1]: Sending SIGTERM to remaining processes...
Jun 16 20:24:48 LIKAN-PC systemd-journald[232]: Journal stopped
lines 933-986/986 (END)

完整日志ctl -b 1 http://pastebin.com/uL6Fdwsv

相关内容