使用 休眠后systemctl hibernate,系统会像关机一样正常启动。我在内核行中有resume参数,在mkinitcpio.conf中有resume钩子
这些是相关的内核消息:
$ dmesg | grep -i swap
[ 0.000000] Command line: initrd=\initramfs-linux.img root=/dev/sda2 rw resume=/dev/sda4
[ 0.000000] Kernel command line: initrd=\initramfs-linux.img root=/dev/sda2 rw resume=/dev/sda4
[ 0.350295] PM: Checking hibernation image partition /dev/sda4
[ 8.776686] Adding 8191996k swap on /dev/sda4. Priority:-1 extents:1 across:8191996k FS
$ dmesg | grep -i hibern
[ 0.350295] PM: Checking hibernation image partition /dev/sda4
[ 0.350301] PM: Hibernation image not present or could not be loaded.
Run Code Online (Sandbox Code Playgroud)
所以唯一剩下的可能性是systemctl 没有写入磁盘。事实上,当我运行命令时,屏幕首先会变黑几秒钟,然后我可以再次看到我的终端,最后它会自行关闭。
我读到 pm-utils …