This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Screensaver for RPi touchscreen
#1
Hi,

I apologise if this has been discussed already. I've done a bit of trawling on the forums and some repos but I might have missed something. In that case, please feel free to move/archive this thread and point me in the right direction. Smile

I picked up the official RPF 7" touchscreen (https://www.raspberrypi.org/products/ras...h-display/) and am looking at power saving solutions.

I've found the Pi Python script that's been floating around (https://github.com/linusg/rpi-backlight) and while it does work, I'm only able to automate the process through a cronjob, which means no wake-on-input. I want the screen to turn off after a set amount of inactivity, then wake up when I touch a key/move the mouse etc, like a screensaver.

After a bit more searching I found this: https://github.com/timothyhollabaugh/pi-...en-timeout

It's a tiny piece of C code that listens on /dev/input/event0 and turns the backlight off if no input has been detected for x seconds. This works great when launched as a process on startup, but...

My question is, has anyone looked into integrating this into something like xscreensaver? Or is there an existing package that I've overlooked? I'm looking for something that will be available out-of-the-box that could integrate into the GUI and be accessible through settings etc.

A custom plugin for xscreensaver would be one possible solution. Does something like that already exist? Or is it something I could look into making? Before I start digging into APIs and docs I want to make sure I'm not reinventing the wheel. Smile

Cheers and happy holidays!
Andy
Reply
#2
i use a physical switch on the power of my display
Reply
#3
Following up on my own post in case anyone else is digging into this...

It's apparently possible to use "xscreensaver-command -watch" and grep, then set /sys/class/backlight/rpi-backlight/bl_power based on BLANK or UNBLANK messages.

So far I have a script that will respond to messages by just printing "Blank" or "Unblank" to the console. The best solution would be an xscreensaver "hack" that can be picked from the GUI. I'm still digging through the docs to find whether that's doable.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)