Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

KDE and XFCE4 has a program to adjust the screen brightness automatically in battery mode to a preset value. How can i set the same with Unity ( or Gnome3 )?

share|improve this question
  1. Download and install Cuttlefish
    This tool helps in a lot of stimulus based reactions.
  2. Install xbacklight
    sudo apt-get install xbacklight
    This tool helps in changing brightness via command line.
    Now make a file(say dim) with following content:
    xbacklight -set 10

    This command reduces your brightness to 10%.
    Change the mode of the file:chmod +x dim
  3. Open the Cuttlefish application(using dash) and add a new reaction.Add a new stimulus Power Cable Unplugged from the Hardware category.


Next you need to set up the reaction.Go to Reaction>Applications>Start Application(Advanced Mode)

Set Application

Now choose the executable as dim(file that we created earlier)
Set Application

You may also want to increase the brightness when power is plugged again.For that follow the same steps except write xbacklight -set 100 and change stimulus to Power Cable Plugged In.

To make it work, you need to enable cuttlefish to start automatically. Go to edit/preferences (within cuttlefish) and enable start up .

share|improve this answer
This is a great guide man, I also managed to change the governor for my 4 threads CPU with cpufreq-selector --cpu 0 -g powersave EDIT: You probably have more then one core so add that comand multiplied by threads: 4 threads = 4 comands and change them in order --cpu 0 then next one --cpu 1 and continue to reach number of cores or on Intel CPU's, threads ;) – Zbunjeni Nov 27 '14 at 0:07
EDIT: To change the GOVERNOR without sudo you need gnome applets. You can get them via terminal command: sudo apt-get install gnome-applets – Zbunjeni Nov 28 '14 at 13:02

I find the solution:

If you have latop-mode installed

$ cat /sys/class/backlight/acpi_video0/brightness

$ cat /sys/class/backlight/acpi_video0/max_brightness

$ sudo gedit /etc/laptop-mode/conf.d/lcd-brightness.conf



BATT_BRIGHTNESS_COMMAND="echo [min value]"

LM_AC_BRIGHTNESS_COMMAND="echo [max value]"

NOLM_AC_BRIGHTNESS_COMMAND="echo [normal value]"


Source: Wiki laptop-mode Gentoo forum

share|improve this answer

Your Answer


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.