Wednesday, May 20, 2009

How to enable the Thinkpad volume notification

A typical Thinkpad has two ways to control the volume of the speakers:
1. a hardware mixer and,
2. not surprisingly, a software mixer.

The volumen up, down and mute buttons on the Thinkpad keyboard are used to control the hardware mixer and have nothing to do with the software mixer. A software mixer is a bit more advanced since it has many more steps in volume control than the 15 steps the hardware mixer has (including mute), but still they're there and they work.

Since Jaunty, the Ubuntu packagers have decided to disable the volume control in the various modules they pack in the distribution. This was because there were too many complaints and bug reports that the usage of the volume buttons resulted in very big steps in volume control. Logical, because if you push volume up and it then ups the hw mixer and sw mixer at the same time, the gain in volume would be twice as big as to be expected.

So, out hw mixer from the volume control. The only real solution here would be if there was an Alsa mixer (or any of the other sound softwares) module to control the hw mixer, but there isn't any.

Draw back is that pressing the volume buttons don't give any graphical feedback about their status, so you're completely in the dark if it is muted, soft or hard. Annoying at least. But... there is a solution.

A bloke named Lorne has recompiled the thinkpad_acpi module for the community and is available at this ppa. It has a new kernel image and headers, that will upgrade your kernel, but not in version. It will remain a slightly addapted stock 2.6.28-11 kernel. Also, the HDAPS fix I posted earlier will remain working after this upgrade.

Just add
deb jaunty main
deb-src jaunty main
to your sources.list or through Synaptic as third party software. Then add the key of this repository to your system using:

$ sudo apt-key adv --recv-keys --keyserver f6a3a943a0f94e10d19c2f35ad3d7a1a3e3d239e

Then upgrade your kernel with either Synaptic or the Update manager and reboot.
VoilĂ , the notification system now shows you the status of the volume when you use the hardware buttons.

You could also use the 'tpb' (for Thinkpad Button) package to accomplish this, but it has some drawbacks. It doesn't look too good, it's not integrated in your desktop experience as the notification system is (and with Jaunty, that looks very slick) and it consumes considerably more power. The latter because tpb polls the nvram subsystem while otherwise the acpi system is used.

Also, installing tpb from the stock Ubuntu packages will deinstall the hotkey package, so you would have to compile/install it manually if you don't want to lose the hotkey package..

1 comment:

  1. Hello,

    I have a somehow related problem. With Jaunty as well. To have the volume/mute button working, i simply create keyboard shortcuts in System/preferences/shortcuts :

    Volume mute : XF86AudioMute
    and so on...

    But strangely enough, it doesn't act on the global volume, but on the Microphone volume/mute !!

    Any idea how to fix this ?

    thanks in advance,