I recently switched to using an LG Gram laptop. Current Linux kernels have a bug with this series of laptops, which cause the CPU load to spike when a USB-C device is attached, which includes the power supply. The CPU load spike in turn overheats the CPU, maxes out the fan, and reduces battery life. Apparently a fix is expected from the mainline kernel soon, but in the meantime, I needed a way of mitigating it.
The answer is to disable Intel's Turbo Boost technology. This is enabled by default in Ubuntu. When it's disabled, although the kernel bug is still present and CPU runs at much higher load than it should, at least it doesn't overheat or run the fan constantly.
To temporarily disable Turbo Boost, simply run
sudo -E bash echo 1 > /sys/devices/system/cpu/intel_pstate/no_turbo
Unfortunately this change doesn't persist across reboots, and unlike changes in /proc
, it can't easily be managed with sysctl
or sysctl.conf
either. However, it can be managed using SystemD. Simply create the file /etc/tmpfiles.d/noturbo.conf
(as root) and put in the following contents:
# Path Mode UID GID Age Argument w /sys/devices/system/cpu/intel_pstate/no_turbo - - - - 1
Turbo Boost should then remain turned off even after you reboot.
References:
- https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1987829?comments=all
- https://www.tautvidas.com/blog/2011/04/disabling-intel-turbo-boost/
- https://www.reddit.com/r/linuxquestions/comments/m4xnts/disable_intel_turbo_patch_in_sysdevicessystemcpu/
- https://wiki.archlinux.org/title/Systemd#Temporary_files
Thank you, it worked very well on a Lenovo Legion Y520 with Ubuntu 22.04.3, when playing some games the laptop overheat, since disabled TurboBoost no longer get that high temps