Gentoo Archives: gentoo-user

From: Richard Fish <bigfish@××××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] no trouble getting to sleep, but would rather die than wake up
Date: Thu, 26 Jan 2006 13:22:17
Message-Id: 7573e9640601260514n2eb494f1taaba0a45a94e08ce@mail.gmail.com
In Reply to: [gentoo-user] no trouble getting to sleep, but would rather die than wake up by Robert Persson
1 On 1/26/06, Robert Persson <ireneshusband@××××××××.uk> wrote:
2 > 'echo mem > /sys/power/state' is what is frustrating. It goes to sleep
3 > alright, but I can't wake it up. The only thing that does anything is the
4 > power button, and what that does is send the system into shutdown.
5
6 Power is the correct way to awaken the system. If you have a "sleep"
7 key, edit /etc/acpi/default.sh to account for the power-button press
8 that shuts down the system. Something like:
9
10 case "$group" in
11 button)
12 case "$action" in
13 sleep)
14 touch /etc/.acpi_ignore_power
15 echo mem >/sys/power/state
16 ;;
17 power)
18 if test -f /etc/.acpi_ignore_power; then
19 rm -f /etc/.acpi_ignore_power
20 >/dev/null 2>&1
21 else
22 /sbin/shutdown -h now
23 fi
24 ;;
25 ...
26
27 If you don't have a sleep key, put the above commands in a script and
28 call that instead.
29
30 Also, you could emerge sys-fs/hibernate, and edit
31 /etc/hibernate/hibernate.conf to use /sys/power/state. Hibernate can
32 also take care of switching to a text console, hacking video modes if
33 necessary, locking the console or X desktop, and so on.
34
35 I actually use hibernate with two different configurations,
36 hibernate.conf and standby.conf, depending upon whether I press the
37 sleep or power buttons.
38
39 If the
40 > sleep state is initiated from a console, the screen remains black during the
41 > brief reawakening.
42
43 Some video drivers do not restore correctly. Use hibernate, or text
44 console, or google 'vbetool'.
45
46 > If the sleep state is initiated from the X server then I
47 > get some kind of funny pattern on the screen of the kind that says that the
48 > video card is confused.
49
50 Which video card and driver? Are you using opensource drivers (which
51 usually work fine with power management) or proprietary ones?
52
53 -Richard
54
55 --
56 gentoo-user@g.o mailing list