[mythtv-users] MythFrontend only suspend mode options...
Thomas Boehm
mythtv-users at lists.boehmi.net
Sun Jan 11 12:24:39 UTC 2015
On 10/01/15 09:13, Raymond Boettcher wrote:
> I considered checking the monitor to see if it has been blanked and
> checking the CPU usage to see if its at 0 or near 0. Even the Mp3
> Player will create some CPU load which will prevent standby. However,
> my attempts to dive into /proc/stat has been interesting, and granted I
> could probably figure out what all the numbers mean, I don't really see
> this as the best approach in handling this.
I use xscreensaver and run this little script every x minutes
| SCREENSAVER_INACTIVE=$(xscreensaver-command -time
2>/dev/null|grep -E "\ blanked" >/dev/null;echo $?)
| if [ $SCREENSAVER_INACTIVE -eq 0 ];then
| sudo /usr/sbin/pm-suspend
| fi
I'm not using mythmusic, so I don't know whether the screensaver kicks
in while playing. If you want to check for other conditions just extend
the "if query" accordingly.
HTH
Thomas
More information about the mythtv-users
mailing list