You are not logged in.

#1 2012-09-03 08:57:03

Wasser
Member
Registered: 2011-07-06
Posts: 23

[SOLVED] Control backlight brightness when computer powers on

Hi, i have a ASUS laptop with keyboard backlight.


The FN keys to control it work great, but changes are not persistent, meaning that when rebooting the computer, the backlight is turned on by default.


Is there a way to tell the kernel (is the kernel that controls that?) to start the computer without backlight? / turn it off it at boot time?


Thanks!

Last edited by Wasser (2013-05-06 22:47:36)

Offline

#2 2012-09-03 09:00:06

progandy
Member
Registered: 2012-05-17
Posts: 5,321

Re: [SOLVED] Control backlight brightness when computer powers on

Can you control the backlight with somethin in /sys/class/backlight?
Then for systemd add an entry to tmpfiles.d that echos 0 to the entry in /sys/class/backlight/... For initscripts, add a line to rc.local that does the same.
Edit or maybe that helps: https://github.com/ktoso/g73-keyboard-backlight-sh

Last edited by progandy (2012-09-03 09:03:11)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |

Offline

#3 2012-09-03 09:09:11

Wasser
Member
Registered: 2011-07-06
Posts: 23

Re: [SOLVED] Control backlight brightness when computer powers on

progandy wrote:

Can you control the backlight with somethin in /sys/class/backlight?
Then for systemd add an entry to tmpfiles.d that echos 0 to the entry in /sys/class/backlight/... For initscripts, add a line to rc.local that does the same.
Edit or maybe that helps: https://github.com/ktoso/g73-keyboard-backlight-sh

Ok. I have just tested it manually and in my case it is:

echo "0" > /sys/class/leds/asus\:\:kbd_backlight/brightness

The problem with doing that is that while it turns off the backlight, gnome does not recognize the change.

Meaning that if I press "FN+KB_LED+" it thinks it's at maximum (shows message marking it's on) and does not turn it on again, instead I have to do "FN+KB_LED-"

Any idea how to solve this?

Offline

#4 2012-09-17 21:14:53

Wasser
Member
Registered: 2011-07-06
Posts: 23

Re: [SOLVED] Control backlight brightness when computer powers on

*small bump*

If I set the intensity manually, gnome does not take notice. Any way to "inform" Gnome that the keyboard backlight changed?

If I don't "inform" gnome, the notification shown by it when using the shortcut later shows wrong intensity.

Offline

#5 2012-09-17 22:16:15

progandy
Member
Registered: 2012-05-17
Posts: 5,321

Re: [SOLVED] Control backlight brightness when computer powers on

Gnome gets its settings from UPower. You'll have to set the brightness before UPower reads it or use upower to set the brightness, maybe something like this:

dbus-send --print-reply --type=method_call --system --dest=org.freedesktop.UPower /org/freedesktop/UPower/KbdBacklight org.freedesktop.UPower.KbdBacklight.SetBrightness int32:0

| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |

Offline

Board footer

Powered by FluxBB