Page 1 of 9

Sleep Mode - and or turn off backlight?

Posted: Thu Sep 17, 2015 8:27 pm
by morphious6
Hello, I have the new display up and it looks great. The one issue I have that I would like to find a solution to is how to force the monitor into sleep mode? I am in CLI mode and it seems to go into sleep mode and the CLI text vanishes after a time, but the backlight remains on with the little color indicator in the upper right corner.

There has to be some way to shut this down while not in use, or these screens won't last very long with the backlight on 24/7

Regards
-D

Re: Sleep Mode - and or turn off backlight?

Posted: Thu Sep 17, 2015 9:01 pm
by alexeames
I believe that feature is coming, but not quite ready yet.

Re: Sleep Mode - and or turn off backlight?

Posted: Thu Sep 17, 2015 10:43 pm
by morphious6
is this the official response or we think it may not be available yet?

Would like to get this ASAP, as I plan to add a proximity sensor to turn on when I enter room and off after a certain time frame.

Re: Sleep Mode - and or turn off backlight?

Posted: Fri Sep 18, 2015 7:06 am
by alexeames
morphious6 wrote:is this the official response or we think it may not be available yet?

Would like to get this ASAP, as I plan to add a proximity sensor to turn on when I enter room and off after a certain time frame.
No it's not official. I don't represent the RPF. It's a "paraphrase" of something I've seen Gordon write either here in this forum or as an answer to a question on the original display launch blog post. I expect he'll be along shortly to tell me I'm talking a load of nonsense or say I'm roughly right :lol:

Re: Sleep Mode - and or turn off backlight?

Posted: Fri Sep 18, 2015 8:41 am
by DirkS

Re: Sleep Mode - and or turn off backlight?

Posted: Fri Sep 18, 2015 12:19 pm
by alexeames
That's the one :)

Re: Sleep Mode - and or turn off backlight?

Posted: Fri Sep 18, 2015 2:18 pm
by gsh
I'm trying to write it now, but have picked up a cold and therefore am sat at home trying to do it remotely which isn't good!

Re: Sleep Mode - and or turn off backlight?

Posted: Fri Sep 18, 2015 2:24 pm
by hippy
morphious6 wrote:There has to be some way to shut this down while not in use, or these screens won't last very long with the backlight on 24/7
What is the expected lifetime of the backlight ?

Most backlight specs I have seen are 50K hours and up, 5 years or more continuous use. I wouldn't have expected this to be much different.

Re: Sleep Mode - and or turn off backlight?

Posted: Wed Sep 23, 2015 5:32 pm
by W. H. Heydt
gsh wrote:I'm trying to write it now, but have picked up a cold and therefore am sat at home trying to do it remotely which isn't good!
I realize that this is going to be a request for "feature creep" (aka "creeping featurism"), but could this feature also permit the display to be dimmed on command?

What I want to do is have the display always on, but dim it at night as the intent is to use it as a bedside alarm clock and automatically (via cron) dimming it at night would be a very nice feature.

Re: Sleep Mode - and or turn off backlight?

Posted: Wed Sep 23, 2015 7:46 pm
by gsh
That's the easy bit...

echo 80 > /sys/class/backlight/rpi-backlight/brightness

With my current build (not released yet) will do that... The thing I'm having trouble with right now is getting it to correctly blank the backlight when it goes to suspend, sometimes it works sometimes not...

Gordon

Re: Sleep Mode - and or turn off backlight?

Posted: Wed Sep 23, 2015 7:51 pm
by Dataworm
Sounds really good so far. Please notify us, when there is a (beta) release published! =)
What are the values that we can set? 0-255 -> Off-On?!

Re: Sleep Mode - and or turn off backlight?

Posted: Fri Oct 02, 2015 10:44 am
by joemensor
Hi guys,
Any ETA on the ability to control the backlight?

Re: Sleep Mode - and or turn off backlight?

Posted: Tue Oct 06, 2015 1:50 pm
by morphious6
Any updates on this one? Also I forgot to mention that is we can turn it off, I would like to turn it back on via PRI sensor detection or via touching the screen to wake it up would be nice too..

Re: Sleep Mode - and or turn off backlight?

Posted: Tue Oct 06, 2015 2:13 pm
by scotty101
Be patient. You'll get it when it is ready.

Re: Sleep Mode - and or turn off backlight?

Posted: Tue Oct 06, 2015 2:59 pm
by Dataworm
You'll get it when it is ready.
Makes sense! :-D
Of course we are patient. But it would be nice to get some feedback about the estimated time until it is finished/published. I don't think the coding will take that much time but depending on human resources, more important tasks and release cycles, it might take days, weeks or in worst case even months. So if someone should know something about expected times, I would be glad to hear them. And yeah I know that estimated times for programming can change a lot! :-D

Re: Sleep Mode - and or turn off backlight?

Posted: Tue Oct 06, 2015 3:07 pm
by W. H. Heydt
Dataworm wrote:
You'll get it when it is ready.
Makes sense! :-D
Of course we are patient. But it would be nice to get some feedback about the estimated time until it is finished/published. I don't think the coding will take that much time but depending on human resources, more important tasks and release cycles, it might take days, weeks or in worst case even months. So if someone should know something about expected times, I would be glad to hear them. And yeah I know that estimated times for programming can change a lot! :-D
Programmers tend to be optimistic about how long a project takes. If the programmer spends time talking about when he expects to be finished, that takes time away from getting it finished. I *think* the RPF has managed to escape the tendency of managers accepting what the programmer has said about schedule, then cutting that down to please the next management level up.

Just follow the old rule that the first 90% of the project takes the first 90% of the time, and the remaining 10% takes the other 90% of the time.

For more on these sorts of issues, go read Weinberg _The Psychology of Computer Programming_ and Brooks _The Mythical Man Month_.

Re: Sleep Mode - and or turn off backlight?

Posted: Sat Oct 10, 2015 3:55 pm
by solar3000
gsh wrote:That's the easy bit...

echo 80 > /sys/class/backlight/rpi-backlight/brightness

With my current build (not released yet) will do that... The thing I'm having trouble with right now is getting it to correctly blank the backlight when it goes to suspend, sometimes it works sometimes not...

Gordon

that does not work.
'File not found'
/sys/class/backlight/: no files, just an empty folder

Re: Sleep Mode - and or turn off backlight?

Posted: Sat Oct 10, 2015 5:54 pm
by JimmyN
solar3000 wrote:that does not work.
'File not found'
/sys/class/backlight/: no files, just an empty folder
The reason it didn't work is contained in the text you quoted.
gsh wrote: With my current build (not released yet) will do that...

Gordon

Re: Sleep Mode - and or turn off backlight?

Posted: Sat Oct 10, 2015 7:23 pm
by solar3000
JimmyN wrote:
solar3000 wrote:that does not work.
'File not found'
/sys/class/backlight/: no files, just an empty folder
The reason it didn't work is contained in the text you quoted.
gsh wrote: With my current build (not released yet) will do that...

Gordon

no he says you can manually 'echo'.

but auto hasn't happened yet.

Re: Sleep Mode - and or turn off backlight?

Posted: Mon Oct 12, 2015 3:48 pm
by gadgetoid
There is *no* backlight or brightness control yet in any build outside of Gordon's own personal fork.

Now, make like a hospital and have some .. err... patients... darn, that doesn't work when it's written!

Re: Sleep Mode - and or turn off backlight?

Posted: Mon Oct 12, 2015 6:22 pm
by gsh
Yeah, I've just pushed this off onto Jonathan's capable shoulders so it should be available in the next week...

Gordon

Re: Sleep Mode - and or turn off backlight?

Posted: Tue Oct 13, 2015 7:26 am
by Aramas
The next week ?
Yeah ! That's cool :D
Thanks

Re: Sleep Mode - and or turn off backlight?

Posted: Tue Oct 13, 2015 6:11 pm
by cpfeil
Great to hear that!

The possibility to turn of the display by code, will make it to the perfect rasperry pi display!

Before using the official raspberry pi display, I also used a touchscreen (HDMI). It was possible to turn it on/off using a relais breakout board. The official display does not support this - Switching off the 5V and reconnecting it, will not switch the display on (I read a post here in this forum which explains why this happens). Would be a perfect solution to have this for the official display.

Great work guys!

Best regards,
Christian

Re: Sleep Mode - and or turn off backlight?

Posted: Sat Oct 24, 2015 7:20 am
by DavidVTaylor
Backlight control is now working as of the firmware commit on Oct 21st :D

I was expecting to have brightness control, but writing values between 128 and 255 to [b]/sys/class/backlight/rpi_backlight/brightness[/b] does not seem to have any effect on brightness. Values below 128 unexpectedly turn the display off entirely. Not what I was expecting to see based on Gordon's example where he echos a value of 80 to the backlight setting.

If you play with this feature, please be aware that the setting is persistent across boots. The display will show boot progress initially and then apply the last brightness setting. Be sure you have remote access working (e.g. ssh) before experimenting since it is hard to change the setting back when you can't see the screen. Disconnecting the display to force HDMI output doesn't help since the 7" display must be connected to change the backlight setting.

Another way I found to turn off the display is to set [b]/sys/class/backlight/rpi_backlight/bl_power[/b] to a value of 1. For example, the following turns off the display. Writing a value of 0 turns it back on.

[b]echo 1 > /sys/class/backlight/rpi_backlight/bl_power[/b]

My wish list is to have brightness control actually work and to have the display be powered off automatically at shutdown to avoid the vintage TV snow effect. An ugly defect in an otherwise excellent display.

David

Re: Sleep Mode - and or turn off backlight?

Posted: Sat Oct 24, 2015 5:42 pm
by joemensor
Thanks for this David.....

...however I have a problem since updating the PI firmware.

I initially had a boot loop situation after updating :o This was down to the fact that I have my PI automatically invoking power saving - which would happen some 30 seconds or so after boot (The PI now switches off the display completely when power saving is invoked) Luckily the boot process gave me enough time to ssh in and turn DPMS off.

Now, the strange thing is I re-enabled power saving and noticed that after 5 or 6 reboot cycles, whilst the PI display would switch off it didn't reboot/crash and when my PIR was activated the screen would turn back on (due to power saving being deactivated) successfully.

Now, given the above I tried to manually turn the display on and off with the code that you provided:

echo 1 > /sys/class/backlight/rpi-backlight/bl_power

When running this I initially get 'permission denied' - even when I run it prefixed with SUDO. So I changed the permissions and as expected it shuts down the display....and also reboots the PI.

I also tried the following...

echo 100 > /sys/class/backlight/rpi-backlight/brightness

This is also crashes/reboots the PI.

What's happening?

Andrew