Bug 219643
Summary: | thinkpad_acpi: Fan control not available since 6.12 for older(?) Ryzen models | ||
---|---|---|---|
Product: | ACPI | Reporter: | Vlastimil Holer (vlastimil.holer) |
Component: | Power-Fan | Assignee: | acpi_power-fan |
Status: | NEEDINFO --- | ||
Severity: | normal | CC: | crok.bic, eduard.c.dumitrescu, hearnia_2k, ImanDevel |
Priority: | P3 | ||
Hardware: | AMD | ||
OS: | Linux | ||
Kernel Version: | Subsystem: | ||
Regression: | No | Bisected commit-id: | |
Attachments: |
t495s ACPI DSDT disassembly
proposed patch which disables ACPI fan access for the T495 and T495s proposed patch which disables the ACPI fan access method for the T495 and T495s proposed patch which disables the ACPI fan access method for the T495 and T495s and E560 Hearnia_2k's dsdt from a ThinkPad x395 |
Description
Vlastimil Holer
2024-12-30 16:57:22 UTC
Reported hardware: - Thinkpad T495 - AMD Ryzen 5 PRO 3500U - Kernel 6.12.7 Since this is a regression, please bisect: https://docs.kernel.org/admin-guide/bug-bisect.html Hello Everyone, It looks like I have the very same laptop and the very same problem (Thinkpad T495 && AMD Ryzen 5 PRO 3500U). DMESG: [ 1.453359] thinkpad_acpi: ThinkPad ACPI Extras v0.26 [ 1.453365] thinkpad_acpi: http://ibm-acpi.sf.net/ [ 1.453367] thinkpad_acpi: ThinkPad BIOS R12ET64W(1.34 ), EC R12HT64W [ 1.453370] thinkpad_acpi: Lenovo ThinkPad T495, model 20NKS0MF00 [ 1.453831] thinkpad_acpi: radio switch found; radios are enabled [ 1.453845] thinkpad_acpi: This ThinkPad has standard ACPI backlight brightness control, supported by the ACPI video driver [ 1.453847] thinkpad_acpi: Disabling thinkpad-acpi brightness events by default… [ 1.459443] thinkpad_acpi: rfkill switch tpacpi_bluetooth_sw: radio is unblocked [ 1.478073] thinkpad_acpi: Standard ACPI backlight interface available, not loading native one [ 1.544670] thinkpad_acpi: battery 1 registered (start 95, stop 100, behaviours: 0x7) [ 1.546536] input: ThinkPad Extra Buttons as /devices/platform/thinkpad_acpi/input/input5 Do work with kernel 6.6 using the very same module options (options thinkpad_acpi fan_control=1 with and without experimental=1) but on 6.12.12-1-lts and never worked with any version of 6.12. I have performed the bisection. The bug was introduced in commit 57d0557dfa4940919ec2971245a6d288e5d85aa8 which adds a new fan control method via the FANG and FANW ACPI methods. In particular, have a look at the `fan_init` method. The T495s laptop has the FANG+FANW ACPI methods (therefore `fang_handle!=NULL` and `fanw_handle!=NULL`) but they do not actually work, which results in the dreaded "No such device or address" error. Fan access and control is restored after forcing the legacy non-ACPI fan control method by setting both `fang_handle` and `fanw_handle` to NULL. I speculate that the underlying cause is related to the following dmesg line: thinkpad_acpi: secondary fan control detected & enabled The DSDT table code for the FANG+FANW methods doesn't seem to do anything special regarding the fan being secondary, but I am not an ACPI expert. I will attach the relevant dump file anyway. I also note that the current thinkpad_acpi module FANG+FANW code does not handle secondary fans in any way. Finally, I am attaching my patch which adds a quirk for T495 and T495s to make them avoid the FANG/FANW methods. Created attachment 307606 [details]
t495s ACPI DSDT disassembly
Created attachment 307607 [details]
proposed patch which disables ACPI fan access for the T495 and T495s
Created attachment 307608 [details]
proposed patch which disables the ACPI fan access method for the T495 and T495s
Ah I should have diff'd against 6.13, not an older version.
Hi, It was very kind of you, thanks a ton! Hopefully it will be merged soon. Can I -somehow- test it myself in an easy way? (In reply to Eduard Christian Dumitrescu from comment #7) > Created attachment 307608 [details] > proposed patch which disables the ACPI fan access method for the T495 and > T495s > > Ah I should have diff'd against 6.13, not an older version. Check out this commit in mainline at v6.14-rc341^24: 1046cac109225eda0973b898e053aeb3d6c10e1d The attribute you used in your patch is already in use: +#define TPACPI_FAN_TPR 0x0040 /* Fan speed is in Ticks Per Revolution */ (In reply to Seyediman Seyedarab from comment #9) > (In reply to Eduard Christian Dumitrescu from comment #7) > > Created attachment 307608 [details] > > proposed patch which disables the ACPI fan access method for the T495 and > > T495s > > > > Ah I should have diff'd against 6.13, not an older version. > > Check out this commit in mainline at v6.14-rc341^24: > 1046cac109225eda0973b898e053aeb3d6c10e1d > > The attribute you used in your patch is already in use: > +#define TPACPI_FAN_TPR 0x0040 /* Fan speed is in Ticks Per > Revolution */ My apologies, I meant v6.14-rc3~41^2~4. Also, users with the E560 experience the same issue, and this does the trick: TPACPI_Q_LNV3('R', '0', '0', TPACPI_FAN_NOACPI); /* E560 */ Maybe you should add this to your patch too. Created attachment 307719 [details]
proposed patch which disables the ACPI fan access method for the T495 and T495s and E560
Updated patch against v6.14-rc4 because a conflicting flag was added. Also added affected model E560 as reported by Seyediman Seyedarab.
This issue also impacts the Thinkpad X395. I would not be surprised if it also impacted a T14 Gen 1. I installed the latest kernel from Fedora Stable-rc, which is 6.14.0-362.vanilla.fc41.x86_64 and I still have the same issue this ticket describes. I'm happy to provide further information to help resolve this if I can do, however I likely need some pointers or steps to provide helpful information. Thanks! (In reply to hearnia_2k from comment #12) > This issue also impacts the Thinkpad X395. > > I would not be surprised if it also impacted a T14 Gen 1. I installed the > latest kernel from Fedora Stable-rc, which is 6.14.0-362.vanilla.fc41.x86_64 > and I still have the same issue this ticket describes. > > I'm happy to provide further information to help resolve this if I can do, > however I likely need some pointers or steps to provide helpful information. > > > Thanks! Hi there, The patch hasn't made it to the mainline yet, but you can find it here: https://web.git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/commit/?h=review-ilpo-fixes&id=2b9f84e7dc863afd63357b867cea246aeedda036 Could you please share the disassembled version of your DSDT? We need your ThinkPad ID to add the quirk for it: $ cat /sys/firmware/acpi/tables/DSDT > dsdt.dat $ iasl -d dsdt.dat If everything goes well, you should get a .dsl file. Please upload it here. Hello! Yes, I get a dsl file. I don't see an upload option, though? Here was the output from the iasl command, it had some warnings, not too sure how important / relevant they are, so sharing in case it's helpful! iasl -d dsdt.dat Intel ACPI Component Architecture ASL+ Optimizing Compiler/Disassembler version 20240322 Copyright (c) 2000 - 2023 Intel Corporation File appears to be binary: found 18034 non-ASCII characters, disassembling Binary file appears to be a valid ACPI table, disassembling Input file dsdt.dat, Length 0xDAB3 (55987) bytes ACPI: DSDT 0x0000000000000000 00DAB3 (v01 LENOVO TP-R13 000011E0 INTL 20120711) Pass 1 parse of [DSDT] Pass 2 parse of [DSDT] Parsing Deferred Opcodes (Methods/Buffers/Packages/Regions) Parsing completed Found 7 external control methods, reparsing with new information Pass 1 parse of [DSDT] Pass 2 parse of [DSDT] Parsing Deferred Opcodes (Methods/Buffers/Packages/Regions) Parsing completed Disassembly completed ASL Output: dsdt.dsl - 483005 bytes iASL Warning: There were 7 external control methods found during disassembly, but only 0 were resolved (7 unresolved). Additional ACPI tables may be required to properly disassemble the code. This resulting disassembler output file may not compile because the disassembler did not know how many arguments to assign to the unresolved methods. Note: SSDTs can be dynamically loaded at runtime and may or may not be available via the host OS. To specify the tables needed to resolve external control method references, the -e option can be used to specify the filenames. Example iASL invocations: iasl -e ssdt1.aml ssdt2.aml ssdt3.aml -d dsdt.aml iasl -e dsdt.aml ssdt2.aml -d ssdt1.aml iasl -e ssdt*.aml -d dsdt.aml In addition, the -fe option can be used to specify a file containing control method external declarations with the associated method argument counts. Each line of the file must be of the form: External (<method pathname>, MethodObj, <argument count>) Invocation: iasl -fe refs.txt -d dsdt.aml I have uploaded the dsdt file that I got as a result. I can provide other info if it's helpful :-) Thanks for the quick response! Created attachment 307913 [details]
Hearnia_2k's dsdt from a ThinkPad x395
This is the decrypted dsdt from a ThinkPad X395.
(In reply to hearnia_2k from comment #15) > Created attachment 307913 [details] > Hearnia_2k's dsdt from a ThinkPad x395 > > This is the decrypted dsdt from a ThinkPad X395. Thank you. You should wait for the patch to make it into the mainline. Your ThinkPad ID is the same as the T495s, so it should be fixed. Looks like the patch has been merged and I got back my fancontrol! uname -a Linux clifford 6.12.23-1-lts #1 SMP PREEMPT_DYNAMIC Thu, 10 Apr 2025 13:28:36 +0000 x86_64 GNU/Linux cat /proc/acpi/ibm/fan status: disabled speed: 0 level: 0 commands: level <level> (<level> is 0-7, auto, disengaged, full-speed) commands: enable, disable commands: watchdog <timeout> (<timeout> is 0 (off), 1-120 (seconds)) Thank you so much! |