DELL E4300笔记本(BackBox5/Ubuntu)CPU各频率电压调整求助
Hey there, let's walk through setting up per-frequency CPU undervolting for your Dell E4300. Since your A23 BIOS doesn't include voltage management options, we'll use Linux user-space tools to tweak voltages per CPU frequency step—this should help lower temps and extend battery life without impacting performance, as you noted.
Prerequisites
First, make sure your system has the necessary tools and kernel modules:
- Check if the
acpi-cpufreqdriver (used for frequency scaling on Core2 Duo) is loaded:
If it's missing, load it with:lsmod | grep acpi_cpufreqsudo modprobe acpi_cpufreq - Install required packages to access CPU registers and manage frequencies:
sudo apt update && sudo apt install msr-tools cpufrequtils
First: Confirm Your CPU's Frequency Steps
Your Core2 Duo P9400 has standard frequency steps, but let's verify them first:
cpufreq-info
You should see something like: 2400 MHz (max), 2133 MHz, 1866 MHz, 1600 MHz, 1333 MHz, 1066 MHz, 800 MHz (min). We'll map your desired voltages to each of these steps.
Step 1: Create a Per-Frequency Undervolt Script
We'll make a script that applies your custom voltage offset whenever the CPU switches frequency. Create a file named undervolt.sh with the following content—replace the voltage offsets in the VOLTAGE_OFFSETS array with your desired values (use negative numbers for undervolting, in millivolts):
#!/bin/bash # Map each CPU frequency (in kHz) to your desired voltage offset (in mV) declare -A VOLTAGE_OFFSETS=( [2400000]="-50" # 2.4GHz: -50mV example [2133000]="-75" # 2.133GHz: -75mV example [1866000]="-100" # 1.866GHz: -100mV example [1600000]="-125" # 1.6GHz: -125mV example [1333000]="-150" # 1.333GHz: -150mV example [1066000]="-175" # 1.066GHz: -175mV example [800000]="-200" # 0.8GHz: -200mV example ) # Get current CPU frequency CURRENT_FREQ=$(cpufreq-info -c 0 -f) # Apply the matching voltage offset if [[ -n "${VOLTAGE_OFFSETS[$CURRENT_FREQ]}" ]]; then # Convert mV to MSR units (Core2 Duo uses 1.25mV per unit) OFFSET_UNITS=$(( ${VOLTAGE_OFFSETS[$CURRENT_FREQ]} / 1.25 )) # Write to MSR register 0x199 (controls voltage offset) sudo wrmsr 0x199 $OFFSET_UNITS echo "Applied ${VOLTAGE_OFFSETS[$CURRENT_FREQ]}mV offset for $CURRENT_FREQ kHz" else echo "No offset defined for current frequency: $CURRENT_FREQ kHz" fi
Make the script executable:
chmod +x undervolt.sh
Step 2: Automate the Script on Frequency Changes
We want the script to run automatically whenever the CPU switches frequency. Here's how to set that up:
- Move the script to a system power management directory:
sudo mv undervolt.sh /etc/pm/power.d/ - Alternatively, use a
udevrule to trigger it on frequency changes. Create a file/etc/udev/rules.d/99-cpufreq-undervolt.ruleswith:SUBSYSTEM=="cpufreq", ACTION=="change", RUN+="/etc/pm/power.d/undervolt.sh"
Step 3: Test Stability and Temperatures
Always test for stability after applying undervolts—too much offset can cause crashes or freezes.
- Stress-test your CPU to check for instability:
sudo apt install stress sudo stress --cpu 2 --timeout 600 # Runs for 10 minutes - Monitor temperatures before and after with:
sensors
If you hit instability, reduce the offset for the highest frequency first, then work your way down.
Step 4: Make Changes Persist Across Reboots
The script won't stay active after a reboot unless you add it to your startup. Add this line to /etc/rc.local (before the exit 0 line):
/etc/pm/power.d/undervolt.sh
Key Notes
- Core2 Duo safe undervolt range: Most chips handle -50mV to -200mV, but this varies per CPU—start small and adjust gradually.
- BackBox 5 is based on Ubuntu 16.04, so keep your system updated to avoid compatibility issues:
sudo apt upgrade
内容的提问来源于stack exchange,提问作者pirogus

