summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--man/pm-action.xml84
-rwxr-xr-xpm/sleep.d/00auto-quirk3
-rwxr-xr-xpm/sleep.d/99video2
3 files changed, 83 insertions, 6 deletions
diff --git a/man/pm-action.xml b/man/pm-action.xml
index 2d5bcd5..964676f 100644
--- a/man/pm-action.xml
+++ b/man/pm-action.xml
@@ -170,12 +170,27 @@
<command>pm-suspend-hybrid</command> commands you can select which
quirks should be used.
</para>
-
+ <para>
+ If <command>pm-suspend</command>, <command>pm-hibernate</command>,
+ or <command>pm-suspend-hybrid</command> is invoked without any
+ commandline parameters, they will try to grab the correct quirks
+ from HAL if it is installed.
+ </para>
<variablelist>
<!-- Use the variablelist.term.separator and the
variablelist.term.break.after parameters to
control the term elements. -->
<varlistentry>
+ <term><option>--auto-quirks</option></term>
+ <listitem>
+ <para>
+ This option will try to grab the correct quirks for this system
+ from HAL. If HAL is not present on the system and this parameter
+ is passed, suspending or hibernating the system will fail.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
<term><option>--quirk-dpms-on</option></term>
<listitem>
<para>
@@ -278,6 +293,23 @@
</para>
</listitem>
</varlistentry>
+ <varlistentry>
+ <term><option>--store-quirks-as-fdi</option></term>
+ <listitem>
+ <para>
+ Save the quirks passed to <command>pm-suspend</command> or
+ <command>pm-suspend-hybrid</command> as an .fdi file that
+ is specific to this system. The file will be saved in
+ <filename>/etc/hal/fdi/information/99local-pm-utils-quirks.fdi</filename>.
+ This parameter will only save the actual quirks that were
+ used to sucessfully suspend/resume a system -- if you are
+ running proprietary video drivers or kernel modesetting
+ video drivers, you will generate a potentially incorrect
+ .fdi file.
+ </para>
+ </listitem>
+ </varlistentry>
+
</variablelist>
</refsect1>
@@ -317,9 +349,9 @@
directory by putting a non-executable file in
/etc/pm/sleep.d, or by adding it to the HOOK_BLACKLIST
configuration variable.
- </para>
- </listitem>
- </varlistentry>
+ </para>
+ </listitem>
+ </varlistentry>
<varlistentry>
<term><filename>/var/log/pm-suspend.log</filename></term>
<listitem>
@@ -330,6 +362,47 @@
</listitem>
</varlistentry>
</variablelist>
+ </refsect1>
+ <refsect1 id="sleep_hook_ordering_convention">
+ <title>SLEEP HOOK ORDERING CONVENTION</title>
+ <variablelist>
+ <varlistentry>
+ <term>00 - 49</term>
+ <listitem>
+ <para>User and most package supplied hooks. If a hook assumes
+ that all of the usual services and userspace
+ infrastructure is still running, it should be here.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>50 - 74</term>
+ <listitem>
+ <para> Service handling hooks. Hooks that start or stop a
+ service belong in this range. At or before 50, hooks
+ can assume that all services are still enabled.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>75 - 89</term>
+ <listitem>
+ <para> Module and non-core hardware handling. If a hook
+ needs to load/unload a module, or if it needs to
+ place non-video hardware that would otherwise break
+ suspend or hibernate into a safe state, it belongs in
+ this range. At or before 75, hooks can assume all
+ modules are still loaded.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>90 - 99</term>
+ <listitem>
+ <para> Reserved for critical suspend hooks. </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
</refsect1>
<refsect1 id="config_vars">
@@ -351,7 +424,8 @@
<listitem>
<para>
The built-in kernel suspend/resume support.
- Use this if nothing else is supported on your system.
+ Use this if nothing else is supported on your system.
+ The kernel backend is always used if nothing else is available.
</para>
</listitem>
</varlistentry>
diff --git a/pm/sleep.d/00auto-quirk b/pm/sleep.d/00auto-quirk
index 0f9bcce..e45686e 100755
--- a/pm/sleep.d/00auto-quirk
+++ b/pm/sleep.d/00auto-quirk
@@ -6,7 +6,7 @@ do_add_quirks()
{
add_parameters $(lshal | \
awk -F '[. ]' \
- '/ power_management.quirk.[a-z_]+ = true/ \
+ '/ power_management.quirk.[0-9a-z_]+ = true/ \
{gsub(/_/, "-", $5); printf("--quirk-%s", $5)}')
}
@@ -64,6 +64,7 @@ maybe_add_quirks()
maybe_save_quirks()
{
+ inhibited && return 0
has_parameter --store-quirks-as-fdi && do_save_quirks
return 0
}
diff --git a/pm/sleep.d/99video b/pm/sleep.d/99video
index dc8590a..0beb360 100755
--- a/pm/sleep.d/99video
+++ b/pm/sleep.d/99video
@@ -166,6 +166,8 @@ resume_video()
quirk "${QUIRK_RADEON_OFF}" && radeon_on
quirk "${QUIRK_DPMS_ON}" && vbe dpms on
quirk "${QUIRK_RESET_BRIGHTNESS}" && reset_brightness
+ # always reset acpi_video_flag -- makes quirk testing more reliable.
+ sysctl -w kernel.acpi_video_flags=0
return 0 # avoid spurious hook exit failure message.
}