Skip to content
Browse files

Add the nvidia check to installer, will try nvidia-xconfig if the nvidia

driver has been loaded.
  • Loading branch information...
1 parent 13ee25d commit 8e745d859cd01027f3b9a5b7a07f49b638028c83 @kmoore134 kmoore134 committed Jan 9, 2014
Showing with 15 additions and 7 deletions.
  1. +0 −3 overlays/install-overlay/root/PCBSDStart.sh
  2. +15 −4 overlays/install-overlay/root/functions.sh
View
3 overlays/install-overlay/root/PCBSDStart.sh
@@ -98,9 +98,6 @@ if [ $? -eq 0 ]; then
exit
fi
-# Now run the X auto-detection
-detect_x
-
# Now start xorg
start_xorg
View
19 overlays/install-overlay/root/functions.sh
@@ -4,7 +4,18 @@
detect_x()
{
- # Check for VESA support
+ # First check if we are running as a VirtualBox guest
+ pciconf -lv | grep -q "VirtualBox"
+ if [ $? -eq 0 ] ; then cp /root/cardDetect/xorg.conf.virtualbox /etc/X11/xorg.conf; fi
+
+ # Check if this system has a nvidia device, and run nvidia-xconfig
+ kldstat | grep -q 'nvidia'
+ if [ $? -eq 0 ] ; then
+ echo "Detected NVIDIA, creating xorg.conf"
+ nvidia-xconfig 2>/dev/null
+ fi
+
+ # Check if the user requested VESA mode
xvesa="NO"
v=`/bin/kenv xvesa 2>/dev/null`
if [ $? -eq 0 ]; then
@@ -75,9 +86,9 @@ EndSection
start_xorg()
{
- # First check if we are running as a VirtualBox guest
- pciconf -lv | grep -q "VirtualBox"
- if [ $? -eq 0 ] ; then cp /root/cardDetect/xorg.conf.virtualbox /etc/X11/xorg.conf; fi
+
+ # Now run the X auto-detection
+ detect_x
# Run X Now
startx

0 comments on commit 8e745d8

Please sign in to comment.
Something went wrong with that request. Please try again.