Sluggish despite 'Performance' power mode

Since I have moved from kernel 6.1.11 to 6.6.11 yesterday, I feel like my system is very slow now. Power mode is set to Performance, however, I can observe in btop that the CPU is frequently going down to as low as 200MHz for short periods of time. CPU temperatures are all between 40 and 60°C which confirms that this is not thermal throttling of some sort. Seems like there is some over-eager power governor at work. In Performance mode, I would expect the CPU to never go below 1GHz or so, however, I have not found any settings to take influence on this so far.
The system feels just like Power Saver mode in kernel 6.1.11. This can’t be right. Watching YouTube videos is now causing so much stress that the videos are choppy, even if they are only shown in a very small area, and anything else is painfully slow. Almost any interaction with the computer has a noticeable delay that it definitely didn’t have before.
Despite it’s a laptop, it almost never runs on battery. The behavior I am addressing here is when external power is plugged in.

System summary output from neofetch:

OS: Fedora Linux 39 (Workstation Edition) x86_64 
Host: Laptop AA 
Kernel: 6.6.11-200.fc39.x86_64 
Uptime: 1 hour, 22 mins 
Packages: 4 (dpkg), 3518 (rpm), 30 (flatpak) 
Shell: bash 5.2.21 
Resolution: 2256x1504, 2560x1440 
DE: GNOME 45.3 
WM: Mutter 
WM Theme: Adwaita 
Theme: Adwaita [GTK2/3] 
Icons: Adwaita [GTK2/3] 
Terminal: gnome-terminal 
CPU: 11th Gen Intel i5-1135G7 (8) @ 4.200GHz 
GPU: Intel TigerLake-LP GT2 [Iris Xe Graphics] 
Memory: 24423MiB / 64087MiB

All cores managed by intel_pstate - output from cat /sys/devices/system/cpu/cpufreq/policy*/scaling_driver:

intel_pstate
intel_pstate
intel_pstate
intel_pstate
intel_pstate
intel_pstate
intel_pstate
intel_pstate

Intel turbo power states are not forbidden - output from cat /sys/devices/system/cpu/intel_pstate/no_turbo:

0

Power Profiles Daemon does not indicate issues - output from sudo systemctl status power-profiles-daemon:

● power-profiles-daemon.service - Power Profiles daemon
     Loaded: loaded (/usr/lib/systemd/system/power-profiles-daemon.service; enabled; preset: enabled)
    Drop-In: /usr/lib/systemd/system/service.d
             └─10-timeout-abort.conf
     Active: active (running) since Fri 2024-01-19 11:33:32 CET; 18min ago
   Main PID: 30357 (power-profiles-)
      Tasks: 4 (limit: 76849)
     Memory: 1.1M
        CPU: 38ms
     CGroup: /system.slice/power-profiles-daemon.service
             └─30357 /usr/libexec/power-profiles-daemon

Jan 19 11:33:32 framework systemd[1]: Starting power-profiles-daemon.service - Power Profiles daemon...
Jan 19 11:33:32 framework systemd[1]: Started power-profiles-daemon.service - Power Profiles daemon.

output from sudo cpupower frequency-info:

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

What’s interesting here is that the ‘current policy’ mentions a range of 0.4 to 4.2GHz but actually it’s 0.2Ghz that seems to be the lower limit. I cannot make any sense about the passage that I have prefixed with >>> above. Active governor should be performance solely. Why is powersave in the game at all?
Tasks with the highest CPU consumption in btop (regularly shown at the top of the list) are:

  • firefox
  • Web Content
  • gnome-shell
  • Xorg

This is no different from before but where the CPU load diagram used to be close to a flat line when nothing is actively done, it’s now looking pretty stressed:

So what is going on here? How can I get my kernel-6.1.11 performance back?

Thank you for any advice!
Cheers,
Joe

I switched back to kernel 6.1.11 just to verify and can confirm that the CPU frequency (according to btop) never goes below 400 MHz, is typically around 1.0 GHz, operation is smooth and btop shows a flat line as long as the system isn’t used.
Playing a YouTube video will have an average CPU usage of almost 75% on kernel 6.6.11 and around 10% on kernel 6.1.11.
This proves for me that the kernel is involved. But it’s not an option to stay on an outdated kernel. So how would I convince 6.6.11 to work as good as 6.1.11 did?

You can see here, it’s a totally different world.

What do you have for a GPU and its driver? This may be related to whether or not hardware acceleration is in use or if the CPU is tasked with graphics rendering.

Please show us the output of inxi -Fzxx

Well, the difference was clearly between kernels 6.1.11 and 6.6.11. But after I switched back and forth, the system is now performing normally again even with the new kernel. Somehow it repaired itself magically. CPU frequency and behavior is now as I know it so I think we can consider this solved already. Just a hiccup.
Anyway, here is the inxi output:

System:
  Kernel: 6.6.11-200.fc39.x86_64 arch: x86_64 bits: 64 compiler: gcc
    v: 2.40-13.fc39 Desktop: GNOME v: 45.3 tk: GTK v: 3.24.39 wm: gnome-shell
    dm: GDM Distro: Fedora release 39 (Thirty Nine)
Machine:
  Type: Laptop System: Framework product: Laptop v: AA
    serial: <superuser required>
  Mobo: Framework model: FRANBMCP0A v: AA serial: <superuser required>
    UEFI: INSYDE v: 03.17 date: 10/27/2022
Battery:
  ID-1: BAT1 charge: 52.4 Wh (100.2%) condition: 52.3/55.0 Wh (95.2%)
    volts: 17.5 min: 15.4 model: NVT Framewo serial: <filter>
    status: not charging
  Device-1: hidpp_battery_0 model: Logitech MX Anywhere 3 serial: <filter>
    charge: 95% status: discharging
CPU:
  Info: quad core model: 11th Gen Intel Core i5-1135G7 bits: 64 type: MT MCP
    arch: Tiger Lake rev: 1 cache: L1: 320 KiB L2: 5 MiB L3: 8 MiB
  Speed (MHz): avg: 1868 high: 4200 min/max: 400/4200 cores: 1: 400 2: 3174
    3: 2979 4: 400 5: 400 6: 4200 7: 1641 8: 1751 bogomips: 38707
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Graphics:
  Device-1: Intel TigerLake-LP GT2 [Iris Xe Graphics] vendor: Framework
    driver: i915 v: kernel arch: Gen-12.1 ports: active: DP-7,eDP-1 empty: DP-1,
    DP-2, DP-3, DP-4, DP-5, DP-6 bus-ID: 00:02.0 chip-ID: 8086:9a49
  Device-2: ARC Camera driver: snd-usb-audio,uvcvideo type: USB rev: 2.0
    speed: 480 Mb/s lanes: 1 bus-ID: 3-6.3.4:10 chip-ID: 05a3:9331
  Device-3: Realtek [] driver: uvcvideo type: USB rev: 2.0 speed: 480 Mb/s
    lanes: 1 bus-ID: 3-7:3 chip-ID: 0bda:5634
  Display: x11 server: X.Org v: 1.20.14 with: Xwayland v: 23.2.4
    compositor: gnome-shell driver: X: loaded: modesetting unloaded: fbdev,vesa
    dri: iris gpu: i915 display-ID: :0 screens: 1
  Screen-1: 0 s-res: 4816x1504 s-dpi: 96
  Monitor-1: DP-7 mapped: DP-4-3 pos: primary,left
    model: LG (GoldStar) ULTRAGEAR res: 2560x1440 dpi: 109 diag: 685mm (27")
  Monitor-2: eDP-1 pos: right model: BOE Display 0x095f res: 2256x1504
    dpi: 201 diag: 343mm (13.5")
  API: OpenGL v: 4.6 vendor: intel mesa v: 23.3.3 glx-v: 1.4 es-v: 3.2
    direct-render: yes renderer: Mesa Intel Xe Graphics (TGL GT2)
    device-ID: 8086:9a49
  API: EGL Message: EGL data requires eglinfo. Check --recommends.
Audio:
  Device-1: Intel Tiger Lake-LP Smart Sound Audio vendor: Framework
    driver: snd_hda_intel v: kernel bus-ID: 00:1f.3 chip-ID: 8086:a0c8
  Device-2: Lenovo [] driver: hid-generic,snd-usb-audio,usbhid type: USB
    rev: 2.0 speed: 12 Mb/s lanes: 1 bus-ID: 3-6.3.3.2:12 chip-ID: 17ef:30d1
  Device-3: ARC Camera driver: snd-usb-audio,uvcvideo type: USB rev: 2.0
    speed: 480 Mb/s lanes: 1 bus-ID: 3-6.3.4:10 chip-ID: 05a3:9331
  API: ALSA v: k6.6.11-200.fc39.x86_64 status: kernel-api
  Server-1: PipeWire v: 1.0.1 status: active with: 1: pipewire-pulse
    status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
    4: pw-jack type: plugin
Network:
  Device-1: Intel Wi-Fi 6 AX210/AX211/AX411 160MHz driver: iwlwifi v: kernel
    pcie: speed: 5 GT/s lanes: 1 bus-ID: aa:00.0 chip-ID: 8086:2725
  IF: wlp170s0 state: up mac: <filter>
  Device-2: Lenovo [] driver: r8152 type: USB rev: 3.0 speed: 5 Gb/s
    lanes: 1 bus-ID: 2-4.1:3 chip-ID: 17ef:a387
  IF: enp0s13f0u4u1 state: up speed: 1000 Mbps duplex: full mac: <filter>
  IF-ID-1: vmnet1 state: unknown speed: N/A duplex: N/A mac: <filter>
  IF-ID-2: vmnet8 state: unknown speed: N/A duplex: N/A mac: <filter>
Bluetooth:
  Device-1: Intel AX210 Bluetooth driver: btusb v: 0.8 type: USB rev: 2.0
    speed: 12 Mb/s lanes: 1 bus-ID: 3-10:6 chip-ID: 8087:0032
  Report: btmgmt ID: hci0 rfk-id: 1 state: up address: <filter> bt-v: 5.3
    lmp-v: 12
Drives:
  Local Storage: total: 3.64 TiB used: 1.33 TiB (36.6%)
  ID-1: /dev/nvme0n1 vendor: Samsung model: SSD 990 PRO 4TB size: 3.64 TiB
    speed: 63.2 Gb/s lanes: 4 serial: <filter> temp: 43.9 C
Partition:
  ID-1: / size: 3.64 TiB used: 1.33 TiB (36.6%) fs: btrfs dev: /dev/dm-0
    mapped: luks-e19affbf-1032-448b-9f84-7c877cbfb2a4
  ID-2: /boot size: 973.4 MiB used: 281.9 MiB (29.0%) fs: ext4
    dev: /dev/nvme0n1p2
  ID-3: /boot/efi size: 598.8 MiB used: 85.5 MiB (14.3%) fs: vfat
    dev: /dev/nvme0n1p1
  ID-4: /home size: 3.64 TiB used: 1.33 TiB (36.6%) fs: btrfs dev: /dev/dm-0
    mapped: luks-e19affbf-1032-448b-9f84-7c877cbfb2a4
Swap:
  ID-1: swap-1 type: zram size: 8 GiB used: 0 KiB (0.0%) priority: 100
    dev: /dev/zram0
Sensors:
  System Temperatures: cpu: 44.0 C mobo: N/A
  Fan Speeds (rpm): N/A
Info:
  Processes: 427 Uptime: 3h 52m Memory: total: 64 GiB note: est.
  available: 62.59 GiB used: 9.59 GiB (15.3%) Init: systemd v: 254
  target: graphical (5) default: graphical Compilers: gcc: 13.2.1 Packages: 52
  pm: dpkg pkgs: 4 pm: rpm pkgs: N/A note: see --rpm pm: flatpak pkgs: 30
  pm: snap pkgs: 14 Shell: Bash v: 5.2.21 running-in: gnome-terminal
  inxi: 3.3.31

Greetings everyone,

I’m sorry but this has to be reopened. Since kernel 6.7.4, this issue has returned, and this time it seems impossible to overcome.
Here is the key data from one of the CPU cores:

johannes|/sys/devices/system/cpu/cpu0/cpufreq ▷ cat scaling_min_freq 
3200000
johannes|/sys/devices/system/cpu/cpu0/cpufreq ▷ cat scaling_governor 
performance
johannes|/sys/devices/system/cpu/cpu0/cpufreq ▷ cat scaling_driver
intel_pstate
johannes|/sys/devices/system/cpu/cpu0/cpufreq ▷ cat cpuinfo_min_freq 
400000

I have set scaling_min_freq to 3.2GHz and the scaling_governor to performance, or rather I’m doing this for all cores whenever I have just logged in. But there is not much of an effect. btop still indicates that the CPU goes down as low as 200MHz very frequently, which is only half of what the cpuinfo_min_freq read-only value shows (I don’t know yet how to set this lower limit). And this is happening while the CPU thermals are well below 55°C for all cores so there is no need for throttling. I understand the btop CPU chart shows a considerably high base load because of the low frequency as well. All the time the Gnome power mode is performance.
The inexplicably low CPU frequencies cause the system to be very sluggish particularly when operating virtual machines in VMware.
Besides the kernel versions, none of the other parameters have changed since I addressed this issue first. But I’m willing to supply more data if needed. Please let me know what might reveal the culprit.
Thank you all for your support. I’m glad this community exists.

Cheers,
Joe

Okay, I think I found it for now. It was the DP module which wasn’t actually in use, nothing plugged in. As soon as I removed it, the CPU recovered and the system is smooth as ever since then.
Source: https://www.reddit.com/r/framework/comments/ye79ps/does_somebody_else_has_performance_drops_once_per/