jharris1993
Posts: 282
Joined: Sat Oct 05, 2013 10:26 pm

How to set display brightness on the Raspberry Pi?

Thu Aug 23, 2018 8:35 am

Ref: Post located at https://www.raspberrypi.org/forums/view ... p?p=730381

Issue:
I have a large TV/Monitor that is used by several different things.
Viz.:
  • As a television
  • As the monitor for a Windows 7 machine that my granddaughters use
  • As the monitor for my Raspberry Pi projects. (my current one is the AIY Voice kit)
  • etc. etc. etc.
Each application has differing brightness needs. Because the TV shows a variety of scenes, (not just a screen that is predominately a bright white), the brightness is set relatively high. In contrast, the two computer applications have relatively empty screens most of the time, so the brightness needs to be set lower.

Unfortunately, there does not seem to be a way to adjust the display brightness using the Raspberry Pi's Raspbian operating system.

This is strange. Every operating system I have used before, (with the exception of DOS and CP/M), have had provisions for controlling the screen's brightness, color-balance, etc., independent of the display's manual controls.

I would also like to suggest that the answer given to the original poster in the previous post - change the brightness manually - is not acceptable.

It should be possible for each consumer of the television's resources to set it's own desired brightness level. Otherwise every time a different device is used, the brightness will have to be adjusted time and again. Additionally, depending on the particular model of TV/monitor being used, it may be very difficult to adjust the screen's brightness when used as something other than the native TV application.

I can regulate display brightness within Windows, Mac O/S, Mint, Ubuntu, Fedora, and (AFAIK), every other Linux distribution I have ever used. I believe that the Raspberry Pi's design and usage model mandates this requirement as it is designed to be portable and used on a variety of differing displays.

If it is possible to do this, please explain how.

If not, can this be submitted as an urgent enhancement request? I would beg to suggest that the absence of such a common and useful feature in Raspbian borders on being either a design flaw or a serious bug.

What say ye?

p.s.
Feel free to move this if I have inadvertently placed this in the wrong category.
Last edited by jharris1993 on Tue Aug 28, 2018 7:29 pm, edited 1 time in total.
Jim "JR"

Some see things as they are, and ask "Why?"
I dream things that never were, and ask "Why Not".

Robert F. Kennedy

“Impossible” is only found in the dictionary of a fool.
Old Chinese Proverb

jharris1993
Posts: 282
Joined: Sat Oct 05, 2013 10:26 pm

Re: How to set display brightness on the Raspberry Pi?

Thu Aug 23, 2018 9:44 am

Update:

I found the following posting, (https://www.reddit.com/r/raspberry_pi/c ... rightness/, that suggests downloading a debian "set brightness" package to the Pi.

I have not yet tried it on the current version of Raspbian/AIY Voice Kit's Raspbian.

Assuming that this is a true and valid solution - I will try it later and report results - can this be included in future Raspbian builds? Especially since there seems to be a need for it. (i.e. based on the number of search engine hits for this question.

Thanks again for all your help!
Last edited by jharris1993 on Tue Aug 28, 2018 7:29 pm, edited 1 time in total.
Jim "JR"

Some see things as they are, and ask "Why?"
I dream things that never were, and ask "Why Not".

Robert F. Kennedy

“Impossible” is only found in the dictionary of a fool.
Old Chinese Proverb

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 31502
Joined: Sat Jul 30, 2011 7:41 pm

Re: How to set display brightness on the Raspberry Pi?

Thu Aug 23, 2018 5:21 pm

I'm not sure that just a few posts on here is indicative that we do need to have something like this but I'll try to explain what could be done.

As far as I know there's no way of making the hardware produce a less bright image, as the linked thread says HDMI is just a bunch of numbers sent to the display, its the displays responsibility to display those as it sees fit.

I'm not sure but there might be a colour correction matrix on the output that can be used to reduce the gamut, giving a lower overall brightness. however that does reduce your colour resolution.

An alternative would be to tell the X window system to not output the full colour gamut, I have no idea whether that is actually possible.

Whatever scheme you use, if it's done at the pi end then you will have a reduction in the colour gamut. If it's done by the display itself then you don't get that reduction.
Principal Software Engineer at Raspberry Pi Ltd.
Working in the Applications Team.

Shadow_7
Posts: 52
Joined: Sat Jul 12, 2014 5:50 am

Re: How to set display brightness on the Raspberry Pi?

Fri Aug 24, 2018 7:42 pm

you can adjust the backlight as such

# echo 32 > /sys/class/backlight/rpi_backlight/brightness

which takes values 0-255 as indicated with max_brightness in the same path. For my 3B+ with the 7" screen.

On my x86 systems you can adjust X with xrandr (when NOT nVidia).

$ xrandr --output HDMI_SOMETHING --brightness 0.8 --gamma 1.35:1.25:1.30

Where the values are float numbers with a default of 1.0. The #:#:# of --gamma is in RGB order AKA Red Green Blue. Not sure if that applies to the pi's though. Sometimes the xbacklight app / package works.

$ xbacklight -set 50%

But it doesn't seem to work much outside of debian stable, and possibly the previous stable or earlier. Also not sure if that works on the pi's.

DirkS
Posts: 10771
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: How to set display brightness on the Raspberry Pi?

Fri Aug 24, 2018 8:25 pm

Shadow_7 wrote:
Fri Aug 24, 2018 7:42 pm
you can adjust the backlight as such

# echo 32 > /sys/class/backlight/rpi_backlight/brightness

which takes values 0-255 as indicated with max_brightness in the same path. For my 3B+ with the 7" screen.
Only for the Pi LCD. This post is about changing backlight for screens in general, including TVs connected through HDMI

drgeoff
Posts: 13216
Joined: Wed Jan 25, 2012 6:39 pm

Re: How to set display brightness on the Raspberry Pi?

Fri Aug 24, 2018 10:32 pm

I suspect that most of the posters on this are not appreciating the difference between brightness and contrast.
Quis custodiet ipsos custodes?

ghans
Posts: 7893
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: How to set display brightness on the Raspberry Pi?

Sat Aug 25, 2018 7:29 am

The only person who could answer this question is probably Eric Anholt or someone who is working with him directly. His/their work is what made the "xgamma" tool work on the Pi in the first place.

ghans

PS: The Wikipedia page of DDC/CI says that it not only works over VGA, but HDMI too.
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

Return to “Troubleshooting”