fix: Use balanced-no-pstate profile on CPUs that don't support a pstate governor.

This commit is contained in:
Kyle Gospodnetich 2024-04-09 10:56:43 -07:00
parent fcea16bddc
commit 5e04d6b731
2 changed files with 10 additions and 1 deletions

View File

@ -1,6 +1,6 @@
[Unit] [Unit]
Description=Configure Bazzite for current hardware Description=Configure Bazzite for current hardware
After=rpm-ostreed.service After=rpm-ostreed.service tuned.service
Before=systemd-user-sessions.service jupiter-biosupdate.service jupiter-controller-update.service Before=systemd-user-sessions.service jupiter-biosupdate.service jupiter-controller-update.service
[Service] [Service]

View File

@ -246,6 +246,15 @@ else
echo "No minimum-free ZRAM changes needed" echo "No minimum-free ZRAM changes needed"
fi fi
# NO-PSTATE FIX
if grep -q "acpi-cpufreq" <<< "$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_driver)"; then
sed -i 's/balanced=balanced/balanced=balanced-no-pstate/g' /etc/tuned/ppd.conf
tuned-adm profile balanced-no-pstate
else
sed -i 's/balanced=balanced-no-pstate/balanced=balanced/g' /etc/tuned/ppd.conf
tuned-adm profile balanced
fi
# HOSTNAME FIX # HOSTNAME FIX
# If the hostname is too long Distrobox will fail during setup # If the hostname is too long Distrobox will fail during setup
# Let's check the length and reset it to something sensible if that happens. # Let's check the length and reset it to something sensible if that happens.