Added nohz_full configuration to grub

This commit is contained in:
2022-06-26 16:50:43 -04:00
parent c98260abbf
commit 2cbe2a6b26
2 changed files with 6 additions and 3 deletions
+3 -2
View File
@@ -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
+3 -1
View File
@@ -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