Commit bab1a3819172
Changed files (1)
imperative
kyushu
imperative/kyushu/bootstrap.sh
@@ -378,16 +378,26 @@ setup_power() {
log_info "powertop service already exists"
fi
- # Set tuned profile for battery life
+ # Configure tuned-ppd for dev performance:
+ # AC → latency-performance (max speed), battery → powersave
if command -v tuned-adm &>/dev/null; then
- local current
- current=$(tuned-adm active 2>/dev/null | sed 's/.*: //')
- if [[ "$current" != "balanced-battery" ]]; then
- log_info "Setting tuned profile to balanced-battery (was: $current)..."
- sudo tuned-adm profile balanced-battery
- else
- log_info "tuned profile already balanced-battery"
- fi
+ log_info "Configuring tuned-ppd for dev performance..."
+ sudo tee /etc/tuned/ppd.conf >/dev/null <<-'EOF'
+ [main]
+ default=performance
+ battery_detection=true
+ sysfs_acpi_monitor=true
+
+ [profiles]
+ power-saver=powersave
+ balanced=balanced
+ performance=latency-performance
+
+ [battery]
+ performance=powersave
+ EOF
+ sudo systemctl restart tuned
+ log_info "tuned-ppd configured: AC→latency-performance, battery→powersave"
fi
}