xorg: support nouveau -> nvidia reconfiguration
This commit is contained in:
parent
32b12498c4
commit
57a587a5e4
@ -184,14 +184,18 @@ if [ -e $XORGCONF ]; then
|
||||
# assume first driver as default videodriver
|
||||
VIDEODRIVER=${VIDEODRIVERS[0]}
|
||||
|
||||
if [ "$VIDEODRIVER" = "nvidia" ]; then
|
||||
[ -e /sys/module/nouveau/parameters/modeset ] && NOUVEAU_MODESET=`cat /sys/module/nouveau/parameters/modeset`
|
||||
if [ "$NOUVEAU_MODESET" = "1" ]; then
|
||||
|
||||
if [ "$VIDEODRIVER" = "nvidia" -a "$NUOUVEAU_MODESET" = "1" ]; then
|
||||
# replace nvidia with nouveau
|
||||
mv $XORGCONF $XORGCONF.postplug.nvidia.save
|
||||
rmmod nvidia
|
||||
echo "blacklist nvidia" > /etc/modprobe.d/postplug-nouveau.conf
|
||||
fi
|
||||
elif [ "$VIDEODRIVER" = "nouveau" -a ! "$NOUVEAU_MODESET" ]; then
|
||||
# replace nouveau with nvidia
|
||||
mv $XORGCONF $XORGCONF.postplug.nouveau.save
|
||||
rmmod nouveau
|
||||
echo "blacklist nouveau" > /etc/modprobe.d/postplug-nouveau.conf
|
||||
fi
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user