summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xprobe-hdmi/probe-hdmi.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/probe-hdmi/probe-hdmi.sh b/probe-hdmi/probe-hdmi.sh
index e3b092e..8cefb87 100755
--- a/probe-hdmi/probe-hdmi.sh
+++ b/probe-hdmi/probe-hdmi.sh
@@ -63,7 +63,12 @@ function try_lightdm_restart() {
while true;
do
sudo service lightdm restart
- [ $(service lightdm status|grep -o start) == 'start' ] && break
+ grep "(EE) FBDEV(0): mmap fbmem: Invalid argument" /var/log/Xorg.0.log
+ return_code_grep=$?
+ # [ $(service lightdm status|grep -o start) == 'start' ] && break
+ # If return code is 0 means the error exist in Xorg file, i.e, Xorg failed,
+ # so do restart, if its 1 means X might have restarted properly
+ [ $return_code_grep -eq 1 ] && break
done
#killall probe_hdmi.sh
}