Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turn off screen when idle #200

Closed
hessius opened this issue Oct 13, 2019 · 12 comments · Fixed by #213
Closed

Turn off screen when idle #200

hessius opened this issue Oct 13, 2019 · 12 comments · Fixed by #213
Assignees
Labels
enhancement New feature or request
Projects

Comments

@hessius
Copy link
Contributor

hessius commented Oct 13, 2019

Feature/enhancement request:

I want to reduce power consumption for my printer and would like the screen to turn off when idle.

To just "black out" the screen you could easily use
xset dpms force off
This makes the screen black but still responsive to touch, i.e. easily woken up by touching the screen.
IMO that's good enough for a first implementation, when idle for 15 minutes (configurable) black out screen.

Ideally I would want the backlight to turn off as well but I have yet to figure out how to do that (I've seen some solutions specifically for the official rPi screen but for a project like this you would need something universal)

As a proof of concept I've now added the command to my PSU-control setup (which controls an Ikea Trådfri smart socket that supplies power to the printer and lights around it), but would love a solution that isn't directly connected to the PSUcontrol plugin as the screen could then be used to power on the printer (I'm posting separate issues around these features)

@UnchartedBull UnchartedBull self-assigned this Oct 13, 2019
@UnchartedBull UnchartedBull added the enhancement New feature or request label Oct 13, 2019
@UnchartedBull UnchartedBull added this to To do in v2 Release via automation Oct 13, 2019
@UnchartedBull
Copy link
Owner

Will be useful I think, i'll have a look if electron allows me to execute console commands (which it should) and how I can get everything back up again.

@UnchartedBull UnchartedBull moved this from To do to In progress in v2 Release Oct 14, 2019
@UnchartedBull
Copy link
Owner

This will be done via xset dpms force standby (this also turns the official RPi display completely off). Could you please check if this works for you as well?

v2 Release automation moved this from In progress to Done Oct 15, 2019
@UnchartedBull
Copy link
Owner

Ok I reopen this issue because I haven't tested it on the Raspberry. If you set turnScreenOffSleep to true the screen should turn off after 5 Minutes (only in standby screen, which gets activated once the OctoPrint connection is closed).

Will close this again once testing is done (before next release)

@UnchartedBull UnchartedBull reopened this Oct 15, 2019
v2 Release automation moved this from Done to In progress Oct 15, 2019
@hessius
Copy link
Contributor Author

hessius commented Oct 16, 2019

xset dpms force standby seems identical to xset dpms force off on my device. Screen is black but backlight is still on

@UnchartedBull
Copy link
Owner

I think most of the non-official Raspberry Screens don‘t have the backlight turn off implemented :/ can you turn off the screen with any command?

@hessius
Copy link
Contributor Author

hessius commented Oct 16, 2019

Unsure, I'll keep looking!

@hessius
Copy link
Contributor Author

hessius commented Oct 16, 2019

Hmm, it might be possible to cut the power for the usb... I do have external power as well, but since I can control that with the PSU-plugin I can just put it there... That moves it out of the purview of OctoDash though (I think the setup with external power is going to be true for most other users as well?)

EDIT: I'll just do what I did with the USB-port for the ender - Add some isolation tape to the power pin on the usb connector. All power will be supplied by the external power source, thus when turning off the printer, the power is going to be cut to the screen as well... That does mean however, that I won't be able to turn on the printer from OctoDash...

EDIT 2: Implemented. Works great, if xset dpms force standby has now been implemented I think this issue can be safely closed?

@UnchartedBull
Copy link
Owner

I wanted to do some testing if everything works when I'm calling xset via electron. Which proves to be working just fine. I'll close this here.

Important: You need to enable turnScreenOffSleep in the ~/.config/octodash/config.json file. It is by default (will be included in the settings menu once that is done).

v2 Release automation moved this from In progress to Done Oct 23, 2019
@ShagoY
Copy link

ShagoY commented Dec 7, 2019

Hi :)

There is a possibility to turn the screen ON after using turnScreenOffSleep?

My Octoprint server runs continuously because it turns my smart plug on/off. But unless I make a mistake in my configuration, Octodash don't seem to reconnect and my display stay off.

My printer is in a fully sealed enclosure and I mainly use Octodash to know the status of my printer. So being able to see at a glance if it is on and/or being printed would be great!

@UnchartedBull
Copy link
Owner

Currently you have to tap the screen once to wake up OctoDash. Does that work for you? If you want to turn the display back on, without touching the screen, that does not work yet ...

@ShagoY
Copy link

ShagoY commented Dec 8, 2019

Not yet but planned ?

@UnchartedBull
Copy link
Owner

If you open a new issue for that, it will be planned at some point ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
No open projects
v2 Release
  
Done
Development

Successfully merging a pull request may close this issue.

3 participants