Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backlight function doesn't work #1

Open
archfan opened this issue Dec 23, 2019 · 5 comments
Open

Backlight function doesn't work #1

archfan opened this issue Dec 23, 2019 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@archfan
Copy link
Owner

archfan commented Dec 23, 2019

ecdiff
kbl_on2.txt
kbl_on1.txt
kbl_off.txt

The original Lenovo firmware allows changing keyboard backlight parameters with ectool

low brightness
sudo ./ectool -w 0xd -z 0x42

high brightness
sudo ./ectool -w 0xd -z 0x82

disable backlight
sudo ./ectool -w 0xd -z 0x02

On coreboot this doesn't work at all. The backlight stays off in any case.

@archfan archfan added the bug Something isn't working label Dec 23, 2019
@archfan archfan self-assigned this Dec 23, 2019
@0xSigi
Copy link

0xSigi commented Jan 19, 2020

Hey! Can you test and see if force loading a thinkpad_acpi solves this issue? To do it you'd need to create a thinkpad-acpi.conf file in /etc/modprobe.d that contains "options thinkpad_acpi force_load=1" without quotes, after that reboot your machine and test again. If this won't work we can try to manually control this via conf file.

@dwzg
Copy link

dwzg commented Jan 21, 2020

Regarding thinkpad_acpi:
While testing, I realized that thinkpad_acpi has issues detecting the EC version of a T440p running coreboot. I found, that thinkpad_acpi expects a specially formatted SMBIOS version string. In other ThinkPads this is achieved by prepending the string "CBET4000" to the coreboot version when reading the SMBIOS version. This is done in src/drivers/i2c/at24rf08c/lenovo_serials.c and I guess the T440p is not using this EEPROM driver. I fixed this, by integrating the SMBIOS version function into the mainboard.c of the T440p, like it was once done in coreboot before the code got moved to the EEPROM driver (see commit 537283d).
The thinkpad_acpi module now correctly detects the EC version, but this had no influence on the backlight issue.

Edit: I just checked something. Fixing this issues resolves the necessity to force_load thinkpad_acpi. The module now loads automatically without any additional parameters.

@0xSigi
Copy link

0xSigi commented Jan 24, 2020

The thinkpad_acpi module now correctly detects the EC version, but this had no influence on the backlight issue.

Edit: I just checked something. Fixing this issues resolves the necessity to force_load thinkpad_acpi. The module now loads automatically without any additional parameters.

The issue with the EC not being detected also impacts tlp charging / calibration thresholds as the tpacpi-bat returns error that the device is not supported.. Most probably this would also be fixed by the change done by @dwzg Unfortunately my keyboard won't arrive until at least end of next week :/

@dwzg
Copy link

dwzg commented Jan 29, 2020

I got the backlight to work! Writing 0x05 to the address 0x01 in ectool does the trick for me. After this I can control the backlight with Fn+Space, like on a noncorebooted T440p. Still no clue where this problem comes from and how to fix it permanently.

@dwzg
Copy link

dwzg commented Jan 31, 2020

Backlight is fixed now: https://review.coreboot.org/c/coreboot/+/38650

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants