Enable screensaver/blank screen for RPi touchscreen Topic is solved

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
Post Reply
Stratos
Posts: 2
Joined: Wed Apr 17, 2019 11:52 pm

Enable screensaver/blank screen for RPi touchscreen

Post by Stratos »

Hey there. First-time visitor here.
I know that most people want to turn screensavers off, but how would I enable it for the Raspberry Pi 7'' toucshcreen? I would like to run OctoPrint on it and I want it to blank the screen (also disable the backlight) when I am not touching it.
Any help is appreciated.
DrJeff
Posts: 1
Joined: Fri Apr 06, 2018 2:59 am

Re: Enable screensaver/blank screen for RPi touchscreen

Post by DrJeff »

Did anyone get this working? Looking to do the same with Chromium auto launching. Had it working with Mate desktop and chromium but want to do this with autostart straight to Chromium.
User avatar
Joulinar
Posts: 2584
Joined: Sat Nov 16, 2019 12:49 am

Re: Enable screensaver/blank screen for RPi touchscreen

Post by Joulinar »

hi,

can you try running xset q once chromium was started.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Randrage
Posts: 2
Joined: Fri Apr 10, 2020 6:08 am

Re: Enable screensaver/blank screen for RPi touchscreen

Post by Randrage »

I, too, would like to do this. When I ran xset q as root it spat out xset: unable to open display ""


Edit: I did some more searching and discovered this thread which says to run export DISPLAY=:0 first which then let me run xset commands without issue. I was able to run xset s 10 && xset -dpms which set the screensaver to 10s and disables DPMS (EnergyStar) features. It wakes up on touch. NEAT :D

Edit 2: Note that both commands need to be run for each boot. I created a script at /etc/profile.d/screensaver.sh that has:

Code: Select all

#!/bin/bash
export DISPLAY=:0
xset s 10 && xset -dpms
which autoruns on login
QLink
Posts: 4
Joined: Sun Apr 05, 2020 6:22 pm

Re: Enable screensaver/blank screen for RPi touchscreen

Post by QLink »

@Randrage

i've tried as you described and screen blanks fine after 10 sec but i can't wake up on touch... it stays blank.
also wake up on keyboard or mouse doesn't work... in fact i have to pull the plug to get a screen again :(

any idea what's the cause for this ?

best regards
Randrage
Posts: 2
Joined: Fri Apr 10, 2020 6:08 am

Re: Enable screensaver/blank screen for RPi touchscreen

Post by Randrage »

@QLink

Odd, I didn't have to do anything special to allow touch or keyboard to wake mine up. I'm running a pretty fresh install of DietPi with just Pi-Hole and Chromium kiosk autorun. Running uname -a says:

Code: Select all

Linux DietPi 4.19.97-v7+ #1294 SMP Thu Jan 30 13:15:58 GMT 2020 armv7l GNU/Linux
My limited searching revealed that people who had this problem on Raspbian were able to fix by doing an apt update / upgrade, however that was several years ago :?
QLink
Posts: 4
Joined: Sun Apr 05, 2020 6:22 pm

Re: Enable screensaver/blank screen for RPi touchscreen

Post by QLink »

@Randrage

i've installed DietPi from scratch and now it's working when i start it manually in terminal like you described.
it wakes on touch also...

do you know if it's possible to prevent the "wake-touch" to get recognized as click input ?
because i don't want to accidently start/stop things which i can't see when i wake the screen ...

similar like it's described here:

https://github.com/nathanRamaNoodles/backlight_dimmer

unfortunatly i can't get backlight_dimmer working with dietpi ... i keep getting error msgs like display-manager.service not found and so on...
Post Reply