My BIOS is Limiting My CPU Clock Speed!

| Comments

I’ve been playing quite a bit of Killing Floor the last few weeks on my aging HP DV8T laptop. The other night, I noticed that the frame rate was just horrible on a couple of maps. I adjusted all the quality settings just about as low as they would go, and I turned down the resolution quite a bit. The frame rate just didn’t improve at all.

So, I decided to investigate. The first thing I did was open up i7z to see if my Core i7 720QM processor’s turbo boost feature was being properly utilized. Many kernel upgrades in the past, I used to have a weird performance issue with Team Fortress 2 under Wine. If I left everything alone, i7z would show all four cores being active at around 1.7 GHz. If I manually disabled two or three cores in the kernel, the processor would run at 2.4 or 2.8 GHz and Team Fortress 2 would run much better.

This was a kludge that helped work around a deficiency in Linux’s process scheduler. I didn’t use this hack for long, and I didn’t really expect to need it today. What I actually found was more interesting, and much more disappointing.

i7z with BIOS limiting the clock rate

As you can see from the screenshot, my processor was stuck at about 1.4 GHz! I poked around quite a bit, trying to figure out what was going on. I tried echoing 1600000 into /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq, but it just wouldn’t go over 1466000.

It didn’t take long for me to notice the bios_limit file in the cpufreq directory:

/sys/devices/system/cpu/cpu0/cpufreq/bios_limit at 1466000

The BIOS is limiting me to 1.4 GHz, but why is it doing that? It seems that the BIOS doesn’t think my aftermarket power supply is doing a good enough job. Interestingly enough, if I unplug the power cable, it goes right back up to full speed while running on battery power.

You can force the kernel to ignore the warning from the BIOS by writing a 1 to /sys/module/processor/parameters/ignore_ppc. I figured this would be a safe work-around, since the laptop can run at full speed on battery power anyway. If I were having a thermal issue instead, this might not be safe for the hardware.

i7z and openssl benchmark running correctly

Killing Floor is running much better now at 2.4 to 2.8 GHz!

How did I fix it?

I added these lines to my /etc/rc.local file:

echo 1 > /sys/module/processor/parameters/ignore_ppc

for x in /sys/devices/system/cpu/cpu[0-7]/cpufreq/;do 
  echo 1600000 > $x/scaling_max_freq
done

Did the power supply go bad? What caused it to begin failing?

My father had to have back surgery last month, so I flew up and I’ve been staying here in my parents’ 110-year-old house while he recovers. I am writing this article in my childhood bedroom while sitting at the desk that was originally home to our Laser 128, a most excellent Apple IIc compatible computer.

The only source of light in this room is a lamp with a CFL bulb. The bulb was flickering quite a bit, so I replaced it. The replacement was also flickering by the next day.

My laptop is plugged into the same outlet, and if you listen carefully, you can actually hear its power brick clicking. The clicks of the power supply and the flicker of the light are in sync. I wouldn’t be surprised if there is some sort of problem with the power coming out of this outlet.

I borrowed a friend’s Kill A Watt power meter to see if it would give me any insights. The only thing even remotely odd is that it is reading 127.1 volts. That’s higher than any outlet that I’ve plugged my own Kill A Watt into. The Internet seems to think that is an acceptable number, but my parents sure do seem to wear out electronics faster than anyone else I know.

Comments