[Lenovo T410] Microphone mute key does not fuction

Bug #751471 reported by Marc Legris on 2011-04-05
This bug affects 14 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)

Bug Description

Pressing the microphone mute key does not actually mute the microphone. No action is visible to the user. xev reports the following:
KeyRelease event, serial 33, synthetic NO, window 0x3c00001,
    root 0xb1, subw 0x0, time 2804760, (725,-74), root:(726,443),
    state 0x0, keycode 248 (keysym 0x0, NoSymbol), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False

gconf editor does not show an entry for this key in /apps/gnome_settings_daemon/keybindings

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: linux-image-2.6.38-7-generic 2.6.38-7.39
Regression: No
Reproducible: Yes
ProcVersionSignature: Ubuntu 2.6.38-7.39-generic 2.6.38
Uname: Linux 2.6.38-7-generic i686
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.23.
Architecture: i386
 **** List of CAPTURE Hardware Devices ****
 card 0: Intel [HDA Intel], device 0: CONEXANT Analog [CONEXANT Analog]
   Subdevices: 0/1
   Subdevice #0: subdevice #0
 /dev/snd/controlC0: u 1263 F.... pulseaudio
 /dev/snd/pcmC0D0c: u 1263 F...m pulseaudio
CRDA: Error: [Errno 2] No such file or directory
 Card hw:0 'Intel'/'HDA Intel at 0xf2620000 irq 45'
   Mixer name : 'Intel IbexPeak HDMI'
   Components : 'HDA:14f15069,17aa214c,00100302 HDA:80862804,17aa21b5,00100000'
   Controls : 12
   Simple ctrls : 6
 Card hw:29 'ThinkPadEC'/'ThinkPad Console Audio Control at EC reg 0x30, fw 6IHT39WW-1.14'
   Mixer name : 'ThinkPad EC 6IHT39WW-1.14'
   Components : ''
   Controls : 1
   Simple ctrls : 1
 Simple mixer control 'Console',0
   Capabilities: pswitch pswitch-joined penum
   Playback channels: Mono
   Mono: Playback [off]
Date: Tue Apr 5 10:30:41 2011
HibernationDevice: RESUME=UUID=e990102f-c651-40cd-a226-91ee04bc1a71
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Beta i386 (20110330)
MachineType: LENOVO 2516A11
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.38-7-generic root=UUID=83b05481-73e7-4792-b313-740f00528ebb ro quiet splash vt.handoff=7
 linux-restricted-modules-2.6.38-7-generic N/A
 linux-backports-modules-2.6.38-7-generic N/A
 linux-firmware 1.49
SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 02/01/2011
dmi.bios.vendor: LENOVO
dmi.bios.version: 6IET75WW (1.35 )
dmi.board.name: 2516A11
dmi.board.vendor: LENOVO
dmi.board.version: Not Available
dmi.chassis.asset.tag: No Asset Information
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.version: Not Available
dmi.modalias: dmi:bvnLENOVO:bvr6IET75WW(1.35):bd02/01/2011:svnLENOVO:pn2516A11:pvrThinkPadT410:rvnLENOVO:rn2516A11:rvrNotAvailable:cvnLENOVO:ct10:cvrNotAvailable:
dmi.product.name: 2516A11
dmi.product.version: ThinkPad T410
dmi.sys.vendor: LENOVO

Herton R. Krzesinski (herton) wrote :

Please run the following command:

to see what inputs are the keyboards, so we know what to check with keymap below. Probably in your case you will get input/event3 and input/event5.

Then run "sudo /lib/udev/keymap -i /dev/input/event3" (or change to event5, depending what source is generating the scan code for the mute key), and paste the output here.

Changed in linux (Ubuntu):
status: New → Incomplete
Herton R. Krzesinski (herton) wrote :

forgot to add, of course press the mute key when running keymap -i, I didn't wrote it well.

Changed in linux (Ubuntu Natty):
assignee: nobody → Chris Van Hoof (vanhoof)
Ara Pulido (ara) on 2011-04-08
Changed in linux (Ubuntu Natty):
importance: Undecided → Medium
Chris Van Hoof (vanhoof) on 2011-04-11
Changed in linux (Ubuntu Natty):
assignee: Chris Van Hoof (vanhoof) → Marc Legris (maaarc)
Victor Tuson Palau (vtuson) wrote :

I think this could be an exception, lets review it on friday and decide

Victor Tuson Palau (vtuson) wrote :

agreed with the Cert Bug team that this will be an exception for 11.04 and hence does not block cert

tags: removed: blocks-hwcert pcert

AT keyboard: input/event3
module: input/event7

sudo /lib/udev/keymap -i /dev/input/event3:
no output is show when pressing the mute mic key, all other keys output normally

Changed in linux (Ubuntu Natty):
status: Incomplete → Confirmed
Changed in linux (Ubuntu Natty):
assignee: Marc Legris (maaarc) → nobody
Changed in linux (Ubuntu Natty):
milestone: none → natty-updates
Herton R. Krzesinski (herton) wrote :

Marc, do you get output of keymap for mute key if you provide the other input event file?

That is, in your previous test, if you did sudo /lib/udev/keymap -i /dev/input/event7, instead of event3.

Changed in linux (Ubuntu Natty):
status: Confirmed → Incomplete


No output from event7, not even from normal keys

Changed in linux (Ubuntu Natty):
status: Incomplete → Confirmed
Jerone Young (jerone) wrote :

Hey guys,
      The microphone mute button does send a keycode. When you press it you will see this in dmesg:

keyboard: can't emulate rawmode for keycode 240

      The reason for this is there is nothing for udev to map it to .. let me explain.

      This is not a hardware key. It just a key that sends a keycode. So under Windows Lenovo has a daemon that does 2 things when it sees this key is pressed:
        1) Mutes/unmutes Microphone mixer
        2) Lights/unlights the LED on the Microphone button.

       To properly support this Linux has to do the same thing. I tried last year to do a lot of this work. One way to go about properly supporting under Linux:
        1) Define a common key for microphone mute . Here is what I tried a while back:

        2) Once something is agreeded on in the kernel then, userspace input.h (/usr/include/linux/input.h)
            will have to be updated as well.

        3) Then add this key to keymap for lenovo thinkpads in udev ..(see
            /usr/udev/keymaps/module-lenovo & /usr/udev/keymaps/lenovo-thinkpad-usb-keyboard-trackpoint)

        4) To add LED support you will need to expose it through thinkpad-acpi module. I think basic support is
             already there. But it does not expose it by default currently.

        5) Add support in Gnome Settings Daemon or write your own daemon. It will listen for the the agreed upon
            common keycode for microphone mute. Also if you want the LED to turn on and off you will need
            to turn it on and off via interface exposed by thinkpad-acpi via sysfs.

Herton R. Krzesinski (herton) wrote :

Thanks Jerone for the explanation, I understand better the situation now, also I looked again at bug 408903. The kernel support for the key here should be simple, once upstream agrees on a new key code, and thinkpad_acpi needs handling to report it (not in udev), as from what I see in the reports in both bugs it is an hotkey handled by acpi->thinkpad_acpi (it's sending KEY_UNKNOWN, and I was in fact expecting keymap to report this for thinkpad_acpi hotkeys, but don't know/remember now if it reports unknown key).

Something like the kernel I uploaded at http://people.canonical.com/~herton/thinkpad_micmute/ (patches there too)

I didn't look at the led support, but can you and Marc check this kernel and see if it's ok? (properly reporting new key code 0x21b). Also I placed some debugging just to check everything is ok, please attach dmesg after pressing the mic mute key.

Also note this is the first part, only the mute key is properly reported, but will need sound mixer app (user space support) to get the new key code and mute the mic in the sound mixer.

If this first part is ok, I'll rise the issue upstream and propose the new key code.

Changed in linux (Ubuntu Natty):
assignee: nobody → Herton R. Krzesinski (herton)
status: Confirmed → Incomplete
Herton R. Krzesinski (herton) wrote :

That is, I'll rise again the issue upstream, once we get this first step verified. For laptops, thinkpad_acpi must handle sending the key code, for the usb thinkpad keyboard, the udev keymap can be updated for the new key code, as Jerone already stated.

Herton R. Krzesinski (herton) wrote :

Ok, this was already being worked on, I found a link to the thread which probably is what Jerone posted on bug 408903, unfortunately that link is broken now so didn't saw it before, here is a working one: http://comments.gmane.org/gmane.linux.acpi.ibm-acpi.devel/2309

For some reason that patch was queued but didn't went upstream. And that patch implies this key code can need something to be added to volume handling of thinkpad_acpi. Jerone, was you able to test that patch and check its functionality, do you remember the history about it?

I wonder if we would need to change something related to the volume subdriver in thinkpad_acpi and the mic mute, I guess not, but that patch adds a TP_HKEY_EV_VOL_MUTE_MIC which doesn't make sense to me.

Changed in linux (Ubuntu Natty):
assignee: Herton R. Krzesinski (herton) → nobody
Jerone Young (jerone) wrote :

          That's right. I forgot it actually sends a acpi event. Which thinkpad-acpi is catches then sending the KEY_UNKNOWN keycode. The link you pointed out to the patch whould just label the acpi event in thinkpad-acpi but still would not help solving the whole problem.

         Getting a generic key to map to is the first step to solving the issue. Though there does seem to be little interest from the community to create it.

Jerone Young (jerone) wrote :

                 Also a bit of history at the time as well there was a lot of disscussion of if thinkpad-acpi should try and do the muting and unmuting. Basically trying to do this at the kernel level. Though nothing ever panned out with this discussion.

                IMO the optimal way was something to send a keycode and let userspace react to it.

Jerone Young (jerone) wrote :

            Sorry doing two things at once. Talked about wrong patch in #14. Was not able to test that patch out. But will give it sin and see it works with the LED support.

Jerone Young (jerone) wrote :

       With your kernel. The microphone mute button does send a keycode. Here are some of the messages you added:

[ 1088.567385] hotkey_notify_hotkey: process scancode == 0x001a
[ 1088.567390] tpacpi_input_send_key_masked: process scancode == 0x001a
[ 1088.567393] tpacpi_input_send_key: got keycode == 0x0000021b

      Though the at least for the T410 it does not expose the led. You would probably need to enable config option CONFIG_THINKPAD_ACPI_UNSAFE_LEDS.

Changed in linux (Ubuntu Natty):
status: Incomplete → Confirmed
Jens Taprogge (jlt-launchpad) wrote :

IIRC you will need something like the patch linked in comment #13 (https://bugs.launchpad.net/ubuntu/natty/+source/linux/+bug/751471/comments/13 ) to get a properly working unmute LED.

  Are you aware of a way to control the LEDs on the external keyboard?

Jerone Young (jerone) wrote :

    Not exactly. I see Manoj tried to get it working back in March with the T420 .. and it does not look simple:

Jens Taprogge (jlt-launchpad) wrote :

  The patch is sufficient to make the internal LED work on my T410s.
A file "/sys/devices/platform/thinkpad_acpi/leds/tpacpi::mute_mic/brightness" is created. When I echo an integer >0 into it the LED is turned on and 0 turns it off again.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers