2019-12-27, 01:41 PM
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.
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.
Cheers and happy holidays!
Andy
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.
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.
Cheers and happy holidays!
Andy