[PC-BSD Commits] r697 - pcbsd/trunk/system-overlay/PCBSD/xorg-gui/bin

svn at pcbsd.org svn at pcbsd.org
Tue Sep 11 13:50:13 PDT 2007


Author: kris
Date: 2007-09-11 13:50:13 -0700 (Tue, 11 Sep 2007)
New Revision: 697

Modified:
   pcbsd/trunk/system-overlay/PCBSD/xorg-gui/bin/rundetect.sh
   pcbsd/trunk/system-overlay/PCBSD/xorg-gui/bin/setupconf.sh
Log:

Added support to Xorg GUI to auto-detect monitor horz / vert refresh rates



Modified: pcbsd/trunk/system-overlay/PCBSD/xorg-gui/bin/rundetect.sh
===================================================================
--- pcbsd/trunk/system-overlay/PCBSD/xorg-gui/bin/rundetect.sh	2007-09-11 20:20:37 UTC (rev 696)
+++ pcbsd/trunk/system-overlay/PCBSD/xorg-gui/bin/rundetect.sh	2007-09-11 20:50:13 UTC (rev 697)
@@ -24,6 +24,27 @@
 
 echo "`clear`" >/dev/console
 
+
+echo "Determining monitor refresh rate capabilities..." >/dev/console
+X -configure 2>/dev/null
+
+# Clear out any old refresh rates
+rm /tmp/.horzsync >/dev/null 2>/dev/null
+rm /tmp/.vertsync >/dev/null 2>/dev/null
+
+# Check for refresh rate lines
+cat /root/xorg.conf.new | grep HorizSync >/dev/null 2>/dev/null
+if [ "$?" = "0" ]
+then
+  cat /root/xorg.conf.new | grep HorizSync > /tmp/.horzsync
+fi
+
+cat /root/xorg.conf.new | grep VertRefresh >/dev/null 2>/dev/null
+if [ "$?" = "0" ]
+then
+  cat /root/xorg.conf.new | grep VertRefresh > /tmp/.vertsync
+fi
+
 echo "Please wait... Start X-Configuration Utility" >/dev/console
 
 # Check if we need to save an existing .xinitrc file

Modified: pcbsd/trunk/system-overlay/PCBSD/xorg-gui/bin/setupconf.sh
===================================================================
--- pcbsd/trunk/system-overlay/PCBSD/xorg-gui/bin/setupconf.sh	2007-09-11 20:20:37 UTC (rev 696)
+++ pcbsd/trunk/system-overlay/PCBSD/xorg-gui/bin/setupconf.sh	2007-09-11 20:50:13 UTC (rev 697)
@@ -42,6 +42,19 @@
     VertRefresh  ${VERTREFRESH}
 " >> ${TMPFILE}
 
+else
+ # The user didnt specify values so check if we have auto-detected ones
+
+ if [ -e "/tmp/.horzsync" ]
+ then
+   echo "`cat /tmp/.horzsync`" >> ${TMPFILE}
+ fi
+
+ if [ -e "/tmp/.vertsync" ]
+ then
+   echo "`cat /tmp/.vertsync`" >> ${TMPFILE}
+ fi
+
 fi
 
 # Setup resolution modeline with GTF



More information about the Commits mailing list