1. Seeing your CPU frequency in real time
  2. Changing to acpi-cpufreq CPU management driver
    1. Disable intel-pstate in grub config
  3. Option 1 - cpufrequtils tool family
    1. Adding a nice drop-down menu to choose your CPU frequency in GNOME 3
  4. Option 2 - Install tlp and tlpui
    1. Default /etc/default/tlp file
  5. Other nice tools

After upgrading my T420 with a 1440p panel, I noticed some lag in the user interface. On top of that, once the CPU heats up above a certain level, it will be slow until you restart the computer for some reason. This seems to be around 80ºC, which is very normal if you upgrade your Lenovo T420 to a crazy-hot Quad-Core i7 Extreme CPU like I did.

I believe that the CPU is heating up more after the panel upgrade, perhaps due to additional strain on the iGPU (Intel HD Graphics 3000). Thus, I decided to search for a solution involving better power management in Ubuntu, especially to avoid the lag after any heating up of the processor. My goal is for it to become fast again after the temperature comes back down.

Seeing your CPU frequency in real time

First, you need a way to see your actual CPU speed to see if any of these changes work.

1
watch grep \"cpu MHz\" /proc/cpuinfo

Changing to acpi-cpufreq CPU management driver

1
2
sudo apt-get update
sudo apt-get install acpi-support acpid acpi

The idea here is to replace the intel-pstate CPU power management driver with the acpi-cpufreq one. This allows for better performance and slightly more efficient power use in some cases, as shown here.

Disable intel-pstate in grub config

To disable the default intel-pstate driver, you need to edit /etc/default/grub:

1
2
# also hides the splash screen for people like me that like to see log messages on boot instead of a progress bar.
GRUB_CMDLINE_LINUX_DEFAULT="i8042.reset quiet nosplash debug intel_pstate=disable"

After making our edits, we need to refresh grub:

1
sudo update-grub

Option 1 - cpufrequtils tool family

1
2
3
4
5
sudo apt-get install cpufreqd cpufrequtils indicator-cpufreq
sudo apt-get install -y linux-tools-$(uname -r)

# GUI for editing cpu power configs
sudo apt-get install cpupower-gui

Adding a nice drop-down menu to choose your CPU frequency in GNOME 3

Indicator-cpufreq in Gnome Menu Indicator-cpufreq in Gnome Menu

Add the following to add to startup applications to have a nice dropdown menu to choose your CPU governor easily. I use the ‘ondemand’ governor.

Adding indicator-cpufreq to top bar Adding indicator-cpufreq to top bar

Adding indicator-cpufreq to top bar - part 2 Adding indicator-cpufreq to top bar

1
2
# The command in text
indicator-cpufreq &

Option 2 - Install tlp and tlpui

Alternatively, you can install tlp and tlpui to have this nice GUI to tweak your CPU’s power configuration and many other things to your heart’s content.

TLPUI interface TLPUI interface

1
2
3
sudo add-apt-repository ppa:linuxuprising/apps
sudo apt update
sudo apt install tlp tlpui

Default /etc/default/tlp file

Here is a default configuration file of the tlp utility, in case your /etc/default/tlp goes Missing In Action…

Other nice tools

  • s-tui allows you to monitor frequencies in load using the CLI, with a nice interface.
  • throttled allows you to suppress thermal throttling if needed.