Repasting a Thinkpad x220
Today story is about repasting a good old Lenovo Thinkpad X220 that has been experiencing overheating issues lately.
The thinkpad X220 is a great laptop, it has been my daily driver since I bought it second-hand 4 years ago and I do not intend to upgrade anytime soon. This is basically a brick. Although it is quite light, about 1.5Kg and quite small, with its 12"5 display, it is thick as hell and its matt black design looks like it is 1982 all over again! But its very well built, has great battery life, is easily upgradable and has the best typing experience I have ever seen on a laptop. Some say that the X220 is the last laptop to carry the IBM thinkpad X identity.
Performance-wise, I can't deny that the original 2011 hardware is aging. With up to a second gen dual core I7 processor, it will not replace your build server nor allow you to play the latest games. Mine is the I5 model, but maxed out with 12Gb of RAM and an SSD it is the perfect linux machine for internet and programming.
In the first part of this article I will go over repasting and then
Taking it apart and repasting
Lately my x220 has been experiencing overheat issues especially while playing full hd videos on youtube or doing some heavy compilations. With temperature increase the fan would go crazy and start being really annoying. Have a look at those unpleasing lines printed with dmesg.
[33094.273538] CPU3: Core temperature above threshold, cpu clock throttled (total events = 7528)
[33094.273540] CPU2: Core temperature above threshold, cpu clock throttled (total events = 7528)
[33094.273542] CPU1: Package temperature above threshold, cpu clock throttled (total events = 26498)
[33094.273543] CPU0: Package temperature above threshold, cpu clock throttled (total events = 26498)
[33094.273546] CPU2: Package temperature above threshold, cpu clock throttled (total events = 26498)
[33094.273551] CPU3: Package temperature above threshold, cpu clock throttled (total events = 26498)
Basically temperatures have reached a threshold and therefore the cpu is now throttling, lowering frequency and thus reducing performances. Looking over the Internet, I noticed it is a really common issue with this laptop and that replacing the old thermal compound would generally help.
To perform this operation, you will need:
- A screwdriver, or a hammer depending on your mood
- Thermal paste obviously, I chose Noctua NT-H1 which is cheap and efficient
- Isopropyl alcohol or an adapted cleaning solvent to properly remove the previous thermal compound
- Cotton buds to carefully clean the cpu
- Patience
- Heavy metal if that is your thing
About 15 minutes later, a complete x220 on a table:
Let us focus now on the motherboard, unscrew the heatsink and have a look at the cpu.
Not looking good, but it could have been worst... A bit of isopropyl later :
Ok now time to repaste, different methods are possible, including:
- Small dot of paste in the middle of the CPU
- Thin line
- Cross
I personally choose the dot method. But the most important rule with thermal paste is "Less is more". You do not want to have exceeding conducting material where it should not be.
Time to reassemble everything and compare temperatures and performances before and after repasting.
Benchmarking temperature and performances
Before rushing into test results, here is a recap of the test system:
- CPU model: i5-2520M @ 2.50GHz / 3.20GHz turbo mode
- RAM: 12GB DDR3 1333Mhz
- SSD: Kingston mS200 mSATA 60 GB
- OS: Linux 4.15.13-1-ARCH x86_64
S-Tui
The Stress Terminal UI is a wonderful tool that allows to monitor CPU temperature, frequency, utilization and power. It has built-in options to heavily stress the processor and its multiple graphs make thermal throttling performance losses easy to spot.
Launching it with the -c option generate stats in a csv file that you can quickly parse afterward.
sudo s-tui -c
# Printing the csv stat file
cat stui_before_idle.csv
Time,Top Freq,Cur Freq,Perf Lost,Utilization,Cur Temp,Max Temp,Cur Power,Max Power,Fan
2018-04-02_21:57:40,3000 MHz,1349.0 MHz,0 %,20.0 %,51.0 C,51.0 C,7.5 W,57.0 W,3474.0 RPM
2018-04-02_21:57:41,3000 MHz,1998.0 MHz,0 %,25.0 %,51.0 C,51.0 C,7.6 W,57.0 W,3474.0 RPM
2018-04-02_21:57:42,3000 MHz,797.0 MHz,0 %,4.7 %,49.0 C,51.0 C,4.5 W,57.0 W,3471.0 RPM
2018-04-02_21:57:43,3000 MHz,797.0 MHz,0 %,0.7 %,49.0 C,51.0 C,3.4 W,57.0 W,3469.0 RPM
2018-04-02_21:57:45,3000 MHz,855.0 MHz,0 %,6.2 %,49.0 C,51.0 C,4.6 W,57.0 W,3494.0 RPM
2018-04-02_21:57:46,3000 MHz,857.0 MHz,0 %,8.5 %,48.0 C,51.0 C,5.3 W,57.0 W,3494.0 RPM
2018-04-02_21:57:47,3000 MHz,803.0 MHz,0 %,5.4 %,48.0 C,51.0 C,4.5 W,57.0 W,3494.0 RPM
.....
Let us compute now the average of these values with awk which is perfect for that task. A little trick is to use multiple field separators( ',' and space character ' ' ) to easily extract the numbers. Then we sum up the numbers of the desired column and divide the result by the number of records.
# Average load temperature when stressing with s-tui
cat stui_before_load_log.csv | awk -F '[, ]' -v N=12 '{ sum += $N } END { if (NR > 0) print sum / NR }'
93.6129
I have done two sets of measure before and after repasting:
- Idle: With s-tui Regular operation for about 300 seconds
- Load: With s-tui heavy Stress operation for about 300 seconds
Now we can insert averages in a table and compare them easily.
Temperature C | Frequency MHz | Fan Speed RPM | Perf Lost % | Power W | |
---|---|---|---|---|---|
Before Idle | 54.46 | 883.90 | 3471.59 | 0% | 4.57 |
After Idle | 53.62 | 886.25 | 3473.90 | 0% | 4.42 |
Diff. | -1.44% | +0.27% | +0.07% | 0% | -3.39% |
The idle benchmark does not show a big improvement after repasting. Temperature drop is less than 1 Celsius degree, while other values stay about the same. Let's keep in mind that CPU utilization is close to zero here.
Temperature C | Frequency MHz | Fan Speed RPM | Perf Lost % | Power W | |
---|---|---|---|---|---|
Before Load | 93.61 | 2441.09 | 4366.76 | 20.55 | 22.43 |
After Load | 83.87 | 2867.71 | 3907.71 | 2.68 | 26.17 |
Diff. | -10.84% | +14.88% | -11.75% | -766.78% | +14.30% |
Load results are much more interesting. Utilization is almost 100% here and we see an impressive 10 Celsius degree drop in average temperature! While the fan speed is greatly reduced, the CPU also throttle way less and is able to maintain a higher frequency. This results in an almost non-existent performance loss.
Ubench
This next benchmark is solely focused on performances and will be using UnixBench.
UnixBench is a benchmark suite based on the original BYTE UNIX. It is a great performance indicator of a Unix-like system, incorporating a wide range of system and graphic tests. Unixbench handles multiple CPU systems by allowing you to execute N copies of a system test simultaneously, N being the number of CPUs.
My CPU being an I5 2cores/4threads we are going to compare performances before and after repasting with 1 and 4 concurrent test executions.
# Launching the system test suite
ubench system
# Launching a few simple 2d graphical tests
ubench 2d-rects 2d-lines 2d-circle 2d-ellipse 2d-shapes 2d-blit 2d-aashapes 2d-polys 2d-text 2d-window
Here are the global results for each test suite:
Before repaste | After repaste | Diff. % | |
---|---|---|---|
System 1 exec. | 866.5 | 865.4 | -0.13% |
System 4 exec. | 1542.0 | 1634.0 | +5.96% |
2D graph. 1 exec. | 11294.7 | 11722.1 | +3.78% |
Executing the system benchmark suite on a single thread gives about the same results before and after repasting. However we notice a slight improvement while executing it in parallel as well as in the 2D graphical test. This is not a huge difference but enough to be noticeable in heavy parallel tasks.
Nevertheless we have to consider that ubench being an overall system benchmark, it is highly dependent on the operating system, libraries and drivers and does not isolate specific hardware.
Conclusion
Did I waste my time repasting the CPU? Absolutely not!
If the performance improvement is not noticeable in daily use, the laptop is much more comfortable to use. I do not experience frequent overheat issues anymore. In load system is much cooler and the fan is rarely audible.
To sum up, if you are confident in taking apart your aging laptop and have a couple hours to spend I highly recommend you do this operation.