I want to keep the screen brightness at minimum level when its unconnected to power and at maximum level when it's connected

On Ubuntu 11.04 it was possible, through this config screen: power settings

However on Ubuntu 11.10 my power settings looks like this: power settings

Is it possible to change automatically screen brightness on ubuntu 11.10 when power gets connected or disconnected as it was in Ubuntu 11.04?



Since Gnome 3 there is no way to specify a different backlight level for battery and AC - there is only one level with idle dimming enabled after a set period on battery. I can't see any good reason for making this over-simplification, as every other OS and major desktop environment supports it. I came up with my own script to perform the function of setting the brightness when a/c is connected/disconnected. Modify the script with you home directory and desired brightness levels, and save as /etc/pm/power.d/00-brightness (also add executable permissions using chmod 755 /etc/pm/power.d/00-brightness)

export DISPLAY=:0

. /home/$user/.dbus/session-bus/*

case $1 in
    echo "Enable screen power saving"
sudo -u $user -g $user dbus-send --session --print-reply  --dest="org.gnome.SettingsDaemon" \
    /org/gnome/SettingsDaemon/Power org.gnome.SettingsDaemon.Power.Screen.SetPercentage uint32:$bat_bright
    echo "Disable screen power saving"
sudo -u $user -g $user dbus-send --session --print-reply  --dest="org.gnome.SettingsDaemon" \
    /org/gnome/SettingsDaemon/Power org.gnome.SettingsDaemon.Power.Screen.SetPercentage uint32:$ac_bright

This setting seems to have moved to the "screen" panel.

enter image description here

Although the default is the behaviour you describe, some configurations might work better if you add acpi_backlight=vendor to your grub kernel parameters.

You need to update grub after adding acpi_backlight=vendor... here are complete instructions (I need to do this for my f2 and f3 keys to function brightness up/down

Run this in a terminal:

sudo nano /etc/default/grub

and change this line:




Save the file and run

sudo update-grub

Now reboot. Your function keys for brightness should now work.

  • Added, it didn't had any effect though. By the way, I don't see there the setting I am looking for, I want to lessen automatically the brightness when the AC gets removed. I hate dim function because I spend a lot of time reading and sudden brightness changes annoy me. – NeDark Jan 18 '12 at 2:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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