Some Bits: Nelson's log

Overheating Intel NUC

My 2018 home media server (an Intel NUC7i5BNH) is failing. It crashes under load; seems to fail when I use it for something intensive (like watching video via the Plex server there). Long story short, the hardware is flaking out; limiting the CPU speed to about 90% of maximum seems to make it stable again. Detailed notes on diagnosing and fixing it below.

When it crashes it locks solid; doesn’t respond to network, doesn’t send pings out (from an in-memory process), syslog doesn’t get updated, hard drive light doesn’t blink. Nothing in the syslog, it just stops writing, nothing in the dmesg file either.

Thanks to this blog post I realized telegraf was logging temperatures even though they weren’t on the dashboard graph. So I added them. Temperatures were going up to 84°C as the CPU load went up. That seems hot, but the CPU is rated to 100°C and looking online I see folks running NUCs at CPU temperatures of 95°C or more. (All temperatures I’m talking about here are from the CPU Package sensor.)

I installed the system stress tools s-tui and stress-ng and was able to crash the system again after stressing (with s-tui defaults) for 2-3 minutes, at around 83°C. Definitely crashing under load, but am not positive it’s temperature.

Thinking it was overheating, I figured the root cause is I added a USB drive to the system and stacked it on top of the NUC. It’s not blocking any vents or anything but will impede passive cooling. So I moved the USB drive. I also took the case off the machine and blew some dust out. When that didn’t work I took the thing apart and give it a proper cleaning, although I did stop short of removing the heat sink since that’d require new thermal paste. I also updated the BIOS and set the fan settings, raising it from “quiet” to “balanced” and eventually “cool”. The fan is definitely spinning and speeding up under load.

But I was still able to crash it with s-tui after just a couple of minutes. Even after all the cleaning, and running with the case off, it still gets to 83°Cish and crashes under load. 83° isn’t that hot! So maybe it’s not actually overheating but failing under some other stress? I wish I had a second power supply to test with.

A full run of memtest86+ passes.

I tried turning off turbo boost in the BIOS; that limits the CPU to 2.2GHz and never lets it run at 3.4GHz. This seems to help; under stress temperatures max out about 57°C. System still works under load after 45 minutes. Of course I’m losing a lot of performance. I don’t think this particular NUC lets you tune overclock parameters in detail, the options are not available in the BIOS.

I got most of my speed back by using Linux’s fancy drivers for controlling CPU scaling and power usage. intel_pstate is the name of the driver, this Arch doc page is a good start as are these RedHat docs. cpupower is the recommended userspace tool but the systemd service definition isn’t available on Ubuntu.

Turns out intel_pstate has a file interface at /sys/devices/system/cpu/cpufreq/. A simple thing is just to write a max frequency to the /sys interface files.

if grep -q i5-7260U /proc/cpuinfo; then
        echo -n "(nelson) throttling CPU in /etc/rc.local for flaky Intel NUC. Max speed: "
        echo 3000000 | tee /sys/devices/system/cpu/cpufreq/policy*/scaling_max_freq
fi

The system seems to be stable at 3.2GHz, just a bit under the 3.4GHz max. At 3.1GHz I was able to stress for a full hour and the system got up to 78°C but never crashed. I set the max to 3.0GHz just to be safe.

Still wish I knew what specifically was failing. I suspect it’s only going to get worse and I should be looking for replacement hardware now. Also curious what changed. December 14 the average temperature climbed from 37°C to 48°C; that’s when I upgraded from Ubuntu 20.04 to 22.10. All sorts of stuff changed then but the only obvious thing is that there’s a new behavior where average load creeps up from 0.15 to 0.2 over the course of a month (before, 0.15 steady was typical.)

Some graphs:

Temperature and CPU during a recent crash
Temperature for the last six months
s-tui after the system crashed

Comments

I wonder consider removing the heat sink and applying fresh new thermal paste - after a few years most systems paste is dried out and mostly ineffective - this appears to be a common maintenance item for older systems from what I can tell. Something to consider 👍