|
桌面为kde4,以前用arch的时候将休眠方式改为uswsusp后感觉很快,最近把gentoo的休眠方式也改为了uswsusp:
- # cat /etc/suspend.conf
- snapshot device = /dev/snapshot
- resume device = /dev/sda2
- image size = 1073741824
- #suspend loglevel = 2
- compute checksum = y
- compress = y
- #encrypt = y
- #early writeout = y
- splash = y
- threads = y
复制代码
- # cat /etc/pm/config.d/module
- SLEEP_MODULE=uswsusp
复制代码
- # ls /usr/src/initramfs/ -aR
- /usr/src/initramfs/:
- . .. bin dev etc init newroot proc sys
- /usr/src/initramfs/bin:
- . .. busybox resume
- /usr/src/initramfs/dev:
- . .. snapshot
- /usr/src/initramfs/etc:
- . .. suspend.conf
- /usr/src/initramfs/newroot:
- . ..
- /usr/src/initramfs/proc:
- . ..
- /usr/src/initramfs/sys:
- . ..
复制代码
- #cat /usr/src/initramfs/init
- #!/bin/busybox ash
- local X ROOT RUNLEVEL
- # Preliminary stuff.
- mount -t proc proc /proc
- mount -t sysfs sysfs /sys
- mdev -s
- # Try to resume. This never returns if it succeeds.
- resume
- # Parse the command line for relevant options.
- for X in `cat /proc/cmdline`
- do
- case "$X" in
- root=*) ROOT=${X#root=} ;;
- [0-6Ss]) RUNLEVEL=${X} ;;
- esac
- done
- # Mount and switch root.
- mount -o ro ${ROOT} /newroot
- umount -f /sys || umount -l /sys
- umount -f /proc || umount -l /proc
- exec switch_root /newroot /sbin/init ${RUNLEVEL}
复制代码
然后用splash_geninitramfs生成initramfs后s2disk很慢……恢复甚至要用1m以上,而arch当时恢复不到30s……s2ram速度正常,但恢复也很慢……请教问题出在何处?…… |
|