Changing the brightness on the Raspberry Pi 7″ touchscreen (v1.1)

Per discussion here, if you have a v1.1 version of the Raspberry Pi 7″ touchscreen, you can vary the brightness by setting a value of 1 to 255 into the file /sys/class/backlight/rpi-backlight/brightness

Use sudo to echo values to a file, do:

sudo sh -c "echo 80 > /sys/class/backlight/rpi_backlight/brightness"

9 Replies to “Changing the brightness on the Raspberry Pi 7″ touchscreen (v1.1)”

    1. When you write a value to that brightness file and then reboot, what value is in the file after the reboot? Does it default back to some other value?

  1. There’s more to this than meets the eye. (I know, bad pun, sue me!)

    If you copied and pasted the line as-is, (with a value of 80), you will notice that the brightness of the screen dropped to about half.

    Interesting factoid: 99.9999999% of all these LCD/back-lit displays change brightness by changing the duty-cycle of the pulse-width driving the display. 100% = full brightness and 0% = completely dark. Now if you do the math, (255=100% then 80=about 31%), you will notice that you’ve reduced the duty-cycle to about 30-or-so percent.

    The big takeaway here is that, not only are you making things easier on your eyes, but *you have just reduced the display’s power consumption by a whopping 70%* due to something called “gamma correction”. Loosely translated it means that to get something that *LOOKS* half as bright, you don’t use half the light, you use about one third.

    This is especially important if your device needs to be both self-powered *AND* have a lit display.

    BTW, this is true for *ANY* display: Your smartphone, your TV, that smart-watch you have. You can keep most of the brightness and cut the power drastically by setting the brightness level to “50%” Try it.

    Here are a couple of interesting Adafruit articles that talk about it in the context of NeoPixels, but it’s really applicable to just about everything.

    https://learn.adafruit.com/sipping-power-with-neopixels/insights

    https://learn.adafruit.com/led-tricks-gamma-correction

  2. Many thanks for the help with the LCD!
    I was really dissapointed when i used the 7″ LCD in the evening, it was more like a light spot hurting my eyes 😉
    Now i can super control the brightness thanks to your tip!

    Chris

  3. Hi all, I have tried this getting an error
    sudo sh -c “echo 80 > /sys/class/backlight/rpi_backlight/brightness”
    sh: 1: cannot create /sys/class/backlight/rpi_backlight/brightness: Directory nonexistent

    The backlight directory does not exist in /sys/class/
    Is there something I am missing??

    Thanks in advance
    Taz

    1. Taz – Go into the backlight directory and see what directory is in there. I had one directory in there called 10-0045. The brightness file was in that subdirectory.

      So, my command looked like this:

      sudo sh -c “echo 80 > /sys/class/backlight/100-0045/brightness”

      Yours may be slightly different…

Leave a Reply to Taz Baker Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.