mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-03 23:47:21 +08:00
63 lines
2.2 KiB
Plaintext
63 lines
2.2 KiB
Plaintext
|
|
whisperer(){
|
|
echo "----------------------------------------------------------------"
|
|
echo "You can use the tool 'aticonfig' to generate an xorg.conf file."
|
|
echo "Remember to add fglrx to the MODULES list in /etc/rc.conf."
|
|
echo "--------------- ^^^^^ ------ ^^^^^^^ ---------------------------"
|
|
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 building module or using more than"
|
|
echo "one kernel use catalyst_build_module command as root, more info:"
|
|
echo "# catalyst_build_module --help"
|
|
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 "For more info and more troubleshooting visit:"
|
|
echo "http://wiki.archlinux.org/index.php/ATI_Catalyst"
|
|
echo "----------------------------------------------------------------"
|
|
}
|
|
|
|
captain_hook(){
|
|
# add hook fglrx to mkiniticpio
|
|
hooks=$(grep ^HOOKS /etc/mkinitcpio.conf | grep fglrx)
|
|
if [ "$hooks" = "" ]; then
|
|
# add hook fglrx
|
|
sed 's/^HOOKS="\([^"]*\)"/HOOKS="\1 fglrx"/' -i /etc/mkinitcpio.conf
|
|
fi
|
|
}
|
|
|
|
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
|
|
}
|
|
|
|
post_install() {
|
|
whisperer
|
|
captain_hook
|
|
check_libdri_so
|
|
/usr/bin/catalyst_build_module &>/dev/null
|
|
}
|
|
|
|
post_upgrade() {
|
|
whisperer
|
|
captain_hook
|
|
check_libdri_so
|
|
/usr/bin/catalyst_build_module &>/dev/null
|
|
}
|
|
|
|
pre_remove(){
|
|
/usr/bin/catalyst_build_module remove_all
|
|
}
|
|
|
|
post_remove() {
|
|
# remove hook fglrx
|
|
sed '/^HOOKS/s/ *fglrx//' -i /etc/mkinitcpio.conf
|
|
# If the symlink is dead, remove it
|
|
check_libdri_so
|
|
echo "NOTE: Don't forget to recover your original xorg.conf file."
|
|
}
|