Intel boost state(Turbo) switches to not supported randomly and when playing some games

System:
  Kernel: 5.9.16-1-MANJARO x86_64 bits: 64 compiler: gcc v: 10.2.1 
  parameters: BOOT_IMAGE=/boot/vmlinuz-5.9-x86_64 
  root=UUID=36acd397-6da9-481f-96e8-45691fae1332 ro quiet apparmor=1 
  security=apparmor udev.log_priority=3 
  Desktop: Xfce 4.16.0 tk: Gtk 3.24.24 info: xfce4-panel wm: xfwm4 
  dm: LightDM 1.30.0 Distro: Manjaro Linux 
Machine:
  Type: Laptop System: LENOVO product: 81LK v: IdeaPad L340-15IRH Gaming 
  serial: <filter> Chassis: type: 10 v: IdeaPad L340-15IRH Gaming 
  serial: <filter> 
  Mobo: LENOVO model: LNVNB161216 v: NO DPK serial: <filter> UEFI: LENOVO 
  v: BGCN33WW date: 11/24/2020 
CPU:
  Info: Quad Core model: Intel Core i5-9300H bits: 64 type: MT MCP 
Graphics:
  Device-1: Intel UHD Graphics 630 vendor: Lenovo driver: i915 v: kernel 
  bus ID: 00:02.0 chip ID: 8086:3e9b class ID: 0300 
  Device-2: NVIDIA TU117M [GeForce GTX 1650 Mobile / Max-Q] vendor: Lenovo 
  driver: nvidia v: 460.39 alternate: nouveau,nvidia_drm bus ID: 01:00.0 
  chip ID: 10de:1f91 class ID: 0300 
  Device-3: Lite-On Integrated Camera type: USB driver: uvcvideo bus ID: 1-8:3 
  chip ID: 04ca:7070 class ID: 0e02 
  Display: x11 server: X.Org 1.20.10 driver: loaded: modesetting,nvidia 
  display ID: :0.0 screens: 1 
  Screen-1: 0 s-res: 3840x1080 s-dpi: 96 s-size: 1016x286mm (40.0x11.3") 
  s-diag: 1055mm (41.6") 
  Monitor-1: HDMI-0 res: 1920x1080 dpi: 82 size: 598x336mm (23.5x13.2") 
  diag: 686mm (27") 
  Monitor-2: eDP-1-1 res: 1920x1080 hz: 60 dpi: 142 
  size: 344x193mm (13.5x7.6") diag: 394mm (15.5") 
  OpenGL: renderer: GeForce GTX 1650/PCIe/SSE2 v: 4.6.0 NVIDIA 460.39 
  direct render: Yes 

okay, the thing is: my cpu randomly stops supporting boost state, but for the most part it’s happening
when i’m playing games so this is how it looks like when i boot up and set up everything with cpupower
by running frequency-set -g performance and -u 4100000:

    analyzing CPU 0:
      driver: intel_pstate
      CPUs which run at the same hardware frequency: 0
      CPUs which need to have their frequency coordinated by software: 0
      maximum transition latency:  Cannot determine or is not supported.
      hardware limits: 800 MHz - 4.10 GHz
      available cpufreq governors: performance powersave
      current policy: frequency should be within 800 MHz and 4.1 GHz.
                      The governor "performance" may decide which speed to use
                      within this range.
      current CPU frequency: Unable to call hardware
      current CPU frequency: 4.0 GHz (asserted by call to kernel)
      boost state support:
        Supported: yes
        Active: yes

and then when i run a game for some reason only AFTER the loading screen it changes to:

analyzing CPU 0:
  driver: intel_pstate
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency:  Cannot determine or is not supported.
  hardware limits: 800 MHz - 4.10 GHz
  available cpufreq governors: performance powersave
  current policy: frequency should be within 800 MHz and 2.40 GHz.
                  The governor "performance" may decide which speed to use
                  within this range.
  current CPU frequency: Unable to call hardware
  current CPU frequency: 2.4 GHz (asserted by call to kernel)
  boost state support:
    Supported: no
    Active: no

oh and for thefirst time it happened i was using prime-run to run minecraft on my nvidia gpu but i stopped having this problem when running it without prime-run but using Xorg.conf configured by
Xorg --configure

Section "ServerLayout"
	Identifier     "X.org Configured"
	Screen      0  "Screen0" 0 0
	Screen      1  "Screen1" RightOf "Screen0"
	InputDevice    "Mouse0" "CorePointer"
	InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
	ModulePath   "/usr/lib/xorg/modules"
	FontPath     "/usr/share/fonts/misc"
	FontPath     "/usr/share/fonts/TTF"
	FontPath     "/usr/share/fonts/OTF"
	FontPath     "/usr/share/fonts/Type1"
	FontPath     "/usr/share/fonts/100dpi"
	FontPath     "/usr/share/fonts/75dpi"
EndSection

Section "Module"
	Load  "glx"
EndSection

Section "InputDevice"
	Identifier  "Keyboard0"
	Driver      "kbd"
EndSection

Section "InputDevice"
	Identifier  "Mouse0"
	Driver      "mouse"
	Option	    "Protocol" "auto"
	Option	    "Device" "/dev/input/mice"
	Option	    "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
	Identifier   "Monitor0"
	VendorName   "Monitor Vendor"
	ModelName    "Monitor Model"
EndSection

Section "Monitor"
	Identifier   "Monitor1"
	VendorName   "Monitor Vendor"
	ModelName    "Monitor Model"
EndSection

Section "Device"
	Identifier  "Card0"
	Driver      "nvidia"
	BusID       "PCI:1:0:0"
EndSection

Section "Device"
        ### Available Driver options are:-
        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz",
        ### <percent>: "<f>%"
        ### [arg]: arg optional
        #Option     "SWcursor"           	# [<bool>]
        #Option     "kmsdev"             	# <str>
        #Option     "ShadowFB"           	# [<bool>]
        #Option     "AccelMethod"        	# <str>
        #Option     "PageFlip"           	# [<bool>]
        #Option     "ZaphodHeads"        	# <str>
        #Option     "DoubleShadow"       	# [<bool>]
        #Option     "Atomic"             	# [<bool>]
	Identifier  "Card1"
	Driver      "modesetting"
	BusID       "PCI:0:2:0"
EndSection

Section "Screen"
	Identifier "Screen0"
	Device     "Card0"
	Monitor    "Monitor0"
	SubSection "Display"
		Viewport   0 0
		Depth     1
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     4
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     8
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     15
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     16
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     24
	EndSubSection
EndSection

Section "Screen"
	Identifier "Screen1"
	Device     "Card1"
	Monitor    "Monitor1"
	SubSection "Display"
		Viewport   0 0
		Depth     1
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     4
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     8
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     15
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     16
	EndSubSection
	SubSection "Display"
		Viewport   0 0
		Depth     24
	EndSubSection
EndSection

it probably should be noted that when i boot up the laptop my cpupower shows that boost state is not supported for first 30-60seconds and even after that i need to change max cpu frequency by myself

just to add i suspect it might have to do something with GPU offloading

I personally have found cpupower to be buggy…

use this command in the terminal to monitor the cpu freq, then uninstall cpupower and check if it works properly.

watch -n.1 "cat /proc/cpuinfo | grep \"^[c]pu MHz\""

well, now it just starts using powersave mode and i don’t have means to change it so it just runs at 2.4GHz permanently\

i tried to disable intel_pstate but it didnt help with anything

The CPU frequency is controlled by the CPU scaling governor and yes, it can be set manually.

It can be done with:

sudo cpupower frequency-set -g performance

to set the goverhnor to performance, and

sudo cpupower frequency-set -g powersave

to set the governor to powersave.

I have made a script to switch between the two. For normal use I leave it on powersave but when I start steam, or starcraft, I toggle it to performance.

$ cat /usr/local/bin/cpu_gov_toggle.sh
#!/bin/bash

currentGovernor=$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor)

if [[ $currentGovernor = 'powersave' ]]; then
	sudo cpupower frequency-set -g performance
	notify-send -t 1000 'Performance' 'The current CPU governor is "powersave", changed to "performance".'
	logger 'The current CPU governor is "powersave", changed to "performance".'
elif [[ $currentGovernor = 'performance' ]]; then
	sudo cpupower frequency-set -g powersave
	notify-send -t 1000 'Performance' 'The current CPU governor is "performance", changed to "powersave".'
	logger 'The current CPU governor is "performance", changed to "powersave".'
else
    logger 'An unexpected error occured. So long and good luck.'
fi

Hope this helps a bit.

maybe i didn’t write it well enough because english is not my main language but, the problem is that when i’m playing a game my cpu forcibly stops supporting turbo and after loading screen my clocks go down to baseclocks no matter the settings

Well, you COULD try to set it to performance and see if that helps, but I think it’s fine, personally.

Nowadays CPUs tend to adjust their clock speed according to demand, so while idle, the CPU chills out too, and when busy, it ramps up as well. This is done for power saving reasons (I think, can’t think of another reason to do this.)

well, on windows it runs at 4GHz and i get nice and playable 70 fps and on linux it drops to 2.4GHz and i’m getting 30-40 fps, and yes i’m using performance mode

In that case, :man_shrugging: I have no idea, sorry.

Wishing you all the best!

Try this, reinstall cpupower and cpupower-gui, then try using the gui to force full speed…

Also, when you can, what is the output of this command?

lscpu |egrep "Model name|MHz"

Here is some good reading on cpu frequency and scaling… CPU frequency scaling - ArchWiki

hey, have you found a solution??

Sorry, late to the party.

Intel Turbo Boost marketing doesn’t make it entirely clear that they’re referring to the maximum frequency a single core can run and sustain. Once you start hitting the CPU with anything that requires multiple cores and threads, you immediately lose out on this Turbo Boost benefit. (It will intelligently drop down to frequencies well below the advertised speed in order to safeguard against excess heat and power consumption.)


A more visual representation is something like…

You run a single-threaded CPU intensive process and it only requires a single core,

  • CORE 0: (:rocket: load) turbo baby! ← “YEAH! Single thread, it’s all up to me! I AM POWERFUL!” :muscle:
  • CORE 1: (:ice_cube: idle ) no turbo
  • CORE 2: (:ice_cube: idle ) no turbo
  • CORE 3: (:ice_cube: idle ) no turbo

But then you really start slamming your entire CPU,

  • CORE 0: (:fire: load) no turbo ← “Okay, sorry! I’ll stop being turbo now…” :pensive:
  • CORE 1: (:fire: load) no turbo
  • CORE 2: (:fire: load) no turbo
  • CORE 3: (:fire: load) no turbo

There’s more to it than that, and there’s no guarantee it will remain active for the entire life of the process. Temperature, power consumption, and what software is being run also play a role. If the work will benefit more from multiple cores running at lower frequencies, then Turbo Boost will not kick in.