Linux下操作系统的休眠与待机

分类: 系统管理   出处:iocblog整理  更新时间:2009-04-19   添加到收藏  

  内核2.6.23以前要用suspend2-source,以后就用tuxonice-source了。
 
  1、安装tuxonice-source和hibernate-script
 
  前者是打了休眠和待机功能的补丁的内核源码包,后者是提供了用户执行休眠和待机的脚本。
 
  2、编译内核
 
  下面是我的配置[来源www.iocblog.net]
 
  [来源www.iocblog.net]

* power management support │ │ 
│ │ [ ] legacy power management api (deprecated) │ │ 
│ │ [ ] power management debug support │ │ 
│ │ *] suspend to ram and standby │ │ 
│ │ *] hibernation (aka 'suspend to disk') │ │ 
│ │ () default resume partition │ │ 
│ │ <*> enhanced hibernation (tuxonice) --->

--- enhanced hibernation tuxonice) │ │ 
│ │ --- image storage (you need at least one allocator) │ │ 
│ │ <*> file allocator │ │ 
│ │ <*> swap allocator │ │ 
│ │ --- general options │ │ 
│ │ <*> compression support │ │ 
│ │ <*> userspace user interface support │ │ 
│ │ (/usr/local/sbin/tuxonice_fbsplash) default userui program location │ │ 
│ │ [ ] allow keep image mode │ │ 
│ │ *] replace swsusp by default │ │ 
│ │ < > cluster support ---> │ │ 
│ │ *] checksum pageset2 │ │ 
│ │ (25) default waiting time for emergency boot messages │ │

 
  3、使用新内核
 
  在终端下和x里面用
 
  hibernate -n和hibernate-ram -n分别试试,如果一切正常则表明配置是没问题的,可以正常使用(去掉后面的-n)
 
  4、hibernate-ram不能resume的问题――vbetool
 
  刚开始在我的dell 1400本本上待机后再恢复,屏幕会变得很暗很暗,终端下根本看不见东西,但是机器是在运行的。搜了下,发现需要用vbetool,安装vbetool,然后打开/etc/hibernate/common.conf里的
 
  

### vbetool
enablevbetool yes

 
  再试试,就一切正常了。
 
  笔记本有了待机和休眠的功能,方能体现其价值啊!
 



文章整理:iocblog
版权申明:本站文章均来自网络,如有侵权,请联系我们,我们收到后立即删除,谢谢!
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有。