[ltp] Any reason why the recommended hotkey mask is 0x008c7fff on X60s

Henrique de Moraes Holschuh linux-thinkpad@linux-thinkpad.org
Fri, 17 Oct 2008 16:45:40 -0300


On Fri, 17 Oct 2008, Damjan wrote:
> > > With that mask, I don't get any events (ACPI or input) when the
> > > volume-up/down/mute buttons are pressed.
> > 
> > Because those keys are routed over the KDC (keyboard controler).  You don't
> > get them over ACPI, no matter what you do.  And if you are going to enable
> > thinkpad-acpi NVRAM pooling to get them, well, you're weird.
> 
> You are saying that putting 0x00ffffff in the hotkey mask will enable
> NVRAM pooling?

No.  You're supopsed to need to do a bit more configuration to convince
thinkpad-acpi to start the NVRAM pooler on a X60.  What I meant is: if you
want those events so *much* that you are willing to enable the NVRAM poller
(which is the only way you will get the volume events from thinkpad-acpi on
your box), you're weird :-)

The reason why volume key reporting is not enabled by default in ANY
thinkpad is because they really would work only as an OSD hint, but people
in userspace started doing deranged things like route them to active
KEY_VOLUME_UP, KEY_VOLUME_DOWN.  That caused mixers to change the AC97
volume, while the firmware would *ALSO* change the speaker volume.  You can
guess how *nicely* fuckup-shaped the dynamic response curve of the volume
control gets when you do that, no?

And that is not even supposed to matter on a X60, since
/proc/acpi/ibm/volume is not supposed to be able to control the volume in a
X60/X60s.

> > Look on thinkwiki or on the list archives for information on how to use
> > these keys.
> 
> I will, although not sure where exactly 
> 
> > And use the latest BIOS for your X60s.
> 
> this is a bit of pain

Let me put it on another way:  I don't support anything but the latest BIOS,
and I have that policy for a very good reason.  The fact that the updates
happen to fix a lot of bugs on the key handling, brightness handling, and
suspend/resume is a large part of it.

I don't *know* if your BIOS has a keyboard bug, as I don't know how old your
BIOS is.  But the earlier X60 BIOSes had a few.

As an example, I cannot use *ANY* part of your report about volume keys and
even volume control to change the way thinkpad-acpi works, because it is not
necessarily the way the BIOS is supposed to work if you are using one of the
more outdated versions of the BIOS.

> > > The problem with that setup is that user-space gets no notificaion
> > > what-so-ever so to display an OSD or to notify the person using the
> > > laptop.
> > 
> > Why the heck would you need OSD for the *thinklight*?  It has its own user
> > feedback built-in.  It lights up when you enable it, and goes dark when you
> > disable it, after all...
> 
> well that was not my main concern, but if te light is burned out, I'd
> like to know it's not actually the button that is the problem :)

Heh :)

> > As for the others: OSD for brightness is to be done by querying the proper
> > backlight control layers.  
> 
> which one would it be in the "PerfectSetup???"?

Hah, tough one.  I very much doubt they have straightened that one out yet.

Now that X.org has a backlight control extension, it probably should go
through that one, if it is read/write.  Otherwise, it is through the sysfs
backlight class.

Which means it is something HAL should know about, and you should just ask
HAL about the current brightness.

> > OSD for volume is to be done by querying the ALSA mixers.
> 
> On my X60s, the volume is only reported by /proc/acpi/ibm/volume, and
> not in any (Master or PCM) Alsa mixer. it's a completelly separate mixer.

The X60s has the good old internal thinkpad mixer?  That's news to me.  If
changing /proc/acpi/ibm/volume in *single user mode* changes the volume on
the speakers, then yes, it does.  I would appreciate if you could confirm
this.   And still I'd only act on it if someone with an up-to-date BIOS
confirms it.

Anyway, I have not added an ALSA mixer interface for /proc/acpi/ibm/volume,
yet.  Mainly because ALSA really wants a separate module that conforms to
the ALSA standard for module parameters, and that means heavy surgery on
thinkpad-acpi.  It will be done, eventually.

-- 
  "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