Thinkpad T440p cannot be unmuted via Fn keys with mplayer in some cases

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Thinkpad T440p cannot be unmuted via Fn keys with mplayer in some cases

Bryan Linton
Hello misc@

I'm not sure if I should send this to bugs@ or not, so I decided
to send this here first.

I recently bought a Thinkpad T440p to replace my aging T60 model
and encountered some non-intuitive behavior.  I think the behavior
of the volume keys has been discussed before, but I don't remember
what the conclusions were.

On my T60, the volume up, volume down, and mute keys behaved as if
the buttons connected to an external speaker on a desktop.  I.e.
I could press them and the OS and X11 were completely oblivious to
any changes.  Everything seemed to be handled by the BIOS behind
the OS's back.

On the T440p however, these keys seem to be passed through to X11
and/or the OS itself, which makes for some odd bugs.

Case #1:

1) Mute the system by pressing Fn+F1.  A light on the F1 AKA "Mute
key" turns on to show the system is muted.
2) "mixerctl outputs.master.mute" shows as "on".
3) Play a video in mplayer.  It plays muted.
4) Oops!  I want my audio, so I press Fn+F1 to unmute the system.

Expected result:
The system is unmuted, and audio plays normally.

Actual result:
The *system* does actually unmute itself.  outputs.master.mute
shows as "off".  However, mplayer picks up the button press, and
now *mplayer* is muted!

Press the button again, and mplayer successfully unmutes itself
but... now the *system* is muted again.

Sometimes I get a brief, split-second of audio when doing this,
but usually no audio plays at all.

This only happens when using mplayer to play a video.  When using
it to play audio, the xterm it's running in does not react this
way and it unmutes itself as in the "Expected result" above.

Case #2:

0) Mute the system before the OS is loaded.  The "mute light"
turns on.
1) Run "mixerctl outputs.master.mute" and it shows
2) Press the button again.  The "mute light" turns off (indicating
the system should not be muted) but now outputs.master.mute shows

Expected result:
The "mute light" and "mixerctl outputs.master.mute" should always
be in a congruent state.

Actual result:
The "mute light" and "mixerctl outputs.master.mute" can and do end
up in contradictory states.

Case #3:

1) Set volume to something below the maximum, *outside* of an
mplayer window.
2) Play a video with mplayer.
3) Press mplayer's "volume up" key (NOT the Fn-combination) to set
mplayer's volume to the max.
4) One can now press the Fn keys to increase the volume beyond the
supposed "max" in mplayer.
5) Try to decrease the volume with the Fn-combination and now
mplayer "catches" the key and ALSO decreases its own, internal
volume as well.  I.e. The Fn-keys seem to have double the effect.
Once on the system as a whole, and again after mplayer intercepts

Expected result:
The Fn-combinations should behave as if a knob on an external set
of speakers is being turned, and the OS and applications within
the OS should have no knowledge of their state.

Actual result:
The button presses are passed through to the OS, where they appear
to have a double effect.  The Fn keys can also continue to
increase the volume even after mplayer says it's at maximum
because they're still decoupled at some level.

As stated above, while there may be other users who would
disagree, I tend to expect hardware buttons like these to behave
as if I'm twiddling a knob on an external stereo or set of

Regardless of how they're treated, it would probably be best if
only one of the BIOS or OS were made aware of them.  As it stands
now, it appears that *both* the BIOS and the OS see the button
presses, which results in the non-intuitive behavior seen above.

Suggested fix:
Uncertain.  I'm not sure if the problem is with the computer
itself, acpithinkpad.c, X11, or with mplayer.  It may even be a
combination of the above.

I'm running the latest BIOS from Lenovo.

dmesg is attached below signature.  I know that custom kernels are
frowned upon, but the only change made is the addition of the
PPPOE_TERM_UNKNOWN_SESSIONS option, which is practically a
requirement for me if I don't want to wait 5-20 minutes for my
internet connection to time-out after rebooting.  I'm making a
semi-educated guess and assuming it would not affect the
audio-subsystem, but I can re-test on a GENERIC.MP kernel if


OpenBSD 6.1-current (GENERIC.MP-PPPOE_TERM_UNKNOWN_SESSIONS) #11: Tue May 23 19:10:56 JST 2017
    [hidden email]:/usr/src/sys/arch/amd64/compile/GENERIC.MP-PPPOE_TERM_UNKNOWN_SESSIONS
real mem = 12539871232 (11958MB)
avail mem = 12154036224 (11590MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xbcc0d000 (67 entries)
bios0: vendor LENOVO version "GLET85WW (2.39 )" date 09/29/2016
bios0: LENOVO 20AWS27D00
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: wakeup devices LID_(S4) SLPB(S3) IGBE(S4) EXP2(S4) EXP3(S4) XHCI(S3) EHC1(S3) EHC2(S3)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpiec0 at acpi0
acpihpet0 at acpi0: 14318179 Hz
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i5-4300M CPU @ 2.60GHz, 2594.33 MHz
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: TSC frequency 2594330880 Hz
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges
cpu0: apic clock running at 99MHz
cpu0: mwait min=64, max=64, C-substates=, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM) i5-4300M CPU @ 2.60GHz, 2594.00 MHz
cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 1, core 0, package 0
cpu2 at mainbus0: apid 2 (application processor)
cpu2: Intel(R) Core(TM) i5-4300M CPU @ 2.60GHz, 2594.00 MHz
cpu2: 256KB 64b/line 8-way L2 cache
cpu2: smt 0, core 1, package 0
cpu3 at mainbus0: apid 3 (application processor)
cpu3: Intel(R) Core(TM) i5-4300M CPU @ 2.60GHz, 2594.00 MHz
cpu3: 256KB 64b/line 8-way L2 cache
cpu3: smt 1, core 1, package 0
ioapic0 at mainbus0: apid 2 pa 0xfec00000, version 20, 24 pins
acpimcfg0 at acpi0 addr 0xf8000000, bus 0-63
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (PEG0)
acpiprt2 at acpi0: bus -1 (PEG_)
acpiprt3 at acpi0: bus 2 (EXP1)
acpiprt4 at acpi0: bus 3 (EXP2)
acpiprt5 at acpi0: bus -1 (EXP3)
acpiprt6 at acpi0: bus -1 (EXP6)
acpicpu0 at acpi0: C2(200@148 mwait.1@0x33), C1(1000@1 mwait.1), PSS
acpicpu1 at acpi0: C2(200@148 mwait.1@0x33), C1(1000@1 mwait.1), PSS
acpicpu2 at acpi0: C2(200@148 mwait.1@0x33), C1(1000@1 mwait.1), PSS
acpicpu3 at acpi0: C2(200@148 mwait.1@0x33), C1(1000@1 mwait.1), PSS
acpipwrres0 at acpi0: PUBS, resource for XHCI, EHC1, EHC2
acpipwrres1 at acpi0: NVP3, resource for PEG_
acpipwrres2 at acpi0: NVP2, resource for PEG_
acpitz0 at acpi0: critical temperature is 200 degC
acpibtn0 at acpi0: LID_
acpibtn1 at acpi0: SLPB
"LEN0071" at acpi0 not configured
"LEN0036" at acpi0 not configured
"SMO1200" at acpi0 not configured
acpibat0 at acpi0: BAT0 model "45N1161" serial  3584 type LION oem "LGC"
acpiac0 at acpi0: AC unit online
acpithinkpad0 at acpi0
"PNP0C14" at acpi0 not configured
"PNP0C14" at acpi0 not configured
"PNP0C14" at acpi0 not configured
"INT340F" at acpi0 not configured
acpivideo0 at acpi0: VID_
acpivout at acpivideo0 not configured
acpivideo1 at acpi0: VID_
cpu0: Enhanced SpeedStep 2594 MHz: speeds: 2601, 2600, 2500, 2300, 2200, 2100, 2000, 1800, 1700, 1600, 1400, 1300, 1200, 1100, 900, 800 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel Core 4G Host" rev 0x06
inteldrm0 at pci0 dev 2 function 0 "Intel HD Graphics 4600" rev 0x06
drm0 at inteldrm0
inteldrm0: msi
inteldrm0: 1920x1080, 32bpp
wsdisplay0 at inteldrm0 mux 1: console (std, vt100 emulation)
wsdisplay0: screen 1-5 added (std, vt100 emulation)
azalia0 at pci0 dev 3 function 0 "Intel Core 4G HD Audio" rev 0x06: msi
xhci0 at pci0 dev 20 function 0 "Intel 8 Series xHCI" rev 0x04: msi
usb0 at xhci0: USB revision 3.0
uhub0 at usb0 configuration 1 interface 0 "Intel xHCI root hub" rev 3.00/1.00 addr 1
"Intel 8 Series MEI" rev 0x04 at pci0 dev 22 function 0 not configured
em0 at pci0 dev 25 function 0 "Intel I217-LM" rev 0x04: msi, address xx:xx:xx:xx:xx:xx
ehci0 at pci0 dev 26 function 0 "Intel 8 Series USB" rev 0x04: apic 2 int 16
usb1 at ehci0: USB revision 2.0
uhub1 at usb1 configuration 1 interface 0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
azalia1 at pci0 dev 27 function 0 "Intel 8 Series HD Audio" rev 0x04: msi
azalia1: codecs: Realtek ALC292
audio0 at azalia1
ppb0 at pci0 dev 28 function 0 "Intel 8 Series PCIE" rev 0xd4: msi
pci1 at ppb0 bus 2
rtsx0 at pci1 dev 0 function 0 "Realtek RTS5227 Card Reader" rev 0x01: msi
sdmmc0 at rtsx0: 4-bit
ppb1 at pci0 dev 28 function 1 "Intel 8 Series PCIE" rev 0xd4: msi
pci2 at ppb1 bus 3
iwm0 at pci2 dev 0 function 0 "Intel Dual Band Wireless AC 7260" rev 0x83, msi
ehci1 at pci0 dev 29 function 0 "Intel 8 Series USB" rev 0x04: apic 2 int 23
usb2 at ehci1: USB revision 2.0
uhub2 at usb2 configuration 1 interface 0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
pcib0 at pci0 dev 31 function 0 "Intel QM87 LPC" rev 0x04
ahci0 at pci0 dev 31 function 2 "Intel 8 Series AHCI" rev 0x04: msi, AHCI 1.3
ahci0: port 0: 6.0Gb/s
ahci0: port 5: 1.5Gb/s
scsibus1 at ahci0: 32 targets
sd0 at scsibus1 targ 0 lun 0: <ATA, Samsung SSD 850, EMT0> SCSI3 0/direct fixed naa.5002538d41895ee0
sd0: 476940MB, 512 bytes/sector, 976773168 sectors, thin
cd0 at scsibus1 targ 5 lun 0: <PLDS, DVD-RW DU8A5SH, BU51> ATAPI 5/cdrom removable
ichiic0 at pci0 dev 31 function 3 "Intel 8 Series SMBus" rev 0x04: apic 2 int 18
iic0 at ichiic0
isa0 at pcib0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5 irq 1 irq 12
pckbd0 at pckbc0 (kbd slot)
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pms0 at pckbc0 (aux slot)
wsmouse0 at pms0 mux 0
wsmouse1 at pms0 mux 0
pms0: Synaptics clickpad, firmware 8.2
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
vmm0 at mainbus0: VMX/EPT
error: [drm:pid0:intel_uncore_check_errors] *ERROR* Unclaimed register before interrupt
ugen0 at uhub0 port 7 "Validity Sensors VFS5011 Fingerprint Reader" rev 1.10/0.78 addr 4
ugen1 at uhub0 port 11 "Intel product 0x07dc" rev 2.00/0.01 addr 5
uvideo0 at uhub0 port 12 configuration 1 interface 0 "SunplusIT INC. Integrated Camera" rev 2.00/0.03 addr 6
video0 at uvideo0
sdmmc0: can't enable card
uhub3 at uhub1 port 1 configuration 1 interface 0 "Intel Rate Matching Hub" rev 2.00/0.04 addr 2
uhub4 at uhub2 port 1 configuration 1 interface 0 "Intel Rate Matching Hub" rev 2.00/0.04 addr 2
vscsi0 at root
scsibus3 at vscsi0: 256 targets
softraid0 at root
scsibus4 at softraid0: 256 targets
iwm0: hw rev 0x140, fw ver 16.242414.0, address xx:xx:xx:xx:xx:xx
error: [drm:pid29163:hsw_unclaimed_reg_clear] *ERROR* Unknown unclaimed register before writing to 101008