PDA

View Full Version : Laptop hotkey under non-gnome environment



sdl
14th July 2006, 11:38 AM
Hi there,

I have posted this question in fedora mailing but get no replies. I think this is not a very common problem nowadays since gnome has become so popular. But anyway, here goes:

I'm using fvwm. Under this wm, laptop hotkeys stop working. For example the [stand by] key will make my laptop enter suspension under gnome but does nothing in fvwm. How can I fix this?

For the moment I'm using pm-suspend. I'm looking for a more generic way i.e. [stand by] will always suspend the laptop under any window manager. I have tried to add 'sleep' to /etc/acpi/events, but I'm new to acpid and I don't know if it's my limited knowledge or acpid, it didn't work as expected. Any ideas?

Your help is much appreciated!

undertoad
14th July 2006, 01:40 PM
maybe try acpi_listen from shell, press power buttons, close lid etc. to show corresponding events, then use these events to make some *.conf files in /etc/acpi/events/ there is a sample.conf there as a guide.

sdl
14th July 2006, 07:17 PM
maybe try acpi_listen from shell, press power buttons, close lid etc. to show corresponding events, then use these events to make some *.conf files in /etc/acpi/events/ there is a sample.conf there as a guide.

I run acpi_listen, but there is no output from pressing [stand by] key.

I go ahead and create /etc/acpi/events/sleep.conf with the following lines:

event=button/sleep.*
action=/usr/sbin/pm-suspend

And restart acpid by `/etc/init.d/acpid restart`. After this, [stand by] still does nothing.

wneumann
15th July 2006, 07:32 AM
Do other things generate acpi events? Lid?

Anyway, if you are keen on having suspend bound to a key, get a copy of keylaunch for linux and bind it to some similar key -- for instance if sleep is fn-f1 (as it is on many laptops), use something like shift-f1 instead. (Keylaunch is worth having anyway -- fire up a browser with a keystroke etc. Gnome provides this sort of thing, but keylaunch lets you choose what you assign to keys and gnome doesn't. Anyway, you are not using gnome.)

sdl
15th July 2006, 10:34 AM
Do other things generate acpi events? Lid?

Yes.


Anyway, if you are keen on having suspend bound to a key, get a copy of keylaunch for linux and bind it to some similar key -- for instance if sleep is fn-f1 (as it is on many laptops), use something like shift-f1 instead. (Keylaunch is worth having anyway -- fire up a browser with a keystroke etc. Gnome provides this sort of thing, but keylaunch lets you choose what you assign to keys and gnome doesn't. Anyway, you are not using gnome.)

Thanks for your quick reply.

However, in gnome I didn't bind the key fn-f1 to sleep and it just worked, so there might be a trick to do so.

I'll look into keylauch.

undertoad
15th July 2006, 04:15 PM
hi, bit ot but i thought you should still be able to use gnome's power management along side fvwm, if HAL/dbus/gnome-power-manager are running does it work like you're in gnome

sdl
15th July 2006, 04:53 PM
hi, bit ot but i thought you should still be able to use gnome's power management along side fvwm, if HAL/dbus/gnome-power-manager are running does it work like you're in gnome

It still works but unlike fc4, fc5's gnome-power-manager does not do suspend/hibernate any more.

wneumann
16th July 2006, 02:35 AM
I had the reverse experience to sdl: under fc4 I had to use my own acpi scripts since gnome was not suspending me reliably, now with fc5 the gnome-power-manager is handling suspend without problem.

sdl
16th July 2006, 02:55 PM
I had the reverse experience to sdl: under fc4 I had to use my own acpi scripts since gnome was not suspending me reliably, now with fc5 the gnome-power-manager is handling suspend without problem.


Actually I can use pm-suspend to suspend:-) It's been reliable for

14:53:18 up 4 days, 11:13, 4 users, load average: 0.18, 0.99, 0.99

I'm trying to figure out how to get the fn-esc (stand by) to work again.