From 2cbe2a6b264fd826bbe0f3e49831e35baf5cb7c7 Mon Sep 17 00:00:00 2001 From: Randall Winkhart Date: Sun, 26 Jun 2022 16:50:43 -0400 Subject: [PATCH] Added nohz_full configuration to grub --- chrootInstall.sh | 5 +++-- install.sh | 4 +++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/chrootInstall.sh b/chrootInstall.sh index 294d434..c141130 100755 --- a/chrootInstall.sh +++ b/chrootInstall.sh @@ -4,6 +4,7 @@ formfactor="$(cat /tempfiles/formfactor)" device="$(cat /tempfiles/device)" cpu="$(cat /tempfiles/cpu)" +threadsminusone="$(cat /tempfiles/threadsminusone)" gpu="$(cat /tempfiles/gpu)" intel_vaapi_driver="$(cat /tempfiles/intel_vaapi_driver)" boot="$(cat /tempfiles/boot)" @@ -35,9 +36,9 @@ 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 mem_sleep_default=deep\"" >> /etc/default/grub + echo "GRUB_CMDLINE_LINUX_DEFAULT=\"loglevel=3 quiet nowatchdog mem_sleep_default=deep nohz_full=1-"$threadsminusone"\"" >> /etc/default/grub else - echo "GRUB_CMDLINE_LINUX_DEFAULT=\"loglevel=3 quiet nowatchdog mem_sleep_default=deep nvidia-drm.modeset=1\"" >> /etc/default/grub + echo "GRUB_CMDLINE_LINUX_DEFAULT=\"loglevel=3 quiet nowatchdog mem_sleep_default=deep nohz_full=1-"$threadsminusone" nvidia-drm.modeset=1\"" >> /etc/default/grub fi grub-mkconfig -o /boot/grub/grub.cfg diff --git a/install.sh b/install.sh index 628a090..1cb69c6 100755 --- a/install.sh +++ b/install.sh @@ -1,7 +1,7 @@ #!/bin/bash loadkeys us echo ---------------------------------------------------------------------------------------------- -echo rwinkhart\'s artix installer +echo rwinkhart\'s artix install script echo last updated june 26, 2022 echo ---------------------------------------------------------------------------------------------- echo You will be asked some questions before installation. @@ -35,6 +35,7 @@ read -r -p "timezone: " timezone # start hardware detection 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;}') ram=$(echo "$(cat /proc/meminfo | grep 'MemTotal:' | awk '{print $2;}') / 1000000" | bc) # stop hardware detection @@ -172,6 +173,7 @@ mkdir /mnt/tempfiles echo "$formfactor" > /mnt/tempfiles/formfactor echo "$device" > /mnt/tempfiles/device echo "$cpu" > /mnt/tempfiles/cpu +echo "$threadsminusone" > /mnt/tempfiles/threadsminusone echo "$gpu" > /mnt/tempfiles/gpu echo "$intel_vaapi_driver" > /mnt/tempfiles/intel_vaapi_driver echo "$boot" > /mnt/tempfiles/boot