[X2Go-Commits] [live-build-x2go] 34/42: went back to xset dpms force for blankdpmsfix, but now split in two - force suspend at beginning of .xsession, force on at end. Also, rearranged code block for screen saver/dpms on/off, so it doesn't interfere with our hack.

git-admin at x2go.org git-admin at x2go.org
Wed Jan 24 18:11:43 CET 2018


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

x2go pushed a commit to branch feature/mate-minidesktop-stretch
in repository live-build-x2go.

commit 9e25b7d997fe7cafb14db40b77be063ca0ac5483
Author: Stefan Baur (BAUR-ITCS) <kontakt at baur-itcs.de>
Date:   Fri Jan 19 14:26:53 2018 +0100

    went back to xset dpms force for blankdpmsfix, but now split in two - force suspend at beginning of .xsession, force on at end. Also, rearranged code block for screen saver/dpms on/off, so it doesn't interfere with our hack.
---
 .../lib/live/config/2900-x2go-thinclientconfig     | 55 ++++++++++++----------
 1 file changed, 29 insertions(+), 26 deletions(-)

diff --git a/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig b/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig
index 6e8587b..d5adaf7 100755
--- a/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig
+++ b/config/includes.chroot/lib/live/config/2900-x2go-thinclientconfig
@@ -27,14 +27,6 @@ cat >/home/user/.xsession <<XSESSION
 # Spawn PulseAudio
 pulseaudio -D -n -L 'module-native-protocol-tcp port=4713' -L 'module-udev-detect' --exit-idle-time=65535 &
 
-# 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
-	for DISPLAYNAME in \$(xrandr | awk '\$2 == "connected" { print \$1 }') ; do
-		xrandr --output \$DISPLAYNAME --off
-		xrandr --output \$DISPLAYNAME --auto
-	done
-fi
-
 # additional variable instead of "case \$(...) in", as we need the value again later on
 XRANDRCMDTAINTED=\$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' -e 's/ \([^ "'"'"']\)/\n\1/g' /proc/cmdline | awk -F '=' '\$1 == "xinerama" { print \$2 }')
 
@@ -90,6 +82,11 @@ for NEXT_DISPLAY in \$(LANG=C xrandr 2>/dev/null | grep ' connected ' | cut -d '
 	THIS_DISPLAY=\$NEXT_DISPLAY
 done
 
+# 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
+
 # Spawn openbox
 openbox &
 
@@ -172,24 +169,6 @@ else
 	LDAPPARAMS=""
 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
-	DPMSARR=(\$(echo \$BLANKINGTIME | awk -F ':' '\$1 ~/^[0-9]*\$/ && \$2 ~/^[0-9]*\$/ && \$3 ~/^[0-9]*\$/  { print \$1 " " \$2 " " \$3}'))
-	if [ \${DPMSARR[0]} -eq 0 ]; then
-		# Disable screensaver and DPMS Power Saving if requested
-		xset s off
-		if grep -q '\W*nodpms\W*' /proc/cmdline; then
-			xset -dpms
-		fi
-	else
-		xset s on
-		xset s \${DPMSARR[0]}
-		if ! grep -q '\W*nodpms\W*' /proc/cmdline; then
-			# Yes, "+dpms dpms" is intentional. 
-			xset +dpms dpms \${DPMSARR[0]} \${DPMSARR[1]} \${DPMSARR[2]}
-		fi
-	fi
-fi
 
 THROTTLINGCOMMAND=""
 THROTTLEVALUES=\$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' -e 's/ \([^ "'"'"']\)/\n\1/g' /proc/cmdline | awk -F '=' '\$1 == "throttle" { print \$2 }' | tr -dc '0-9.:u')
@@ -229,6 +208,30 @@ if [ -n "\$THROTTLEVALUES" ]; then
 	fi
 fi
 
+# 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 on dpms 0 0 0 -dpms
+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
+	DPMSARR=(\$(echo \$BLANKINGTIME | awk -F ':' '\$1 ~/^[0-9]*\$/ && \$2 ~/^[0-9]*\$/ && \$3 ~/^[0-9]*\$/  { print \$1 " " \$2 " " \$3}'))
+	if [ \${DPMSARR[0]} -eq 0 ]; then
+		# Disable screensaver and DPMS Power Saving if requested
+		xset s off
+		if grep -q '\W*nodpms\W*' /proc/cmdline; then
+			xset -dpms
+		fi
+	else
+		xset s on
+		xset s \${DPMSARR[0]}
+		if ! grep -q '\W*nodpms\W*' /proc/cmdline; then
+			# Yes, "+dpms dpms" is intentional. 
+			xset +dpms dpms \${DPMSARR[0]} \${DPMSARR[1]} \${DPMSARR[2]}
+		fi
+	fi
+fi
+
 eval \$THROTTLINGCOMMAND x2goclient --thinclient --no-session-edit --no-menu --maximize --add-to-known-hosts --haltbt --read-exports-from=/home/user/export \$LDAPPARAMS \$SESSIONFROM \$BACKGROUND \$BRANDING \$STARTSESSION
 XSESSION
 

--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git


More information about the x2go-commits mailing list