Flickr Photos

Red Fox eating rowan berries
Roe Deer
Leopard in the rain
Lion mum taking care of cubs
Male Lion
Lion Cubs Playing
Lazy Spotted Hyena
Female Lion
Golden Jackal
Golden Jackal

Linux: Adjust LCD laptop backlight brightness from command line

I needed to find out how can I change my laptop backlight brighness using just a command line. Solution for that problem was easier than I thought because you can do
that just with one line =)

On my laptop which is Dell Latitude D430 brigness file was on /sys/class/backlight/dell_backlight directory but it’s probably almost on the same place /sys/class/backlight/ on every laptop (and linux distribution) which is it possible to change.

Before you start to change your laptop display brightness you should find out which is the maximum brigness of your screen which you can see with cat command from the max_brigtness file like this:

cat /sys/class/backlight/dell_backlight/max_brightness

On my laptop max brightness was 7 and surprisingly lowest brightness is 0 so let’s change brightness between 0-7 =)

So if I want to save energy and turn backlight as dark as possible I just put 0 to brightness file like this:

echo 0 > /sys/class/backlight/dell_backlight/brightness

and when I want full brightness I just write seven to that same file:

echo 7 > /sys/class/backlight/dell_backlight/brightness

Just be sure that you use > and not >> because >> will just add that number on that file and now we want to remove the old number and add new one there.

So why I needed to do this? I had a script which was checking some things and alert me when something wrong happened so instead of email/sms alerts or audio alerts I just wrote a script which keeps my display as dark as possible and when it needs my attenion it will turn brighness to max and show alerts on display =)

4 comments to Linux: Adjust LCD laptop backlight brightness from command line

  • Anonymous

    Hello! This post could not be written any better!
    Reading this post reminds me of my good old room mate! He always kept chatting about this.

    I will forward this article to him. Pretty sure he will
    have a good read. Many thanks for sharing!

  • Binyul

    it doesn’t work.
    even running as root doesn’t work as well.

  • Thanks , I’ve recently been searching for info approximately this subject for a long time and yours is the greatest I have discovered so far. But, what concerning the conclusion? Are you sure in regards to the source?

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>