Adjusting brightness on bootup

I got tired of having to enter the code from [the last post][] to adjust my Linux screen brightness so with a little inspiration from the internet I figured I’d pop a few aliases into my .bashrc

alias bri=’sudo setpci -s 00:02.0 F4.B=FF’
alias mid=’sudo setpci -s 00:02.0 F4.B=75′
alias dim=’sudo setpci -s 00:02.0 F4.B=25′

Now these settings will be available through terminal by typing `dim`, `mid` or `bri`. But that’s still more work then I want to do so I also picked my favorite value likely to be my default and I added it to my startup scripts. `vim /etc/init.d/mystartup.sh`

#!/bin/bash
# Adam’s Startup scripts

echo “Setting up customized environment…”

# adjust screen brightness
sudo setpci -s 00:02.0 F4.B=75

Then I set permissions to `chmod +x` and update my bootup scripts:

$ update-rc.d mystartup.sh defaults 99

Done.

[the last post]: http://adam.merrifield.ca/2012/06/01/ubuntu-support-for-intel-gma-3600/ “control brightness via terminal”

 

Adam Merrifield

 

Leave a Reply