I have a Thinkpad T430 with an i7-3520M CPU. This is rated to run at 2.90GHz, but it can boost up to 3.5GHz.
Previously I would use Windows 10. It is an old laptop, and CPU temperatures can get quite high, but on Windows it would never heat up to the point where it would shut off on me. It would instead stop boosting and lower the clock speed to compensate for the high heat, if I remember correctly. When the laptop is docked, due to the less ideal cooling setup it would heat up faster, but it would still not overheat on Windows 10.
When I'm using Kubuntu 24.04 (kernel 6.8.0-51), I noticed that the CPU can reach very high temperatures of around 95C during high CPU usage. The clock rate also seems to be constantly boosting to 3.5GHz, despite the high temperatures. At high temperatures, I noticed in top that there are some processes called "idle_inject" that have a high CPU usage. After googling those, it seems that the kernel uses these processes to inject idle wait states to force the CPU to idle to cool down, if I understand correctly. However, it doesnt seem like it's doing anything to help, and the CPU clock stays at 3.5GHz.
On prolonged workloads, the laptop would eventually force shutdown. I feel that this isn't normal behaviour and there is something wrong with the way the kernel is managing the CPU frequency. What can I do?
Note: I realize that I could do hardware fixes like cleaning/replacing the fan, replacing the thermal paste, etc. But the fact is that the CPU is boosting when it shouldn't be, and I believe this is controlled in software, and didn't happen on Windows. So there should be a way to fix it.
EDIT: Here are some thermald logs
Dec 30 09:08:47 the9a3eedi-linux thermald[1475]: 13 CPUID levels; family:model:stepping 0x6:3a:9 (6:58:9)
Dec 30 09:08:47 the9a3eedi-linux thermald[1475]: 13 CPUID levels; family:model:stepping 0x6:3a:9 (6:58:9)
Dec 30 09:08:49 the9a3eedi-linux thermald[1475]: sensor id 4 : No temp sysfs for reading raw temp
Dec 30 09:08:49 the9a3eedi-linux thermald[1475]: sensor id 4 : No temp sysfs for reading raw temp
Dec 30 09:08:49 the9a3eedi-linux thermald[1475]: sensor id 4 : No temp sysfs for reading raw temp
Dec 30 09:08:49 the9a3eedi-linux thermald[1475]: Config file /etc/thermald/thermal-conf.xml does not exist
Dec 30 09:08:49 the9a3eedi-linux thermald[1475]: Config file /etc/thermald/thermal-conf.xml does not exist
Dec 30 09:08:49 the9a3eedi-linux thermald[1475]: Config file /etc/thermald/thermal-conf.xml does not exist
Dec 30 09:08:49 the9a3eedi-linux thermald[1475]: Polling mode is enabled: 4
Dec 30 09:08:49 the9a3eedi-linux systemd[1]: Started thermald.service - Thermal Daemon Service.