From 6a370dc91448d213cf59bd01decb9c9155f56b41 Mon Sep 17 00:00:00 2001 From: Kerrin Sheldrake Date: Fri, 5 Sep 2014 03:26:54 +0000 Subject: [PATCH] Turn off xset screensaver and dpms (energy star) modes New rpi firmware disables omxplayer video and audio when xset screensaver turns on. Disable on omxplayer start, re-enable on exit. --- omxplayer | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/omxplayer b/omxplayer index 505b0f37..90cc6ac0 100755 --- a/omxplayer +++ b/omxplayer @@ -43,6 +43,11 @@ if [ -z $NOREFRESH ] || [ "$NOREFRESH" == "0" ]; then fi fi +if [ ! -z $xset_bin ]; then +$xset_bin -dpms +$xset_bin s off +fi + DBUS_CMD="dbus-daemon --fork --print-address 5 --print-pid 6 --session" OMXPLAYER_DBUS_ADDR="/tmp/omxplayerdbus.${USER}" OMXPLAYER_DBUS_PID="/tmp/omxplayerdbus.${USER}.pid" @@ -66,6 +71,11 @@ export DBUS_SESSION_BUS_PID LD_LIBRARY_PATH="$OMXPLAYER_LIBS${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" $OMXPLAYER_BIN "$@"; true +if [ ! -z $xset_bin ]; then +$xset_bin +dpms +$xset_bin s on +fi + if [ ! -z $NOREFRESH ] && [ "$NOREFRESH" == "1" ]; then exit 0 fi