fglrx/radeon: also support fglrx -> radeon and reverse reconfiguration based on modeset activation
This commit is contained in:
parent
57a587a5e4
commit
b934e5e81d
@ -185,17 +185,28 @@ if [ -e $XORGCONF ]; then
|
|||||||
VIDEODRIVER=${VIDEODRIVERS[0]}
|
VIDEODRIVER=${VIDEODRIVERS[0]}
|
||||||
|
|
||||||
[ -e /sys/module/nouveau/parameters/modeset ] && NOUVEAU_MODESET=`cat /sys/module/nouveau/parameters/modeset`
|
[ -e /sys/module/nouveau/parameters/modeset ] && NOUVEAU_MODESET=`cat /sys/module/nouveau/parameters/modeset`
|
||||||
|
[ -e /sys/module/radeon/parameters/modeset ] && RADEON_MODESET=`cat /sys/module/radeon/parameters/modeset`
|
||||||
|
|
||||||
if [ "$VIDEODRIVER" = "nvidia" -a "$NUOUVEAU_MODESET" = "1" ]; then
|
if [ "$VIDEODRIVER" = "nvidia" -a "$NUOUVEAU_MODESET" = "1" ]; then
|
||||||
# replace nvidia with nouveau
|
# replace nvidia with nouveau
|
||||||
mv $XORGCONF $XORGCONF.postplug.nvidia.save
|
mv $XORGCONF $XORGCONF.postplug.nvidia.save
|
||||||
rmmod nvidia
|
rmmod nvidia
|
||||||
echo "blacklist nvidia" > /etc/modprobe.d/postplug-nouveau.conf
|
echo "blacklist nvidia" > /etc/modprobe.d/postplug-nouveau.conf
|
||||||
elif [ "$VIDEODRIVER" = "nouveau" -a ! "$NOUVEAU_MODESET" ]; then
|
elif [ "$VIDEODRIVER" = "nouveau" -a "$NOUVEAU_MODESET" != "1" ]; then
|
||||||
# replace nouveau with nvidia
|
# replace nouveau with nvidia
|
||||||
mv $XORGCONF $XORGCONF.postplug.nouveau.save
|
mv $XORGCONF $XORGCONF.postplug.nouveau.save
|
||||||
rmmod nouveau
|
rmmod nouveau
|
||||||
echo "blacklist nouveau" > /etc/modprobe.d/postplug-nouveau.conf
|
rm -f /etc/modprobe.d/postplug-nouveau.conf
|
||||||
|
elif [ "$VIDEODRIVER" = "fglrx" -a "$RADEON_MODESET" = "1" ]; then
|
||||||
|
# replace fglrx with radeon
|
||||||
|
mv $XORGCONF $XORGCONF.postplug.fglrx.save
|
||||||
|
rmmod fglrx
|
||||||
|
echo "blacklist fglrx" > /etc/modprobe.d/postplug-radeon.conf
|
||||||
|
elif [ "$VIDEODRIVER" = "radeon" -a "$RADEON_MODESET" != "1" ]; then
|
||||||
|
# replace radeon with fglrx
|
||||||
|
mv $XORGCONF $XORGCONF.postplug.radeon.save
|
||||||
|
rmmod radeon
|
||||||
|
rm -f /etc/modprobe.d/postplug-radeon.conf
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user