Skip to content

Commit

Permalink
Inactivate ddcprobe if broken. Freezes X startup
Browse files Browse the repository at this point in the history
  • Loading branch information
mavrothal committed Jan 31, 2016
1 parent cf4395e commit 9135ef5
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions woof-code/rootfs-skeleton/usr/sbin/xorgwizard-automatic
Original file line number Diff line number Diff line change
Expand Up @@ -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...
Expand Down

0 comments on commit 9135ef5

Please sign in to comment.