IBM R52 Laptop, LCD/CRT toggle doesn't work

Bug #159185 reported by schuelaw
2
Affects Status Importance Assigned to Milestone
hotkey-setup (Ubuntu)
Invalid
Undecided
Unassigned
Nominated for Intrepid by arya abraham

Bug Description

Binary package hint: hotkey-setup

Fn+F7 should toggle LCD/CRT modes. Worked in Ubuntu 7.04, doesn't work on a clean install of Ubuntu 7.10.

As reported by dmidecode the machine is:

IBM
1859BBU
ThinkPad R52

Looking at the tail of /var/log/acpid while pressing the combination Fn+F7 gives:

[Wed Oct 31 18:54:54 2007] received event "ibm/hotkey HKEY 00000080 00001007"
[Wed Oct 31 18:54:54 2007] notifying client 4872[107:116]
[Wed Oct 31 18:54:54 2007] notifying client 5198[0:0]
[Wed Oct 31 18:54:54 2007] executing action "/bin/true"
[Wed Oct 31 18:54:54 2007] BEGIN HANDLER MESSAGES
[Wed Oct 31 18:54:54 2007] END HANDLER MESSAGES
[Wed Oct 31 18:54:54 2007] action exited with status 0
[Wed Oct 31 18:54:54 2007] completed event "ibm/hotkey HKEY 00000080 00001007"

It's clear that it's getting to
/etc/acpi/events/ibmvideobtn

Unfortunately, the action variable in the file is the trivial action=/bin/true

What I don't get is that when I went back to the Ubuntu 7.04 source and looked through the acpi-support package, this file is the same. I don't know why it worked in 7.04 and not in 7.10.

Revision history for this message
schuelaw (schuelaw) wrote :

Well, I just finished installing 7.04 and indeed the video switching works just fine there.

In 7.10, I suspect it's a problem with the hotkey keymask in /etc/modprobe.d/thinkpad_acpi.modprobe
the contents of which are, by default:

options thinkpad_acpi hotkey=enable,0xffff8f experimental=1

As near as I can tell, this should set the mask to 0xffff8f in /proc/acpi/ibm/hotkey to that value, but instead it has the following contents:

status: enabled
mask: 0xffffff
commands: enable, disable, reset, <mask>

as you can see the mask is trivial, capturing all key strokes.

In 7.04, Fn+F7 doesn't generate an acpi event. I'm guessing it goes straight to the hardware and does the right thing.

To fix this, I somehow have to get the mask in /proc/acpi/ibm/hotkey to be what it was in 7.04, but all of my attempts to change it have been ignored.

Any help?

Revision history for this message
schuelaw (schuelaw) wrote :

I reinstalled 7.10 and figured out how to change the mask in /proc/acpi/ibm/hotkey. I tried a number of things:

echo "0xffff8f" > hotkey #Fn+F7 stops showing up in /var/log/acpi, but video switch still doesn't work.

echo "reset" > hotkey #Fn+F7 stops showing up in /var/log/acpi, but video switch still doesn't work.

echo "0xff8f" > hotkey #Fn+F7 stops showing up in /var/log/acpi, but video switch still doesn't work.

I'm really stumped now.

Revision history for this message
Hristo Erinin (zorlem) wrote :

According to linux-2.6.23/Documentation/thinkpad-acpi.txt:
[quote]
The hot key bit mask allows some control over which hot keys generate
events. If a key is "masked" (bit set to 0 in the mask), the firmware
will handle it. If it is "unmasked", it signals the firmware that
thinkpad-acpi would prefer to handle it, if the firmware would be so
kind to allow it (and it often doesn't!).

Not all bits in the mask can be modified. Not all bits that can be
modified do anything. Not all hot keys can be individually controlled
by the mask. Some models do not support the mask at all, and in those
models, hot keys cannot be controlled individually. The behaviour of
the mask is, therefore, higly dependent on the ThinkPad model.
[/quote]

So, to be on the safe side that your acpid will handle (almost) all possible Fn-Fx combinations you just have to
echo 0xffff > /proc/acpi/ibm/hotkey. On my Debian lenny system I've got
# We pass a bit more in case there are more buttons. :-)
options thinkpad_acpi hotkey=enable,0xffffbf experimental=1

in /etc/modprobe.d/thinkpad_acpi.modprobe which is part of acpi-support 0.103-4 and all of my Fn-Fx keys (except Fn-F6 and Fn-F10) generate acpi events.
Another problem is that currently in acpi-support the /etc/acpi/events/ibmvideobtn whis holds the action that has to be taken when Fn-F7 is pressed reads:
[quote]
# /etc/acpi/events/ibmvideobtn
# This is called when the user presses the video button. It is currently
# a placeholder.

event=ibm/hotkey HKEY 00000080 00001007
action=/bin/true
[/quote]
i.e. it detects the keypress but does nothing.
For my R50e with Intel Corporation 82852/855GM Integrated Graphics Device I've got the following script associated with Fn-F7 to switch my display layout /usr/local/bin/Fn-F7.sh:
[quote]
#! /bin/bash

status=`i810switch|grep CRT|grep off`;

if [ "$status" = "" ]; then
 /usr/local/bin/i855crt off;
else
  /usr/local/bin/i855crt swcursor on 1024x768@85;
fi
[/quote]
You have to get a script simillar to this one and put its name in the action= line, so that it would be executed when you press Fn-F7.

Hope this helps.

Revision history for this message
Daniel T Chen (crimsun) wrote :

Is this symptom still reproducible in 8.10?

Changed in hotkey-setup:
status: New → Incomplete
Revision history for this message
schuelaw (schuelaw) wrote : Re: [Bug 159185] Re: IBM R52 Laptop, LCD/CRT toggle doesn't work

Quoting Daniel T Chen:
> Is this symptom still reproducible in 8.10?

I haven't moved to 8.10 yet. I'll let you know if (when) I do.

Albert

Revision history for this message
Steve Langasek (vorlon) wrote :

Thank you for taking the time to report this issue and help to improve Ubuntu.

Between Ubuntu 7.10 and Ubuntu 8.10, hotkey handling has been in a state of flux due to changes in the underlying architecture. As of Ubuntu 9.04, these issues should all be resolved, and the Fn+F7 hotkey on ThinkPad laptops is known to work correctly. If you find that you are still having problems with this key after upgrade to Ubuntu 9.04, please see <https://wiki.ubuntu.com/Hotkeys/Troubleshooting> for more information on locating and resolving the problem.

Changed in hotkey-setup (Ubuntu):
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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