summaryrefslogtreecommitdiffstats
path: root/abs/core/LinHES-config/xconfig.sh
diff options
context:
space:
mode:
Diffstat (limited to 'abs/core/LinHES-config/xconfig.sh')
-rwxr-xr-xabs/core/LinHES-config/xconfig.sh118
1 files changed, 76 insertions, 42 deletions
diff --git a/abs/core/LinHES-config/xconfig.sh b/abs/core/LinHES-config/xconfig.sh
index 2fad821..fff7f44 100755
--- a/abs/core/LinHES-config/xconfig.sh
+++ b/abs/core/LinHES-config/xconfig.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+#set -x
#SET DISPLAYCARD to force a cardtype
#SET DISPLAYRES to force Xres, ENV takes precendent over cmdline
#displayres=cmdline
@@ -7,6 +8,8 @@ NVPKGS="ati-dri xf86-video-ati xf86-video-radeonhd intel-dri xf86-video-intel xf
BASE=""
. /etc/profile
NVIDIA_96XX="$TEMPLATES/xorg/96xx_supported.txt"
+NVIDIA_173="$TEMPLATES/xorg/173_supported.txt"
+NVIDIA_SUPPORTED="$TEMPLATES/xorg/nvidia_supported.txt"
#TEMPLATES="/usr/share/templates"
MYTHHOME=$BASE/home/mythtv
@@ -30,7 +33,7 @@ function Xvalues {
Xcardtype=$VGACARDTYPE
fi
echo "Will use $VGACARDTYPE"
- currentmode=`cat "$BASE/etc/X11/xorg.conf" | grep Modes | awk -Fs '{ print $2 }'`
+ #currentmode=`cat "$BASE/etc/X11/xorg.conf" | grep Modes | awk -Fs '{ print $2 }'`
}
function presetupX {
@@ -93,22 +96,27 @@ function setupAdvancedX {
# echo $ML
case $Xcardtype in
NVIDIA|nVidia|nvidia)
+ nvidia_driver_install
case $Xconnection in
DVI) ConnectedMonitor=DFP ;;
vga) ConnectedMonitor=CRT;;
Auto) ConnectedMonitor=Auto;;
TV) ConnectedMonitor=TV
- echo "Option \"TVStandard\" \"$XTVstandard\"" >>/tmp/options
- echo "Option \"TVOutFormat\" \"$XTVconnection\"" >> /tmp/options
+ nvidia-xconfig -c /etc/X11/xorg.conf.d/20-automv.conf --tv-standard="$XTVstandard"
+ nvidia-xconfig -c /etc/X11/xorg.conf.d/20-automv.conf --tv-out-format="$XTVconnection"
+ # echo "Option \"TVStandard\" \"$XTVstandard\"" >>/tmp/options
+ # echo "Option \"TVOutFormat\" \"$XTVconnection\"" >> /tmp/options
;;
+ *) ConnectedMonitor=Auto;;
esac
if [ "$ConnectedMonitor" = Auto ]
then
echo "auto connection"
else
- echo "Option \"ConnectedMonitor\" \"$ConnectedMonitor\"" >> /tmp/options
- echo "Option \"FlatPanelProperties\" \"Scaling = centered, Dithering = enabled\"" >> /tmp/options
- echo "Option \"DigitalVibrance\" \"0\"" >> /tmp/options
+ nvidia-xconfig -c /etc/X11/xorg.conf.d/20-automv.conf --connected-monitor="$ConnectedMonitor"
+ #echo "Option \"ConnectedMonitor\" \"$ConnectedMonitor\"" >> /tmp/options
+ #echo "Option \"FlatPanelProperties\" \"Scaling = centered, Dithering = enabled\"" >> /tmp/options
+ #echo "Option \"DigitalVibrance\" \"0\"" >> /tmp/options
fi
if [ "$XignoreEDID" = 1 ]
@@ -125,16 +133,16 @@ function setupAdvancedX {
HS="# Hsync edid used "
VR="# Vertrefresh edid used "
fi
- echo "Option \"UseEdidFreqs\" \"$EDIDFREQ\"" >> /tmp/options
- echo "Option \"IgnoreEDID\" \"$EDIDvalue\"" >> /tmp/options
-
-
- sed -e "s/^.*Modes.*$/${ML}/" \
- -e "/INSERT MODELINE/r $TEMPLATES/xorg/modeline.$Xcategory" \
- -e "s/^.*DisplaySize.*$/ $DS/" \
- -e "s/^#.*HorizSync.*$/ $HS/g" \
- -e "s/^#.*VertRefresh.*$/ $VR/g" \
- -e "/INSERT HERE/r /tmp/options" "$TEMPLATES/xorg/xorg.conf.nvidia" > "$XORG_CONF"
+# echo "Option \"UseEdidFreqs\" \"$EDIDFREQ\"" >> /tmp/options
+# echo "Option \"IgnoreEDID\" \"$EDIDvalue\"" >> /tmp/options
+#
+#
+# sed -e "s/^.*Modes.*$/${ML}/" \
+# -e "/INSERT MODELINE/r $TEMPLATES/xorg/modeline.$Xcategory" \
+# -e "s/^.*DisplaySize.*$/ $DS/" \
+# -e "s/^#.*HorizSync.*$/ $HS/g" \
+# -e "s/^#.*VertRefresh.*$/ $VR/g" \
+# -e "/INSERT HERE/r /tmp/options" "$TEMPLATES/xorg/xorg.conf.nvidia" > "$XORG_CONF"
;;
ati|ATI)
@@ -179,6 +187,57 @@ function setupAdvancedX {
esac
}
+function nvidia_driver_install {
+
+
+ cp "$TEMPLATES/xorg/xorg.conf.nvidia" $BASE/etc/X11/xorg.conf.d/20-automv.conf
+ if [ ${Xres} = Auto ]
+ then
+ nvidia-xconfig -c /etc/X11/xorg.conf.d/20-automv.conf --mode-list="nvidia-auto-select"
+ else
+ nvidia-xconfig -c /etc/X11/xorg.conf.d/20-automv.conf --mode-list=${Xres}
+ fi
+
+ if [ "$TESTMODE" != "test" ]
+ then
+
+
+ grep -qi "$CARDID" "$NVIDIA_SUPPORTED"
+ if [ $? = 0 ]
+ then
+ #install latest drivers
+ echo "installing current nvidia drivers"
+ pacman --noconfirm -Rd libgl > /dev/null 2>&1
+ pacman --noconfirm -R $NVPKGS > /dev/null 2>&1
+ pacman --noconfirm -S nvidia nvidia-utils > /dev/null 2>&1
+ fi
+
+
+ #nvidia check right here
+ grep -qi "$CARDID" "$NVIDIA_96XX"
+ if [ $? = 0 ]
+ then
+ #install 96xx drivers
+ echo "installing nvidia 96xx drivers"
+ pacman --noconfirm -Rd libgl > /dev/null 2>&1
+ pacman --noconfirm -R $NVPKGS > /dev/null 2>&1
+ pacman --noconfirm -S nvidia-96xx nvidia-96xx-utils > /dev/null 2>&1
+ fi
+
+ grep -qi "$CARDID" "$NVIDIA_173"
+ if [ $? = 0 ]
+ then
+ #install latest drivers
+ echo "installing 173 nvidia drivers"
+ pacman --noconfirm -Rd libgl > /dev/null 2>&1
+ pacman --noconfirm -R $NVPKGS > /dev/null 2>&1
+ pacman --noconfirm -S nvidia-173xx nvidia-173xx-utils > /dev/null 2>&1
+ fi
+ fi
+ echo "/usr/lib/libXvMCNVIDIA_dynamic.so.1" > "$XVMC_CONFIG"
+ rm $BASE/etc/X11/xorg.conf.d/20-nvidia.conf
+}
+
function setupX {
Xvalues
@@ -188,32 +247,7 @@ function setupX {
then
case $VGACARDTYPE in
nVidia)
- if [ ${Xres} = Auto ]
- then
- sed -e "/^.*Modes.*$/d" "$TEMPLATES/xorg/xorg.conf.nvidia" > "$XORG_CONF"
- else
- sed -e "s/^.*Modes.*$/\t Modes \"${Xres}\"/" "$TEMPLATES/xorg/xorg.conf.nvidia" > "$XORG_CONF"
- fi
- if [ "$TESTMODE" != "test" ]
- then
- #nvidia check right here
- grep -qi "$CARDID" "$NVIDIA_96XX"
- if [ $? = 0 ]
- then
- #install 96xx drivers
- echo "installing nvidia 96xx drivers"
- pacman --noconfirm -Rd libgl > /dev/null 2>&1
- pacman --noconfirm -R $NVPKGS > /dev/null 2>&1
- pacman --noconfirm -S nvidia-96xx nvidia-96xx-utils > /dev/null 2>&1
- else
- #install latest drivers
- echo "installing current nvidia drivers"
- pacman --noconfirm -Rd libgl > /dev/null 2>&1
- pacman --noconfirm -R $NVPKGS > /dev/null 2>&1
- pacman --noconfirm -S nvidia nvidia-utils > /dev/null 2>&1
- fi
- fi
- echo "/usr/lib/libXvMCNVIDIA_dynamic.so.1" > "$XVMC_CONFIG"
+ nvidia_driver_install
;;
# VMware)