如何在 ubuntu 15.04 上启用休眠模式?
注意:我尝试过sudo pm-hibernate
,但当它恢复我的电脑时,所有打开的应用程序都被关闭了
我的 RAM 大小为 4GB,交换大小为 6GB
输出sudo blkid; cat /etc/initramfs-tools/conf.d/resume
/dev/sda1: UUID="0B4A-F405" TYPE="vfat" PARTLABEL="EFI System Partition" PARTUUID="d44a3ad4-3dad-4450-8863-a551d3404047"
/dev/sda2: UUID="b5a0202a-34dd-4fc9-8fb9-360169c27808" TYPE="ext4" PARTUUID="adcf8d36-61f2-4f11-91c0-84272ddc127c"
/dev/sda3: LABEL="swap" UUID="de8544b3-7bca-4ff1-9a1c-755bcc6da7b4" TYPE="swap" PARTUUID="6503d611-8305-4511-be08-680e8cf7fe94"
/dev/sda4: LABEL="backup" UUID="fd9554a9-0120-483a-9f71-44890d59bb1a" TYPE="ext4" PARTUUID="4535eae7-5494-49b7-a720-9e33dd9cd734"
/dev/sda5: LABEL="volume1" UUID="bb69c64d-5c45-4bab-90e1-ba46e5afd6b2" TYPE="ext4" PARTUUID="094b7241-4895-4051-90ab-439252b4e3f4"
/dev/sda6: LABEL="volume2" UUID="78e88fe7-4eb5-45a3-9673-e14340891d38" TYPE="ext4" PARTUUID="2c503384-ae96-484f-ac54-2265b55ea315"
/dev/sda7: PARTLABEL="Microsoft reserved partition" PARTUUID="1e4e3d03-6720-4ce3-afca-0cec0ece7eb9"
/dev/sda8: UUID="3824EEFE24EEBDCE" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="d25007f0-f962-4cdc-8e67-b54888d3f63b"
RESUME=UUID=8d53d44b-e0da-4599-832f-824884a65bae
答案1
您的问题在于 UUID 不匹配。您可能在安装后重新创建了交换分区。您可以通过运行来修复它
sudo tee /etc/initramfs-tools/conf.d/resume <<< "RESUME=UUID=de8544b3-7bca-4ff1-9a1c-755bcc6da7b4"
sudo update-initramfs -u -k all
然后重新启动。
要在关机菜单中启用休眠功能,您可以使用这个答案。