PATCH to fix thinkpad acpi hotkey mask for Thinkpad T61/X61/R61 and all other Thinkpads

Bug #194679 reported by Jerone Young
18
Affects Status Importance Assigned to Milestone
acpi-support (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

Binary package hint: acpi-support

Currently on Thinkpad T61/X61/R61 laptops, hotkeys
FN+F5 <-- Wireless button
FN+F7 <--- Video switching button

Are not sending acpi events. The issue is that these are hotkeys that are being masked away. This is no longer needed with newer version of thinkpad-acpi module, and all hotkeys should be enabled.

People have been doing this around the web .. and this really should be the default NOW. One example can be found here under the "Thinkpad buttons" section:
http://www.thinkwiki.org/wiki/Installing_Ubuntu_7.10_(Gutsy_Gibbon)_on_a_ThinkPad_R61

Here is a patch for the acpi-support package to fix this problem:

Signed-off-by: Jerone Young <email address hidden>

diff -r c1187f1f8e87 -r f64bee252abd thinkpad_acpi.modprobe
--- a/thinkpad_acpi.modprobe Sat Feb 23 04:29:33 2008 -0600
+++ b/thinkpad_acpi.modprobe Sat Feb 23 04:30:25 2008 -0600
@@ -1,1 +1,1 @@ options thinkpad_acpi hotkey=enable,0xff
-options thinkpad_acpi hotkey=enable,0xffff8f experimental=1
+options thinkpad_acpi hotkey=enable,0xffffff experimental=1

This has been tested and does fix this issue completely.

Related branches

Revision history for this message
Daniel Hahler (blueyed) wrote :

The linked wiki page says that this masks FN+F7 and FN+F9 away, (not F7 and F5, as you've said in the description).
Please clarify, so I can add the proper changelog entry. Thanks.

Changed in acpi-support:
assignee: nobody → blueyed
importance: Undecided → Low
status: New → In Progress
Revision history for this message
Daniel Hahler (blueyed) wrote :

Just for reference, the following was changed in that file during Gutsy cycle, by Paul Sladen (in acpi-support 0.101):
--- acpi-support-0.100/thinkpad_acpi.modprobe 2007-08-31 04:09:14.000000000 +0200
+++ acpi-support-0.101/thinkpad_acpi.modprobe 2007-09-13 18:29:42.000000000 +0200
@@ -1 +1 @@
-options thinkpad_acpi hotkey=enable,0xff8f experimental=1
+options thinkpad_acpi hotkey=enable,0xffff8f experimental=1

Revision history for this message
Jerone Young (jerone) wrote :

After reading the new man pages and some discussion on ibm-acpi mailing list masking off hot keys is not nesscary. I'm not even sure why they did it to begin with (it's a way to disable keys) .. but now it is causing problems for newer Lenovo based Thinkpads T,R, X series. All hot keys need to be enabled by default.

Revision history for this message
Jerone Young (jerone) wrote :

For a better description:

This fixes masking of hot keys FN+F5 & FN+F7 for Lenovo Thinkpads and all other Thinkpads. All hot keys should be enabled by default.

For the link above, I was pointing out how they had to do the same in thinkpad_acpi.modprobe to unmask the keys (they only needed for there FN+F7 event they create).

What they do , that should be a seprate bug is they add an even file for the eject event (FN+F9 .. which was not being blocked)...so that you have an eject event. I'll file a seprate bug for this. As I want to crate files for eject & FN+Space bar (which is magnify).

Thanks.

Revision history for this message
Jerone Young (jerone) wrote :

So according to Henrique the thinkpad-acpi maintainer .. this patch needs to change. Ubuntu should not have been messing with the hotkey mask at all ...as this is all handled in the thinkpad-acpi code. His response can be found here:

http://sourceforge.net/mailarchive/message.php?msg_name=20080223195052.GB5123%40khazad-dum.debian.net

So this patch should actually be (will test and see that everything is ok):

Signed-off-by: Jerone Young <email address hidden>

diff -r 4b27ca13af80 thinkpad_acpi.modprobe
--- a/thinkpad_acpi.modprobe Sat Feb 23 16:18:42 2008 -0600
+++ b/thinkpad_acpi.modprobe Sat Feb 23 16:18:59 2008 -0600
@@ -1,1 +1,1 @@ options thinkpad_acpi hotkey=enable,0xff
-options thinkpad_acpi hotkey=enable,0xffff8f experimental=1
+options thinkpad_acpi experimental=1

Revision history for this message
Jerone Young (jerone) wrote :

I did testing and it works! But I think we also need to remove experimental=1 as this is also something that is not wanted anymore (unless of course you have a very experimental feature needed...don't think we want to enable unstable code by default). Given this I have spun one last patch based on this and what Henrique (the thinkpad-acpi maintainer has stated):

Description:
  This patch removes bad options from the thinkpad-acpi driver that are now handled by the thinkpad-acpi driver and greatly imporves functionality across all thinkpads, as well as does not cut on unstable code by default.

Signed-off-by: Jerone Young <email address hidden>

diff -r 4b27ca13af80 thinkpad_acpi.modprobe
--- a/thinkpad_acpi.modprobe Sat Feb 23 16:18:42 2008 -0600
+++ b/thinkpad_acpi.modprobe Sat Feb 23 16:34:21 2008 -0600
@@ -1,1 +1,1 @@ options thinkpad_acpi hotkey=enable,0xff
-options thinkpad_acpi hotkey=enable,0xffff8f experimental=1
+options thinkpad_acpi

Revision history for this message
Jerone Young (jerone) wrote :

Doing some research I have found that these options where actually needed in Gutsy as the version of thinkpad-acpi that comes in the Gutsy kernel does not have the detection abilities. Now with the Hardy kernel the thinkpad-acpi can now automatically (and correctly) detect keys for thinkpads. So these options should be removed to thinkpad-acpi .. should be removed.

Revision history for this message
Serge (serge-de-souza) wrote :

What should it be for gutsy? Do we still need hotkey=enable,0xffff8f ?

Revision history for this message
Jerone Young (jerone) wrote :

In gutsy it should just be:

hotkey=enable,0xffffff

The issue in gusty is it has a very old version of thinkpad acpi that didn't have the detection code needed. While in hardy this isn't even needed. Which is why we are trying to drop the thinkpad_acpi.modprobe from hardy.

Revision history for this message
Daniel Hahler (blueyed) wrote :

The patch/fix (for Hardy) has been included in the debdiff at bug 193842, and is waiting for sponsorship.
A test package is available from my PPA, if you want to test it (https://launchpad.net/~blueyed/+archive).

Changed in acpi-support:
assignee: blueyed → nobody
status: In Progress → Triaged
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package acpi-support - 0.106

---------------
acpi-support (0.106) hardy; urgency=low

  * Cherrypicked bugfix patches from Launchpad (LP: #193842)
  * lib/state-funcs: make wireless led work with asus-laptop (the new module);
    patch from Nicolò Chieffo (LP: #189889)
  * Add events/asus-video to support asus switch video hotkey; patch from
    Nicolò Chieffo (LP: #138228)
  * events/asus-wireless-2, asus-wireless-2.sh:
    Support Fn+F2 on Asus A8Js; patch from Matteo Collina (LP: #105929)
  * Fix the value range in sonybright.sh (0-7 instead of 1-8); patch from unggnu
    (LP: #136380)
  * "lib/FUJITSU SIEMENS.config":
    - Enable suspend for Fujitsu-Siemens C1110 (LP: #52970)
    - Enable STR for Fujitsu-Siemens Lifebook S7020, S7110
  * resume.d/50-time.sh, suspend.d/88-time.sh:
    Fix handling of hardware clock before/after suspend; patch from Rodrigo
    Novo (LP: #36815)
  * events/asus-*: Fix event key names for ASUS (HOTK); patch from
    Jeroen van der Vegt (LP: #25784)
  * Fix names in comments for events/panasonic-{mute,volume-down,volume-up}
  * debian/rules, README.toshiba: Drop toshiba_acpi.modprobe, which only
    contained an invalid/obsolete option "hotkeys_over_acpi" (LP: #180678)
  * debian/control: Standards-Version 3.7.3
  * Drop thinkpad_acpi.modprobe: the workarounds therein are not needed for
    thinkpad_acpi in Hardy anymore; investigations by Jerone Young (LP: #194679)
  * Add events/lenovo-eject to handle the Thinkpad eject button (Fn+F9); patch
    from Jerone Young (LP: #194609)

 -- Daniel Hahler <email address hidden> Thu, 06 Mar 2008 02:15:54 +0100

Changed in acpi-support:
status: Triaged → Fix Released
Revision history for this message
Michael Truscott (mltruscott) wrote :

Is acpi-support the package that controls the suspend key (fn +F5) and the behaviour of the lid switch?

Since switching to hardy these do not work on my T60, although they did in gutsy.

If this needs to be filed elsewhere please let me know.

Michael

Revision history for this message
Jerone Young (jerone) wrote :

Fn+f4 is the suspend key . Fn+f5 is witless toggle.

Revision history for this message
Jerone Young (jerone) wrote :

fn+f4 works fine. Try a live cd build maybe something up with your intsall.

Revision history for this message
Jerone Young (jerone) wrote :

@Micheal also ensure you have the latest bios
http://www.thinkwiki.org/wiki/BIOS_Upgrade

Also here is a picture of the thinkpad T60 keyboard (notice Fn+F4 is suspend).
Fn+F5 is wireless toggle. So it switches bluetooth and wireless on and off.

http://www.notebookreview.com/assets/9328.jpg

It sends the exact same acpi events and the Thinkpad T61. So if you run "acpi_listen" and you see the events there is no issue.

I would suggest though you run a fresh daily build live cd from here:
http://cdimage.ubuntu.com/daily-live/current/

This problem is most likely your install. As it should work.

Revision history for this message
Michael Truscott (mltruscott) wrote : Re: [Bug 194679] Re: PATCH to fix thinkpad acpi hotkey mask for Thinkpad T61/X61/R61 and all other Thinkpads

Jerone,

thanks for your help - it was the FN + F4 key; please blame viral supidity...

I'll try the live CD build as you suggest.

Michael

On Saturday 29 March 2008 16:24:19 Jerone Young wrote:
> @Micheal also ensure you have the latest bios
> http://www.thinkwiki.org/wiki/BIOS_Upgrade
>
> Also here is a picture of the thinkpad T60 keyboard (notice Fn+F4 is
> suspend). Fn+F5 is wireless toggle. So it switches bluetooth and wireless
> on and off.
>
> http://www.notebookreview.com/assets/9328.jpg
>
> It sends the exact same acpi events and the Thinkpad T61. So if you run
> "acpi_listen" and you see the events there is no issue.
>
> I would suggest though you run a fresh daily build live cd from here:
> http://cdimage.ubuntu.com/daily-live/current/
>
> This problem is most likely your install. As it should work.

Revision history for this message
Michael Truscott (mltruscott) wrote :

The live CD works, thanks.

Is it worth finding out why this didn't work on my machine or would it just be
easier to reinstall?

Michael

On Saturday 29 March 2008 20:18:47 Michael Truscott wrote:
> Jerone,
>
> thanks for your help - it was the FN + F4 key; please blame viral
> supidity...
>
> I'll try the live CD build as you suggest.
>
> Michael
>
> On Saturday 29 March 2008 16:24:19 Jerone Young wrote:
> > @Micheal also ensure you have the latest bios
> > http://www.thinkwiki.org/wiki/BIOS_Upgrade
> >
> > Also here is a picture of the thinkpad T60 keyboard (notice Fn+F4 is
> > suspend). Fn+F5 is wireless toggle. So it switches bluetooth and wireless
> > on and off.
> >
> > http://www.notebookreview.com/assets/9328.jpg
> >
> > It sends the exact same acpi events and the Thinkpad T61. So if you run
> > "acpi_listen" and you see the events there is no issue.
> >
> > I would suggest though you run a fresh daily build live cd from here:
> > http://cdimage.ubuntu.com/daily-live/current/
> >
> > This problem is most likely your install. As it should work.

Revision history for this message
Jerone Young (jerone) wrote :

you should just do a fresh install

Revision history for this message
Michael Truscott (mltruscott) wrote :

Thought you'd say that...

On Sunday 30 March 2008 18:42:23 Jerone Young wrote:
> you should just do a fresh install

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.