Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Whenever I boot Ubuntu the display and keyboard brightness are reset to maximum.

Since I almost never need such high brightness settings, every boot includes an aftermath of excessive key pressing.

I would be thankful if anybody could guide me to a solution to automate my key presses or apply new brightness settings automatically upon every boot. Thank you for your consideration :)

share|improve this question
add comment

1 Answer

I had a problem like this (the brightness was all the way down on startup) and this is how I solved it.

Your brightness settings are just a flat file with a single number in it. It is probably one of these files, but you might have to do some checking to make sure.

/sys/class/backlight/acpi_video0/brightness

/sys/class/backlight/intel_backlight/brightness

Try running this in the terminal (change file name as appropriate)

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

What I did was create a cronjob using the special word @REBOOT to run this command whenever the computer started.

share|improve this answer
    
I have seen this tip before, but I have not found it elegant or practical (see my next comment). Also, don't you need sudo? Anyway, I have already found the files that need to be edited: /sys/class/leds/smc::kbd_backlight/brightness and /sys/class/backlight/intel_backlight/brightness. –  king_julien Jul 29 '13 at 16:08
    
This solution is not pratical for two reasons: 1) You need to enter your password after every login to run it 2) If you press the brightness keys for the display or keyboard after this script was applied, the brightness will be changed as if the initial brightness were still maximum. –  king_julien Jul 29 '13 at 16:09
    
I know that point 2) sounds a bit strange so I'll try to explain what happens. If the default brightness is always maximum after every boot, I will use this script to send echo 0 to turn off the keyboard backlight. Now, when I want to turn it on later and press the 'brightness increase' key, the brightness will not jump from 0 to a little, but from 0 to the maximum minus a little. Since my question is to not end up in a key pressing orgy after every boot - this solution is not practical. –  king_julien Jul 29 '13 at 16:10
1  
I know its not the most elegant solution, but it works well for my similar situation. If you use roots crontab you will not have the password problem. –  dan08 Jul 29 '13 at 16:12
    
Oh, I did not know that. Not having to enter the password would be a big plus. But I don't know much about this cronjob thing. I will have to look into that. Thanks! –  king_julien Jul 29 '13 at 16:15
show 1 more comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.