Comment 106 for bug 357673

Revision history for this message
Henrique de Moraes Holschuh (hmh) wrote : Re: [Bug 357673] Re: No notification when sliding audio volume, muting volume on ThinkPad X31, X32, X41, X60, T22, T40, T42, T60, R50e, R51, R52

On Sun, 26 Jul 2009, Johannes Hessellund wrote:
> The brightness notofication bug is resolved upstream now. Also see bug
> #372874.
>
> http://cgit.freedesktop.org/~dkukawka/hal/commit/?id=d792a792846f9632edfdea3651a74fcd24b2ead7

It was about time. Good news.

> Brightness notifications on Thinkpads will to solved.

No, they won't. The real fix was submitted by Fedora, as generic brightness
change *event* support. I will contribute with sysfs poll() support for
actual_brightness on top of that patch soon.

It will be in the 2.6.32 kernels, and Ubuntu should backport THOSE as well
if they want proper brightness handling, and fix HAL to use select()/poll()
or uevents to get the notifications. Patches available in the linux-acpi
mailing list.

> To enable brightness buttons they should be enabled in the thinkpad_acpi
> module:
>
> options thinkpad_acpi hotkey=enable,0xfdffff

This will, of course, destroy any chances you have of working brightness
keys on any Lenovo laptop if the user has to tell ACPI video to switch to
"vendor" mode (typically done when brightness change refuses to work with
nvidia cards or Xorg OpRegion+KMS).

Patches for thinkpad-acpi to auto-enable brightness keys when vendor mode is
active on the thinkpads that need it are ready and available in the
thinkpad-acpi devel git tree. I will be sending them out soon to the
linux-acpi mailinglist. Patches to use the brightness event support are
being worked on, should be ready in two weeks.

Obviously, any gross hack that enables brightness key events and THEN goes
on to *abuse* it as simple notifications will make it completely impossible
for thinkpads that actually need they to be processed as keys, to work.
This is what is currently employed by Ubuntu+HAL, as far as I know.

PS: if you ever need to proplery *reset* thinkpad-acpi's hotkey_mask to the
one that the driver wants to be used, do this:

cat /sys/bus/platform/devices/thinkpad_acpi/hotkey_recommended_mask
    > /sys/bus/platform/devices/thinkpad_acpi/hotkey_mask

Might be needed when all the proper event support lands.

--
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh