Difference between revisions of "How to make ACPI work"
(rewritten acpi_sleep=s3_bios comment) |
|||
Line 49: | Line 49: | ||
*the madwifi driver, if you happen to use it | *the madwifi driver, if you happen to use it | ||
Afterwards you might want to enable them again, as well as run a script that does necessary configurations according to the ac power state. | Afterwards you might want to enable them again, as well as run a script that does necessary configurations according to the ac power state. | ||
− | + | Furthermore, the system clock is not readjusted automatically, so you will probably also want the do that from that script (i.e. by restarting your systemclock bootup script). | |
Finally you should take note that swsusp does not set the ACPI S4 state. Instead it goes to S5. This means that the machine itself doesn't know that it was suspend rather than shutdown. Hence you can i.e. boot a parallel installed other operating system and resume your linux session later, as long as you don't touch the swap partition the image was saved to. | Finally you should take note that swsusp does not set the ACPI S4 state. Instead it goes to S5. This means that the machine itself doesn't know that it was suspend rather than shutdown. Hence you can i.e. boot a parallel installed other operating system and resume your linux session later, as long as you don't touch the swap partition the image was saved to. |
Revision as of 19:11, 12 December 2004
Contents
general
Todo...
Screen blanking (Standby)
Make sure you have
- Option "DPMS"
in you XF86Config/xorg.conf.
Running "xset +dpms" and then "xset xdpms force off" will turn off the backlight on a laptop screen. To force a screen off that is using a radeon chipset, install the package "radeontools."
Todo...
Suspend to RAM (Sleep)
ACPI Sleep and suspend-to-ram with recent 2.6.x kernels usually works fine, too.
With a 2.6.9 kernel, when resuming from a suspend-to-ram the display might remain black (the system is still rebootable via ctrl-alt-del). This can be fixed by adding "acpi_sleep=s3_bios" to the kernel boot parameters.
However I experience some problems with the serial port of the port replicator after the wake up from ram.
Also, you might want to take note of the Problem with high power drain in ACPI sleep.
Suspend to disk (Hibernate)
There are two drivers for this available:
- swsusp, which is in the kernel and
- SoftwareSuspend2 which is more feature rich, but not yet in the kernel, so you have to patch it in yourself
Both are reported to work fine as long as you use open-source graphic drivers. A comparison of the features can be found on this page.
Just in case you are in doubt...yes, it is safe in both cases to use the same swap partition as active swap and as suspend partition.
using swsusp
Software Suspend (swsusp) is included in the 2.6 kernel series. It seems like no patches for 2.4 kernels are available.
To enable it, go to Power management options and enable Power management support and Software Suspend in the kernel config menu. You'll also want to give the swap partition to suspend to in Default resume partition.
In case you prefer to edit your config file directly, you should have the following three entries look like here...
CONFIG_PM=y CONFIG_SOFTWARE_SUSPEND=y CONFIG_PM_STD_PARTITION="/dev/resume_partition"
...where /dev/resume_partition needs to be replaced by the swap partition you want to use for suspending. (Use fdisk -l /dev/hda if unsure.)
You can override the default resume partition anytime by giving resume=/dev/resume_partition as kernel boot parameter. Also, ihn case you suspended, but want to boot up normally (without resuming from the saved image - loosing all data that was unsaved at suspend time), you can give the noresume kernel boot parameter.
To suspend you can either do a simple echo -n 4 > /proc/acpi/sleep (recommended) or use the patched SysVInit and call swsusp or shutdown -z now.
Ideally you would do this from a script like /etc/acpi/actions/hibernate.sh. It has proven to be a good idea to shutdown the following processes/drivers within the script before you do the actual suspend.
- any running mysql server
- the madwifi driver, if you happen to use it
Afterwards you might want to enable them again, as well as run a script that does necessary configurations according to the ac power state. Furthermore, the system clock is not readjusted automatically, so you will probably also want the do that from that script (i.e. by restarting your systemclock bootup script).
Finally you should take note that swsusp does not set the ACPI S4 state. Instead it goes to S5. This means that the machine itself doesn't know that it was suspend rather than shutdown. Hence you can i.e. boot a parallel installed other operating system and resume your linux session later, as long as you don't touch the swap partition the image was saved to.
using SoftwareSuspend2
Todo...