Project

General

Profile

Actions

Bug #533

closed

T440p audio mute button and fan control not working

Added by frantic from xboot 4 months ago. Updated about 2 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Start date:
03/07/2024
Due date:
% Done:

0%

Estimated time:
Affected versions:
Needs backport to:
Affected hardware:
Lenovo Thinkpad T440p
Affected OS:
All Linux distributions

Description

In recent coreboot versions, the audio mute button and fan control has stopped working. Whereas you use the same revision from Libreboot, it all works fine and smoothly. This leads me to suspect that someone changed someone without testing, which is real annoying.
The audio mute button technically still functions, but the LED no longer turns on/off. Always just off.
Fan control no longer works with Thinkfan. /proc/acpi/ibm/fan doesn't exist any more. I've tried "force loading" thinkpad_acpi, but it doesn't work.

Actions #1

Updated by Paul Menzel 4 months ago

In recent coreboot versions, the audio mute button and fan control has stopped working. Whereas you use the same revision from Libreboot, it all works fine and smoothly. This leads me to suspect that someone changed someone without testing, which is real annoying.

Sorry, you hit a problem, and thank you for reporting it. The project is short of testers, so it’d be great if you stepped up or payed some company for it.

The audio mute button technically still functions, but the LED no longer turns on/off. Always just off.
Fan control no longer works with Thinkfan. /proc/acpi/ibm/fan doesn't exist any more. I've tried "force loading" thinkpad_acpi, but it doesn't work.

Please attach logs and it’d be great if you could bisect the problem. (Please make sure to have a way to recover, in case a bisect commit fails to boot due to another issue fixed in the mean time.)

It’d be great if you could upload logs to the board status repository with util/board_status/board_status.sh.

Actions #2

Updated by frantic from xboot 4 months ago

frantic from xboot wrote in #note-2:

Paul Menzel wrote in #note-1:

In recent coreboot versions, the audio mute button and fan control has stopped working. Whereas you use the same revision from Libreboot, it all works fine and smoothly. This leads me to suspect that someone changed someone without testing, which is real annoying.

Sorry, you hit a problem, and thank you for reporting it. The project is short of testers, so it’d be great if you stepped up or payed some company for it.

The audio mute button technically still functions, but the LED no longer turns on/off. Always just off.
Fan control no longer works with Thinkfan. /proc/acpi/ibm/fan doesn't exist any more. I've tried "force loading" thinkpad_acpi, but it doesn't work.

Please attach logs and it’d be great if you could bisect the problem. (Please make sure to have a way to recover, in case a bisect commit fails to boot due to another issue fixed in the mean time.)

It’d be great if you could upload logs to the board status repository with util/board_status/board_status.sh.

I'm happy to try and help, but I'm not too familiar with coreboots code. So I'll try my best.
There's not too many logs I can really attach. The mute button still works like I said, but the LED just doesn't turn on/off. Could you please let me know where the code would be for this so I can start analyzing it?
For Thinkfan, I get the following error:

ERROR: ~TpFanDriver: Resetting fan control in /proc/acpi/ibm/fan: No such file or directory
ERROR: ~TpFanDriver: Resetting fan control in /proc/acpi/ibm/fan: No such file or directory
ERROR: init: Initializing fan control in /proc/acpi/ibm/fan: No such file or directory

I couldn't run board_status because I got:

Getting coreboot boot log
Getting timestamp data
Verifying that nvramtool is available
Getting all CMOS values
Failed to run "util/nvramtool/nvramtool -a", aborting

Thanks

Actions #3

Updated by Evgeny Zinoviev 4 months ago

Hi,

I switched to T440p as my daily driver some time ago and I can confirm the missing fan controls and the mute button issue. There was also an issue with incorrect behavior of the LED on the laptop's lid, but I already committed a fix.

If nobody's willing to work on it, I can assign this to myself, I was going to look into it some day anyway.

P.S. Regarding the mute button LED, as a quick dirty temporary workaround, you can turn the LED on and off using util/pmh7tool plus, for example, acpid hooks (if you'll run acpi_listen, you'll see it catches button/mute MUTE event every time you press the button). Or, if you don't want to rely on acpid, maybe some pulseaudio (or whatever sound server you use) hooks...

To turn it on, run as root: pmh7tool -c 0x102 4
To turn it off: pmh7tool -s 0x102 4

Actions #4

Updated by frantic from xboot 4 months ago

Evgeny Zinoviev wrote in #note-3:

Hi,

I switched to T440p as my daily driver some time ago and I can confirm the missing fan controls and the mute button issue. There was also an issue with incorrect behavior of the LED on the laptop's lid, but I already committed a fix.

If nobody's willing to work on it, I can assign this to myself, I was going to look into it some day anyway.

P.S. Regarding the mute button LED, as a quick dirty temporary workaround, you can turn the LED on and off using util/pmh7tool plus, for example, acpid hooks (if you'll run acpi_listen, you'll see it catches button/mute MUTE event every time you press the button). Or, if you don't want to rely on acpid, maybe some pulseaudio (or whatever sound server you use) hooks...

To turn it on, run as root: pmh7tool -c 0x102 4
To turn it off: pmh7tool -s 0x102 4

Hi, thanks for confirming. Nice to know I'm not going crazy.
Where would the code to the mute button LED be? I'm happy to go and try fix it, as I have the revision to a version of coreboot where the LED worked. So I can probably try just see the differences.
Same with fan control.
Thanks

Actions #5

Updated by Evgeny Zinoviev 4 months ago

P.P.S. You say on libreboot everything works, what revision of libreboot did you use exactly? Because I tried some of their recent ones and these issues were already there.

Actions #6

Updated by frantic from xboot 4 months ago

Evgeny Zinoviev wrote in #note-5:

P.P.S. You say on libreboot everything works, what revision of libreboot did you use exactly? Because I tried some of their recent ones and these issues were already there.

I'm currently using the latest release version of Libreboot and the LED and fan controls work very well.
The coreboot revision for this version is: b6cbfa977f63d57d5d6b9e9f7c1cef30162f575a

Actions #7

Updated by Evgeny Zinoviev 4 months ago

Where would the code to the mute button LED be? I'm happy to go and try fix it, as I have the revision to a version of coreboot where the LED worked. So I can probably try just see the differences.
Same with fan control.

Well, I'd start from src/ec/lenovo/h8 and the device tree under src/mainboard/lenovo/haswell/variants/t440p, maybe there were some changes to the EC config?.. And also anything related to ACPI there.

Actions #8

Updated by Evgeny Zinoviev 4 months ago

There's also a chance that some, for example, SMBIOS tables or something similar are not filled or filled incorrectly, and as a result, the thinkpad_acpi linux driver just doesn't recognize the device as valid and supported. So I'd look into this too. I'd check with the driver code, see what it looks for, and compared it to what coreboot provides. Maybe the driver just doesn't catch our thinkpads as thinkpads :)

Actions #9

Updated by frantic from xboot 4 months ago

Evgeny Zinoviev wrote in #note-7:

Where would the code to the mute button LED be? I'm happy to go and try fix it, as I have the revision to a version of coreboot where the LED worked. So I can probably try just see the differences.
Same with fan control.

Well, I'd start from src/ec/lenovo/h8 and the device tree under src/mainboard/lenovo/haswell/variants/t440p, maybe there were some changes to the EC config?.. And also anything related to ACPI there.

Nothing much seems to have changed. I can see your LED Logo lid patch, but that's it.
I'm going to test whether changing my SMBIOS table names works. As currently, it is named under "xboot" and I changed it from LENOVO to Lenovo.
Libreboot doesn't apply any patches to the T440p either, so this should hopefully work. As I have no idea what else could be causing it.

Actions #10

Updated by frantic from xboot 4 months ago

frantic from xboot wrote:

In recent coreboot versions, the audio mute button and fan control has stopped working. Whereas you use the same revision from Libreboot, it all works fine and smoothly. This leads me to suspect that someone changed someone without testing, which is real annoying.
The audio mute button technically still functions, but the LED no longer turns on/off. Always just off.
Fan control no longer works with Thinkfan. /proc/acpi/ibm/fan doesn't exist any more. I've tried "force loading" thinkpad_acpi, but it doesn't work.

Alright, so I've found a fix. Unfortunately, you need to set the SMBIOS BIOS Vendor Name to "coreboot". You also need to set SMBIOS Manufacturer to "LENOVO". You also need to set the Mainboard vendor name to "LENOVO". After I set these, fan controls and the LED light started working again on the latest master. I'm not sure what's wrong with the LED light requiring this, but my guess for fan controls is that the thinkpad_acpi module checks whether you have coreboot and also checks your manufacturer. I will look into the code when later tonight when I'm not busy, and see if I can add a patch or anything to thinkpad_acpi.
Anyways, that's the fix that worked for me. If you wish for my config, just ask and I will provide.
Thanks

Actions #11

Updated by Evgeny Zinoviev 3 months ago

frantic from xboot wrote in #note-10:

frantic from xboot wrote:

In recent coreboot versions, the audio mute button and fan control has stopped working. Whereas you use the same revision from Libreboot, it all works fine and smoothly. This leads me to suspect that someone changed someone without testing, which is real annoying.
The audio mute button technically still functions, but the LED no longer turns on/off. Always just off.
Fan control no longer works with Thinkfan. /proc/acpi/ibm/fan doesn't exist any more. I've tried "force loading" thinkpad_acpi, but it doesn't work.

Alright, so I've found a fix. Unfortunately, you need to set the SMBIOS BIOS Vendor Name to "coreboot". You also need to set SMBIOS Manufacturer to "LENOVO". You also need to set the Mainboard vendor name to "LENOVO". After I set these, fan controls and the LED light started working again on the latest master. I'm not sure what's wrong with the LED light requiring this, but my guess for fan controls is that the thinkpad_acpi module checks whether you have coreboot and also checks your manufacturer. I will look into the code when later tonight when I'm not busy, and see if I can add a patch or anything to thinkpad_acpi.
Anyways, that's the fix that worked for me. If you wish for my config, just ask and I will provide.
Thanks

Well I'm glad that my guess turned out to be correct. Thank you for testing and verifying. I guess my SMBIOS is also messed up in some way (no idea why :D), or at least thinkpad_acpi thinks so.

Although at this point I'm not sure this is a coreboot bug.

Actions #12

Updated by Evgeny Zinoviev 3 months ago

  • Status changed from New to Resolved
Actions #13

Updated by Evgeny Zinoviev 3 months ago

For everyone who encounters this issue - I just found another workaround:

just pass force_load=1 to thinkpad_acpi module.

Actions #14

Updated by frantic from xboot about 2 months ago

Evgeny Zinoviev wrote in #note-13:

For everyone who encounters this issue - I just found another workaround:

just pass force_load=1 to thinkpad_acpi module.

PS. That only works once you've fixed the SMBIOS tables.

Actions

Also available in: Atom PDF