mirror of
https://github.com/rwinkhart/artix-install-script.git
synced 2026-08-28 04:46:27 -04:00
Added nohz_full configuration to grub
This commit is contained in:
+3
-2
@@ -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
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user