特殊:Badtitle/NS100:SuspendHowto:修订间差异
小 新页面: {{From|https://help.ubuntu.com/community/SuspendHowto}} {{Languages|UbuntuHelp:SuspendHowto}} NOTE: Suspend support is included in the Hoary release. Hoary users should see [[UbuntuHelp:H... |
小无编辑摘要 |
||
第2行: | 第2行: | ||
{{Languages|UbuntuHelp:SuspendHowto}} | {{Languages|UbuntuHelp:SuspendHowto}} | ||
NOTE: Suspend support is included in the Hoary release. Hoary users should see [[UbuntuHelp:HoaryPM]] | NOTE: Suspend support is included in the Hoary release. Hoary users should see [[UbuntuHelp:HoaryPM]] | ||
NOTE: For succesful suspend to disk (hibernation), you need swap partition (or file, though I have not tested with swap file) bigger than is actual size of your memory. All your memory and also everything that was swaped at the time of hibernation must fit in swap, so at the size of swap should be 1.5x-2x bigger than size of your RAM. | NOTE: For succesful suspend to disk (hibernation), you need swap partition (or file, though I have not tested with swap file) bigger than is actual size of your memory. All your memory and also everything that was swaped at the time of hibernation must fit in swap, so at the size of swap should be 1.5x-2x bigger than size of your RAM. | ||
== Introduction == | == Introduction == | ||
Suspend mode is a special low-power mode, often used on laptops, that preserves the contents of RAM | Suspend mode is a special low-power mode, often used on laptops, that preserves the contents of RAM | ||
while conserving power. | while conserving power. | ||
There are two different standards for power management (which handles suspend in Linux), ACPI and APM. ACPI has more advanced features, but is only found on computers made in the last few years. APM is older, and somewhat more mature, but doesn't offer as many features as ACPI. It also isn't available on many new PCs. | There are two different standards for power management (which handles suspend in Linux), ACPI and APM. ACPI has more advanced features, but is only found on computers made in the last few years. APM is older, and somewhat more mature, but doesn't offer as many features as ACPI. It also isn't available on many new PCs. | ||
Also, there are two main forms of suspend - suspend-to-RAM and suspend-to-disk | Also, there are two main forms of suspend - suspend-to-RAM and suspend-to-disk | ||
(also known as "software suspend" or "hibernation"). Suspend-to-RAM uses more power, but is almost instant. Suspend-to-disk, on the other hand, uses no power (the system actually powers off), but takes longer to suspend/resume. This HOWTO will discuss all of these methods. | (also known as "software suspend" or "hibernation"). Suspend-to-RAM uses more power, but is almost instant. Suspend-to-disk, on the other hand, uses no power (the system actually powers off), but takes longer to suspend/resume. This HOWTO will discuss all of these methods. | ||
WARNING: This is not officially supported in Ubuntu Warty, and may cause system problems or data loss. | WARNING: This is not officially supported in Ubuntu Warty, and may cause system problems or data loss. | ||
Use with caution. | Use with caution. | ||
== Suspending to RAM (APM) == | == Suspending to RAM (APM) == | ||
To enable APM on a system: | To enable APM on a system: | ||
*edit your /etc/modules file and add apm to the list of modules. | *edit your /etc/modules file and add apm to the list of modules. | ||
第25行: | 第18行: | ||
*Finally, reboot the computer. If your system supports APM, everything should be set up. | *Finally, reboot the computer. If your system supports APM, everything should be set up. | ||
Close the laptop lid (if you have a laptop) or press the Sleep button to suspend to RAM. | Close the laptop lid (if you have a laptop) or press the Sleep button to suspend to RAM. | ||
Some systems may not work properly with this, and many new systems don't support APM at all. | Some systems may not work properly with this, and many new systems don't support APM at all. | ||
In this case, search for information on suspending your particular laptop in the wiki or | In this case, search for information on suspending your particular laptop in the wiki or | ||
第31行: | 第23行: | ||
management features of many newer laptops, and also doesn't work with suspend-to-disk using | management features of many newer laptops, and also doesn't work with suspend-to-disk using | ||
the code in the kernel. | the code in the kernel. | ||
== ACPI == | == ACPI == | ||
To suspend to disk, choose "Hibernate" from the GNOME logout menu. To suspend to RAM, edit | To suspend to disk, choose "Hibernate" from the GNOME logout menu. To suspend to RAM, edit | ||
<pre><nowiki> | <pre><nowiki> | ||
第39行: | 第29行: | ||
</nowiki></pre> | </nowiki></pre> | ||
and uncomment the second line by deleting the # character, to read: | and uncomment the second line by deleting the # character, to read: | ||
<pre><nowiki>ACPI_SLEEP=true | <pre><nowiki>ACPI_SLEEP=true | ||
</nowiki></pre> | </nowiki></pre> | ||
==== Ubuntu 6.06 ==== | ==== Ubuntu 6.06 ==== | ||
Dapper needs another step to enable suspend. Execute gconf-editor, and visit apps/gnome-powermanager and enable "can_suspend". You can enable/disable suspend and/or hibernation from there. | Dapper needs another step to enable suspend. Execute gconf-editor, and visit apps/gnome-powermanager and enable "can_suspend". You can enable/disable suspend and/or hibernation from there. | ||
If you have an nVidia card, visit the NvidiaLaptopBinaryDriverSuspend wiki page. | If you have an nVidia card, visit the NvidiaLaptopBinaryDriverSuspend wiki page. | ||
For those running the fglrx driver, you need uncomment the line in /etc/default/fglrx, so it reads as | For those running the fglrx driver, you need uncomment the line in /etc/default/fglrx, so it reads as | ||
<pre><nowiki>FGLRX_ACPI_SWITCH_POWERSTATES=true | <pre><nowiki>FGLRX_ACPI_SWITCH_POWERSTATES=true | ||
</nowiki></pre> | </nowiki></pre> | ||
The ipw2200 driver currently doesn't allow suspend. The easy workaround is to edit /etc/default/acpi-support, and add ipw2200 to the MODULES list, like so: | The ipw2200 driver currently doesn't allow suspend. The easy workaround is to edit /etc/default/acpi-support, and add ipw2200 to the MODULES list, like so: | ||
<pre><nowiki>MODULES="ipw2200" | <pre><nowiki>MODULES="ipw2200" | ||
</nowiki></pre> | </nowiki></pre> | ||
=== Event Processing === | === Event Processing === | ||
For a working suspend and hibernate support several pieces of software have to work together, which results in a highly integrated system that needs to be understood in case troubleshooting is necessary. The following description should help to explain the processing of events as of Ubuntu 6.06 LTS (Dapper). | For a working suspend and hibernate support several pieces of software have to work together, which results in a highly integrated system that needs to be understood in case troubleshooting is necessary. The following description should help to explain the processing of events as of Ubuntu 6.06 LTS (Dapper). | ||
# Press keyboard button (sleep, power) | |||
# generation of events | |||
## acpid | |||
### /etc/acpi/events/{sleepbtn,powerbtn} | |||
### /etc/acpi/sleep.sh or /etc/acpi/hibernate.sh | |||
#### /etc/acpi/prepare.sh: includes /etc/acpi/suspend.d/*.sh | |||
#### triggers suspend in kernel by ''echo $SLEEP_MODE > /sys/power/state'' | |||
#### /etc/acpi/resume.sh: includes /etc/acpi/resume.d/*.sh | |||
b. hal event | b. hal event | ||
# gnome-power-manager or klaptopd kicks in and looks up its policy | |||
# /usr/share/hal/scripts/hal-system-power-{suspend,hibernate} | |||
## checks for avaiable handlerss: powersave, '''pmi''', pm-hibernate, hibernate, direct /sys/power/state | |||
## /usr/sbin/pmi action {suspend,hibernate} force | |||
### /etc/acpi/sleep.sh or /etc/acpi/hibernate.sh ''# following processing as described for the acpid case'' | |||
This should help to understand ''"What happens, when XX button is pressed?"''. In case something in the path is not working, this should help to adopt the scripts, add debugging and fix the problems. | This should help to understand ''"What happens, when XX button is pressed?"''. In case something in the path is not working, this should help to adopt the scripts, add debugging and fix the problems. | ||
[[category:CategoryDocumentation]] [[category:CategoryCleanup]] | [[category:CategoryDocumentation]] [[category:CategoryCleanup]] | ||
[[category:UbuntuHelp]] | [[category:UbuntuHelp]] |
2007年11月30日 (五) 21:37的版本
文章出处: |
{{#if: | {{{2}}} | https://help.ubuntu.com/community/SuspendHowto }} |
点击翻译: |
English {{#ifexist: {{#if: UbuntuHelp:SuspendHowto | UbuntuHelp:SuspendHowto | {{#if: | :}}SuspendHowto}}/af | • {{#if: UbuntuHelp:SuspendHowto|Afrikaans| [[::SuspendHowto/af|Afrikaans]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SuspendHowto | UbuntuHelp:SuspendHowto | {{#if: | :}}SuspendHowto}}/ar | • {{#if: UbuntuHelp:SuspendHowto|العربية| [[::SuspendHowto/ar|العربية]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SuspendHowto | UbuntuHelp:SuspendHowto | {{#if: | :}}SuspendHowto}}/az | • {{#if: UbuntuHelp:SuspendHowto|azərbaycanca| [[::SuspendHowto/az|azərbaycanca]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SuspendHowto | UbuntuHelp:SuspendHowto | {{#if: | :}}SuspendHowto}}/bcc | • {{#if: UbuntuHelp:SuspendHowto|جهلسری بلوچی| [[::SuspendHowto/bcc|جهلسری بلوچی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SuspendHowto | UbuntuHelp:SuspendHowto | {{#if: | :}}SuspendHowto}}/bg | • {{#if: UbuntuHelp:SuspendHowto|български| [[::SuspendHowto/bg|български]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SuspendHowto | UbuntuHelp:SuspendHowto | {{#if: | :}}SuspendHowto}}/br | • {{#if: UbuntuHelp:SuspendHowto|brezhoneg| [[::SuspendHowto/br|brezhoneg]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SuspendHowto | UbuntuHelp:SuspendHowto | {{#if: | :}}SuspendHowto}}/ca | • {{#if: UbuntuHelp:SuspendHowto|català| [[::SuspendHowto/ca|català]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SuspendHowto | UbuntuHelp:SuspendHowto | {{#if: | :}}SuspendHowto}}/cs | • {{#if: UbuntuHelp:SuspendHowto|čeština| [[::SuspendHowto/cs|čeština]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SuspendHowto | UbuntuHelp:SuspendHowto | {{#if: | :}}SuspendHowto}}/de | • {{#if: UbuntuHelp:SuspendHowto|Deutsch| [[::SuspendHowto/de|Deutsch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SuspendHowto | UbuntuHelp:SuspendHowto | {{#if: | :}}SuspendHowto}}/el | • {{#if: UbuntuHelp:SuspendHowto|Ελληνικά| [[::SuspendHowto/el|Ελληνικά]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SuspendHowto | UbuntuHelp:SuspendHowto | {{#if: | :}}SuspendHowto}}/es | • {{#if: UbuntuHelp:SuspendHowto|español| [[::SuspendHowto/es|español]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SuspendHowto | UbuntuHelp:SuspendHowto | {{#if: | :}}SuspendHowto}}/fa | • {{#if: UbuntuHelp:SuspendHowto|فارسی| [[::SuspendHowto/fa|فارسی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SuspendHowto | UbuntuHelp:SuspendHowto | {{#if: | :}}SuspendHowto}}/fi | • {{#if: UbuntuHelp:SuspendHowto|suomi| [[::SuspendHowto/fi|suomi]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SuspendHowto | UbuntuHelp:SuspendHowto | {{#if: | :}}SuspendHowto}}/fr | • {{#if: UbuntuHelp:SuspendHowto|français| [[::SuspendHowto/fr|français]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SuspendHowto | UbuntuHelp:SuspendHowto | {{#if: | :}}SuspendHowto}}/gu | • {{#if: UbuntuHelp:SuspendHowto|ગુજરાતી| [[::SuspendHowto/gu|ગુજરાતી]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SuspendHowto | UbuntuHelp:SuspendHowto | {{#if: | :}}SuspendHowto}}/he | • {{#if: UbuntuHelp:SuspendHowto|עברית| [[::SuspendHowto/he|עברית]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SuspendHowto | UbuntuHelp:SuspendHowto | {{#if: | :}}SuspendHowto}}/hu | • {{#if: UbuntuHelp:SuspendHowto|magyar| [[::SuspendHowto/hu|magyar]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SuspendHowto | UbuntuHelp:SuspendHowto | {{#if: | :}}SuspendHowto}}/id | • {{#if: UbuntuHelp:SuspendHowto|Bahasa Indonesia| [[::SuspendHowto/id|Bahasa Indonesia]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SuspendHowto | UbuntuHelp:SuspendHowto | {{#if: | :}}SuspendHowto}}/it | • {{#if: UbuntuHelp:SuspendHowto|italiano| [[::SuspendHowto/it|italiano]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SuspendHowto | UbuntuHelp:SuspendHowto | {{#if: | :}}SuspendHowto}}/ja | • {{#if: UbuntuHelp:SuspendHowto|日本語| [[::SuspendHowto/ja|日本語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SuspendHowto | UbuntuHelp:SuspendHowto | {{#if: | :}}SuspendHowto}}/ko | • {{#if: UbuntuHelp:SuspendHowto|한국어| [[::SuspendHowto/ko|한국어]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SuspendHowto | UbuntuHelp:SuspendHowto | {{#if: | :}}SuspendHowto}}/ksh | • {{#if: UbuntuHelp:SuspendHowto|Ripoarisch| [[::SuspendHowto/ksh|Ripoarisch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SuspendHowto | UbuntuHelp:SuspendHowto | {{#if: | :}}SuspendHowto}}/mr | • {{#if: UbuntuHelp:SuspendHowto|मराठी| [[::SuspendHowto/mr|मराठी]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SuspendHowto | UbuntuHelp:SuspendHowto | {{#if: | :}}SuspendHowto}}/ms | • {{#if: UbuntuHelp:SuspendHowto|Bahasa Melayu| [[::SuspendHowto/ms|Bahasa Melayu]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SuspendHowto | UbuntuHelp:SuspendHowto | {{#if: | :}}SuspendHowto}}/nl | • {{#if: UbuntuHelp:SuspendHowto|Nederlands| [[::SuspendHowto/nl|Nederlands]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SuspendHowto | UbuntuHelp:SuspendHowto | {{#if: | :}}SuspendHowto}}/no | • {{#if: UbuntuHelp:SuspendHowto|norsk| [[::SuspendHowto/no|norsk]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SuspendHowto | UbuntuHelp:SuspendHowto | {{#if: | :}}SuspendHowto}}/oc | • {{#if: UbuntuHelp:SuspendHowto|occitan| [[::SuspendHowto/oc|occitan]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SuspendHowto | UbuntuHelp:SuspendHowto | {{#if: | :}}SuspendHowto}}/pl | • {{#if: UbuntuHelp:SuspendHowto|polski| [[::SuspendHowto/pl|polski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SuspendHowto | UbuntuHelp:SuspendHowto | {{#if: | :}}SuspendHowto}}/pt | • {{#if: UbuntuHelp:SuspendHowto|português| [[::SuspendHowto/pt|português]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SuspendHowto | UbuntuHelp:SuspendHowto | {{#if: | :}}SuspendHowto}}/ro | • {{#if: UbuntuHelp:SuspendHowto|română| [[::SuspendHowto/ro|română]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SuspendHowto | UbuntuHelp:SuspendHowto | {{#if: | :}}SuspendHowto}}/ru | • {{#if: UbuntuHelp:SuspendHowto|русский| [[::SuspendHowto/ru|русский]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SuspendHowto | UbuntuHelp:SuspendHowto | {{#if: | :}}SuspendHowto}}/si | • {{#if: UbuntuHelp:SuspendHowto|සිංහල| [[::SuspendHowto/si|සිංහල]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SuspendHowto | UbuntuHelp:SuspendHowto | {{#if: | :}}SuspendHowto}}/sq | • {{#if: UbuntuHelp:SuspendHowto|shqip| [[::SuspendHowto/sq|shqip]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SuspendHowto | UbuntuHelp:SuspendHowto | {{#if: | :}}SuspendHowto}}/sr | • {{#if: UbuntuHelp:SuspendHowto|српски / srpski| [[::SuspendHowto/sr|српски / srpski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SuspendHowto | UbuntuHelp:SuspendHowto | {{#if: | :}}SuspendHowto}}/sv | • {{#if: UbuntuHelp:SuspendHowto|svenska| [[::SuspendHowto/sv|svenska]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SuspendHowto | UbuntuHelp:SuspendHowto | {{#if: | :}}SuspendHowto}}/th | • {{#if: UbuntuHelp:SuspendHowto|ไทย| [[::SuspendHowto/th|ไทย]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SuspendHowto | UbuntuHelp:SuspendHowto | {{#if: | :}}SuspendHowto}}/tr | • {{#if: UbuntuHelp:SuspendHowto|Türkçe| [[::SuspendHowto/tr|Türkçe]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SuspendHowto | UbuntuHelp:SuspendHowto | {{#if: | :}}SuspendHowto}}/vi | • {{#if: UbuntuHelp:SuspendHowto|Tiếng Việt| [[::SuspendHowto/vi|Tiếng Việt]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SuspendHowto | UbuntuHelp:SuspendHowto | {{#if: | :}}SuspendHowto}}/yue | • {{#if: UbuntuHelp:SuspendHowto|粵語| [[::SuspendHowto/yue|粵語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SuspendHowto | UbuntuHelp:SuspendHowto | {{#if: | :}}SuspendHowto}}/zh | • {{#if: UbuntuHelp:SuspendHowto|中文| [[::SuspendHowto/zh|中文]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SuspendHowto | UbuntuHelp:SuspendHowto | {{#if: | :}}SuspendHowto}}/zh-hans | • {{#if: UbuntuHelp:SuspendHowto|中文(简体)| [[::SuspendHowto/zh-hans|中文(简体)]]}}|}} {{#ifexist: {{#if: UbuntuHelp:SuspendHowto | UbuntuHelp:SuspendHowto | {{#if: | :}}SuspendHowto}}/zh-hant | • {{#if: UbuntuHelp:SuspendHowto|中文(繁體)| [[::SuspendHowto/zh-hant|中文(繁體)]]}}|}} |
{{#ifeq:UbuntuHelp:SuspendHowto|:SuspendHowto|请不要直接编辑翻译本页,本页将定期与来源同步。}} |
{{#ifexist: :SuspendHowto/zh | | {{#ifexist: SuspendHowto/zh | | {{#ifeq: {{#titleparts:SuspendHowto|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:SuspendHowto|1|-1|}} | zh | | }}
NOTE: Suspend support is included in the Hoary release. Hoary users should see UbuntuHelp:HoaryPM NOTE: For succesful suspend to disk (hibernation), you need swap partition (or file, though I have not tested with swap file) bigger than is actual size of your memory. All your memory and also everything that was swaped at the time of hibernation must fit in swap, so at the size of swap should be 1.5x-2x bigger than size of your RAM.
Introduction
Suspend mode is a special low-power mode, often used on laptops, that preserves the contents of RAM while conserving power. There are two different standards for power management (which handles suspend in Linux), ACPI and APM. ACPI has more advanced features, but is only found on computers made in the last few years. APM is older, and somewhat more mature, but doesn't offer as many features as ACPI. It also isn't available on many new PCs. Also, there are two main forms of suspend - suspend-to-RAM and suspend-to-disk (also known as "software suspend" or "hibernation"). Suspend-to-RAM uses more power, but is almost instant. Suspend-to-disk, on the other hand, uses no power (the system actually powers off), but takes longer to suspend/resume. This HOWTO will discuss all of these methods. WARNING: This is not officially supported in Ubuntu Warty, and may cause system problems or data loss. Use with caution.
Suspending to RAM (APM)
To enable APM on a system:
- edit your /etc/modules file and add apm to the list of modules.
- edit the defoptions line of your /boot/grub/menu.lst file so that it ends with acpi=off, and then sudo update-grub to update the GRUB configuration.
- Add the modules shpchp and pciehp to the end of the /etc/modprobe.d/blacklist file (they don't work w/APM).
- Finally, reboot the computer. If your system supports APM, everything should be set up.
Close the laptop lid (if you have a laptop) or press the Sleep button to suspend to RAM. Some systems may not work properly with this, and many new systems don't support APM at all. In this case, search for information on suspending your particular laptop in the wiki or elsewhere. Also, if APM doesn't work, try ACPI. Note that APM doesn't support all the power management features of many newer laptops, and also doesn't work with suspend-to-disk using the code in the kernel.
ACPI
To suspend to disk, choose "Hibernate" from the GNOME logout menu. To suspend to RAM, edit
/etc/default/acpi-support
and uncomment the second line by deleting the # character, to read:
ACPI_SLEEP=true
Ubuntu 6.06
Dapper needs another step to enable suspend. Execute gconf-editor, and visit apps/gnome-powermanager and enable "can_suspend". You can enable/disable suspend and/or hibernation from there. If you have an nVidia card, visit the NvidiaLaptopBinaryDriverSuspend wiki page. For those running the fglrx driver, you need uncomment the line in /etc/default/fglrx, so it reads as
FGLRX_ACPI_SWITCH_POWERSTATES=true
The ipw2200 driver currently doesn't allow suspend. The easy workaround is to edit /etc/default/acpi-support, and add ipw2200 to the MODULES list, like so:
MODULES="ipw2200"
Event Processing
For a working suspend and hibernate support several pieces of software have to work together, which results in a highly integrated system that needs to be understood in case troubleshooting is necessary. The following description should help to explain the processing of events as of Ubuntu 6.06 LTS (Dapper).
- Press keyboard button (sleep, power)
- generation of events
- acpid
- /etc/acpi/events/{sleepbtn,powerbtn}
- /etc/acpi/sleep.sh or /etc/acpi/hibernate.sh
- /etc/acpi/prepare.sh: includes /etc/acpi/suspend.d/*.sh
- triggers suspend in kernel by echo $SLEEP_MODE > /sys/power/state
- /etc/acpi/resume.sh: includes /etc/acpi/resume.d/*.sh
- acpid
b. hal event
- gnome-power-manager or klaptopd kicks in and looks up its policy
- /usr/share/hal/scripts/hal-system-power-{suspend,hibernate}
- checks for avaiable handlerss: powersave, pmi, pm-hibernate, hibernate, direct /sys/power/state
- /usr/sbin/pmi action {suspend,hibernate} force
- /etc/acpi/sleep.sh or /etc/acpi/hibernate.sh # following processing as described for the acpid case
This should help to understand "What happens, when XX button is pressed?". In case something in the path is not working, this should help to adopt the scripts, add debugging and fix the problems.