[X2Go-Commits] [live-build-x2go] 72/108: earlyblankdpmsfix can now be called as earlyblankdpmsfix=nnnn, where nnnn is the time in microseconds that each screen should remain blank
git-admin at x2go.org
git-admin at x2go.org
Wed Mar 20 22:13:19 CET 2019
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch feature/openbox
in repository live-build-x2go.
commit f6b2c9d495e4510ab694d86bb1e05031cffc6707
Author: Stefan Baur (BAUR-ITCS) <kontakt at baur-itcs.de>
Date: Sun Jan 6 23:57:59 2019 +0000
earlyblankdpmsfix can now be called as earlyblankdpmsfix=nnnn, where nnnn is the time in microseconds that each screen should remain blank
---
config/includes.chroot/lib/live/config/0000-earlyblankdpmsfix | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/config/includes.chroot/lib/live/config/0000-earlyblankdpmsfix b/config/includes.chroot/lib/live/config/0000-earlyblankdpmsfix
index cd9245d..cfe0d23 100755
--- a/config/includes.chroot/lib/live/config/0000-earlyblankdpmsfix
+++ b/config/includes.chroot/lib/live/config/0000-earlyblankdpmsfix
@@ -8,13 +8,22 @@ EarlyBlankDPMSFix ()
echo -n " earlyblankdpmsfix"
# code to fix blank screen happening with DisplayPort and some buggy TFTs (even xset q reports "Monitor is on" even though it is pitch black)
-if grep -q '\W*earlyblankdpmsfix\W*' /proc/cmdline; then
+if grep -q '\W*earlyblankdpmsfix[=\W]*' /proc/cmdline; then
+ SLEEPTIME=$(cat /proc/cmdline | tr ' ' '\n' | awk -F'=' '"earlyblankdpmsfix"==$1 {print $2}' | tr -dc '0-9')
+ [ -z "$SLEEPTIME" ] && SLEEPTIME=1
+ if [ -x /bin/usleep ] ; then
+ SLEEPCOMMAND="/bin/usleep $SLEEPTIME"
+ else
+ SLEEPTIME=$(echo $SLEEPTIME | awk '{ printf "%s", $1/1000 }') # awk works for fractions so we don't need bc
+ SLEEPCOMMAND="/bin/sleep $SLEEPTIME"
+ fi
(
while ! ( [ -d /sys/class/graphics ] && [ -c /dev/tty1 ] && [ -c /dev/vcs1 ] ) ; do
sleep 1
done
for FBDEVICE in /sys/class/graphics/fb[0-9]*; do
echo 1 > $FBDEVICE/blank
+ $SLEEPCOMMAND
echo 0 > $FBDEVICE/blank
done
) &
--
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