Adjust LCD brightness from command line

Welcome to Linux Screw! If you're new here, you may want to subscribe our RSS feed.

dell 1501As many other Ubuntu users several days ago I’ve upgraded my Feisty to Gutsy at my Dell Inspiron 1501.

Unfortunately many things that worked for me in Feisty doesn’t work in Gutsy just after upgrading. Among them are: suspend/hibernate and brightness adjustment. At this moment I’m trying to get these features working and certainly share results here but not workable brightness adjustment really disturbed me. So, until I didn’t find a solution how to adjust LCD brightness with keyboard, there is nice workaround: execute the following command with root rights (sudo -s to get it):

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

This will make you LCD screen as bright as possible and you can proceed with your work (like me :) ). To lower brightness just replace 100 with another value like 62 and watch the results.

Hope it helps!

 
 
» You might also be interested in the following articles:
Ubuntu Feisty Fawn at Dell Inspiron 1501
Get Wi-Fi working on Dell Inspiron 1501 with Ubuntu
Update Dell laptop BIOS with Ubuntu
Dell shares custom-tailored Ubuntu Feisty for it’s laptops
Dell offers new Ubuntu preinstalled laptop XPS M1330



» Want to stay up to date? Subscribe to our E-MAIL or RSS feed!

21 Responses to “Adjust LCD brightness from command line”


  1. 1 vivek

    Nice tip :)

  2. 2 aruvoski

    how?

  3. 3 artiomix

    Hi aruvoski,

    In your Ubuntu:
    Applications -> Accessories -> Terminal

    Then type `sudo -s` and enter your password. After you’ve got prompt like ~#, you can type:

    echo -n 100 > /proc/acpi/video/VGA/LCD/brightness
    to adjust LCD brightness where 100 is maximum value and 62 is minimum.

    Hope it helps! :)

    P.S. You’re welcome to ask any related questions here ;)

  4. 4 Cristian Navalici

    Pay attention that you might have GLX instead of VGA as in:

    /proc/acpi/video/GLX0/LCD/brightness

    Anyway, this is a ‘cool’ tip. Thanks for it!

  5. 5 Jillian

    oh good lord THANK YOU
    i have been trying to figure this out for weeks.
    YAY BRIGHT SCREEN AGAIN!!

  6. 6 artiomix

    Hey everybody, thanks for your comments! :)

  7. 7 Rasha

    I have a Dell Latitude C610 and I’ve tried running the line in Ubuntu tho I had to modify as my line is /proc/acpi/video/VID/LCD/brightness. But it’s saying the command is unknown.

  8. 8 artiomix

    Hello Rasha,

    try this:

    sudo -s or su

    then

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

    :D

  9. 9 Satish Vellanki

    No luck for me :-(

    # echo -n 50 > /proc/acpi/video/VGA/LCD/brightness
    bash: echo: write error: Invalid argument

    What could be wrong?

  10. 10 ross

    turn off acpi and it will work with fn keys

  11. 11 ross

    it might only work on opensuse. when you do this kpowersave doesnt work

  12. 12 animatt

    Try running cat /proc/acpi/video/VGA/LCD/brightness

    This will show supported brightness levels.

    Running it on my monitor gives

    root@Gateway-M-Series:/home/animatt# cat /proc/acpi/video/VGA/LCD/brightnesslevels: 100 37 12 25 37 50 62 75 87 100
    current: 12

  13. 13 Alex

    Thanks for posting this info. Every day, I learn something new about using linux. Much more fun than M$ Win!
    Seems to me this could easily be put in a script that would read the current setting and go up or down depending on which name it was called with.
    I’m going to work on it for myself and post it back here in case anyone else is interested.
    Can all of the hardware be controlled via the /proc dir?

    Thanks again for the pointer. :-)

  14. 14 Alex

    The following is working nicely for me:
    #!/bin/sh
    # adjust lcd brightness on Dell Inspiron 1501 - 080303 Alex P Janssen Jr - alex@ourwoods.org
    # INSTRUCTIONS:
    # Save this script to a file named brightup.sh in /home/yourusername/bin
    # Make it executable: chmod +x brightup.sh
    # Save yourself having to run it in a terminal and enter your password each time
    # edit sudoers: sudo visudo
    # add to sudoers: yourusername ALL=(ALL) NOPASSWD:/bin/bash
    # save and exit
    # link brightup and brightdn to brightup.sh:
    # ln -s /home/yourusername/bin/brightup.sh /home/yourusername/bin/brightup
    # ln -s /home/yourusername/bin/brightup.sh /home/yourusername/bin/brightdn
    # Add a couple of custum launchers to your panel ( I run Gnome )
    # Right-click the panel and select Add to Panel
    # Click Custom Launcher
    # Type=Application, Name=Darker, Command=sudo bash -c /home/apjjr/bin/brightdn
    # Select a down-arrow for an icon and Close
    # Do the same for brightup, except set the name to Lighter and pick an up-arrow
    #
    # check our id
    #echo `id`
    ourname=$0
    ourname=`basename “$ourname”`
    xx=`cat /proc/acpi/video/VGA/LCD/brightness | grep current | cut -c 9-`
    curbright=`echo $xx`
    # check process name and current brightness setting
    #echo “${ourname},${curbright}:”
    case $curbright in
    0) # after boot my brightness value is 0
    # echo “12″
    echo -n 12 >/proc/acpi/video/VGA/LCD/brightness
    ;;
    12) if [ "$ourname" = "brightup" ]; then
    #echo “12 to 25″
    echo -n 25 >/proc/acpi/video/VGA/LCD/brightness
    fi
    ;;
    25) if [ "$ourname" = "brightup" ]; then
    #echo “25 to 37″
    echo -n 37 >/proc/acpi/video/VGA/LCD/brightness
    else
    echo -n 12 >/proc/acpi/video/VGA/LCD/brightness
    fi
    ;;
    37) if [ "$ourname" = "brightup" ]; then
    #echo “37 to 50″
    echo -n 50 >/proc/acpi/video/VGA/LCD/brightness
    else
    echo -n 25 >/proc/acpi/video/VGA/LCD/brightness
    fi
    ;;
    50) if [ "$ourname" = "brightup" ]; then
    #echo “50 to 62″
    echo -n 62 >/proc/acpi/video/VGA/LCD/brightness
    else
    echo -n 37 >/proc/acpi/video/VGA/LCD/brightness
    fi
    ;;
    62) if [ "$ourname" = "brightup" ]; then
    #echo “62 to 75″
    echo -n 75 >/proc/acpi/video/VGA/LCD/brightness
    else
    echo -n 50 >/proc/acpi/video/VGA/LCD/brightness
    fi
    ;;
    75) if [ "$ourname" = "brightup" ]; then
    #echo “75 to 87″
    echo -n 87 >/proc/acpi/video/VGA/LCD/brightness
    else
    echo -n 62 >/proc/acpi/video/VGA/LCD/brightness
    fi
    ;;
    87) if [ "$ourname" = "brightup" ]; then
    #echo “87 to 100″
    echo -n 100 >/proc/acpi/video/VGA/LCD/brightness
    else
    echo -n 75 >/proc/acpi/video/VGA/LCD/brightness
    fi
    ;;
    100) if [ "$ourname" != "brightup" ]; then
    echo -n 87 >/proc/acpi/video/VGA/LCD/brightness
    fi
    ;;
    esac
    exit 0

    That’s it.
    Alex

  15. 15 Petko

    Hello. Here is another way to do this. I add in the file ~/.bashrc :

    Bup ()
    {
    FILE=/proc/acpi/video/VID/LCD/brightness
    current=`cat $FILE | grep current | cut -c 10-`
    prev=12
    for i in `cat $FILE | grep levels | cut -c 17-`; do
    if [[ $i -eq $current && "$1" == "-" ]]; then
    echo -n $prev > $FILE
    break;
    elif [ $i -gt $current ]; then
    echo -n $i > $FILE ;
    break;
    fi;
    prev=$i
    done
    }
    Bdown (){ Bup -; }

    (Just make sure the line FILE=/proc/acpi/video/… points to your correct file.)
    This way, I can type in a terminal “Bup” or “Bdown” to set the brightness up or down.

    Greetings.

  16. 16 Geoffroy

    BRIGHTNESS on UBUNTU:

    This has worked for me in the directory, for me
    /proc/acpi/video/OVGA/DD03$
    and I did the command
    echo -n 100> brightness
    in my directory.
    Don’t forget to change the rights and owner for the file brightness

    Thanks for this artiomix:
    ” echo -n 100 > /proc/acpi/video/VGA/LCD/brightness
    to adjust LCD brightness where 100 is maximum value and 62 is minimum.
    Hope it helps! :)”

  17. 17 Ohnoesmilk

    thank you so much!!! you saved my eyes from burning! :D

  18. 18 Radha

    guys do this work on windows?
    i need to know pls make me know the fast you can my email is
    elmenoldr@hotmail.com

  1. 1 Personal Computers and Tech News » Ajust LCD brightness from command line (works at Dell 1501)
  2. 2 eraser’s blog » Blog Archive » Ajust LCD brightness from command line (works at Dell 1501)
  3. 3 dell » Ajust LCD brightness from command line (works at Dell 1501)

Leave a Reply




Friendly Sites:Who is behind Linux Screw?
Aspiring Sysadmin | GeekyBits³ | Bash Cures Cancer | TOTMS
Linux Operating System | Small Linux Deployments | My SysAd Blog
The Danesh Project | ZEPY | Linux config Wiki | Planet Sysadmin
The Sys Admin | {buhay sysad} | a non-geek's linux notes
Linux HOWTOs, Tutorials & Projects with Adam Palmer | LinuxAlt.Com
My name is Artem Nosulchik (artiomix AT gmail DOT com) and I'm Linux/Unix, Cisco systems engineer. The main idea of Linux Screw is to share relevant knowledge, skills and observations over The Web. Here you can find a lot of information related to different Linux distributions, FreeBSD, IOS as well as a other Open Source around staff. Read more ››