xorg: further fixes for radeon/fglrx switch

This commit is contained in:
Silvan Calarco 2014-10-03 18:49:24 +02:00
parent 806b8138d5
commit 91d9c11c5e
2 changed files with 10 additions and 3 deletions

View File

@ -163,7 +163,7 @@ if [ -e $XORGCONF ]; then
[ -e /sys/module/nouveau/parameters/modeset ] && NOUVEAU_MODESET=`cat /sys/module/nouveau/parameters/modeset`
[ "$NOUVEAU_MODESET" = "-1" ] && NOUVEAU_MODESET=1
[ -e /sys/module/radeon/parameters/modeset ] && RADEON_MODESET=`cat /sys/module/radeon/parameters/modeset`
[ "$RADEON_MODESET" = "-1" ] && NOUVEAU_MODESET=1
[ "$RADEON_MODESET" = "-1" ] && RADEON_MODESET=1
if [ "$VIDEODRIVER" = "nvidia" -a "$NOUVEAU_MODESET" = "1" ]; then
# replace nvidia with nouveau
@ -185,10 +185,12 @@ if [ -e $XORGCONF ]; then
VIDEODRIVER=""
elif [ "$VIDEODRIVER" = "radeon" -a "$RADEON_MODESET" != "1" ]; then
# replace radeon with fglrx
mv $XORGCONF $XORGCONF.postplug.radeon.save
#mv $XORGCONF $XORGCONF.postplug.radeon.save
rmmod radeon
rm -f /etc/modprobe.d/postplug-radeon.conf
VIDEODRIVER="fglrx"
ATI_DRV=1
CONFCREATED=1
fi
fi
@ -461,7 +463,8 @@ fi
# radeon: enable a conservative power profile (mid) by default
if [ -e /sys/class/drm/card0/device/power_profile ]; then
echo mid > /sys/class/drm/card0/device/power_profile
[ "$XORG_POWER_PROFILE" ] || XORG_POWER_PROFILE="mid"
echo $XORG_POWER_PROFILE > /sys/class/drm/card0/device/power_profile
fi
# Configure keyboard

View File

@ -61,6 +61,10 @@ NETWORK_NEWDEVICE=off
# (on/off, default: on)
XORG_DETECT_SCREEN_SIZE=on
# xorg server: power profile for Radeon driver
# (auto/low/mid/high, default: mid)
#XORG_POWER_PROFILE=mid
# force sound card reconfiguration
# (on/off, default: off)
SOUND_FORCE_RESCAN=off