Bug 216963
Summary: | Power profile switch broken for Lenovo Thinkpad X1 Yoga (Gen 6) after upgrade 6.1.6 -> 6.1.7 | ||
---|---|---|---|
Product: | ACPI | Reporter: | Iyán (me) |
Component: | Power-Processor | Assignee: | acpi_power-processor |
Status: | RESOLVED CODE_FIX | ||
Severity: | normal | CC: | agurenko, Chris, jakob.helgesson, johnsimcall, leodream2008, leonard.r.koenig, mpearson-lenovo, nate, plumerlis |
Priority: | P1 | ||
Hardware: | Intel | ||
OS: | Linux | ||
Kernel Version: | 6.1.7 | Subsystem: | |
Regression: | Yes | Bisected commit-id: |
Description
Iyán
2023-01-23 22:31:51 UTC
Just a note that I am looking at this and have reproduced it. It's my fault - I think I made two dumbass mistakes in the patch you identified. I have a fix that I'm testing locally - but I want to just do a bit more sanity before I push it for review - to make sure I don't make things worse (especially as it's late and I'm prone to making more mistakes in the evening). I'll aim to have it upstream for review tomorrow. Many thanks for the bug - very much appreciated. I should have caught this one in testing but I didn't expect to have any effects on Intel platforms at all and missed it :( Sorry. Mark Hey Mark, No problem, I'll be happy to test your new patch on my machine when it's ready. Iyán FWIW after upgrading to Kernel 6.1.7 on my X1 Yoga gen 4, I see a slightly different issue: attempting to switch to Balanced mode using Fn+H or the Plasma GUI switches to Powersave mode instead. Switching to Performance mode using Fn+H or the GUI still works. So effectively, the system only has Powersave and Performance modes right now. Hey, I'm running a Thinkpad X1 Carbon Gen 10 with an Intel Core i7 1260p. For me, upgrading to 6.1.7 also broke power switching. In regular operation pressing Fn+L Fn+M Fn+H aka low-power (Low), balanced (Medium) and performance (High). Since upgrading to 6.1.7 all of the above-mentioned keybinds all resulted in low-power being set. Manually echoing balanced to /sys/firmware/acpi/platform_profile results in the balanced mode being activated, however doing the same with performance results in instantly switching back to low-power. If needed I'm happy to help out with testing possible fixes. Jakob Hi Nate & Jakob, That sounds like the same I am seeing on the X1C9. I think my patch will fix that for you. The issue I introduced is that the code that reports back the profile mode got broken. I read the BIOS to determine the profile mode and had added a change to also determine the functional mode (MMC/PSC/AMT) at the same time (the standard API returns both). What I had missed is that some Intel platforms have a different API for getting the platform profile in MMC mode. It's honestly a bit of a BIOS quirkiness in implementation specific to some platforms. The problem is that API does not return the functional mode - and missing that broke how the operational mode is reported back to user space. Upstream patch is: https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/commit/?h=fixes&id=1bc5d819f0b9784043ea08570e1b21107aa35739 It's been accepted by the maintainer and marked for stable so hopefully it will propagate fairly quickly (the fix for the AMD platforms that broke this did!) Mark Hey Mark, I build the kernel with your new patch and issue solved for me! Cheers, Iyán Phew! I've been testing it here but it takes time for each platform and today has been tied up with meetings - really appreciate the feedback. Thank you! Fixed in 6.1.9 https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/drivers/platform/x86/thinkpad_acpi.c?h=linux-6.1.y#n10519 Already gave it a test drive and everything is working back to normal. Yeah, I updated to 6.1.9 using Arch's repos and it works just fine. Closing. |