So, my laptop has been "freeze crashing" randomly (System totally unresponsive, mouse freezed, clock not going forward, no keyboard commands have any effect, and the only way to get out of it is hard rebooting using physical power button), from anywhere to a few minutes to several hours of using my computer.
So naturally, I investigated the issue and tried to find a fix. After looking at the kernel log i saw that the last logged events before freezing is several "Hardware Errors":
kernel: mce: [Hardware Error]: Machine check events loggedSo, I search it up and try to find solutions. And I did, I found this post. Which basically tells me to add a few boot parameters. And it does fix the issue, I haven't had any more Hardware Errors logged, or any random freezes ever since. These are the boot parameters:
noapic pci=assign-busses apicmaintimer idle=poll reboot=cold,hardBut the issue is, now my laptop is idling at a way higher temperature when using these boot parameters. Around 70 degrees Celsius, instead of 35-40. Now, obviously I've checked System Monitor to see if there is anything taking up CPU usage, but there's nothing. It's using anywhere between 0 to 3% of CPU utilization on all 4 threads, nothing out of the ordinary.
And I know its the boot parameters causing this issue, because I've tried removing them, and after rebooting, fans aren't spinning as loudly and its idling at a normal temperature. But, the Hardware Errors are back, and so are the random freezes.
I am quite a novice at Linux stuff, so I literally have no idea what these boot parameters do. Can someone experienced tell me what it is they're doing, and why they're causing my CPU to idle so much hotter?
EDIT #1
So thanks to the help of matigo and Doug, I was told that the idle=poll parameter is disabling the idle system for the CPU, which obviously make the CPU run hotter and create more waste heat.
When removing that boot parameter, the Hardware Errors are back.
So, my freezes and Hardware Errors seem to have something to do with how the CPU switches between idle states.
My CPU is an Intel Core i7-7500U
This is the output from running grep . /sys/devices/system/cpu/cpu0/cpuidle/state*/name:
/sys/devices/system/cpu/cpu0/cpuidle/state0/name:POLL
/sys/devices/system/cpu/cpu0/cpuidle/state1/name:C1
/sys/devices/system/cpu/cpu0/cpuidle/state2/name:C1E
/sys/devices/system/cpu/cpu0/cpuidle/state3/name:C3
/sys/devices/system/cpu/cpu0/cpuidle/state4/name:C6
/sys/devices/system/cpu/cpu0/cpuidle/state5/name:C7s
/sys/devices/system/cpu/cpu0/cpuidle/state6/name:C8
/sys/devices/system/cpu/cpu0/cpuidle/state7/name:C9
/sys/devices/system/cpu/cpu0/cpuidle/state8/name:C10So basically what I need help with is this, to get rid of these Hardware Errors and crashes without completely disabling the CPU idle system, if possible.
51 Answer
The boot parameter idle=poll basically disables the idle system, rendering idle as no-op spin cycles. So, yes you would expect a lot more waste heat becuase the CPUs never go to sleep.
Here is an example from my test server, using turbostat:
doug@s19:~$ sudo turbostat --Summary --quiet --show Busy%,Bzy_MHz,IRQ,PkgWatt,PkgTmp,RAMWatt,GFXWatt,CorWatt --interval 15
Busy% Bzy_MHz IRQ PkgTmp PkgWatt CorWatt GFXWatt RAMWatt
0.01 938 558 36 1.34 0.68 0.00 0.89
0.02 800 455 36 1.33 0.67 0.00 0.89 <<< All idle states enabled
60.14 4799 109298 47 29.48 28.82 0.00 0.89 <<< transition sample
99.76 4800 180297 47 47.24 46.59 0.00 0.89 <<< All idle states disabled, except poll.
99.76 4800 180311 49 47.65 46.99 0.00 0.89
99.76 4800 180305 49 47.82 47.17 0.00 0.89Note: the intel_pstate CPU frequency scaling driver "sees" the CPUs as busy, but top does not:
top - 19:23:43 up 7:14, 3 users, load average: 0.00, 0.00, 0.00
Tasks: 214 total, 1 running, 213 sleeping, 0 stopped, 0 zombie
%Cpu0 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu1 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu2 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu3 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu4 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu5 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu6 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu7 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu8 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu9 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu10 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu11 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
MiB Mem : 31936.7 total, 31137.0 free, 312.3 used, 487.5 buff/cache
MiB Swap: 2048.0 total, 2048.0 free, 0.0 used. 31227.9 avail Mem 7