Files
battery_life/scripts/test-single-core-boost.sh
rwiegand b9e2c2a731 Add CPU power management tools and dynamic frequency scaling
- Add cpu-power-control.sh: Script for managing CPU power limits and presets
- Add monitor-cpu-freq.sh: Real-time CPU frequency monitoring tool
- Add test-single-core-boost.sh: Tool for testing single-core boost frequencies
- Add BIOS-FIX.md: Documentation for BIOS configuration fix
- Update tlp.conf: Configure dynamic CPU frequency scaling (400MHz-4.2GHz on AC, 400MHz-2.2GHz on battery)
- Add Intel RAPL power limit controls for CPU power capping
- Enable dynamic frequency scaling with proper platform profiles
- Fix CPU frequency stuck at 1.6GHz issue (required BIOS SpeedStep disable)
- Configure balanced battery mode with 2.2GHz max for responsiveness
2025-10-06 22:34:19 +02:00

29 lines
1.0 KiB
Bash
Executable File

#!/bin/bash
# Single Core Boost Test Script
# Forces maximum single-core performance to reach peak boost frequencies
echo "Testing single-core boost capability..."
echo "Current base frequency: $(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq | awk '{print $1/1000}') MHz"
# Disable cores 1-7 temporarily to force single-core boost
for cpu in {1..7}; do
echo 0 | sudo tee /sys/devices/system/cpu/cpu${cpu}/online > /dev/null 2>&1
done
echo "Cores 1-7 disabled, testing single-core boost..."
# Run intensive single-core workload
timeout 5s bash -c 'while true; do echo "scale=5000; 4*a(1)" | bc -l > /dev/null 2>&1; done' &
sleep 2
echo "Peak frequency during single-core load: $(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq | awk '{print $1/1000}') MHz"
# Re-enable all cores
for cpu in {1..7}; do
echo 1 | sudo tee /sys/devices/system/cpu/cpu${cpu}/online > /dev/null 2>&1
done
wait
echo "All cores re-enabled"
echo "Final frequency: $(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq | awk '{print $1/1000}') MHz"