https://wiki.archlinux.org/index.php/Uswsusp
Step A:
install https://aur.archlinux.org/packages/us/uswsusp-git/uswsusp-git.tar.gz
tar zxf uswsusp-git.tar.gz
makepkg
pacman -U uswsusp-git-xxxx-1-x86_64.pkg.tar.xz
em /etc/suspend.conf
like this:
snapshot device = /dev/snapshot
resume device = /dev/sda5
resume offset = 123456 <----# swap-offset <swap_file_path>
shutdown method = platform
compress = y
Step B:
1) Create the swap file and make it active, eg.
# dd if=/dev/zero of=<swap_file_path> bs=1024 count=<swap_file_size_in_k>
# mkswap <swap_file_path>
# swapon <swap_file_path>
2) Use an application that will bmap the swap file with the help of the
FIBMAP ioctl and determine the location of the file's swap header, as the
offset, in <PAGE_SIZE> units, from the beginning of the partition which
holds the swap file.
# swap-offset <swap_file_path>
next line maybe useless
3) Add the following parameters to the kernel command line:
resume=<swap_file_partition> resume_offset=<swap_file_offset>
Step C:
s2disk
本文档详细介绍了如何在 Arch Linux 上安装并配置 USwsusp 工具来实现系统的深度睡眠功能。步骤包括:安装 USwsusp,创建交换文件,配置 suspend.conf 文件,设置内核参数等。
1575

被折叠的 条评论
为什么被折叠?



