From: Armin Wolf <W_Armin@gmx.de>
To: "孙 誉铭" <wolf109909@outlook.com>,
"platform-driver-x86@vger.kernel.org"
<platform-driver-x86@vger.kernel.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Mingyou Chen" <qby140326@gmail.com>,
"Hans de Goede" <hansg@kernel.org>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"Nabil Danial" <nabildanial.93@gmail.com>
Subject: Re: [RESEND PATCH 0/5] platform/x86: bitland-mifs-wmi: MIFS v2 firmware support (Xiaomi Book Pro 14 2026)
Date: Wed, 26 Aug 2026 23:45:12 +0200 [thread overview]
Message-ID: <2526d874-2ebb-48b3-b5d2-33addcff3fdb@gmx.de> (raw)
In-Reply-To: <20260728180944.51356-1-wolf109909@outlook.com>
Am 28.07.26 um 20:09 schrieb 孙 誉铭:
> Resending: the foxmail envelope rewrite (tencent...@qq.com) appears to
> have gotten the first attempt filtered. No content changes.
>
> This series makes the Bitland MIFS WMI driver work on the Xiaomi Book
> Pro 14 2026 (Intel Panther Lake, Ultra 5 358H) and very likely on the
> REDMI Book Pro 14 2025, whose suspend failure was reported earlier [1].
>
> These machines ship a reduced MIFS firmware ("v2"): the WMAA method
> implements only function groups 0x0800/0x0a00/0x0c00/0x1000, reports
> the performance mode as raw QFAN EC codes {2,3,4,9,10} instead of the
> v1 0..3 enumeration, and exposes no WMI fan function. Additionally the
> firmware never defines ECON, so \_SB.PC00.LPCB.Q_EC._STA fails and the
> ACPI EC driver never binds, which kills all EC query handlers
> (including the lid switch notifications _Q0C/_Q0D).
Sorry for the late reply.
This looks like a severe ACPI bug to me, can you share the output of "acpidump"?
Thanks,
Armin Wolf
> Symptoms fixed by this series, all reproduced and verified on the
> affected machine:
>
> * Suspend/hibernate aborted with -EINVAL from the driver's suspend
> hook (same failure as [1]: "dpm_run_callback():
> bitland_mifs_wmi_suspend returns -22"; 242 failures counted in
> suspend_stats). Patch 1 makes the WMI call validate the firmware
> status word and the suspend/resume hooks fault-tolerant.
>
> * power-profiles-daemon could not read or set the platform profile
> ("Failed to get profile for handler bitland-mifs-wmi"; selecting
> "performance" failed outright and wedged the daemon). Patch 2
> detects the v2 firmware variant at probe and maps the QFAN codes
> (2=quiet, 3=balanced, 4=speed, 9/10=extreme).
>
> * The hwmon device reported zero RPM on all channels because the v2
> firmware has no WMI fan function. Patch 3 reads the two fan
> tachometers (u16 RPM, 0 = stopped) from the EC shared-memory window
> at 0xFE0B0300 (DSDT region "ERAM", offsets 0x69/0x6B).
>
> * Closing the lid produced no SW_LID event (screen stayed on, keys
> pressed by the closed lid typed into the visible lock screen,
> locking the account). Patch 4 polls the LSTE lid bit in the EC
> window and, on a change, evaluates the very AML methods the EC
> query would have run (_Q0C/_Q0D), restoring proper lid events.
> DMI-gated to the affected model.
>
> All values were reverse-engineered from the machine's DSDT/SSDT
> (WMID device, _UID "MIFS") and verified live: mode switching changes
> the EC QFAN register as expected, fan tachs ramp 0 -> ~2700 RPM under
> load, lid close/open emit proper switch events consumed by
> systemd-logind, and suspend/resume cycles complete cleanly with the
> driver loaded (suspend_stats: fail 0).
>
> Notes for reviewers:
>
> * The v2 variant is detected at runtime (perf-mode query result
> outside the v1 enumeration) so other Bitland machines sharing this
> firmware generation get support without DMI entries; the lid quirk
> additionally requires a DMI match.
> * On this platform the firmware perf-mode switch reaches Intel DTT
> (\_SB.IETM, INTC10D4) via ODV variables; mainline has no driver for
> that device, so the TDP change the firmware intends is currently
> not applied on Linux. Programming RAPL directly from this driver
> seemed inappropriate; I left it out. Happy to hear preferences.
> * Interactions with the in-flight "Merge redmi-wmi into
> bitland-mifs-wmi" series [2] are limited to file context; the
> control-device paths touched here are disjoint from the event-device
> merge.
>
> [1] https://lists.openwall.net/linux-kernel/2026/07/10/72
> "[BUG] platform/x86: bitland-mifs-wmi: Hibernation fails with
> error -22 on Xiaomi Redmi Book Pro 14 2025"
> [2] https://www.spinics.net/lists/kernel/msg6309086.html
> "[PATCH v1 0/4] Merge redmi-wmi into bitland-mifs-wmi"
>
>
> Yuming Sun (5):
> platform/x86: bitland-mifs-wmi: validate WMAA status, never abort
> suspend
> platform/x86: bitland-mifs-wmi: support MIFS v2 perf-mode mapping
> platform/x86: bitland-mifs-wmi: read fan tach from EC window on MIFS
> v2
> platform/x86: bitland-mifs-wmi: drive lid switch via EC poll on Xiaomi
> Book Pro 14
> Documentation: wmi: bitland-mifs-wmi: document MIFS v2 firmware
> variant
>
> .../wmi/devices/bitland-mifs-wmi.rst | 26 ++
> drivers/platform/x86/bitland-mifs-wmi.c | 272 +++++++++++++++++-
> 2 files changed, 290 insertions(+), 8 deletions(-)
>
prev parent reply other threads:[~2026-08-26 21:45 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-28 18:09 孙 誉铭
2026-07-28 18:09 ` [RESEND PATCH 1/5] platform/x86: bitland-mifs-wmi: validate WMAA status, never abort suspend 孙 誉铭
2026-08-24 15:42 ` Ilpo Järvinen
2026-08-26 13:26 ` KentoNion
2026-08-26 13:29 ` KentoNion
2026-07-28 18:09 ` [RESEND PATCH 2/5] platform/x86: bitland-mifs-wmi: support MIFS v2 perf-mode mapping 孙 誉铭
2026-07-30 10:56 ` Mingyou Chen
2026-08-16 22:18 ` kento
2026-07-28 18:10 ` [RESEND PATCH 3/5] platform/x86: bitland-mifs-wmi: read fan tach from EC window on MIFS v2 孙 誉铭
2026-08-24 15:48 ` Ilpo Järvinen
2026-07-28 18:10 ` [RESEND PATCH 4/5] platform/x86: bitland-mifs-wmi: drive lid switch via EC poll on Xiaomi Book Pro 14 孙 誉铭
2026-08-24 16:00 ` Ilpo Järvinen
2026-08-26 13:26 ` KentoNion
2026-08-26 13:29 ` KentoNion
2026-07-28 18:10 ` [RESEND PATCH 5/5] Documentation: wmi: bitland-mifs-wmi: document MIFS v2 firmware variant 孙 誉铭
2026-07-30 9:24 ` [RESEND PATCH 0/5] platform/x86: bitland-mifs-wmi: MIFS v2 firmware support (Xiaomi Book Pro 14 2026) Armin Wolf
2026-08-26 13:26 ` KentoNion
2026-08-26 13:29 ` KentoNion
2026-08-27 22:04 ` Armin Wolf
2026-08-26 21:45 ` Armin Wolf [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2526d874-2ebb-48b3-b5d2-33addcff3fdb@gmx.de \
--to=w_armin@gmx.de \
--cc=hansg@kernel.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nabildanial.93@gmail.com \
--cc=platform-driver-x86@vger.kernel.org \
--cc=qby140326@gmail.com \
--cc=wolf109909@outlook.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®