Search code examples
shellubuntuubuntu-11.10brightness

Changing monitor brightness programatically in Ubuntu 11.10


I'm using Dell inspiron 1564 laptop with Ubuntu 11.10. Here I can change my monior brightness simply via fn+F4/5. But I need a low brightness even lower than the min limit of fn+F4. How can I do it programatically or which shell command to use for that?


Solution

  • I'm not sure that it's possible to go lower than what the laptop controls get you, but you can programatically change brightness by echoing a value to /sys/class/backlight/<something>/brightness. On my netbook the 'something' is acpi_video0.

    $ cat /sys/class/backlight/acpi_video0/brightness
    10
    $ sudo sh -c 'echo 0 > /sys/class/backlight/acpi_video0/brightness'
    $ cat /sys/class/backlight/acpi_video0/brightness
    0
    

    Edit: There's also xbacklight, which uses XRandr.