breezy2dapper: hibernate broken
Jaime Davila
jdavila at hampshire.edu
Sun Jun 11 21:42:35 UTC 2006
Patrick Drechsler wrote:
> Jaime Davila wrote on 11 Jun 2006 18:05:29 MET:
>
>
> ,----[ sleepbtn.sh ]
> | #!/bin/bash
> | . /usr/share/acpi-support/key-constants
> | acpi_fakekey $KEY_SLEEP
> `----
>
>
> Executing the above command works fine (no errors): Laptop goes
> into suspend mode and and be resurrected by pressing Fn.
>
> Thank you for your help so far Jaime.
>
> So suspending works fine (from the GnomeSystem->Quit menu as well
> as Fn-F4 alias sleepbtn.sh).
>
> What doesn't work is Fn-F12 (does that correspond to the function
> hibernatebtn.sh?).
Which script runs on a particular key being pressed is configurable. The
default ubuntu installation does have sensible names, so it might in
fact be hibernatebtn.sh. It certainly is in my system.
Here's how you can find out.
first you need to figure out what acpi event your laptop generates when
you press fn-f12. In my system that's ibm/hotkey HKEY 00000080 0000100c
To find out what it is in yours, for sure, view the content of
/var/log/acpid, press fn-f12, and then look at the file again to see
what was added.
Once you find out what acpi event gets detected, look to see which file
in /etc/acpi/events makes reference to it. you can do that by first
changing to that directory (cd /etc/acpi/events) and then "grepping" the
files in that directory for the string you're looking for. For example,
if I want to find which file contains ibm/hotkey HKEY 00000080 0000100c,
I would do "grep 'ibm/hotkey HKEY 00000080 0000100c' *" In my system
that would return ibm-hibernatebtn. If I look inside that file (with
less ibm-hibernatebtn) I would see that the file makes reference to
action=/etc/acpi/hibernatebtn.sh . That tells me that when the system
detects ibm/hotkey HKEY 00000080 0000100c it will run ibm-hibernatebtn
That and other files referenced in there are in directory /etc/acpi .
That sounds like a problem I always see on my thinkpads, and I've seen
it being mentioned for other machines too. It has to do with something
in the grub configuration. For some reason, if the bootup process
displays that nice looking ubuntu graphic, it doesn't come back from
hibernation. The problem has existed for me under ubuntu now, kubuntu
before, and fedora cores 1 & 4 before that.
here's how you tell grub not to display that image.
Go to /boot/brub, and edit file menu.lst . There's a like there that
reads "# kopt=" . Make sure it says "# kopt=root=/dev/hda1 ro nosplash
quiet resume=/dev/hda5", where:
/dev/hda1 is the partition your system is booting from. /dev/hda5 is
where the swap partition is. You can find both of those with
(Applications -> system -> Administration -> disks -> partitions)
> The computer hibernates but when starting it
> again the screen stays black after passing the GRUB stage.
>
> For completeness, here's the content of hibernatebtn.sh:
>
> ,----[ hibernatebtn.sh ]
> | #!/bin/bash
> | . /usr/share/acpi-support/key-constants
> | acpi_fakekey $KEY_SUSPEND
> `----
>
That's the same thing I have, which works. Why it works is a mystery for
me. In particular, there's another file called hibernate.sh, which does
a lot of other things, which is the one that executed for me when I was
using kde, but doesn't run now. My only thought is that gnome is taking
care of some of the stuff, somehow.
> Regards
>
> Patrick
Let me know how it goes,
Jaime
--
******************************************************
Jaime J. Davila
Assistant Professor of Computer Science
Hampshire College
School of Cognitive Science
jdavila at hampshire dot edu
http://helios.hampshire.edu/jdavila
*******************************************************
More information about the ubuntu-users
mailing list