X61 CPU clock limiter on 65w charger w/o batt, and Linux loophole?
Posted: Sat Mar 11, 2017 4:54 am
Certain Thinkpad models (including the X61) have a BIOS quirk that limits the CPU clock speed to 1.2GHz when running the laptop on a 65w AC adapter without a battery installed.
In Linux, this shows up as /sys/devices/system/cpu/cpuN/cpufreq/bios_limit. Note that the N is the CPU core # minus 1, so for a dual-core processor, there would be two, like this:
/sys/devices/system/cpu/cpu0/cpufreq/bios_limit
/sys/devices/system/cpu/cpu1/cpufreq/bios_limit
We do know the reason for this-- it's a protection mechanism in order to prevent drawing more current than the 65w adapter can supply.
However, I encountered a bug, or perhaps a loophole.
If I start the laptop with both charger and battery plugged in, put the system on standby, then remove the battery, the
bios_limit file does not appear (or is not generated) when I resume from suspend.
This allows me to run my X61 at full speed on AC even without the battery. I ran a few 7z benchmarks to confirm its performance.
on AC, without battery at boot --> 1877 MIPs
on AC, with battery installed --> 3522 MIPs
on AC, battery removed during suspend --> 3522 MIPs
I'm running Debian 8 64-bit on an X61 with a Core 2 Duo T7500 processor and 2GB RAM. I have TLP installed, and the processor is undervolted.
I don't know if this is reproducible in other Thinkpads and other Linux distributions. Just reporting my discovery and findings.
In Linux, this shows up as /sys/devices/system/cpu/cpuN/cpufreq/bios_limit. Note that the N is the CPU core # minus 1, so for a dual-core processor, there would be two, like this:
/sys/devices/system/cpu/cpu0/cpufreq/bios_limit
/sys/devices/system/cpu/cpu1/cpufreq/bios_limit
We do know the reason for this-- it's a protection mechanism in order to prevent drawing more current than the 65w adapter can supply.
However, I encountered a bug, or perhaps a loophole.
If I start the laptop with both charger and battery plugged in, put the system on standby, then remove the battery, the
bios_limit file does not appear (or is not generated) when I resume from suspend.
This allows me to run my X61 at full speed on AC even without the battery. I ran a few 7z benchmarks to confirm its performance.
on AC, without battery at boot --> 1877 MIPs
on AC, with battery installed --> 3522 MIPs
on AC, battery removed during suspend --> 3522 MIPs
I'm running Debian 8 64-bit on an X61 with a Core 2 Duo T7500 processor and 2GB RAM. I have TLP installed, and the processor is undervolted.
I don't know if this is reproducible in other Thinkpads and other Linux distributions. Just reporting my discovery and findings.