Ubuntu – reduce Screen brightness in battery mode automatically

brightnessgnome-power-managerindicatorpower-managementscreen

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 )?

Best Answer

I found the solution:

If you have laptop-mode-tools installed

cat /sys/class/backlight/acpi_video0/brightness
cat /sys/class/backlight/acpi_video0/max_brightness
sudo -H gedit /etc/laptop-mode/conf.d/lcd-brightness.conf

Contents should be:

DEBUG=0
CONTROL_BRIGHTNESS=1
BATT_BRIGHTNESS_COMMAND="echo [min value]"
LM_AC_BRIGHTNESS_COMMAND="echo [max value]"
NOLM_AC_BRIGHTNESS_COMMAND="echo [normal value]"
BRIGHTNESS_OUTPUT="/sys/class/thermal/cooling_device0/cur_state"

Sources:

Related Question