Chinaunix首页 | 论坛 | 博客
  • 博客访问: 3820810
  • 博文数量: 197
  • 博客积分: 10086
  • 博客等级: 上将
  • 技术积分: 5145
  • 用 户 组: 普通用户
  • 注册时间: 2007-05-13 10:50
文章分类

全部博文(197)

文章存档

2011年(2)

2009年(30)

2008年(165)

我的朋友

分类: LINUX

2009-01-03 21:40:13

Fixing hibernation in Ubuntu

The default method of hibernation provided by powermanagement-interface seems to be flaky at best (it does not work on either my T41 or my T61).

Luckily uswsusp works out of the box

After installing the uswsusp package you need to make sure to "remove" ACPI hibernation as this is the first choice of hibernation selected by the HAL scripts called from GNOME. You must also make sure that no other hibernation packages are installed.

$ sudo apt-get remove hibernate
$ sudo apt-get install uswsusp
$ sudo dpkg-divert --rename --divert /etc/acpi/hibernate.sh-disabled /etc/acpi/hibernate.sh
$ sudo ln -sf /sbin/s2disk /usr/sbin/s2disk

If you want to make use of the hibernate button make the following changes:

First we divert the event script used by ACPI so our own script will not be overwritten when the acpi-support package is upgraded

$ sudo dpkg-divert --rename --divert /etc/acpi/hibernatebtn.sh-disabled /etc/acpi/hibernatebtn.sh

Then create a new /etc/acpi/hibernatebtn.sh with this simple content

#!/bin/bash
s2disk

Optionally, if you want the spiffy splash screens during hibernate/restore, also install the splashy and splashy themes (you'll have to edit /etc/uswsusp.conf and add a line saying "splash = y" to use them)

$ sudo apt-get install splashy splashy-themes

阅读(783) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~