0

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 :)

king_julien
  • 754
  • 1
  • 14
  • 31

1 Answers1

1

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.

Dan
  • 6,753
  • 5
  • 26
  • 43
  • 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. – Dan 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
  • Here is a good start http://askubuntu.com/questions/2368/how-do-i-set-up-a-cron-job

    To access roots crontab use sudo crontab -e

    – Dan Jul 29 '13 at 16:16