[sf-lug] Overheating and CPU throttling

Akkana Peck akkana at shallowsky.com
Sat Jan 12 11:49:44 PST 2019


My Thinkpad X201 laptop has developed an overheating problem.
Randomly, when I'm doing something lengthy and CPU intensive
like building Firefox, it will shut down without warning. Afterward,
I have messages like this in /var/log/kern.log:
thermal_zone0: critical temperature reached (100 C), shutting down

I've found lots of pages with people with similar problems,
getting lots of responses like "Any modern Linux computer should
automatically throttle its CPU when temperatures get high". No one
explains how this automatic throttling is supposed to happen, or how
to enable it if it's not happening, or what "modern" means (is it
the CPU that needs to be modern? The BIOS? The kernel? How modern?)

What I'd really like is a daemon or kernel setting that monitors
the temperature and, if it exceeds max (well before it reaches
critical), scales down the CPU frequency, or kills or (preferably)
suspends whatever process is running away with the CPU, or suspends
the machine rather than shutting down. I have started down the path
of writing such a daemon, but it's complicated by not wanting to
suspend certain processes like X even if their CPU usage looks high
due to some other app. And it's hard to believe Linux doesn't
already offer a solution to this problem.

More system details:

This X201 has been my main workhorse for 5+ years and never had
temperature problems until a few weeks ago. I have opened it
and don't see any dust bunnies around the fan.

Processor is a quad-core Intel(R) Core(TM) i5 CPU M 540 @ 2.53GH.
Distro is Debian Testing. Kernel was 4.18.0-2-amd64, which I was
stuck on because of a modeset bug in 4.18.0-3, but it looks like
4.19.0-1 has fixed it so now I've upgraded.

/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor is
"ondemand", if that matters; though it doesn't seem from
https://www.kernel.org/doc/Documentation/cpu-freq/governors.txt
like any of the governors look at temperature at all.

Any suggestions? Any good articles I could read on how this
scaling/governor/thermal/cpufreq stuff is supposed to work?

        ...Akkana



More information about the sf-lug mailing list