summaryrefslogtreecommitdiffstats
path: root/abs/core/LinHES-config/xconfig.sh
diff options
context:
space:
mode:
authorCecil <knoppmyth@gmail.com>2011-08-07 05:58:06 (GMT)
committerCecil <knoppmyth@gmail.com>2011-08-07 05:58:06 (GMT)
commitf75cfa40ac713fbc58294c72d98aa77511e01524 (patch)
tree47e7c53979985897bfd6ecdd655048c7c8ce7b4e /abs/core/LinHES-config/xconfig.sh
parent3292ca9fcd6c508a64f66a61b97af184701350d5 (diff)
parent8ce168b0cd19dabd922ff13e6f71d6ec1954873e (diff)
downloadlinhes_pkgbuild-f75cfa40ac713fbc58294c72d98aa77511e01524.zip
linhes_pkgbuild-f75cfa40ac713fbc58294c72d98aa77511e01524.tar.gz
linhes_pkgbuild-f75cfa40ac713fbc58294c72d98aa77511e01524.tar.bz2
Merge branch 'testing' of ssh://cesman@linhes.org/mount/repository/linhes_pkgbuild into testing
Diffstat (limited to 'abs/core/LinHES-config/xconfig.sh')
-rwxr-xr-xabs/core/LinHES-config/xconfig.sh54
1 files changed, 40 insertions, 14 deletions
diff --git a/abs/core/LinHES-config/xconfig.sh b/abs/core/LinHES-config/xconfig.sh
index fff7f44..d684c21 100755
--- a/abs/core/LinHES-config/xconfig.sh
+++ b/abs/core/LinHES-config/xconfig.sh
@@ -4,7 +4,15 @@
#SET DISPLAYRES to force Xres, ENV takes precendent over cmdline
#displayres=cmdline
#NVPKGS="ati-dri xf86-video-ati xf86-video-radeonhd intel-dri xf86-video-intel unichrome-dri xf86-video-unichrome xf86-video-mga xf86-video-savage xf86-video-trident"
-NVPKGS="ati-dri xf86-video-ati xf86-video-radeonhd intel-dri xf86-video-intel xf86-video-mga xf86-video-savage xf86-video-trident unichrome-dri xf86-video-openchrome"
+#NVPKGS="ati-dri xf86-video-ati xf86-video-radeonhd intel-dri xf86-video-intel xf86-video-mga xf86-video-savage xf86-video-trident unichrome-dri xf86-video-openchrome "
+#NVPKGS="unichrome-dri"
+for i in ati intel mga savage sis unichrome
+do
+ #templist="$i-dri xf86-video-$i"
+ templist=`echo $i-dri xf86-video-$i`
+ NVPKGS=`echo $NVPKGS $templist`
+
+done
BASE=""
. /etc/profile
NVIDIA_96XX="$TEMPLATES/xorg/96xx_supported.txt"
@@ -187,28 +195,37 @@ function setupAdvancedX {
esac
}
+function nvidia_prepare {
+ pacman --noconfirm -Rdd libgl > /dev/null 2>&1
+ for i in `echo ${NVPKGS}`
+ do
+ echo $i
+ pacman --noconfirm -Rc $i
+ # echo pacman -R $NVPKGS
+ #pacman -R $NVPKGS
+ done
+
+
+}
+
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 -Rd libgl > /dev/null 2>&1
+ # pacman --noconfirm -R $NVPKGS > /dev/null 2>&1
+ nvidia_prepare
pacman --noconfirm -S nvidia nvidia-utils > /dev/null 2>&1
fi
@@ -219,8 +236,9 @@ function nvidia_driver_install {
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 -Rd libgl > /dev/null 2>&1
+# # pacman --noconfirm -R $NVPKGS > /dev/null 2>&1
+ nvidia_prepare
pacman --noconfirm -S nvidia-96xx nvidia-96xx-utils > /dev/null 2>&1
fi
@@ -229,11 +247,19 @@ function nvidia_driver_install {
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 -Rd libgl > /dev/null 2>&1
+# pacman --noconfirm -R $NVPKGS > /dev/null 2>&1
+ nvidia_prepare
pacman --noconfirm -S nvidia-173xx nvidia-173xx-utils > /dev/null 2>&1
fi
fi
+ 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
+
echo "/usr/lib/libXvMCNVIDIA_dynamic.so.1" > "$XVMC_CONFIG"
rm $BASE/etc/X11/xorg.conf.d/20-nvidia.conf
}