电脑上的的休眠一直用不了,今天总算可以正常休眠了,不过在休眠虽然安全但是启动的速度却太慢,我的电脑因为某个扩展卡启动电脑的时候自检要30秒左右,于是我想要是Linux下也有windows的混合休眠技术就好了,没曾想到竟然还真有这个功能,现在我们来启用这个功能吧。
首先就,检测系统是否支持混合睡眠:
sudo pm-is-supported --suspend-hybrid && echo "hybrid suspend is supported" || echo "your system doesn't support hybrid suspend"
# WORKAROUND: always set the default hibernate mode first (normal mode)
# (not required if you have the patch mentioned by Rohan below (http://askubuntu.com/a/344879/169))
HIBERNATE_MODE=platform
# Always use hibernate instead of suspend, but with "suspend to both"
if [ "$METHOD" = "suspend" ]; then
METHOD=hibernate
HIBERNATE_MODE=suspend
fi
# Make sure to use the kernel's method, in case uswsusp is installed etc.
SLEEP_MODULE=kernel
现在点击菜单中的睡眠按钮就可启用混合睡眠了,原来的休眠功能不变,现在总算是速度和安全兼备了。
补充:突然发现这个功能在我的上网本上使用正常,但是在台式机上就会一睡不起,我怀疑是闭源显卡驱动的问题。
ps:Ubuntu一样可以使用这个功能。
这里感谢这篇文章:How To Use Hybrid Suspend In Ubuntu