How to get volume hotkeys working again on W500?

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

How to get volume hotkeys working again on W500?

marc_ltp
[pleaes Cc me on replies so that I can see them faster]

I've read the list archives, I know ubuntu did something not much loved
where they generate X events on the hardware volume keys.
As a matter of fact, I get those:
KeyRelease event, serial 35, synthetic NO, window 0x6200001,
    root 0x126, subw 0x6200002, time 1337700564, (42,27), root:(550,1045),
    state 0x0, keycode 122 (keysym 0x1008ff11, XF86AudioLowerVolume), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False

So, with an ugly hack, installing xbindkeys, and:
gandalfthegrey:~$ cat .xbindkeysrc
"aumix -v -10"
XF86AudioLowerVolume

"aumix -v +10"
XF86AudioRaiseVolume


I was able to make things work again.

But this made me curious: why can't I get the hardware keys to work at the
OS level anymore like they used to?

My W500's hotkey mask comes with:
gandalf:~# cat /sys/devices/platform/thinkpad_acpi/hotkey_recommended_mask
0x038c7fff

linux/Documentation/laptops/thinkpad-acpi.txt gives the hotkey mask
and
0x1015  0x14    VOLUME UP       Internal mixer volume up. This
                                key is always handled by the
                                firmware, even when unmasked.
                                NOTE: Lenovo seems to be changing
                                this.
0x1016  0x15    VOLUME DOWN     Internal mixer volume up. This
                                key is always handled by the
                                firmware, even when unmasked.
                                NOTE: Lenovo seems to be changing
                                this.
0x1017  0x16    MUTE            Mute internal mixer. This
                                key is always handled by the
                                firmware, even when unmasked.  

As a result, I tried to add the 0x14 and 0x15 bits to the hotkey mask and fed
gandalfthegrey [mc]# cat /proc/acpi/ibm/hotkey
status:         enabled
mask:           0x03bc7fff
commands:       enable, disable, reset, <mask>

(0x03bc7fff instead of 0x038c7fff)

Yet, using the mute key still works.
When I mute, the vol up and vol down keys do unmute, but this happens in the bios.

tpb doesn't see the keys anymore (while tpb does see mute), and acpi_listen
does not see the keys either (strace of tpb or acpid doesn't show anything
registering in tpb or acpid when I push vol up and vol down).

I used to have tpb control master mixer volume, which I can't do anymore now.

I guess I can live with making this work through X, but any idea what
changed or what I'm missing?

Thanks,
Marc
--
"A mouse is a device used to point at the xterm you want to type in" - A.S.R.
Microsoft is to operating systems & security ....
                                      .... what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/ 
--
The linux-thinkpad mailing list home page is at:
http://mailman.linux-thinkpad.org/mailman/listinfo/linux-thinkpad
Reply | Threaded
Open this post in threaded view
|

Re: How to get volume hotkeys working again on W500?

marc_ltp
On Sun, Feb 28, 2010 at 09:39:49AM -0800, Marc MERLIN wrote:

> As a result, I tried to add the 0x14 and 0x15 bits to the hotkey mask and fed
> gandalfthegrey [mc]# cat /proc/acpi/ibm/hotkey
> status:         enabled
> mask:           0x03bc7fff
> commands:       enable, disable, reset, <mask>
>
> (0x03bc7fff instead of 0x038c7fff)
>
> Yet, using the mute key still works.
> When I mute, the vol up and vol down keys do unmute, but this happens in the bios.
>
> tpb doesn't see the keys anymore (while tpb does see mute), and acpi_listen
> does not see the keys either (strace of tpb or acpid doesn't show anything
> registering in tpb or acpid when I push vol up and vol down).
>
> I used to have tpb control master mixer volume, which I can't do anymore now.
>
> I guess I can live with making this work through X, but any idea what
> changed or what I'm missing?

Sorry, I forgot some details:
thinkpad_acpi: ThinkPad ACPI Extras v0.23-20091010
thinkpad_acpi: http://ibm-acpi.sf.net/
thinkpad_acpi: ThinkPad BIOS 6FET79WW (3.09 ), EC 7VHT14WW-1.03
thinkpad_acpi: Lenovo ThinkPad W500, model 4063FM6

kernel 2.6.31.6-core2smp-1khznohz-preempt-notcks-noide-hm64-20091206

ubuntu karmic

Marc
--
"A mouse is a device used to point at the xterm you want to type in" - A.S.R.
Microsoft is to operating systems & security ....
                                      .... what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/ 
--
The linux-thinkpad mailing list home page is at:
http://mailman.linux-thinkpad.org/mailman/listinfo/linux-thinkpad
Reply | Threaded
Open this post in threaded view
|

Re: How to get volume hotkeys working again on W500?

Henrique de Moraes Holschuh-2
In reply to this post by marc_ltp
On Sun, 28 Feb 2010, Marc MERLIN wrote:
> I've read the list archives, I know ubuntu did something not much loved
> where they generate X events on the hardware volume keys.

Whether that has any bearing on whatever happens in your system depends on
your ThinkPad model.  The newer ones from Lenovo do *NOT* issue volume
up/down ACPI notifications, they issue volume up/down keypresses and
software has to act on them or the volume won't be changed.

> My W500's hotkey mask comes with:
> gandalf:~# cat /sys/devices/platform/thinkpad_acpi/hotkey_recommended_mask
> 0x038c7fff

AFAIK the W500 doesn't have volume ACPI hotkeys, as it doesn't have a
console volume control anymore (it has just the HDA mixer).  So, it has
volume *keys*, that don't even go through thinkpad-acpi... but thinkpad-acpi
is not informed of that by the firmware so the keys are still there in the
recommended mask.

> Yet, using the mute key still works.

Mute is implemented by the firmware, and may or may not work (or get
reported to thinkpad-acpi) depending on whether the system was given a
OSI(Linux) parameter by the kernel or not.  Whether it happens or not
depends on your kernel command line parameters, and on some hardcoded
blacklists in the kernel source (i.e. kernel version).

> I guess I can live with making this work through X, but any idea what
> changed or what I'm missing?

The hardware lost the extra console (headphone/speakers) volume control, so
it now depends on the HDA mixer to do that.  It *does* have console hardware
mute (independent of the HDA mixer).

--
  "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
--
The linux-thinkpad mailing list home page is at:
http://mailman.linux-thinkpad.org/mailman/listinfo/linux-thinkpad
Reply | Threaded
Open this post in threaded view
|

Re: How to get volume hotkeys working again on W500?

marc_ltp
On Mon, Mar 01, 2010 at 04:41:26PM -0300, Henrique de Moraes Holschuh wrote:
> On Sun, 28 Feb 2010, Marc MERLIN wrote:
> > I've read the list archives, I know ubuntu did something not much loved
> > where they generate X events on the hardware volume keys.
>
> Whether that has any bearing on whatever happens in your system depends on
> your ThinkPad model.  The newer ones from Lenovo do *NOT* issue volume
> up/down ACPI notifications, they issue volume up/down keypresses and
> software has to act on them or the volume won't be changed.

Aah, thanks for confirming that.
So it sounds like my xbindkeys is indeed the way to go then.

> > I guess I can live with making this work through X, but any idea what
> > changed or what I'm missing?
>
> The hardware lost the extra console (headphone/speakers) volume control, so

Yeah, I noticed that. I wonder how many cents that saved :-/

> it now depends on the HDA mixer to do that.  It *does* have console hardware
> mute (independent of the HDA mixer).

Thanks for explaining, so xbindkeys it is for me then.

Thanks,
Marc
--
"A mouse is a device used to point at the xterm you want to type in" - A.S.R.
Microsoft is to operating systems & security ....
                                      .... what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/ 
--
The linux-thinkpad mailing list home page is at:
http://mailman.linux-thinkpad.org/mailman/listinfo/linux-thinkpad
Reply | Threaded
Open this post in threaded view
|

Re: How to get volume hotkeys working again on W500?

Henrique de Moraes Holschuh-2
On Mon, 01 Mar 2010, Marc MERLIN wrote:
> > The hardware lost the extra console (headphone/speakers) volume control, so
>
> Yeah, I noticed that. I wonder how many cents that saved :-/

Well, it removed an entire IC that did the eletronic volume control plus the
spearker and headphone amplification and drive.  I doubt it was a cost
issue, more likely it was a power budget issue, supply chain issue (that IC
is an old part, might be in phase-out at the vendor) or a noise issue.

--
  "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
--
The linux-thinkpad mailing list home page is at:
http://mailman.linux-thinkpad.org/mailman/listinfo/linux-thinkpad
Reply | Threaded
Open this post in threaded view
|

Re: How to get volume hotkeys working again on W500?

marc_ltp
On Mon, Mar 01, 2010 at 05:25:28PM -0300, Henrique de Moraes Holschuh wrote:
> On Mon, 01 Mar 2010, Marc MERLIN wrote:
> > > The hardware lost the extra console (headphone/speakers) volume control, so
> >
> > Yeah, I noticed that. I wonder how many cents that saved :-/
>
> Well, it removed an entire IC that did the eletronic volume control plus the
> spearker and headphone amplification and drive.  I doubt it was a cost
> issue, more likely it was a power budget issue, supply chain issue (that IC
> is an old part, might be in phase-out at the vendor) or a noise issue.

Gotcha on that.

Now this reminds me that I find the speaker volume fairly low on this
laptop. When the source is low too, end volume is too low sometimes.

Does someone have a recommended way to boost sound by resampling the output
past whatever volume 100% on alsamixer would give you?

Marc
--
"A mouse is a device used to point at the xterm you want to type in" - A.S.R.
Microsoft is to operating systems & security ....
                                      .... what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/ 
--
The linux-thinkpad mailing list home page is at:
http://mailman.linux-thinkpad.org/mailman/listinfo/linux-thinkpad
Reply | Threaded
Open this post in threaded view
|

Re: How to get volume hotkeys working again on W500?

Robert Tomsick
On Sat, 2010-03-06 at 14:42 -0800, Marc MERLIN wrote:
> Does someone have a recommended way to boost sound by resampling the output
> past whatever volume 100% on alsamixer would give you?

I know VLC can do this, and I suspect there's probably some other
software with similar capabilities.

-Rob

smime.p7s (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: How to get volume hotkeys working again on W500?

Marius Gedminas-4
In reply to this post by marc_ltp
On Sat, Mar 06, 2010 at 02:42:09PM -0800, Marc MERLIN wrote:
> Now this reminds me that I find the speaker volume fairly low on this
> laptop. When the source is low too, end volume is too low sometimes.
>
> Does someone have a recommended way to boost sound by resampling the output
> past whatever volume 100% on alsamixer would give you?

Pulseaudio can do that.  If you launch the sound settings dialog, the
volume slider goes to maybe 150% (while volume control keys/the dropdown
slider from the applet only go to 100%).

Some applications such as VLC or mplayer can do that too (VLC out of the
box, mplayer if you enable -softvol and set -softvol-max to something
higer than 100).

I've also noticed that the integrated speakers of my T61 aren't as loud
as the ones on my T42 were.

Marius Gedminas
--
Unix gives you enough rope to shoot yourself in the foot.

signature.asc (204 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: How to get volume hotkeys working again on W500?

Jesse Sheidlower
In reply to this post by marc_ltp
On Mon, Mar 01, 2010 at 12:21:42PM -0800, Marc MERLIN wrote:

> On Mon, Mar 01, 2010 at 04:41:26PM -0300, Henrique de Moraes Holschuh wrote:
> > On Sun, 28 Feb 2010, Marc MERLIN wrote:
> > > I've read the list archives, I know ubuntu did something not much loved
> > > where they generate X events on the hardware volume keys.
> >
> > Whether that has any bearing on whatever happens in your system depends on
> > your ThinkPad model.  The newer ones from Lenovo do *NOT* issue volume
> > up/down ACPI notifications, they issue volume up/down keypresses and
> > software has to act on them or the volume won't be changed.
>
> Aah, thanks for confirming that.
> So it sounds like my xbindkeys is indeed the way to go then.
>
> > > I guess I can live with making this work through X, but any idea what
> > > changed or what I'm missing?
> >
> > The hardware lost the extra console (headphone/speakers) volume control, so
>
> Yeah, I noticed that. I wonder how many cents that saved :-/
>
> > it now depends on the HDA mixer to do that.  It *does* have console hardware
> > mute (independent of the HDA mixer).
>
> Thanks for explaining, so xbindkeys it is for me then.

Sorry to revive this thread, but I just installed Ubuntu 9.10
on a W500 and have a variant of this question, that might go
with the question from elsewhere in the thread of boosting the
output beyond 100%.

My volume keys do control the speaker volume, and the
xbindkeys trick doesn't seem to change anything. In any case,
I've discovered that if I open the Sound Preferences app, I
_do_ have the option of pushing the sound past 100%. However,
using the volume keys or using the volume applet will
instantly re-center the volume around the 100% mark.

In other words, if I have a quiet recording or movie (or just
want it really loud), I can use the volume slider in Sound
Preferences to push the volume high, but if I then use the
regular volume applet or the keys, the volume goes back to
"normal" and I can't push it high again without opening up
Sound Preferences.

Does anyone know if there's a way to incorporate the control I
have with Sound Preferences into the other methods of
controlling the volume?

Thanks.

Jesse Sheidlower
--
The linux-thinkpad mailing list home page is at:
http://mailman.linux-thinkpad.org/mailman/listinfo/linux-thinkpad
Reply | Threaded
Open this post in threaded view
|

Re: How to get volume hotkeys working again on W500?

marc_ltp
In reply to this post by Robert Tomsick
On Sun, Mar 07, 2010 at 12:55:52AM +0000, Robert Tomsick wrote:
> On Sat, 2010-03-06 at 14:42 -0800, Marc MERLIN wrote:
> > Does someone have a recommended way to boost sound by resampling the output
> > past whatever volume 100% on alsamixer would give you?
>
> I know VLC can do this, and I suspect there's probably some other
> software with similar capabilities.

On Sun, Mar 07, 2010 at 04:27:30AM +0200, Marius Gedminas wrote:
> Pulseaudio can do that.  If you launch the sound settings dialog, the
> volume slider goes to maybe 150% (while volume control keys/the dropdown
> slider from the applet only go to 100%).
>
> Some applications such as VLC or mplayer can do that too (VLC out of the
> box, mplayer if you enable -softvol and set -softvol-max to something
> higer than 100).

Thanks both for the tips.

Marc
--
"A mouse is a device used to point at the xterm you want to type in" - A.S.R.
Microsoft is to operating systems & security ....
                                      .... what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/ 
--
The linux-thinkpad mailing list home page is at:
http://mailman.linux-thinkpad.org/mailman/listinfo/linux-thinkpad