diff options
-rw-r--r-- | README | 32 | ||||
-rw-r--r-- | README.debugging | 41 |
2 files changed, 46 insertions, 27 deletions
@@ -17,7 +17,7 @@ Why do we need it? * Suspend/resume functionality can be easily modified by installing files into the /etc/pm/sleep.d directory. These files, known as - "hooks" can perform specific tasks on suspend/resume, such as: + hooks, can perform specific tasks on suspend/resume, such as: - enabling and disabling standby LED's on laptop hardware - enabling suspend GUI's like suspend2 @@ -28,7 +28,7 @@ Why do we need it? - setting grub to be the default target for a hibernate-resume - other wacky things that need doing on specific systems -How do "hooks" work? +How do hooks work? * You put an executable file in /etc/pm/sleep.d. When suspend or hibernate is called, several things happen: @@ -44,32 +44,10 @@ How do "hooks" work? 5) Each of /etc/pm/sleep.d/* are executed in reverse C sort order, with a command line argument of "resume" or "thaw". -End-user customization and debugging: +* For more detailed information on how hooks work and how to write one, + read HOWTO.hooks . -* If a particular hook is causing problems on your system, you can disable it - using the HOOK_BLACKLIST environment variable by creating a file in - /etc/pm/config.d and adding the line: - HOOK_BLACKLIST="hookname 99another-hook" - -* If a parameter (or lack thereof) passed to pm-suspend and friends is causing - problems, or you need to debug the suspend/resume process to work out what - quirks are causing problems, you can use the ADD_PARAMETERS and - DROP_PARAMETERS environment variables. To do this, create a file in - /etc/pm/config.d, and add the following lines to it: - ADD_PARAMETERS="--parameter-to-add --another-parameter" - DROP_PARAMETERS="--parameter-to-drop --another-parameter-to-drop" - - If you want to drop all parameters (for testing purposes, or to work around - bugs in HAL), you can use DROP_PARAMETERS="all" - -* If you suspect that a kernel module is preventing you from being - able to suspend and resume, you can use the SUSPEND_MODULES - environment variable to have that module removed when the system - suspends and reloaded when the system wakes up. - -* To find out what parameters can be passed to pm-suspend and friends, run them - with '--help' as the first parameter as root. This will print out the - options that it supports and which hooks or modules handle those options. +* For information on how to debug pm-utils, read README.debugging. That's it! diff --git a/README.debugging b/README.debugging new file mode 100644 index 0000000..5e1948e --- /dev/null +++ b/README.debugging @@ -0,0 +1,41 @@ +End-user customization and debugging: + +* If a particular hook is causing problems on your system, you can disable it + using the HOOK_BLACKLIST environment variable by creating a file in + /etc/pm/config.d and adding the line: + HOOK_BLACKLIST="hookname 99another-hook" + +* If a parameter (or lack thereof) passed to pm-suspend and friends is causing + problems, or you need to debug the suspend/resume process to work out what + quirks are causing problems, you can use the ADD_PARAMETERS and + DROP_PARAMETERS environment variables. To do this, create a file in + /etc/pm/config.d, and add the following lines to it: + ADD_PARAMETERS="--parameter-to-add --another-parameter" + DROP_PARAMETERS="--parameter-to-drop --another-parameter-to-drop" + + If you want to drop all parameters (for testing purposes, or to work around + bugs in HAL), you can use DROP_PARAMETERS="all" + +* If you suspect that a kernel module is preventing you from being + able to suspend and resume, you can use the SUSPEND_MODULES + environment variable to have that module removed when the system + suspends and reloaded when the system wakes up. + +* To find out what parameters can be passed to pm-suspend and friends, run them + with '--help' as the first parameter as root. This will print out the + options that it supports and which hooks or modules handle those options. + +Significant conceptual changes from pm-utils 0.99.x and earlier: + +* Do not rely on the internals of hooks when configuring or customizing + pm-utils. Conceptually, hooks are black boxes from the point of view + of the pm-utils core code, and there is no guarantee that the implementation + of a given hook will not change from pm-utils revision to pm-utils revision. + +* The preferred method of modifying the behaviour of a hook is to modify the + ADD_PARAMETERS and DROP_PARAMETERS to change the global parameters available + to each hook. + +* All scripts created and maintained by the pm-utils are POSIX/SuS compliant. + Any modification or new script should be POSIX compliant and work as intended + using dash and posh before you submit a patch upstream.
\ No newline at end of file |