Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a Debian Linux desktop and a CRT display. I want to change the screen's brightness without using the monitor's brightness controls. How can I do this? Is this possible in the command line or is there an application to be installed?

share|improve this question

migrated from stackoverflow.com Mar 11 '11 at 3:39

This question came from our site for professional and enthusiast programmers.

1  
So you have a desktop with an external monitor and you want to control the backlight, right? It is connected by VGA cable? I don't think there is a way to do that. Most LCD backlight controls are for laptops and handhelds that have direct access (I/O) to the backlight controller. I don't think there is a control path via the VGA interface for that. –  Keith Mar 11 '11 at 7:31
    
ADditional info: I'm using CRT monitor. –  Neilvert Noval Mar 11 '11 at 17:06
    
@NeilvertNoval Instead of commenting with add. info, add the info to the original question. The fact that it is a CRT monitor should be declared in the question title itself. –  Herman Torjussen Jan 12 '12 at 13:09

8 Answers 8

Look under /sys/class/backlight for the appropriate files to frob.

echo -n 6 > /sys/class/backlight/acpi_video0/brightness
share|improve this answer
5  
my /sys/class/backlight is an empty directory. –  Neilvert Noval Mar 11 '11 at 17:05
    
Works, but my path is /sys/class/backlight/acpi_video0/brightness and my range goes up to 15. (Fedora 17 64bit) –  pgampe Jun 12 '12 at 11:24
    
@Ignacio Vazquez-Abrams same problem as Neilvert Noval –  krupal Apr 25 '13 at 17:09
    
This requires root access, which I think makes this unusable. –  oneself May 22 '13 at 4:04
    
@oneself: Non-root access was never a part of the question. –  Ignacio Vazquez-Abrams May 22 '13 at 4:15

$ sudo apt-get install xbacklight

How to set brightness to 50%

$ xbacklight -set 50

How to increase brightness 10%

$ xbacklight -inc 10

How to decrease brightness 10%

$ xbacklight -dec 10

More info here

share|improve this answer
    
No root needed for this, awesome thanks! –  Luc Jul 17 '13 at 14:11
    
Best solution here, thank you. –  JL. Sep 23 '13 at 15:03
    
jcomeau@aspire:~$ xbacklight -set 50 gives error message: No outputs have backlight property –  jcomeau_ictx Nov 26 '13 at 3:00
    
it changes the contrast, not the brightness; it doesn't save power. –  Edouard Thiel Dec 29 '13 at 19:43

If you don't have hardware support for changing the brightness of your monitor you could use the command xrandr together with its option flags --output and --brightness, as can be seen in my answer to a similar question on askubuntu.com

share|improve this answer
    
This is actually very nice! –  Gerhard Burger Jan 8 '13 at 11:12

You need to control the monitor over DDC. See http://ddccontrol.sourceforge.net/ for one program that lets you do this.

share|improve this answer
    
Very good, thanks for the tip! I wrote a program with it, look at it on this page. –  Edouard Thiel Dec 29 '13 at 19:44

You could give this solution a try:

echo -n 100 > /proc/acpi/video/VGA/LCD/brightness

Also, in the comments, there are some hints what to do alternatively if it doesn't work (f.e. using GLX0 instead of VGA.

EDIT: As this doesn't seem to help, another user in the comments suggests to install xbacklight and calling xbacklight -set 100.

EDIT2: And another one says if you don't have a video folder, try sudo modprobe video.

share|improve this answer
    
I checked on this before posting, but I have no video folder on that path. –  Neilvert Noval Mar 9 '11 at 14:47
    
modprobe video -> command not found –  Neilvert Noval Mar 10 '11 at 16:01
    
I already installed xbacklight, but when I do xbacklight -set 100. it says No outputs have backlight property –  Neilvert Noval Mar 10 '11 at 16:02
    
No video folder + sudo modprobe video doesn't does anything. –  Santosh Kumar Jul 31 '13 at 5:18

After searching around, I think I found a pretty good way to get this done on most laptops. The first command gets the name of your screen, something like LVDS1. If this does not work, try getting the name of your screen with xrandr --current. There are probably more elegant ways to do this, the sed command removes everything after the first space, the head and tail commands simply remove everything except the second line of the output. The second line uses the screen name to change the brightness to 1.0. This can be set to almost anything, including 0.0 for a black screen or 50.0 for a completely white screen, but I think 1.0 is the desired value here.

screenName=$(xrandr --current | sed s/\ .*// | head -n2 | tail -n1);
xrandr --output $screenName --brightness 1.0

The command below sets the brightness to the maximum allowed brightness, as I noticed that just setting it to '100' does not simply work, at least not on all systems.

sudo sh -c 'echo -n $(cat /sys/class/backlight/acpi_video0/max_brightness) > /sys/class/backlight/acpi_video0/brightness'

This worked on multiple laptops running Ubuntu 12.04.

share|improve this answer
    
Mind you, this will do it in software by modifiying the pixel values. It will not actually dim the display. –  Mario Jun 4 '13 at 7:26

Here is a small program I wrote to control the brightness on my laptop for Ubuntu 12.04.3 LTS. Look at explanations inside (file /usr/local/dreamcolor2/README in the tarball):

http://pageperso.lif.univ-mrs.fr/~edouard.thiel/tar/brightness-dreamcolor2.tgz

It uses ddccontrol on i2c buses and works great for my configuration:

- HP ELiteBook 8770w
- NVidia Quadro K3000M
- HP DreamColor 2 Monitor, full HD
- Ubuntu 12.04.3 LTS x86_64, kernel 3.8.0-34-generic
- Nvidia Driver Version: 319.32
- Unity desktop

I tried every other solutions in this page and this is the only one which actually worked for me. Another solution was to run the HP Mobile Display Assistant (downloaded on HP site) but it is only given as rpm, no deb package; it has to be tweaked a little bit to work and is rather slow, and does not work with fn keys.

My script allows to control the brightness by the command line and by the fn keys. Please tell me if it works for you out of the box or if you have to change the i2c device in the script.

share|improve this answer

CRT's (Cathode Ray Tube) don't have backlights. LCD's do have backlights. Adjusting the brightness on a CRT involves changing the signal going to it, unlike a LCD.

CRT's use the maximum amount of power on white screens, because the electron guns use more power to emit more electrons, while LCD's spend the most power on black screens, because all transistors are on flipping the polarity of liquid crystal blocking the light coming from the backlight.

Any utility that can trigger DPMS should work to put the monitor into sleep mode with many of the CRT's made in the mid to late 90's through to the end of production.

share|improve this answer
    
To elaborate a little more, CRTs emit light though the florescence excitation of phosphors due to the electrons hitting it. Various different chemicals emitted different frequencies of light. –  Montaray Jack 2 days ago
    
There are four DPMS modes that analog CRTs could be in, all controlled by the state of the VSync and HSYNC lines, ON is HSYNC and VSYNC both on, STANDBY is HSYNC off and VSYNC ON uses around 80% power, SUSPEND HSYNC on VSYNC off uses around 30W for the Energy Star rated monitors and OFF- both HSYNC AND VSYNC off. This used to work just fine with X, going back all the way to the XFree86 days, but I don't know if it still works. –  Montaray Jack 2 days ago
    
You can query the state of DPMS with xset q, which, I think, is still a part of the standard X Windows set of programs. You can also set the time for DPMS with xset, as well as changing mouse and keyboard parameters. –  Montaray Jack 2 days ago
    
For permanent changes, you should add Option "DPMS" to the "Monitor" section, and to the Server Layout section of xorg.conf something like Option "BlankTime" "4" Option "StandbyTime" "0" Option "SuspendTime" "0" Option "OffTime" "5" with the times edited to your preference –  Montaray Jack 2 days ago
    
Changing Brightness and Contrast on a analog monitor is done down on the other side of the RAMDAC, by opamps in the RAMDAC or or between the RAMDAC and VGA connector or on the monitor side by amps in the Monitor. Contrast is controlled by amplification of the signal, and Contrast is controlled by the Bias of the signal, so DC offset. –  Montaray Jack 2 days ago

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.