This started with an issue that was present in the 6.1.7 kernel in which the power profile would constantly switch to "Power Saver" whenever it was set to anything else. That issue had been "fixed" in the 6.1.9 kernel, but I found after that, I could not set the profile to "Performance" or "Power Saver", and it would switch to "Balanced" (sometimes instantly, sometimes after a few seconds, sometimes after a minute or so) whenever I tried to set it to "Performance" or "Power Saver". Ever since 6.1.9, whenever a new kernel releases, I try it, and when it ultimately still does this, I immediately downgrade back to 6.1.6, before there was any issue to begin with. The latest Fedora kernel at the time of writing this is 6.2.9, which I have indeed tried. The issue is still present. I can confirm that this does still occur on a fresh installation of Fedora with the latest kernel, so it is nothing to do with my installation. As for the hardware, this computer is a ThinkPad T490 (model 20N20031US) with an i7-8565U. This computer has the latest firmware updates.
Seems platform profiles aren't loading with the latest kernel. I'll need to dig into why but I don't think they are supported on this platform I checked with an older kernel (6.0.11-300) and the platform profiles aren't there either. Are you able to confirm on your working kernel if you see /sys/firmware/acpi/platform_profile please? Also it might be interesting to do: grep . /sys/devices/virtual/powercap/intel-rapl-mmio/intel-rapl-mmio:0/*_uw and then do FN+H; FN+M; FN+L which are the hotkeys to switch between power profiles (bypass the OS entirely) and see if the values change. On my system they didn't (but it seems I'm also running a trial BIOS that I need to update from...so be great to get your results) Please also confirm which BIOS and EC versions you have Thanks Mark
(In reply to Mark Pearson from comment #1) > Seems platform profiles aren't loading with the latest kernel. I'll need to > dig into why but I don't think they are supported on this platform > I checked with an older kernel (6.0.11-300) and the platform profiles aren't > there either. > > Are you able to confirm on your working kernel if you see > /sys/firmware/acpi/platform_profile please? > > Also it might be interesting to do: > grep . /sys/devices/virtual/powercap/intel-rapl-mmio/intel-rapl-mmio:0/*_uw > > and then do FN+H; FN+M; FN+L which are the hotkeys to switch between power > profiles (bypass the OS entirely) and see if the values change. On my system > they didn't (but it seems I'm also running a trial BIOS that I need to > update from...so be great to get your results) > > Please also confirm which BIOS and EC versions you have > > Thanks > Mark Hello Mark, Thanks for your reply. On kernel 6.1.6 (the working one) I do have /sys/firmware/acpi/platform_profile, and the contents accurately represent the current power profile. Grepping the files you mentioned returns the following: /sys/devices/virtual/powercap/intel-rapl-mmio/intel-rapl-mmio:0/constraint_0_max_power_uw:15000000 /sys/devices/virtual/powercap/intel-rapl-mmio/intel-rapl-mmio:0/constraint_0_power_limit_uw:10000000 /sys/devices/virtual/powercap/intel-rapl-mmio/intel-rapl-mmio:0/constraint_1_max_power_uw:0 /sys/devices/virtual/powercap/intel-rapl-mmio/intel-rapl-mmio:0/constraint_1_power_limit_uw:29000000 The hotkeys did not do anything for me either. I am on BIOS 1.79 (N2IETA1P) and EC 1.26 (N2IHT42W). Please let me know if you need any other information. -Jon
Thanks Jon - I'll do some more checking on mine and figure out what changed.
This is confusing :( The culprit commit is https://github.com/torvalds/linux/commit/bce6243f767f7da88aa4674d5d678f9f156eaba9 But as noted in there: > PSC platform profile mode is only supported on Linux for AMD platforms. > Some older Intel platforms (e.g T490) are advertising it's capability > as Windows uses it - but on Linux we should only be using MMC profile > for Intel systems. I'm testing on my T490 and it is not advertising MMC mode - it is *only* advertising PSC; and I'm assuming that is what you are seeing too. However - I originally made that change because of this: https://gitlab.freedesktop.org/hadess/power-profiles-daemon/-/issues/86 My internal ticket on that issue notes that the BIOS is advertising MMC and PSC modes. It definitely isn't now. I need to talk to the FW team and understand what is going on I'm afraid. Right now I'm confused. It seems they've disabled MMC but I need to check why.... Mark
Does that mean, even though my T490 says it is using a given profile on the "working" kernel, it actually isn't? Also, I am unfortunately not familiar with PSC or MMC. Are they just different ways of setting processor states? Jon
Hi Jon, PSC and MMC are different thermal control modes internal to our firmware. My previous understanding was that MMC was used on Intel and PSC was used on AMD. However, after some discussion, it looks like my previous understanding on this was wrong :( It was a little bit a case of 'lost in translation' when discussing with the FW team in China but ultimately my fault - I should have double checked my understanding of what was being stated. The fix I committed above needs to be reverted. The FW team have (since I proposed that patch) updated the BIOS to remove advertising MMC, so the kernel should allow PSC on Intel platforms. I'll get a patch submitted upstream ASAP and get it fixed. Mark
Great, thank you! Jon
(In reply to Mark Pearson from comment #7) > The fix I committed above needs to be reverted. The FW team have (since I > proposed that patch) updated the BIOS to remove advertising MMC, so the > kernel should allow PSC on Intel platforms. Maybe not revert entirely, but allow both preferring one or the other depending on if it is an Intel vs AMD based laptop ? To be clear what I'm worried about here is machines with an older BIOS which does still advertise both regressing ... ?
Yeah - I was thinking about that - On the L13 G2 it advertises PSC mode but it won't work under Linux (Intel has done some special Windows drivers to handle it). Right now I believe there are no profile controls available that we can use. - T490 advertises PSC mode and it works (all handled by the FW). Right now it isn't being made available but should be I don't believe I've seen other cases reported. My suggestion is: - FW should advertise which mode it supports correctly. T490 is now doing this (but earlier FW versions weren't). If FW is wrong it should be fixed (if possible) - L13 G2 doesn't support platform profiles under Linux. I'm thinking a quirk for the L13 G2 to avoid using profiles is needed. I'm not going to be able to get them to fix the firmware. We should have caught this during enablement, but that's a separate discussion with our QA team that I need to have. The downside is I don't have an L13 G2...so have to rely on a colleague for testing so it's going to take me a little while to get this ready Let me know any thoughts or concerns Mark
(In reply to Mark Pearson from comment #10) > Yeah - I was thinking about that > - On the L13 G2 it advertises PSC mode but it won't work under Linux (Intel > has done some special Windows drivers to handle it). Right now I believe > there are no profile controls available that we can use. Ok, so we need to DMI quirk this and not offer any platform_profile support on this model. > - T490 advertises PSC mode and it works (all handled by the FW). Right now > it isn't being made available but should be But originally (with older BIOS-es) it did not work and MMC mode had to be used, right ? At least that is what: https://github.com/torvalds/linux/commit/bce6243f767f7da88aa4674d5d678f9f156eaba9 Claims. So maybe add a "prefer MMC" DMI quirk mechanism and set that for the 490 intel models and then if both are advertised use MMC to keep things working with the old BIOS for which bce6243f767f7 was written ? At least if this is not too much effort / not too messy code wise. We do have fwupdate support for these models, but still many users just never update their BIOS so it would be good to keep old versions working if we can.
> But originally (with older BIOS-es) it did not work and MMC mode had to be used, right ? At least that is what: > https://github.com/torvalds/linux/commit/bce6243f767f7da88aa4674d5d678f9f156eaba9 I suspect I'm going to have to downgrade FW to check what is/was going on - it's not making a lot of sense right now to me either. I'm stumped as to how it used to not work - it should have done. The only conclusion I have so far is my commit was garbage - but I know I tested it so I'm really hoping that's not the case. I'll do some more digging and see what I can find out as I'm missing something in my understanding. As MMC is offered first in the code it will work as 'MMC preferred' by default (if both are advertised) I think without needing a quirk - but I have this horrible sinking feeling the issue is tied up somewhere in there. The conversation with the FW team has been a little confusing at times (largely language based); but they have confirmed clearly the T490 is using PSC (and in my testing yesterday PSC definitely works). Mark
Some updates on this issue. I was travelling last week so haven't made much direct progress - but I was in Japan and got to sit down with the FW team which was quite helpful and I have a bit more insight. They confirmed that PSC mode is used on Intel platforms. In fact Windows is using that for their profile slider control - so my code in the driver saying not to run it on Intel platforms is definitely wrong and I need to correct it. MMC mode was intended for Linux platforms and maps on top of the FN+H/M/L key presses. It wasn't really made clear why we have two modes and I do have some concerns that it may be related to how the thermal tables are used in Windows and not Linux so I'm treading cautiously for now. I will be doing some more investigation here but it's going to take me some time and testing. PSC mode should possibly take preference over MMC mode but I'm somewhat hesitant to make that change without clarity and results In the short term I'm working on a couple of patches: 1) Revert the change that blocks PSC mode on the Intel platforms. MMC will remain as preferred for now. 2) A module parameter that can be used to force MMC or PSC mode regardless of what is advertised. That way if we hit some other particular case we have a workaround whilst I figure it out with the FW team. Once I've had a chance to discuss some options more with Intel, AMD and the thermal team I'm hoping I can get something a bit better - but it's definitely going to take me longer to get those pieces all tied together. Sorry about all the confusion - I wish I could state confidently what the final answer is but there's a lot of history and churn in this area (and variation between platforms). I've re-opened internal ticket LO-1710 on this issue Mark
Any more updates on this? Jon
The patch for fixing the original regression was accepted upstream - it fixes things for the T490 https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/commit/drivers/platform/x86/thinkpad_acpi.c?h=for-next&id=0c0cd3e25a5b64b541dd83ba6e032475a9d77432 I checked and the fix is in the fedora-6.3 kernel. Note, this does raise a problem on the L13 G2 Intel, but this is a FW problem that gets exposed by the patch and needs fixing in FW. I have a ticket open with the FW team (LO-2513) and nagged them last week for an update because we don't have the fix yet. If you have another platform impacted please let me know I think we can close this (from the T490 point of view) - let me know if any objections. Mark
Unfortunately, I am still experiencing the issue on kernel-6.3.12-100.fc37. Is there anything I should check or any information I could provide? Jon
I updated my T490 (with Fedora38 rather than 37; but don't think that should matter). I'm seeing the same as you - it's not working for performance mode; only for low-power and balanced. What is weird is I still have the kernel and module from when I fixed this originally and I double checked it is all working there correctly(including checking the power limits). Right now I have no idea what is going on - those patches fixed it back on the 6.3.0-rc1 kernel but don't seem to be working now they've been integrated. I'll have to debug and find out what is going on - something stupid must have happened. Sorry :( One small note - I'm on PTO from Friday for two weeks (and travelling so can't take a stack of laptops with me). I'll do my best to look at this before then but this week is a bit crazy. I've tagged myself as needinfo so I'll get the bug nags for it as a reminder. Mark
I'm confused... I cloned the kernel ark repository (https://gitlab.com/cki-project/kernel-ark) and did a clean build using the Fedora config from the fedora-6.3 branch. This gives a 6.3.13 kernel - and it works correctly. I've checked the source code for 6.3.12 and the patches are there. I've kicked off a build of that exact tree to see if I can reproduce the issue from that....it should work.
This got even weirder... I built the 6.3.12 kernel from the same kernel source as the 6.3.12-200-fc38 image. Platform profiles were working. Pretty confused at this point I went back to my 6.3.12-200-fc38 install; and platform profiles are now working correctly there too. I can't reproduce the problem anymore. I've tried dropping back to an old kernel and then going back up - everything keeps working. Not sure what to do at this point. Can you try power cycling (full power off, not just reboot) to see if that makes a difference? (grasping at straws) If it still doesn't work are you happy to try a kernel rpm that I've built? Mark
Think I've figured out what is going on - this is the lapmode sensor triggering. You can't have performance mode enabled in lapmode, though for some reason it is dropping to low-power if it's in performance mode (balance mode stays at balance). You can check the status of the lapmode with /sys/devices/platform/thinkpad_acpi/dytc_lapmode Can you confirm if that matches with your observations? If lapmode isn't triggered then the profiles are working correctly. I think there is a FW issue that it goes to low-power mode instead of balanced (getting that fixed will be interesting). I'll follow up with the FW team on that once you confirm my observations are correct. Mark
I am not at the machine right now, but I think it is worth noting that when I tested it with the new kernel, the laptop stood completely still the whole time, from before I even turned it on. Unless lap mode is being triggered when it is not supposed to, I do not believe it was in lap mode. I will confirm when I get home from work today. Jon
Ok, I have just checked and confirmed that the initial problem still occurs, and that the laptop is not entering lap mode when it is not supposed to. In other words, Performance and Power Saver both switch to balanced, and the aforementioned file continues to display 0, indicating no lap mode. This is on both 6.4.4 and 6.3.12. Let me know if there is any other information I could provide.
This is still VERY much present on the L13 Gen2 and has been for like *checks notes* THREE MONTHS. No 'lap mode' whatever here either, just constant throttling
Well, I will say it is somewhat comforting to know now that I am not the only one experiencing this. Welcome to the club.