Bug 218696 - DYTC frequency scaling deterioration and event spam
Summary: DYTC frequency scaling deterioration and event spam
Status: NEW
Alias: None
Product: Drivers
Classification: Unclassified
Component: Platform_x86 (show other bugs)
Hardware: All Linux
: P3 normal
Assignee: drivers_platform_x86@kernel-bugs.osdl.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-04-08 19:32 UTC by Lucas Mülling
Modified: 2024-04-13 05:23 UTC (History)
2 users (show)

See Also:
Kernel Version:
Subsystem:
Regression: No
Bisected commit-id:


Attachments
ACPI Feilds dump before during and after the problem (912.17 KB, text/plain)
2024-04-08 19:32 UTC, Lucas Mülling
Details

Description Lucas Mülling 2024-04-08 19:32:01 UTC
Created attachment 306108 [details]
ACPI Feilds dump before during and after the problem

Hi,

I'm trying to implement automatic user-space platform profile controls for my ThinkPad and noticed that while under load, i.e. compiling the kernel, the firmware (I think) will start sending `ibm/hotkey LEN0268:00 00000080 00006032` events non-stop, which causes thinkpad_acpi to update the platform profile. This happens once every second. However, the profile doe's not change. This render any userspace tool useless, since we cannot react according to Fn + [L|M|H] events.

While this is happening, the max frequency scaling will get stuck at a maximum of around 2990MHz (78 C). The baseline for this model, from my measurements, is 3.400MHz (95 C). This seems to happen only if the GPU is used and DYTC is in MMC mode.

I can reproduce this reliably by playing a full-screen YouTube video while compiling the kernel.

Changing platform profile to low-power and then back to performance fixes this for a while. I've also noticed that leaving the deceive sleeping for long periods of time fixes this.

I've tried looking at the DYTC implementation but didn't find anything special about going into low-power, I've tried to dump the the ACPI fields using acpi_dbg, but haven't found anything useful yet.

I've attached the dumps (in the same file), which are:

- before, taken after reboot.
- during, taken while the firmware is sending 6032 events and frequency scaling is stuck;
- after, taken after changing the platform profile to low-power and back to performance (this was done using Fn + L then Fn + H)

Bellow, also, is the diff between during and after. But it does not show anything useful to me.
```
--- during      2024-04-08 15:17:49.998768985 -0300
+++ after       2024-04-08 15:20:56.829128627 -0300
@@ -151,7 +151,7 @@
 \_SB.PCI0.SMB.LRG3 {00000000000000FF}
 \_SB.PCI0.SMB.LHC3 {00000000000000FF}
 \_SB.PCI0.SMB.SEC {0000000000000031}
-\_SB.PCI0.SMB.MIN {0000000000000017}
+\_SB.PCI0.SMB.MIN {0000000000000020}
 \_SB.PCI0.SMB.MX01 {00000000000000FF}
 \_SB.PCI0.SMB.MX07 {00000000000000FF}
 \_SB.PCI0.SMB.MX14 {00000000000000FF}
@@ -191,7 +191,7 @@
 \_SB.PCI0.SMB.MS04 {00000000000000F0}
 \_SB.PCI0.SMB.MS40 {0000000000000042}
 \_SB.PCI0.SMB.ECES {0000000000000000}
-\_SB.PCI0.LPC0.EC0.SBVO {000000000000317B}
+\_SB.PCI0.LPC0.EC0.SBVO {000000000000317A}
 \_SB.PCI0.LPC0.EC0.SBAC {0000000000000000}
 \_SB.PCI0.LPC0.EC0.SBRS {0000000000000064}
 \_SB.PCI0.LPC0.EC0.SBRC {000000000000110A}
@@ -210,7 +210,7 @@
 \_SB.PCI0.LPC0.EC0.SBCH {000000000050694C}
 \_SB.PCI0.LPC0.EC0.SBMN {53 4D 50 00 32 30 32 31 00 00 00 00 00 00 C0 C0 }
 \_SB.PCI0.LPC0.EC0.SBDN {4C 4E 56 2D 35 42 31 31 48 35 36 33 33 39       }
-\_SB.PCI0.LPC0.EC0.TWBT {C0 C0 01 03 E0 41 00 00 00 00 00 00 00 00 00 00 C0 C0 20 E0 DC 0B 7B 31 00 00 00 00 64 00 0A 11 C0 C0 0A 11 FF FF FF FF FF FF E0 00 0A 00 14 0C C0 C0 68 10 F2 2B 31 00 B4 56 8F 06 EE 12 00 00 C0 C0 53 4D 50 00 32 30 32 31 00 00 00 00 00 00 C0 C0 4C 4E 56 2D 35 42 31 31 48 35 36 33 33 39 C0 C0 4C 69 50 00 00 00 00 00 00 00 00 00 00 00 C0 C0 58 32 58 50 33 35 4C 30 31 4C 46 00 00 00 C0 C0 4C 58 C1 41 80 00 05 00 42 05 00 01 06 00 C0 C0 10 00 02 00 00 00 00 00 00 00 00 00 00 00 C0 C0 42 01 01 01 00 00 7E 10 7E 10 7E 10 04 50 C0 C0 B0 01 B6 0A 29 02 00 00 00 00 00 00 00 00 C0 C0 00 07 00 00 00 00 00 00 00 00 00 00 00 00 C0 C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 C0 C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 C0 C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 }
+\_SB.PCI0.LPC0.EC0.TWBT {C0 C0 01 03 E0 41 00 00 00 00 00 00 00 00 00 00 C0 C0 20 E0 DE 0B 7A 31 00 00 00 00 64 00 0A 11 C0 C0 0A 11 FF FF FF FF FF FF E0 00 0A 00 0D 0C C0 C0 68 10 F2 2B 31 00 B4 56 8F 06 EE 12 00 00 C0 C0 53 4D 50 00 32 30 32 31 00 00 00 00 00 00 C0 C0 4C 4E 56 2D 35 42 31 31 48 35 36 33 33 39 C0 C0 4C 69 50 00 00 00 00 00 00 00 00 00 00 00 C0 C0 58 32 58 50 33 35 4C 30 31 4C 46 00 00 00 C0 C0 4C 58 C1 41 80 00 05 00 42 05 00 01 06 00 C0 C0 10 00 02 00 00 00 00 00 00 00 00 00 00 00 C0 C0 42 01 01 01 00 00 7E 10 7E 10 7E 10 04 50 C0 C0 B0 01 B6 0A 29 02 00 00 00 00 00 00 00 00 C0 C0 00 07 00 00 00 00 00 00 00 00 00 00 00 00 C0 C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 C0 C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 C0 C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 }
 \_SB.PCI0.LPC0.EC0.T2BT {00 01 00 00 00 00 00 00 7A 00 00 00 00 00 41 50 50 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 1A 01 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 }
 \_SB.SMIB {00000000000000B0}
 \_SB.PEBA {00000000F8000000}
@@ -903,5 +903,3 @@
 \M414 {0000000000000B00}
 \M444 {00 00 00 00 00 00 00 00 00                      }
 \M449 {00 00 00 00 00 00 00 00 00                      }
```

Tested on:
- Kernel: 6.8.1
- Host: 21C6000UBO
- UEFI: 0.1.30

I'm willing to help debug this in any way I can, though i'm out of ideas right now. I'm also not sure if this is a firmware bug and wanted a second opinion before sinking more time into this.
Comment 1 Hans de Goede 2024-04-09 09:14:42 UTC
Thank you for the bug report. I'm adding Mark Pearson from Lenovo to the Cc.

Mark, can you took a look at this please ?
Comment 2 Mark Pearson 2024-04-09 09:51:53 UTC
Hi Lucas - which platform is this on?
Comment 3 Lucas Mülling 2024-04-09 13:26:54 UTC
It's a ThinkPad L14 Gen 3 (21C6000UBO)
Comment 4 Mark Pearson 2024-04-09 14:30:58 UTC
Thanks! (for my reference - L14 G3 AMD)

I've created internal ticket LO-2964 and we'll see if we can reproduce and get insight from the FW team as to what is happening.

If you have some of the ACPI events recorded (I assume you're running acpi_listen?) that might be useful - just so we can show the FW team what events are being sent. Hopefully we can reproduce the issue in the lab though.

Mark
Comment 5 Lucas Mülling 2024-04-10 00:34:30 UTC
Sorry for the delay. There is not much to it, just a spam of 6032 events.

This is what i did, from fresh boot:
1) compile the kernel, platform profile is set to performance;
2) while compiling, open firefox and play a youtube video (not sure yet if it makes a difference but i make the video full screen);
3) wait, around 7 minutes later something will start sending 6032 events.

```
[2024-04-10 00:13:58.298415463 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:20:07.484752635 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:20:07.485231335 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:20:09.492703646 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:20:09.496085280 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:20:13.494644855 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:20:13.495007198 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:20:15.507129202 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:20:15.512095283 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:20:17.501617237 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:20:17.501900099 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:20:19.509051274 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:20:19.509091294 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:20:21.516889210 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:20:21.517488948 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:20:23.523683770 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:20:23.524109599 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:20:25.583080826 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:20:25.583109462 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:20:27.527613254 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:20:27.527908129 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:20:29.535477241 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:20:29.535499800 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:20:31.540738828 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:20:31.541415602 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:20:33.552122248 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:20:33.560068158 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:20:35.553146491 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:20:35.553583007 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:20:37.557097763 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:20:37.557146513 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:20:39.562525644 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:20:39.564082014 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:20:41.566964137 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:20:41.567355884 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:20:43.566109338 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:20:43.566135249 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:20:45.581597610 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:20:45.585073601 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:20:47.589012720 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:20:47.589059445 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:20:49.603594786 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:20:49.603671054 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:20:51.600073750 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:20:51.600105738 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:20:53.614342503 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:20:53.614732853 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:20:55.624071913 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:20:55.624097685 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:20:57.629782098 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:20:57.634214023 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:20:59.646579638 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:20:59.648146344 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:21:01.658537791 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:21:01.658923182 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:21:03.675633489 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:21:03.675656467 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:21:05.673374855 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:21:05.673739503 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:21:07.687322542 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:21:07.690965526 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:21:09.738533290 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:21:09.742130528 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:21:11.707979999 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:21:11.708743936 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:21:13.720025107 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:21:13.720450378 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:21:15.730913064 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:21:15.731321573 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:21:17.735085667 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:21:17.737068425 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:21:19.752476099 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:21:19.752846683 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:21:21.762457920 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:21:21.765068842 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:21:23.765390748 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:21:23.765787314 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:21:25.782965057 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:21:25.782993412 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:21:27.796879285 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:21:27.797280650 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:21:29.798304102 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:21:29.798331059 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:21:31.805232507 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:21:31.805252551 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:21:33.814409640 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:21:33.815183388 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:21:35.833073472 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:21:35.833105948 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:21:37.814734228 UTC] ibm/hotkey LEN0268:00 00000080 00006032
[2024-04-10 00:21:37.814759510 UTC] ibm/hotkey LEN0268:00 00000080 00006032
```

The first event is me pressing Fn + H. I'm reading the events using netlink so i can add timestamps, i did double check and acpi_listen shows the same thing.
Comment 6 Mark Pearson 2024-04-10 17:08:35 UTC
Thanks! Forwarded to FW team - they're trying to reproduce it.
Comment 7 Lucas Mülling 2024-04-13 05:23:57 UTC
Hey Mark, I was testing today and noticed that it happens when GPU temps reach ~70C.

Note You need to log in before you can comment on or make changes to this bug.