2013-02-06 14:54:07 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
2013-02-06 15:12:23 +01:00
|
|
|
if [ -z "$(lspci|grep "VGA.*Radeon")" ]; then
|
|
|
|
echo "You must have a Radeon graphic adapter. Exit."
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
2013-02-06 14:54:07 +01:00
|
|
|
|
|
|
|
if [ $(id -u) -ne 0 ]; then
|
2013-02-06 15:12:23 +01:00
|
|
|
echo "You must be root to run this script. Exit."
|
2013-02-06 14:54:07 +01:00
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
2013-06-25 22:56:10 +02:00
|
|
|
if [ $(pacman -Qi catalyst-utils 2>/dev/null |wc -l) -ge 2 ]; then
|
2013-12-22 19:03:45 +01:00
|
|
|
pacman -Rdd --noconfirm catalyst catalyst-utils lib32-catalyst-utils
|
2013-02-06 14:54:07 +01:00
|
|
|
rm -f "/etc/X11/xorg.conf"
|
2013-03-08 08:05:28 +01:00
|
|
|
pacman -S --noconfirm ati-dri lib32-ati-dri xf86-video-ati
|
2013-12-22 19:03:45 +01:00
|
|
|
pacman -S --noconfirm mesa-libgl lib32-mesa-libgl
|
2013-12-24 09:24:27 +01:00
|
|
|
pacman -S --noconfirm libcl lib32-libcl
|
2013-02-06 15:15:54 +01:00
|
|
|
if [ -f "/boot/syslinux/syslinux.cfg" ]; then
|
2013-12-24 09:24:27 +01:00
|
|
|
sed -i 's/ nomodeset//' "/boot/syslinux/syslinux.cfg"
|
2013-02-06 15:15:54 +01:00
|
|
|
echo
|
|
|
|
echo "#### Syslinux entry:"
|
|
|
|
grep -A4 "^LABEL arch$" "/boot/syslinux/syslinux.cfg"
|
|
|
|
else
|
|
|
|
echo "You do not seem to use Syslinux. No configuration done."
|
|
|
|
echo "You have to remove 'nomodeset' kernel parameter manually."
|
|
|
|
fi
|
2013-02-06 14:54:07 +01:00
|
|
|
else
|
2013-03-08 08:05:28 +01:00
|
|
|
pacman -Rs --noconfirm ati-dri lib32-ati-dri xf86-video-ati
|
|
|
|
pacman -Rdd --noconfirm mesa-libgl lib32-mesa-libgl
|
2013-12-24 09:24:27 +01:00
|
|
|
pacman -Rdd --noconfirm libcl lib32-libcl
|
2013-12-22 19:03:45 +01:00
|
|
|
pacman -S --noconfirm catalyst catalyst-utils lib32-catalyst-utils
|
2013-02-06 14:54:07 +01:00
|
|
|
aticonfig --initial
|
2013-03-08 08:05:28 +01:00
|
|
|
if [ $? -eq 0 ] && [ -f "/boot/syslinux/syslinux.cfg" ]; then
|
2013-02-06 15:15:54 +01:00
|
|
|
sed -i '/^LABEL arch$/{n;n;n;s/$/ nomodeset/}' "/boot/syslinux/syslinux.cfg"
|
|
|
|
echo
|
|
|
|
echo "#### Syslinux entry:"
|
|
|
|
grep -A4 "^LABEL arch$" "/boot/syslinux/syslinux.cfg"
|
|
|
|
else
|
|
|
|
echo "You do not seem to use Syslinux. No configuration done."
|
|
|
|
echo "You have to add 'nomodeset' kernel parameter manually."
|
|
|
|
fi
|
2013-02-06 14:54:07 +01:00
|
|
|
fi
|