X300 getting stuck on lowest frequency

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

X300 getting stuck on lowest frequency

Mark Rosenstand
Hello list,

My favorite ThinkPad is getting stuck on 800 MHz every couple of days, requiring a reboot to reset.
I don't believe it's a new issue, but with applications getting heavier and heavier, it is now barely
usable when running at that frequency. (Thank you, GNOME 3.)

In the BIOS the scaling modes are set to automatic for both AC and battery. I've tried to set
it to "Maximum performance" for AC, but it doesn't seem to make a difference. Disabling
SpeedStep altogether seems to be the only option to avoid the problem, but that of course
affects the temperature, which makes my already-aggressively-configured thinkfan(1) jump from
level 1 to 2 -- which on this model means ~5200 RPM instead of ~2000 RPM.

The OS (Debian testing) uses the ondemand governor. When the machine is stuck,
/sys/bus/cpu/devices/cpu{0,1}/cpufreq/scaling_max_freq shows 800000, so I'm pretty sure this
is a BIOS/firmware issue. The BIOS installed is the latest available (1.10).

The laptop is primarily used on AC. I open and close the lid (suspend) a couple of times a day.
Occasionally, I unplug it from AC and use it on battery. I have no idea which of the two triggers
this behaviour from the BIOS, but the machine is having the issue as I type this, and IIRC it
hasn't been unplugged from AC since last boot.

I also have a T410s and a X220, none of which seem to behave this way, but as the X300 is still
my preferred Thinkpad, I don't use them that much.

Has anyone else tried or heard of this? Ideas?
Reply | Threaded
Open this post in threaded view
|

Re: X300 getting stuck on lowest frequency

Stefan Monnier
>>>>> "Mark" == Mark Rosenstand <[hidden email]> writes:
> My favorite ThinkPad is getting stuck on 800 MHz every couple of days,
> requiring a reboot to reset.
[...]
> The OS (Debian testing) uses the ondemand governor.  When the machine
> is stuck, /sys/bus/cpu/devices/cpu{0,1}/cpufreq/scaling_max_freq shows
> 800000, so I'm pretty sure this is a BIOS/firmware issue.  The BIOS
> installed is the latest available (1.10).

AFAIK the /sys/bus/cpu/devices/cpu{0,1}/cpufreq/scaling_max_freq can
never be modified after boot by the BIOS.

OTOH you should be able to do:

  echo 1200000 >/sys/bus/cpu/devices/cpu0/cpufreq/scaling_max_freq

So the more likely problem is that some script/program somewhere
modifies your scaling_max_freq.


        Stefan

--
The linux-thinkpad mailing list home page is at:
http://mailman.linux-thinkpad.org/mailman/listinfo/linux-thinkpad
Reply | Threaded
Open this post in threaded view
|

Re: X300 getting stuck on lowest frequency

Mark Rosenstand
On Mon, Nov 17, 2014 at 3:52 AM, Stefan Monnier <[hidden email]> wrote:
>>>>> "Mark" == Mark Rosenstand <[hidden email]> writes:
> My favorite ThinkPad is getting stuck on 800 MHz every couple of days,
> requiring a reboot to reset.
[...]
> The OS (Debian testing) uses the ondemand governor.  When the machine
> is stuck, /sys/bus/cpu/devices/cpu{0,1}/cpufreq/scaling_max_freq shows
> 800000, so I'm pretty sure this is a BIOS/firmware issue.  The BIOS
> installed is the latest available (1.10).

AFAIK the /sys/bus/cpu/devices/cpu{0,1}/cpufreq/scaling_max_freq can
never be modified after boot by the BIOS.

OTOH you should be able to do:

  echo 1200000 >/sys/bus/cpu/devices/cpu0/cpufreq/scaling_max_freq

So the more likely problem is that some script/program somewhere
modifies your scaling_max_freq.
 
It just hit the bug again, and I can confirm that changing scaling_max_freq is not possible.
The system has definitely not been unplugged since last reboot, so it must be related
to suspend.

root@kodachi:~# cat /sys/bus/cpu/devices/cpu0/cpufreq/scaling_available_frequencies
1201000 1200000 800000 
root@kodachi:~# cat /sys/bus/cpu/devices/cpu0/cpufreq/scaling_max_freq
800000
root@kodachi:~# echo 1201000 >/sys/bus/cpu/devices/cpu0/cpufreq/scaling_max_freq
root@kodachi:~# cat /sys/bus/cpu/devices/cpu0/cpufreq/scaling_max_freq
800000

Also, cpufreq-info output:

root@kodachi:~# cpufreq-info
cpufrequtils 008: cpufreq-info (C) Dominik Brodowski 2004-2009
Report errors and bugs to [hidden email], please.
analyzing CPU 0:
  driver: acpi-cpufreq
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency: 10.0 us.
  hardware limits: 800 MHz - 1.20 GHz
  available frequency steps: 1.20 GHz, 1.20 GHz, 800 MHz
  available cpufreq governors: userspace, powersave, conservative, ondemand, performance
  current policy: frequency should be within 800 MHz and 800 MHz.
                  The governor "ondemand" may decide which speed to use
                  within this range.
  current CPU frequency is 800 MHz (asserted by call to hardware).
  cpufreq stats: 1.20 GHz:3.06%, 1.20 GHz:1.77%, 800 MHz:95.17%  (5871)
analyzing CPU 1:
  driver: acpi-cpufreq
  CPUs which run at the same hardware frequency: 1
  CPUs which need to have their frequency coordinated by software: 1
  maximum transition latency: 10.0 us.
  hardware limits: 800 MHz - 1.20 GHz
  available frequency steps: 1.20 GHz, 1.20 GHz, 800 MHz
  available cpufreq governors: userspace, powersave, conservative, ondemand, performance
  current policy: frequency should be within 800 MHz and 800 MHz.
                  The governor "ondemand" may decide which speed to use
                  within this range.
  current CPU frequency is 800 MHz (asserted by call to hardware).
  cpufreq stats: 1.20 GHz:3.33%, 1.20 GHz:1.51%, 800 MHz:95.16%  (6589)

Switching to the performance governor also keeps it at lowest frequency, so I am pretty confident
that this is a firmware bug. /sys/bus/cpu/devices/cpu0/cpufreq/bios_limit says 800000 as well.

Any clues?
Reply | Threaded
Open this post in threaded view
|

Re: X300 getting stuck on lowest frequency

Alexandre Kalmeijer
In reply to this post by Mark Rosenstand
I had this issue when I ran my X220 only on AC,
the thing is that when no battery is present the bios will lock frequency. 

If this is not the case for then I would suggest downloading tlp and trying to set freq manually. gl

On Sat, Nov 15, 2014 at 10:13 AM, Mark Rosenstand <[hidden email]> wrote:
Hello list,

My favorite ThinkPad is getting stuck on 800 MHz every couple of days, requiring a reboot to reset.
I don't believe it's a new issue, but with applications getting heavier and heavier, it is now barely
usable when running at that frequency. (Thank you, GNOME 3.)

In the BIOS the scaling modes are set to automatic for both AC and battery. I've tried to set
it to "Maximum performance" for AC, but it doesn't seem to make a difference. Disabling
SpeedStep altogether seems to be the only option to avoid the problem, but that of course
affects the temperature, which makes my already-aggressively-configured thinkfan(1) jump from
level 1 to 2 -- which on this model means ~5200 RPM instead of ~2000 RPM.

The OS (Debian testing) uses the ondemand governor. When the machine is stuck,
/sys/bus/cpu/devices/cpu{0,1}/cpufreq/scaling_max_freq shows 800000, so I'm pretty sure this
is a BIOS/firmware issue. The BIOS installed is the latest available (1.10).

The laptop is primarily used on AC. I open and close the lid (suspend) a couple of times a day.
Occasionally, I unplug it from AC and use it on battery. I have no idea which of the two triggers
this behaviour from the BIOS, but the machine is having the issue as I type this, and IIRC it
hasn't been unplugged from AC since last boot.

I also have a T410s and a X220, none of which seem to behave this way, but as the X300 is still
my preferred Thinkpad, I don't use them that much.

Has anyone else tried or heard of this? Ideas?

Reply | Threaded
Open this post in threaded view
|

Re: X300 getting stuck on lowest frequency

Mark Rosenstand
On Fri, Nov 21, 2014 at 5:54 PM, Alexandre Kalmeijer <[hidden email]> wrote:
I had this issue when I ran my X220 only on AC,
the thing is that when no battery is present the bios will lock frequency. 

If this is not the case for then I would suggest downloading tlp and trying to set freq manually. gl

The battery is present at all times, and unplugging/re-plugging doesn't make any difference.
However it does seem to be the BIOS limiting the frequency. If I set
/sys/module/processor/parameters/ignore_ppc to 1, I can successfully set
scaling_max_freq to 1200 MHz while bios_limit is still at 800 MHz.
I suppose this is a bad workaround and unsafe. Any other ideas what could
trigger the BIOS to limit the frequency? The temperature is around 55C at idle,
but never reach 65C thanks to fan regulation.

Thank you for your help :-)
Reply | Threaded
Open this post in threaded view
|

Re: X300 getting stuck on lowest frequency

Henrique de Moraes Holschuh-2
On Fri, 21 Nov 2014, Mark Rosenstand wrote:
> I suppose this is a bad workaround and unsafe. Any other ideas what could
> trigger the BIOS to limit the frequency? The temperature is around 55C at
> idle,

The power adapter check logic, if it misbehaves.  It has a limiter when you
don't use one that is powerful enough for worst case power drain.

--
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh
--
The linux-thinkpad mailing list home page is at:
http://mailman.linux-thinkpad.org/mailman/listinfo/linux-thinkpad