diff --git a/chrootInstall.sh b/chrootInstall.sh index 143e5c9..315351e 100755 --- a/chrootInstall.sh +++ b/chrootInstall.sh @@ -36,10 +36,12 @@ if [ "$boot" == 2 ]; then fi cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo curl https://raw.githubusercontent.com/rwinkhart/artix-install-script/main/config-files/grub -o /etc/default/grub -if [ "$gpu" != 'NVIDIA' ]; then - echo "GRUB_CMDLINE_LINUX_DEFAULT=\"loglevel=3 quiet nowatchdog retbleed=off mem_sleep_default=deep nohz_full=1-"$threadsminusone"\"" >> /etc/default/grub -else +if [ "$gpu" == 'NVIDIA' ]; then echo "GRUB_CMDLINE_LINUX_DEFAULT=\"loglevel=3 quiet nowatchdog retbleed=off mem_sleep_default=deep nohz_full=1-"$threadsminusone" nvidia-drm.modeset=1\"" >> /etc/default/grub +elif [ "$gpu" == 'AMD' ]; then + echo "GRUB_CMDLINE_LINUX_DEFAULT=\"loglevel=3 quiet nowatchdog retbleed=off mem_sleep_default=deep nohz_full=1-"$threadsminusone" amdgpu.ppfeaturemask=0xffffffff\"" >> /etc/default/grub +else + echo "GRUB_CMDLINE_LINUX_DEFAULT=\"loglevel=3 quiet nowatchdog retbleed=off mem_sleep_default=deep nohz_full=1-"$threadsminusone"\"" >> /etc/default/grub fi grub-mkconfig -o /boot/grub/grub.cfg @@ -83,7 +85,7 @@ if [ "$cpu" == 'AuthenticAMD' ]; then else pacman -S intel-ucode --noconfirm fi -if [ "$gpu" == 'AMD' ] || [ "$gpu" == 'Advanced' ]; then +if [ "$gpu" == 'AMD' ]; then pacman -S mesa vulkan-icd-loader vulkan-radeon libva-mesa-driver libva-utils --needed --noconfirm elif [ "$gpu" == 'Intel' ]; then pacman -S mesa vulkan-icd-loader vulkan-intel --needed --noconfirm diff --git a/install.sh b/install.sh index 15135ec..c0bccea 100755 --- a/install.sh +++ b/install.sh @@ -3,7 +3,7 @@ loadkeys us echo ---------------------------------------------------------------------------------------------- echo rwinkhart\'s artix install script -echo last updated december 04, 2022 +echo last updated january 02, 2023 echo ---------------------------------------------------------------------------------------------- echo You will be asked some questions before installation. echo -e "----------------------------------------------------------------------------------------------\n" @@ -37,6 +37,9 @@ read -r -p "timezone: " timezone cpu=$(lscpu | grep 'Vendor ID:' | awk 'FNR == 1 {print $3;}') threadsminusone=$(echo "$(lscpu | grep 'CPU(s):' | awk 'FNR == 1 {print $2;}') - 1" | bc) gpu=$(lspci | grep 'VGA compatible controller:' | awk 'FNR == 1 {print $5;}') +if ! ([ "$gpu" == 'NVIDIA' ] || [ "$gpu" == 'Intel' ]); then + gpu=AMD +fi ram=$(echo "$(< /proc/meminfo)" | grep 'MemTotal:' | awk '{print $2;}'); ram=$(echo "$ram / 1000000" | bc) # stop hardware detection