[ltp] Re: X300 getting stuck on lowest frequency

Mark Rosenstand linux-thinkpad@linux-thinkpad.org
Fri, 21 Nov 2014 13:53:26 +0100


--001a113338a84d8d9705085deec7
Content-Type: text/plain; charset=UTF-8

On Mon, Nov 17, 2014 at 3:52 AM, Stefan Monnier <monnier@iro.umontreal.ca>
wrote:

> >>>>> "Mark" == Mark Rosenstand <rosenstand@gmail.com> 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 cpufreq@vger.kernel.org, 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?

--001a113338a84d8d9705085deec7
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote">On M=
on, Nov 17, 2014 at 3:52 AM, Stefan Monnier <span dir=3D"ltr">&lt;<a href=
=3D"mailto:monnier@iro.umontreal.ca" target=3D"_blank">monnier@iro.umontrea=
l.ca</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"ma=
rgin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,=
204);border-left-style:solid;padding-left:1ex"><span class=3D"">&gt;&gt;&gt=
;&gt;&gt; &quot;Mark&quot; =3D=3D Mark Rosenstand &lt;<a href=3D"mailto:ros=
enstand@gmail.com">rosenstand@gmail.com</a>&gt; writes:<br>
&gt; My favorite ThinkPad is getting stuck on 800 MHz every couple of days,=
<br>
&gt; requiring a reboot to reset.<br>
</span>[...]<br>
<span class=3D"">&gt; The OS (Debian testing) uses the ondemand governor.=
=C2=A0 When the machine<br>
&gt; is stuck, /sys/bus/cpu/devices/cpu{0,1}/cpufreq/scaling_max_freq shows=
<br>
&gt; 800000, so I&#39;m pretty sure this is a BIOS/firmware issue.=C2=A0 Th=
e BIOS<br>
&gt; installed is the latest available (1.10).<br>
<br>
</span>AFAIK the /sys/bus/cpu/devices/cpu{0,1}/cpufreq/scaling_max_freq can=
<br>
never be modified after boot by the BIOS.<br>
<br>
OTOH you should be able to do:<br>
<br>
=C2=A0 echo 1200000 &gt;/sys/bus/cpu/devices/cpu0/cpufreq/scaling_max_freq<=
br>
<br>
So the more likely problem is that some script/program somewhere<br>
modifies your scaling_max_freq.<br></blockquote><div>=C2=A0</div><div>It ju=
st hit the bug again, and I can confirm that changing scaling_max_freq is n=
ot possible.</div><div>The system has definitely not been unplugged since l=
ast reboot, so it must be related</div><div>to suspend.</div><div><br></div=
><div><div>root@kodachi:~# cat /sys/bus/cpu/devices/cpu0/cpufreq/scaling_av=
ailable_frequencies</div><div>1201000 1200000 800000=C2=A0</div><div>root@k=
odachi:~# cat /sys/bus/cpu/devices/cpu0/cpufreq/scaling_max_freq</div><div>=
800000</div><div>root@kodachi:~# echo 1201000 &gt;/sys/bus/cpu/devices/cpu0=
/cpufreq/scaling_max_freq</div><div>root@kodachi:~# cat /sys/bus/cpu/device=
s/cpu0/cpufreq/scaling_max_freq</div><div>800000</div></div><div><br></div>=
<div>Also, cpufreq-info output:</div><div><br></div><div><div>root@kodachi:=
~# cpufreq-info</div><div>cpufrequtils 008: cpufreq-info (C) Dominik Brodow=
ski 2004-2009</div><div>Report errors and bugs to <a href=3D"mailto:cpufreq=
@vger.kernel.org">cpufreq@vger.kernel.org</a>, please.</div><div>analyzing =
CPU 0:</div><div>=C2=A0 driver: acpi-cpufreq</div><div>=C2=A0 CPUs which ru=
n at the same hardware frequency: 0</div><div>=C2=A0 CPUs which need to hav=
e their frequency coordinated by software: 0</div><div>=C2=A0 maximum trans=
ition latency: 10.0 us.</div><div>=C2=A0 hardware limits: 800 MHz - 1.20 GH=
z</div><div>=C2=A0 available frequency steps: 1.20 GHz, 1.20 GHz, 800 MHz</=
div><div>=C2=A0 available cpufreq governors: userspace, powersave, conserva=
tive, ondemand, performance</div><div>=C2=A0 current policy: frequency shou=
ld be within 800 MHz and 800 MHz.</div><div>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 The governor &quot;ondemand&quot; may decid=
e which speed to use</div><div>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 within this range.</div><div>=C2=A0 current CPU freque=
ncy is 800 MHz (asserted by call to hardware).</div><div>=C2=A0 cpufreq sta=
ts: 1.20 GHz:3.06%, 1.20 GHz:1.77%, 800 MHz:95.17% =C2=A0(5871)</div><div>a=
nalyzing CPU 1:</div><div>=C2=A0 driver: acpi-cpufreq</div><div>=C2=A0 CPUs=
 which run at the same hardware frequency: 1</div><div>=C2=A0 CPUs which ne=
ed to have their frequency coordinated by software: 1</div><div>=C2=A0 maxi=
mum transition latency: 10.0 us.</div><div>=C2=A0 hardware limits: 800 MHz =
- 1.20 GHz</div><div>=C2=A0 available frequency steps: 1.20 GHz, 1.20 GHz, =
800 MHz</div><div>=C2=A0 available cpufreq governors: userspace, powersave,=
 conservative, ondemand, performance</div><div>=C2=A0 current policy: frequ=
ency should be within 800 MHz and 800 MHz.</div><div>=C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 The governor &quot;ondemand&quot;=
 may decide which speed to use</div><div>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
 =C2=A0 =C2=A0 =C2=A0 =C2=A0 within this range.</div><div>=C2=A0 current CP=
U frequency is 800 MHz (asserted by call to hardware).</div><div>=C2=A0 cpu=
freq stats: 1.20 GHz:3.33%, 1.20 GHz:1.51%, 800 MHz:95.16% =C2=A0(6589)</di=
v></div><div><br></div><div>Switching to the performance governor also keep=
s it at lowest frequency, so I am pretty confident</div><div>that this is a=
 firmware bug.=C2=A0/sys/bus/cpu/devices/cpu0/cpufreq/bios_limit says 80000=
0 as well.</div><div><br></div><div>Any clues?</div></div></div></div>

--001a113338a84d8d9705085deec7--