ralphbsz
Posts: 6
Joined: Mon Apr 24, 2017 10:27 pm

Power down display while RPi is running

Sat Dec 30, 2017 5:05 am

Imagine: I have the display powered separately from the RPi (in my case a RPi3). Sometimes, the RPi will have power, but the display will not. This situation might go on for one second, one minute, or ten minutes, but not much longer. Obviously, there will be nothing displayed at that time (duh, it will be black), and touch input won't work.

Here's why. I have my RPi installed in an electrical control box, where it is monitoring (and in the future also controlling) pumps and related equipment. The site has a gas-powered generator, but when the utility power goes out, it takes between 10 and 30 seconds for the generator to come on. Clearly, that's long enough for the RPi to crash. For my server at home, I have a big UPS, but clearly a UPS that's the size of a shoebox is insane for a RPi. So I was toying with the idea of using Adafruit's mode 2465 PowerBoost charger/converter and a small LiPO battery to build a tiny UPS (fits in a small DIN-rail mounted case) that can power the RPi for a few minutes if need be. So far, so good.

The question is: Do I also have to keep the display powered? Will the RPi and the touchscreen functionality go crazy if the display loses power? If I need to keep the display running also, that's not a disaster, it just means that I'll probably need to run a second PowerBoost board for the display and a second battery.

Any input on this?

User avatar
DougieLawson
Posts: 30935
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: Power down display while RPi is running

Sat Dec 30, 2017 6:07 am

It's not possible. If you power down the display you have to reboot to re-enable it.
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

Since 2012: 1B*5, 2B*2, B+, A+, Zero*2, 3B*3

Please post ALL technical questions on the forum. Do not send private messages.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 4688
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Power down display while RPi is running

Sat Dec 30, 2017 6:43 am

https://github.com/raspberrypi/firmware/issues/768
I did have a quick play just before the Christmas break, and it whilst I got the reset sequence running when required, it didn't bring the screen back to life. I may have another quick play when I next get an hour or two spare, but it's not a priority.
Dougie is right that the only answer currently is to keep both powered.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
Please don't send PMs asking for support - use the forum.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

ralphbsz
Posts: 6
Joined: Mon Apr 24, 2017 10:27 pm

Re: Power down display while RPi is running

Sat Dec 30, 2017 4:29 pm

Thanks. Not the news I wanted, but life isn't perfect. Time to order twice as much battery/inverter hardware ...

orangekid13
Posts: 1
Joined: Tue Jan 02, 2018 4:34 pm

Re: Power down display while RPi is running

Tue Jan 02, 2018 4:40 pm

According to this stackoverflow page you can switch it on and off using /sys/class/backlight/rpi_backlight/bl_power

I'm having permission issues with my setup and their instruction doesn't work, but putting the command inside the quotes of sudo sc -c "" so turning it off is

Code: Select all

sudo sc -c "echo 1 > /sys/class/backlight/rpi_backlight/bl_power"
and turning it on is

Code: Select all

sudo sc -c "echo 0 > /sys/class/backlight/rpi_backlight/bl_power"

User avatar
DougieLawson
Posts: 30935
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: Power down display while RPi is running

Tue Jan 02, 2018 6:38 pm

orangekid13 wrote:
Tue Jan 02, 2018 4:40 pm
According to this stackoverflow page you can switch it the backlight on and off using /sys/class/backlight/rpi_backlight/bl_power
FTFY, you're welcome.
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

Since 2012: 1B*5, 2B*2, B+, A+, Zero*2, 3B*3

Please post ALL technical questions on the forum. Do not send private messages.

ralphbsz
Posts: 6
Joined: Mon Apr 24, 2017 10:27 pm

Re: Power down display while RPi is running

Thu Jan 04, 2018 11:56 pm

Thank you, that might help. Once I have the display and the RPi mounted, I'll do some current measurements, to see how bad it really is. But even if I need two separate "inverters" or "UPSes", that's not the end of the world.

Return to “Official Foundation Display”

Who is online

Users browsing this forum: No registered users and 2 guests