core/catalyst-utils/catalyst-utils.install

68 lines
2.5 KiB
Plaintext
Raw Normal View History

2010-10-27 08:36:46 +08:00
whisperer(){
echo "----------------------------------------------------------------"
echo "You can use the tool 'aticonfig' to generate an xorg.conf file."
2011-05-01 20:11:50 +08:00
echo "--------------------- ^^^^^^^^^ --------------------------------"
2010-10-27 08:36:46 +08:00
echo "Add nomodeset to your kernel line in /boot/grub/menu.lst , ie.:"
echo "kernel /boot/vmlinuz26 root=/dev/sda1 ro nomodeset"
echo "----------------------------------------------------------------"
echo "If experiencing problems with white/gray/black_artifacts you can"
echo "[as root] kill Xserver and use this command:"
echo "# aticonfig --set-pcs-str=DDX,ForceXAA,TRUE"
echo "----------------------------------------------------------------"
2011-08-04 02:53:31 +08:00
echo "Now you can swítch between xorg-libgl for intel/radeon or fglrx"
echo "[as root] use this command:"
echo "# pxp_switch_catalyst <amd|intel|query>"
echo "----------------------------------------------------------------"
2011-02-16 08:05:36 +08:00
echo "For more info and more troubleshooting visit:"
echo "http://wiki.archlinux.org/index.php/ATI_Catalyst"
echo "----------------------------------------------------------------"
2010-10-27 08:36:46 +08:00
}
check_libdri_so(){
2011-05-01 20:11:50 +08:00
if [ ! -e usr/lib/xorg/modules/extensions/libdri.so ]; then
ln -sf usr/lib/xorg/modules/extensions/libdri.xorg usr/lib/xorg/modules/extensions/libdri.so
2010-10-27 08:36:46 +08:00
fi
}
2011-08-04 02:53:31 +08:00
#pXp = powerXpress, set catalyst libs in default
pXp_set_to_amd(){
CARCH=`uname -m`
if [ "${CARCH}" = "i686" ]; then
_lib=lib
elif [ "${CARCH}" = "x86_64" ]; then
_lib=lib64
fi
usr/${_lib}/fglrx/switchlibGL amd
usr/${_lib}/fglrx/switchlibglx amd
2011-06-19 08:33:37 +08:00
}
2010-10-27 08:36:46 +08:00
post_install(){
check_libdri_so
2011-08-04 02:53:31 +08:00
pXp_set_to_amd
2010-10-27 08:36:46 +08:00
whisperer
}
post_upgrade(){
check_libdri_so
2011-08-04 02:53:31 +08:00
pXp_set_to_amd
2010-10-27 08:36:46 +08:00
whisperer
}
post_remove(){
# If the symlink is dead, remove it
2011-08-04 02:53:31 +08:00
check_libdri_so
#remove /usr/lib/catalystpxp/libGL.so* symlinks and dir
rm usr/lib/catalystpxp/libGL.so* &>/dev/null
rmdir -p "usr/lib/catalystpxp/" --ignore-fail-on-non-empty &>/dev/null
#remove usr/lib/xorg/modules/updates/extensions/libglx.so symlink and dir
rm usr/lib/xorg/modules/updates/extensions/libglx.so &>/dev/null
rmdir -p "usr/lib/xorg/modules/updates/extensions" --ignore-fail-on-non-empty &>/dev/null
rmdir -p "usr/lib/xorg/modules/updates" --ignore-fail-on-non-empty &>/dev/null
echo "----------------------------------------------------------------"
echo " Don't forget to recover your original xorg.conf file."
echo "----------------------------------------------------------------"
2010-10-27 08:36:46 +08:00
}