mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Anton Karasev <uselessfire@gmail.com>
To: W_Armin@gmx.de, martiya.ar@gmail.com,
	platform-driver-x86@vger.kernel.org
Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
	qby140326@gmail.com, ilpo.jarvinen@linux.intel.com,
	hansg@kernel.org
Subject: Re: [BUG] Redmi Book Pro 16 2024 platform_profile write fails on Linux 7.1.7
Date: Wed, 30 Sep 2026 04:54:36 +0300	[thread overview]
Message-ID: <20260930015436.3095516-1-uselessfire@gmail.com> (raw)
In-Reply-To: <3b58a0ae-f050-4dd5-80f6-bf2cdfc20318@gmx.de>

Hi Armin,

I have the same machine as Martiya (Redmi Book Pro 16 2024, DMI
XIAOMI / TM2309, BIOS RMAMT6B0P0B0B, which is the latest BIOS Xiaomi
publishes for this model). In case it is useful to have it on the list,
here is its full acpidump (all tables, acpidump -o):

  https://bugzilla.kernel.org/attachment.cgi?id=310971

What the tables say about the Mifs interface on this BIOS, and what I
verified on the machine:

- The method is \_SB.PC00.WMID.WMAA, in the SSDT with OEM Table ID
  XMCC1806. It implements only command 0x08 (GET and SET), 0x0a
  subcommand 5, and 0x10 (GET subcommands 1-3, SET subcommand 2 only).
  Other command IDs answer 0xE000, including WMI_FN_SYSTEM_AC_TYPE,
  which your "Treat WMI_FN_SYSTEM_AC_TYPE as optional" patch now
  handles; unhandled subcommands mostly return status 0.

- The SET branches set only the return code and leave the function id
  at 0; only the GET branches fill it in. So on this BIOS "Detect failed
  function calls" reports every SET as failed with -ENOMSG, although the
  firmware applies it -- the same as Chris reported for the Xiaomi Book
  Pro 14 in "Only check the function id of GET responses". Verified with
  the for-next driver built for 7.2.7: every profile write failed with
  -ENOMSG while the EC mode changed; with Chris's patch on top, all of
  them succeed.

- The mode values are not the Bitland ones. SET of 0x08 stores the value
  in the EC register QFAN as is, and NTDP in the DSDT maps QFAN to the
  DPTF variable \_SB.ODV1: 0/1 balanced (ODV1 0), 2 quiet (2), 3
  performance/Turbo (1), 4 full speed/Geek (4). With your two patches
  the AC type check now passes on AC, and the value "performance" writes
  (3) happens to be Turbo here; "balanced-performance" writes 1, which is
  balanced, and after Fn+K to balanced (QFAN 1) platform_profile reads
  back balanced-performance. On battery performance is still refused by
  power_supply_is_system_supplied(), although the firmware accepts Turbo
  there.

- Command 0x10 is the battery interface on this firmware (subcommand 2
  is the 80 % charge protection), which makes the existing kb_mode
  attribute dangerous: writing "fixed" to it turns charge protection off.
  Verified on the machine.

I have put the details, including the test results, in a reply to
[PATCH v6 5/5] of the redmi-wmi merge series, since that is where the
per-machine table is being discussed. I am happy to test patches on
this model.

Thanks,
Anton Karasev

      reply	other threads:[~2026-09-30  1:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-11 18:55 Martiya Aryan Mehr
2026-08-26 21:26 ` Armin Wolf
2026-09-30  1:54   ` Anton Karasev [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=20260930015436.3095516-1-uselessfire@gmail.com \
    --to=uselessfire@gmail.com \
    --cc=W_Armin@gmx.de \
    --cc=hansg@kernel.org \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martiya.ar@gmail.com \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=qby140326@gmail.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®