View Full Version : Controlling Screen Brightness using C/C++

June 29th, 2009, 01:13 PM

I am developing a GUI in Ubuntu 9.04 using QT (C++). I need to control the screen brightness using a slide bar.

I don't have any idea how to do this. Googling gave me this blog


This states that there should be a file in /sys/class/backlight/acpi_video0/brightness but after looking i just found an empty folder /sys/class/backlight.

I will appreciate any help.

Thank you,

June 29th, 2009, 02:31 PM
There are already applications that do this, two examples are PowerDevil(written in Qt) and Gnome Power Manager(Using GTK+). Perhaps you should look at the source for these applications.

July 1st, 2009, 07:20 AM
I found the brightness file in /proc/acpi/video/VID1/LCD. On opening the file through text editor it says <not supported>.

has Ubuntu 9.04 stopped supporting this file? I am still going through the code for PowerDevil.