|
|
|
@ -10,6 +10,59 @@
|
|
|
|
|
# as published by the Free Software Foundation. So feel free to copy, distribute,
|
|
|
|
|
# or modify it as you wish.
|
|
|
|
|
|
|
|
|
|
setup_graphics_card() {
|
|
|
|
|
# Main menu. Correct option for graphics card should be automatically highlighted.
|
|
|
|
|
DIALOG " $_InstGrDrv " --radiolist "$_InstDEBody\n\n$_UseSpaceBar" 0 0 12 \
|
|
|
|
|
$(mhwd -l | awk 'FNR>4 {print $1}' | awk 'NF' |awk '$0=$0" - off"') 2> /tmp/.driver || return 0
|
|
|
|
|
|
|
|
|
|
if [[ $(cat /tmp/.driver) != "" ]]; then
|
|
|
|
|
clear
|
|
|
|
|
arch_chroot "mhwd -f -i pci $(cat /tmp/.driver)" 2>$ERR
|
|
|
|
|
check_for_error "install $(cat /tmp/.driver)" $?
|
|
|
|
|
|
|
|
|
|
GRAPHIC_CARD=$(lspci | grep -i "vga" | sed 's/.*://' | sed 's/(.*//' | sed 's/^[ \t]*//')
|
|
|
|
|
|
|
|
|
|
# All non-NVIDIA cards / virtualisation
|
|
|
|
|
if [[ $(echo $GRAPHIC_CARD | grep -i 'intel\|lenovo') != "" ]]; then
|
|
|
|
|
install_intel
|
|
|
|
|
elif [[ $(echo $GRAPHIC_CARD | grep -i 'ati') != "" ]]; then
|
|
|
|
|
install_ati
|
|
|
|
|
elif [[ $(cat /tmp/.driver) == "video-nouveau" ]]; then
|
|
|
|
|
sed -i 's/MODULES=""/MODULES="nouveau"/' ${MOUNTPOINT}/etc/mkinitcpio.conf
|
|
|
|
|
fi
|
|
|
|
|
check_for_error "$FUNCNAME $(cat /tmp/.driver)" "$?"
|
|
|
|
|
else
|
|
|
|
|
DIALOG " $_ErrTitle " --msgbox "\n\n$_WarnInstGr\n" 0 0
|
|
|
|
|
check_for_error "No video-driver selected."
|
|
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
install_intel() {
|
|
|
|
|
sed -i 's/MODULES=""/MODULES="i915"/' ${MOUNTPOINT}/etc/mkinitcpio.conf
|
|
|
|
|
|
|
|
|
|
# Intel microcode (Grub, Syslinux and systemd-boot).
|
|
|
|
|
# Done as seperate if statements in case of multiple bootloaders.
|
|
|
|
|
if [[ -e ${MOUNTPOINT}/boot/grub/grub.cfg ]]; then
|
|
|
|
|
DIALOG " grub-mkconfig " --infobox "$_PlsWaitBody" 0 0
|
|
|
|
|
sleep 1
|
|
|
|
|
arch_chroot "grub-mkconfig -o /boot/grub/grub.cfg" 2>$ERR
|
|
|
|
|
fi
|
|
|
|
|
# Syslinux
|
|
|
|
|
[[ -e ${MOUNTPOINT}/boot/syslinux/syslinux.cfg ]] && sed -i "s/INITRD /&..\/intel-ucode.img,/g" ${MOUNTPOINT}/boot/syslinux/syslinux.cfg
|
|
|
|
|
|
|
|
|
|
# Systemd-boot
|
|
|
|
|
if [[ -e ${MOUNTPOINT}${UEFI_MOUNT}/loader/loader.conf ]]; then
|
|
|
|
|
update=$(ls ${MOUNTPOINT}${UEFI_MOUNT}/loader/entries/*.conf)
|
|
|
|
|
for i in ${upgate}; do
|
|
|
|
|
sed -i '/linux \//a initrd \/intel-ucode.img' ${i}
|
|
|
|
|
done
|
|
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
install_ati() {
|
|
|
|
|
sed -i 's/MODULES=""/MODULES="radeon"/' ${MOUNTPOINT}/etc/mkinitcpio.conf
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
install_manjaro_de_wm_pkg() {
|
|
|
|
|
PROFILES="/usr/share/manjaro-tools/iso-profiles"
|
|
|
|
|
# Only show this information box once
|
|
|
|
|