This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch 
feature/openbox-magic-pixel-workaround-buster-heuler-bpo
in repository live-build-x2go.

commit d234e9063b964d77ec5db37f591f2652ef057aa9
Author: Stefan Baur (BAUR-ITCS) <kont...@baur-itcs.de>
Date:   Tue Jun 30 16:36:46 2020 +0200

    blankdpmsfix now also supports passing a time value
---
 .../etc/X11/Xsession.d/60x11-blanking-dpms-config            | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git 
a/config/includes.chroot/etc/X11/Xsession.d/60x11-blanking-dpms-config 
b/config/includes.chroot/etc/X11/Xsession.d/60x11-blanking-dpms-config
index 128c503..4aad736 100644
--- a/config/includes.chroot/etc/X11/Xsession.d/60x11-blanking-dpms-config
+++ b/config/includes.chroot/etc/X11/Xsession.d/60x11-blanking-dpms-config
@@ -1,7 +1,4 @@
 # code to fix blank screen happening with DisplayPort and some buggy TFTs 
(xset q reports "Monitor is on" even though it is pitch black)
-if grep -q '\W*blankdpmsfix\W*' /proc/cmdline; then
-        xset dpms force suspend
-fi
 
 BLANKINGTIME=$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' 
-e 's/ \([^ "'"'"']\)/\n\1/g' /proc/cmdline | awk -F '=' '$1 == "blank" { print 
$2 }' | tr -dc '0-9:')
 if [ -n "$BLANKINGTIME" ]; then
@@ -23,6 +20,15 @@ if [ -n "$BLANKINGTIME" ]; then
 fi
 
 if grep -q '\W*blankdpmsfix\W*' /proc/cmdline; then
+       SLEEPTIME=$(cat /proc/cmdline | tr ' ' '\n' | awk -F'=' 
'"blankdpmsfix"==$1 {print $2}' | tr -dc '0-9')
+       # SLEEPTIME is a value set in milliseconds -- not microseconds and not 
seconds either
+       [ -z "$SLEEPTIME" ] && SLEEPTIME=1000 # so we default to 1000 
milliseconds = 1 second
+       SLEEPTIME=$(echo $SLEEPTIME | awk '{ printf "%s", $1/1000 }') # awk 
works for fractions so we don't need bc
+       SLEEPCOMMAND="/bin/sleep $SLEEPTIME"
+
+        #xset dpms force suspend
+        xset dpms force off
+       $SLEEPCOMMAND
        xset dpms force on 
        xset dpms 0 0 0 
        xset -dpms

--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on 
/srv/git/code.x2go.org/live-build-x2go.git
_______________________________________________
x2go-commits mailing list
x2go-commits@lists.x2go.org
https://lists.x2go.org/listinfo/x2go-commits

Reply via email to