Bugzilla – Bug 113625
Incorrect key/event behaviour for suspend to disk and suspend to ram on thinkpad 40
Last modified: 2008-09-02 18:07:37 UTC
On my IBM Thinkpad R40, Fn+F4 is used for suspend to ram and Fn+F12 is used for suspend to disk. This is the behaviour in WinXP and also in Ubuntu (with ACPI) and older Suse releases(with APM.) On Suse10 (beta3 clean install) the default Fn+F4 action is to suspend to disk. Once I set the 'Sleep button' to suspend to ram in Yast powermanagement module, I can suspend to ram (very well!) using Fn+F4. Still, there's no way of binding Fn+F12 to suspend to disk.
Please do (as root): $ rcpowersave stop $ rcacpid stop $ killall powersave $ killall acpid $ modprobe ibm_acpi $ echo "enable" > /proc/acpi/ibm/hotkey $ cat /prco/acpi/event Now press Fn-F12 and let me know if the output is "ibm/hotkey HKEY 00000080 0000100c"
(In reply to comment #1) [...] > $ killall powersave This line should be $ killall powersaved [...]
Yes, that's the output I get. Also, that module isn't loaded at boot. Should it be?
The module will be loaded automatically in Beta 4. The echo > "enable" command will not be necessary either. I've submitted new packages of 'acpid' and 'IAL'. With Beta 4 you will be able to assign Fn-F12 to suspend to disk using 'initial' (a GUI for IAL). Simply install 'initial' and create an event for "Fn-F12". As event action enter 'powersave -U' which will invoke suspend to disk. I'll close the bug. Please verify with Beta 4. Feel free to re-open if something does not work as expected.
OK, we ran into problems because of this change. With $ echo enable > /proc/acpi/ibm/hotkey we do no longer receive ACPI events from button.c. Thus, the events for the lid switch, sleep button and power button are no longer generated. The IBM driver is generating ACPI events for them but in a different format. This breaks user space programs which expect the events to be in the format of button.c. I will reopen the bug since we should resolve this for the future: the events of the buttons defined in the ACPI specification should be reported by button.c and ibm_acpi.c should report additional ACPI events which are specific to IBM laptops. Deepak, if you want to have Fn-F12 working with SL10 simply edit /etc/modprobe.d/ibm_acpi and comment the first options line resulting in: #options ibm_acpi experimental=1 and uncomment the second options line resulting in: options ibm_acpi hotkey=enabled experimental=1 Since the powersave daemon will no longer receive the ACPI events, you'll need to use the package "initial" and create hotkey actions for the desired IBM ACPI events. E.g. add an action for Fn-F12 to trigger the command /usr/bin/powersave -U (suspend-to-disk) and Fn-F4 to trigger /usr/bin/powersave -u (suspend-to-ram).
Changing resolution to LATER.
Found a way to have Fn-F12 working as described in comment #4. So this bug should be solved in RC2. Please verify.
Thanks. Haven't been able to try beta4 or RC1. Will check in RC2!
Perfect. Let me know if you face any problems.
Okay, works with initial in RC1. Couple of things which may or may not be related. 1. initial needs to be put in Autostart for keybindings to work. I wish KHotkeys would detect Fn-x key events. 2. The event assignments in Yast->System->Power Management->ACPI Settings don't work. I guess that's expected. 3. How do I shut off/blank screen. That's Fn-F3 on my laptop. powersave doesn't seem to have any option to do that. 4. Trivial.. In the IBM Laptop options of KMilo in KDE Control Center, all the command paths are wrong. I can file new reports for these if needed. That's the least I can do :-)
1.) I'm planning to merge initial into khotkeys for 10.0 2.) Yes. 3.) Right, powersave does not (yet) have such functions. Did you have this feature in another distribution? 4.) I'll look into this, too. I'd like you to file new bugs for 10.1 and directly assign them to me. Thanks for reporting. I really appreciate your testing.
(In reply to comment #11) > 1.) I'm planning to merge initial into khotkeys for 10.0 10.1 that sohould be.
3.) Yes, Fn-F3,F4,F12 keys for blank, suspend2ram, suspend2disk worked as expected on Ubuntu Hoary. Actually, these keys worked on older SUSE releases too.. I don't remember which but certainly for 9.1. But on SUSE 9.1, I had to disable ACPI and enable APM to get suspend features and Fn-keys working. Hoary was the first to give me functional ACPI powermanagement on this laptop. Which ones should I file as new bugs? Initial+KHotkeys and screen blanking? And can I assign now to 10.1 or wait for 10.0 to ship first?
3.) I guess they have a tuned acpid to handle those. We definitly catch-up to provide the same functionality. I guess having a bug for * merge initial with khotkeys and * enhance ThinkPad support (e.g. screenblanking) would be nice.
Feel free to file the reports now (against 10.1, feature request, assign them to me).
Because the LATER and REMIND resolutions have been removed, the resolution of this bug has changed from LATER to WONTFIX. If this bug needs to be reconsidered, reopen it and set a future "Target Milestone for Fix."