Well, checking the VRAM via lspci seems to be relatively useless as it cannot see more than 256 MB.
So I removed it. Also removed one redundant lspci.
## Check VGA card and load respective driver.
if [ $(which lspci) ] && [ $(which Xorg) ]; then
echo -en "\033[1;30m:: \033[1;34mVGA\033[1;30m: "
VGA="$(lspci | grep -m1 -E "VGA|3D")"
VGA_VENDOR="$(echo "$VGA" | grep -m1 -i -o -E "intel|nvidia|radeon" )"
if [ -n "$VGA_VENDOR" ]; then
[ -d /etc/X11 ] || mkdir -p /etc/X11
VGA_MODEL="$(echo "$VGA" | sed 's/^.*VGA compatible controller: //;s/ Corporation//;s/ Mobile//;s/ Express//;s/ Integrated Graphics Controller//;s/ (rev .*//' | sed "s:$VGA_VENDOR ::I")"
echo -en "\033[1;33m$VGA_VENDOR \033[1;32m$VGA_MODEL\033[1;30m ...\033[1;33m"
TCUSER="$(cat /etc/sysconfig/tcuser)"
KERNEL="$(uname -r)"
VGA_VENDOR="$(echo "$VGA_VENDOR" | tr '[:upper:]' '[:lower:]')"
case $VGA_VENDOR in
intel)
su "$TCUSER" -c "tce-load -i xf86-video-intel" >/dev/null &
rotdash $!
echo -e "\033[1;30mDone\033[0;39m"
;;
nvidia)
if [ -e "/etc/sysconfig/tcedir/optional/nvidia-304.125-$KERNEL.tcz" ]; then
su "$TCUSER" -c "tce-load -i nvidia-304.125-$KERNEL" >/dev/null &
rotdash $!
[ -e /etc/X11/xorg.conf ] || nvidia-xconfig >/dev/null 2>&1
else
su "$TCUSER" -c "tce-load -i xf86-video-nouveau" >/dev/null &
rotdash $!
fi
echo -e "\033[1;30mDone\033[0;39m"
;;
radeon)
su "$TCUSER" -c "tce-load -i firmware-radeon xf86-video-ati" >/dev/null &
rotdash $!
echo -e "\033[1;30mDone\033[0;39m"
;;
*) echo -e "\033[1;30mUnknown\033[0;39m" ;;
esac
else
echo -e "\033[1;31mFailed\033[1;34m to determine driver\033[1;30m.\033[0;39m"
fi
fi
If anyone with an ATI / Radeon card would like to try this code in /opt/bootsync.sh , I'd like to hear if it works or if additional extensions are needed.
Also I have no idea about geode , mach64 , neomagic , openchrome and vmware .
Feel free to feed me with the output of
lspci | grep -m1 -E "VGA|3D"