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.

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?

Thanks.

share|improve this question

2 Answers 2

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
user=chris
bat_bright=50
ac_bright=90

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

case $1 in
    true)
    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
    ;;
    false)
    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
    ;;
esac
share|improve this answer

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:

GRUB_CMDLINE_LINUX=""

to

GRUB_CMDLINE_LINUX="acpi_backlight=vendor"

Save the file and run

sudo update-grub

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

share|improve this answer
    
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

 
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.