Skip to content
Permalink
Browse files

Inactivate ddcprobe if broken. Freezes X startup

  • Loading branch information
mavrothal committed Jan 31, 2016
1 parent cf4395e commit 9135ef5f971b520cf30b74f52645051360d83228
Showing with 22 additions and 0 deletions.
  1. +22 −0 woof-code/rootfs-skeleton/usr/sbin/xorgwizard-automatic
@@ -14,6 +14,28 @@

. /etc/rc.d/MODULESCONFIG

# ddcprobe hangs in some hardware and the entire X startup freezes.
# test and inactivate early on
if [ "$(which ddcprobe)" ]; then
for TRY in 1 2 3
do
ddcprobe &
XPID=$!
sleep 0.5
RUNNING="$(cat /proc/"$XPID"/status | grep -i running)"
[ "$RUNNING" = "" ] && break
[ "$TRY" = "1" ] && XPID1="$XPID" && RUNNING1="$RUNNING"
[ "$TRY" = "2" ] && XPID2="$XPID" && RUNNING2="$RUNNING"
[ "$TRY" = "3" ] && XPID3="$XPID" && RUNNING3="$RUNNING"
done
if [ "$RUNNING1" -a "$RUNNING2" -a "$RUNNING3" ]; then
chmod 644 /usr/sbin/ddcprobe
fi
kill -9 "$XPID1" 2>/dev/null
kill -9 "$XPID2" 2>/dev/null
kill -9 "$XPID3" 2>/dev/null
fi

#120517
if [ "`which ddcprobe`" = "" ];then
#running on an arm board...

0 comments on commit 9135ef5

Please sign in to comment.
You can’t perform that action at this time.