aboutsummaryrefslogtreecommitdiff
path: root/system/pm-utils/README.SLACKWARE
blob: a69e6f5c86debc27cf07b11c63c35003769e67a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
README.SLACKWARE
20081130 - rworkman@slackware.com

===============================================================================
PLEASE READ THIS ENTIRE FILE BEFORE REPORTING PROBLEMS OR ASKING FOR HELP!
===============================================================================

One of these routines should tell you whether any of the operations
are supported by your current kernel/userspace at all:

  for i in hibernate suspend suspend-hybrid ; do
    pm-is-supported --$i \
      && echo "$i is supported" \
      || echo "$i is not supported" ;
  done

  *OR*

  cat /sys/power/state

Assuming they are supported, running "pm-suspend" as root should do a suspend
to ram, and "pm-hibernate" should suspend to disk. Note that you must have a 
swap partition (or file, but partition is easier) which is large enough 
(2x ram is good here) and the relevant initrd lines and such for this to work. 
If you're not familiar with all of that, don't test pm-hibernate.
I don't have hardware which supports suspend-hybrid, so I have no idea if/how
it works at all.

Here's the short version of using suspend to disk:

Stanza in /etc/lilo.conf should look something like this:
  image = /boot/vmlinuz-generic-smp-2.6.26.7-smp
    initrd = /boot/initrd.gz
    append = "resume=/dev/hda2"
    root = /dev/hda1
    label = Slackware
    read-only

/etc/mkinitrd.conf should look something like this:
  MODULE_LIST="jfs"
  ROOTDEV="/dev/hda1"
  ROOTFS="jfs"
  RESUMEDEV="/dev/hda2"

mkinitrd command invocation would be this:
  mkinitrd -c -k 2.6.26.7-smp -F

All of the above assumes at least a cursory understanding of what those
commands and parameters do. If it's not clear, don't attempt it on a
system that you can't easily reinstall without concern.

==============================================================================

If it works for you, and/or you want to automate it a bit, you'll find
some sample acpi event declarations and scripts here:
  http://rlworkman.net/conf/acpi/
A better option is to use a power manager daemon, but unless you happen to be
running gnome or one of the pre-release xfce-4.6 builds, that's not an option.
I'm not sure whether kde's klaptop supports pm-utils or not, so feedback in
this area is encouraged.

==============================================================================

If it doesn't work by default for you, consider having a look at
  http://people.freedesktop.org/~hughsient/quirk/quirk-suspend-index.html
for some debugging hints.  Pay particular attention to this page:
  http://people.freedesktop.org/~hughsient/quirk/quirk-suspend-try.html
If you are able to get your machine to suspend/resume correctly by passing
additional quirks on the command line, then I would like to know about it so
that upstream hal-info can get the correct information to use.  Please email
the make/model and other relevant information about your machine along with
the full output of "lshal" and "lspci" attached, and what extra quirks you
needed to add for successful suspend/resume to rworkman@slackware.com

==============================================================================

If you need the system to do certain operations before going to sleep and
then undo them (or perhaps do something new) when waking back up, pm-utils
supports something called "hooks."  The hooks installed by packages (not only
pm-utils itself) should be in /usr/lib/pm-utils/sleep.d/, while any hooks 
installed by the local system administrator (e.g. things that are only an
issue on that one machine) should be in /etc/pm/sleep.d/.

Looking at some of the existing hooks should give you a decent idea of their
capabilities; as a head start, the functions used in the hooks are declared 
in /usr/lib/pm-utils/functions, which is inherited elsewhere by 
/usr/lib/pm-utils/pm-functions

One way to contribute to pm-utils indirectly is by writing and sending any
needed hooks scripts to upstream projects; as an example, the hook that 
ships with wicd was contributed by me.  Ideally, the pm-utils package should
have a very minimum number of hooks shipped with it, as they should ship with
the package to which the hook pertains; for example, the grub package would
ship its own hook.

==============================================================================

We have removed several hooks from the default upstream package in response
to a discussion on the pm-utils mailing list; see the source directory of
pm-utils for details, and if you happen to need any of the removed hooks,
most of them are in /usr/doc/pm-utils-*/extra_hooks/

==============================================================================

KNOWN BUGS

If your alsa drivers don't correctly save and restore state across a sleep /
resume cycle (due to a buggy driver), then you will need to add the drivers
to a custom file named /etc/pm/config.d/defaults (create the file if it does
not exist already) in a variable named "SUSPEND_MODULES" - see the file at
/usr/lib/pm-utils/defaults for proper format.

==============================================================================