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

Hotkey to control screen brightness not working - Lenovo Thinkpad w520 #141

Closed
CarlUpright opened this issue Jun 13, 2017 · 11 comments
Closed

Comments

@CarlUpright
Copy link

I'm using Build Apr 24 2017 on Linux (Lakka live usb) on a Lenovo Thinkpad w520.
When i press volume - and + , or when i press Fn + Home or Fn + End (supposed to be the brightness control hotkeys), nothing happen.

I made a hotkey for the volume control, so that's no big deal, but my screen is dimmed to the minimum.

Is there a little script i could use to create a hotkey to control the screen brightness? or maybe i need to use a different display driver ?

@kivutar
Copy link
Member

kivutar commented Jun 13, 2017

It's certainly the kind of screen where a systemd unit is setting the brightness during the boot.

https://www.google.fr/search?q=Lenovo+Thinkpad+w520+linux+screen+brightness&ie=utf-8&oe=utf-8&client=firefox-b&gfe_rd=cr&ei=l5o_WZOgLKLVXr6igfAP

You can try to add acpi_osi="!Windows 2012" thinkpad-acpi.brightness_enable=1 in the syslinux configuration files on the first partiton of the USB.

If it's not enough, try this command in the CLI, maybe using SSH from another PC:

echo 100 > /proc/acpi/video/VID1/LCD0/brightness

@CarlUpright
Copy link
Author

Solution 1 didn't work.
Here https://mzanfardino.wordpress.com/2015/02/10/linux-enabling-brightness-control-for-thinkpad-w520/ the user say he also added

BoardName "Quadro 1000M"
Option "RegistryDwords" "EnableBrightnessControl=1"

to the file /etc/X11/xorg.conf . I don't see that file in Lakka.


Solution 2 also didn't work. here's what's written :

Lakka (community) Version: 2.0
Lakka:~ # echo 100 > /proc/acpi/video/VID1/LCD0/brightness
**-sh: can't create /proc/acpi/video/VID1/LCD0/brightness: nonexistent directory**
Lakka:~ # 

@CarlUpright
Copy link
Author

i found out that this command works in the CLI using SSH :
echo XXX > /sys/class/backlight/intel_backlight/brightness

Where XXX is a value between 0 (backlight off) and max_brightness (4437 for this particular model).

So it seams like it is really the Fn hotkey that isn't working with Lakka (no problem in win 7, or Ubuntu). Is there a way to create a hotkey in Lakka to send the command to max out the display ? or to create a new value in the menu ?

@kivutar
Copy link
Member

kivutar commented Jun 13, 2017

For now let try the autostart service to automatically set the brightness on boot.

@CarlUpright
Copy link
Author

i don't know how to do that, can you assist me ?

@kivutar
Copy link
Member

kivutar commented Jun 13, 2017

@CarlUpright
Copy link
Author

that's already done and i'm there :)

@kivutar
Copy link
Member

kivutar commented Jun 13, 2017

OK, use nano to create the autostart.sh

nano .config/autostart.sh

Paste the content:

echo 4437 > /sys/class/backlight/intel_backlight/brightness

And save with CTRL+X

Then enable the service:

systemctl enable autostart

And reboot to check if it worked

@CarlUpright
Copy link
Author

Done. It is now booting at maximum brightness. That's good enough for me on that laptop, I'll try to boot it on different PC to see if that still works.

On the side, i think i need to compile the ThinkPad ACPI Extras Driver to activate all my Fn keys. I never compiled anything.

Thank you !

@kivutar
Copy link
Member

kivutar commented Jun 13, 2017

Yeah forget it, in Lakka compiling doesn't work exactly like on the other linux distributions. If this workaround works for you, it's already lucky :)

@kivutar kivutar closed this as completed Jun 13, 2017
@ricsif
Copy link

ricsif commented May 23, 2021

@kivutar @CarlUpright
Thanks for the steps, it solved similar brightness problem on Lenovo T430 (I have two, faced the issue only on one of them).
Despite the following error, after reboot .config/autostart.sh was executed.

Lakka:~ # systemctl enable autostart
Failed to enable unit: File autostart.service: No such file or directory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants