新客网WWW.XKER.COM:致力做中国最专业的网络学院!
学院: 操作系统 - 网络应用 - 服务器 - 网络安全 - 工具软件 - 办公软件 - Web开发 - 数据库 - 网页设计 - 图形图像 - 媒体动画 - 硬件学堂 - 存储频道 - QQ专区
您的位置:首页 > 网络学院 > 操作系统 > Linux教程 > 正文:新手学堂:Linux操作系统下的休眠与待机

新手学堂:Linux操作系统下的休眠与待机

新客网 XKER.COM 2008-01-28 来源:赛迪网 sixth 收藏本文

内核2.6.23以前要用suspend2-source,以后就用tuxonice-source了。

1、安装tuxonice-source和hibernate-script

前者是打了休眠和待机功能的补丁的内核源码包,后者是提供了用户执行休眠和待机的脚本。

2、编译内核

下面是我的配置

* 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

再试试,就一切正常了。

笔记本有了待机和休眠的功能,方能体现其价值啊!

收藏】 【评论】 【推荐】 【投稿】 【打印】 【关闭
发表评论
要记得去论坛讨论,点击注册新会员匿名评论
评论内容:不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
阅读排行
随机推荐
实用信息推荐