mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-05 09:37:14 +08:00
68 lines
2.6 KiB
Plaintext
68 lines
2.6 KiB
Plaintext
|
|
whisperer(){
|
|
echo "----------------------------------------------------------------"
|
|
echo "You can use the tool 'aticonfig' to generate an xorg.conf file."
|
|
echo "--------------------- ^^^^^^^^^ --------------------------------"
|
|
echo "Add nomodeset to your kernel line in /boot/grub/grub.cfg , ie.:"
|
|
echo "ernel /boot/vmlinuz-linux 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 "----------------------------------------------------------------"
|
|
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 "----------------------------------------------------------------"
|
|
echo "For more info and more troubleshooting visit:"
|
|
echo "http://chakra-linux.org/wiki/index.php/Switching_Between_Free_and_Non-free_Video-Drivers"
|
|
echo "----------------------------------------------------------------"
|
|
}
|
|
|
|
check_libdri_so(){
|
|
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
|
|
fi
|
|
}
|
|
|
|
#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
|
|
}
|
|
|
|
post_install(){
|
|
check_libdri_so
|
|
pXp_set_to_amd
|
|
whisperer
|
|
}
|
|
|
|
post_upgrade(){
|
|
check_libdri_so
|
|
pXp_set_to_amd
|
|
whisperer
|
|
}
|
|
|
|
post_remove(){
|
|
# If the symlink is dead, remove it
|
|
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 "----------------------------------------------------------------"
|
|
}
|