Howto: Set Screen Brightness for Poulsbo Netbook from Terminal
August 21, 2010
Posted by on
Today’s memory dump should be helpful for those unfortunate to have purchased a netbook with the Poulsbo chipset, installed a GNU/Linux distribution, and then installed the “PSB” driver. By default, as soon as the PSB module is loaded, the screen brightness goes to its highest setting. According to PowerTOP, this alone causes a 2.3 Watt increase in power usage.
With my Acer Aspire One 751h and its 3-cell battery, which has lost 19.95% of its capacity (according to acpitool -B) over the past year, this means 36 minutes less battery life. Which is something of a problem when you only have about 2 and a half hours to start with.
The PSB driver exposes a setting to adjust the screen brightness, fortunately, so here’s a script (tested with both Bash and Dash) to set the backlight brightness to a number between 0 and 100. (Note: on my netbook, there is no difference between 0 and 20 brightness level.) Just copy-and-paste, and save as “brightness.sh”. Then set the permissions to be executable (chmod +x ./brightness.sh)
sudo sh -c "echo $1 > /sys/class/backlight/psblvds/brightness"
Syntax to use:
where $1 is the level you want to set the brightness to.
Set to minimum brightness:
Set to half-brightness:
I suppose this could be used to bind the brightness keys to actually set the brightness, as well, but I’m not really sure how to do that yet. Besides, one trick per post!
This “code” is released under the GPL v3 license. You can find this license on the Free Software Foundation’s website.