From b934e5e81d7a819fcde223bde6959e65df37335b Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Wed, 11 Jul 2012 01:06:57 +0200 Subject: [PATCH] fglrx/radeon: also support fglrx -> radeon and reverse reconfiguration based on modeset activation --- VERSION | 2 +- postplug.d/30xorg | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/VERSION b/VERSION index 995377a..0160fc1 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -VERSION = 1.2.16 +VERSION = 1.2.17 diff --git a/postplug.d/30xorg b/postplug.d/30xorg index d576b43..a5b14d5 100644 --- a/postplug.d/30xorg +++ b/postplug.d/30xorg @@ -185,17 +185,28 @@ if [ -e $XORGCONF ]; then VIDEODRIVER=${VIDEODRIVERS[0]} [ -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 # replace nvidia with nouveau mv $XORGCONF $XORGCONF.postplug.nvidia.save rmmod nvidia 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 mv $XORGCONF $XORGCONF.postplug.nouveau.save 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