morphious6
Posts: 17
Joined: Thu Sep 17, 2015 8:21 pm

Sleep Mode - and or turn off backlight?

Thu Sep 17, 2015 8:27 pm

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

User avatar
alexeames
Forum Moderator
Forum Moderator
Posts: 2869
Joined: Sat Mar 03, 2012 11:57 am
Location: UK
Contact: Website

Re: Sleep Mode - and or turn off backlight?

Thu Sep 17, 2015 9:01 pm

I believe that feature is coming, but not quite ready yet.
Alex Eames RasPi.TV, RasP.iO

morphious6
Posts: 17
Joined: Thu Sep 17, 2015 8:21 pm

Re: Sleep Mode - and or turn off backlight?

Thu Sep 17, 2015 10:43 pm

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.

User avatar
alexeames
Forum Moderator
Forum Moderator
Posts: 2869
Joined: Sat Mar 03, 2012 11:57 am
Location: UK
Contact: Website

Re: Sleep Mode - and or turn off backlight?

Fri Sep 18, 2015 7:06 am

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:
Alex Eames RasPi.TV, RasP.iO


User avatar
alexeames
Forum Moderator
Forum Moderator
Posts: 2869
Joined: Sat Mar 03, 2012 11:57 am
Location: UK
Contact: Website

Re: Sleep Mode - and or turn off backlight?

Fri Sep 18, 2015 12:19 pm

That's the one :)
Alex Eames RasPi.TV, RasP.iO

gsh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1445
Joined: Sat Sep 10, 2011 11:43 am

Re: Sleep Mode - and or turn off backlight?

Fri Sep 18, 2015 2:18 pm

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!
--
Gordon Hollingworth PhD
Raspberry Pi - Director of Software Engineering

hippy
Posts: 6281
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: Sleep Mode - and or turn off backlight?

Fri Sep 18, 2015 2:24 pm

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.

W. H. Heydt
Posts: 11102
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Sleep Mode - and or turn off backlight?

Wed Sep 23, 2015 5:32 pm

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.

gsh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1445
Joined: Sat Sep 10, 2011 11:43 am

Re: Sleep Mode - and or turn off backlight?

Wed Sep 23, 2015 7:46 pm

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
--
Gordon Hollingworth PhD
Raspberry Pi - Director of Software Engineering

Dataworm
Posts: 15
Joined: Sat Sep 19, 2015 2:09 pm

Re: Sleep Mode - and or turn off backlight?

Wed Sep 23, 2015 7:51 pm

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?!

joemensor
Posts: 8
Joined: Fri Oct 02, 2015 10:42 am

Re: Sleep Mode - and or turn off backlight?

Fri Oct 02, 2015 10:44 am

Hi guys,
Any ETA on the ability to control the backlight?

morphious6
Posts: 17
Joined: Thu Sep 17, 2015 8:21 pm

Re: Sleep Mode - and or turn off backlight?

Tue Oct 06, 2015 1:50 pm

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..

scotty101
Posts: 3752
Joined: Fri Jun 08, 2012 6:03 pm

Re: Sleep Mode - and or turn off backlight?

Tue Oct 06, 2015 2:13 pm

Be patient. You'll get it when it is ready.
Electronic and Computer Engineer
Pi Interests: Home Automation, IOT, Python and Tkinter

Dataworm
Posts: 15
Joined: Sat Sep 19, 2015 2:09 pm

Re: Sleep Mode - and or turn off backlight?

Tue Oct 06, 2015 2:59 pm

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

W. H. Heydt
Posts: 11102
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Sleep Mode - and or turn off backlight?

Tue Oct 06, 2015 3:07 pm

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_.

User avatar
solar3000
Posts: 1051
Joined: Sat May 18, 2013 12:14 am

Re: Sleep Mode - and or turn off backlight?

Sat Oct 10, 2015 3:55 pm

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
Antikythera

JimmyN
Posts: 1109
Joined: Wed Mar 18, 2015 7:05 pm
Location: Virginia, USA

Re: Sleep Mode - and or turn off backlight?

Sat Oct 10, 2015 5:54 pm

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

User avatar
solar3000
Posts: 1051
Joined: Sat May 18, 2013 12:14 am

Re: Sleep Mode - and or turn off backlight?

Sat Oct 10, 2015 7:23 pm

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.
Antikythera

gadgetoid
Posts: 152
Joined: Wed Mar 07, 2012 9:58 pm

Re: Sleep Mode - and or turn off backlight?

Mon Oct 12, 2015 3:48 pm

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!

gsh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1445
Joined: Sat Sep 10, 2011 11:43 am

Re: Sleep Mode - and or turn off backlight?

Mon Oct 12, 2015 6:22 pm

Yeah, I've just pushed this off onto Jonathan's capable shoulders so it should be available in the next week...

Gordon
--
Gordon Hollingworth PhD
Raspberry Pi - Director of Software Engineering

Aramas
Posts: 16
Joined: Tue Sep 29, 2015 10:24 am
Location: France - Lille

Re: Sleep Mode - and or turn off backlight?

Tue Oct 13, 2015 7:26 am

The next week ?
Yeah ! That's cool :D
Thanks

cpfeil
Posts: 15
Joined: Wed Dec 25, 2013 1:35 pm

Re: Sleep Mode - and or turn off backlight?

Tue Oct 13, 2015 6:11 pm

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

DavidVTaylor
Posts: 7
Joined: Mon Oct 12, 2015 5:16 pm

Re: Sleep Mode - and or turn off backlight?

Sat Oct 24, 2015 7:20 am

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

joemensor
Posts: 8
Joined: Fri Oct 02, 2015 10:42 am

Re: Sleep Mode - and or turn off backlight?

Sat Oct 24, 2015 5:42 pm

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

Return to “Beginners”