From: Armin Wolf <W_Armin@gmx.de>
To: Nikita Krasnov <nikita.nikita.krasnov@gmail.com>,
linux-acpi@vger.kernel.org, linux-input@vger.kernel.org,
platform-driver-x86@vger.kernel.org, linux@weissschuh.net,
fengwk94@gmail.com
Subject: Re: Missing ACPI driver for a keyboard button in Xiaomi RedmiBook Pro 16
Date: Mon, 21 Jul 2025 01:23:32 +0200 [thread overview]
Message-ID: <68cc7f60-39b1-47f3-9120-82f8b0f26d9c@gmx.de> (raw)
In-Reply-To: <6c7e2d8a-8c79-4311-8126-c888a6519c71@gmail.com>
Am 20.07.25 um 01:39 schrieb Nikita Krasnov:
> Hello!
>
> I have a Xiaomi RedmiBook Pro 16 laptop and I suspect it is missing a
> driver.
>
> The laptop has a top row of F1-F12 buttons that can also control volume,
> brightness and many other things. Most of them work fine and produce a
> completely valid output (shown via `acpi_listen` from the `acpid`
> package):
>
> button/mute MUTE 00000080 00000000
> button/volumedown VOLDN 00000080 00000000
> button/volumeup VOLUP 00000080 00000000
> video/brightnessdown BRTDN 00000087 00000000
> video/brightnessup BRTUP 00000086 00000000
>
> But then there is a "Mute mic" key (F4 button with an image of a
> crossed-out microphone). It has an LED that lights up and down when the
> button is being pressed, but there is no keycode, no dmesg message and
> no _valid_ ACPI event — the message in `acpi_listen` is always the same,
> no matter the state of the button. Pressing the button multiple times
> produces the same output:
>
> wmi PNP0C14:00 00000020 00000000
>
> Might be a good time to mention that I nave 0 experience with ACPI, WMI
> and drivers in general... I tried debugging the issue further and got
> some data, but I lack the proper knowledge to interpret it.
>
> Running `acpidump -b` (from `acpica-tools` package) generated some .dat
> files which I then decompiled with `iasl -d` (from the same
> `acpica-tools` package).
>
> # acpidump -b
> # iasl -d dsdt.dat
>
> The resulting `dsdt.dsl` file has some code that mentions "PNP0C14".
> I've attached this file with this email.
Hi,
please share the whole output of acpidump as the DSDT contains only two unrelated
WMI devices.
> I also tried restarting the kernel with this configuration (NixOS
> shenanigans; not sure what exactly it does there), but that didn't seem
> to produce any extra files or directories on the system (in /sys and
> /dev).
>
> boot.initrd.availableKernelModules = [
> "xhci_pci"
> "thunderbolt"
> "nvme"
> "usb_storage"
> "sd_mod"
> ];
> boot.initrd.kernelModules = [ ];
> boot.kernelModules = [ "kvm-intel" "wmi-sysfs" "wmi" "acpi_call" ];
> boot.extraModulePackages = [ ];
Those additional modules will likely not help you, i suspect that we need
to extend the xiaomi-wmi driver a bit to add support for additional keyboard
events.
> Here is some extra info that might be relevant:
>
> $ ls /dev/wmi
> ls: cannot access '/dev/wmi': No such file or directory
>
> $ ls -1 /sys/bus/wmi/devices
> 05901221-D566-11D1-B2F0-00A0C9062910
> 05901221-D566-11D1-B2F0-00A0C9062910-1
> 05901221-D566-11D1-B2F0-00A0C9062910-2
> 05901221-D566-11D1-B2F0-00A0C9062910-3
> 1DCEAF0A-4D63-44BB-BD0C-0D6281BFDDC5
> 1F13AB7F-6220-4210-8F8E-8BB5E71EE969
> 2BC49DEF-7B15-4F05-8BB7-EE37B9547C0B
> 3F9E3C26-B077-4F86-91F5-37FF64D8C7ED
> 46C93E13-EE9B-4262-8488-563BCA757FEF
> 657B6048-310C-4A90-A211-10A17922A0AF
> A6FEA33E-DABF-46F5-BFC8-460D961BEC9F
> B60BFB48-3E5B-49E4-A0E9-8CFFE1B3434B
> F80A5498-23F3-4053-A244-B39067EC476F
> FA78E245-2C0F-4CA1-91CF-15F34E474850
>
> $ ls /sys/bus/wmi/devices/2BC49DEF-7B15-4F05-8BB7-EE37B9547C0B/
> driver_override expensive guid instance_count
> modalias object_id power subsystem uevent
>
> $ uname -a
> Linux 6.15.5 #1-NixOS SMP PREEMPT_DYNAMIC x86_64 GNU/Linux
>
> $ ls /proc/acpi
> button wakeup
>
> $ sudo cat /proc/acpi/button/lid/LID0/state
> state: open
>
> $ sudo cat /proc/acpi/wakeup
> Device S-state Status Sysfs node
> AWAC S4 *enabled platform:ACPI000E:00
> XDCI S4 *disabled
> XHCI S4 *enabled pci:0000:00:14.0
> HDAS S4 *disabled pci:0000:00:1f.3
> I3C0 S4 *disabled
> CNVW S4 *disabled pci:0000:00:14.3
> RP01 S4 *disabled
> PXSX S4 *disabled
> RP02 S4 *disabled
> PXSX S4 *disabled
> RP03 S4 *disabled
> PXSX S4 *disabled
> RP04 S4 *disabled
> PXSX S4 *disabled
> RP05 S4 *disabled
> PXSX S4 *disabled
> RP06 S4 *disabled
> PXSX S4 *disabled
> RP07 S4 *disabled
> PXSX S4 *disabled
> RP08 S4 *disabled
> PXSX S4 *disabled
> RP09 S4 *enabled pci:0000:00:06.0
> PXSX S4 *disabled pci:0000:01:00.0
> RP10 S4 *disabled
> PXSX S4 *disabled
> RP11 S4 *disabled
> PXSX S4 *disabled
> RP12 S4 *disabled
> PXSX S4 *disabled
> TXHC S4 *enabled pci:0000:00:0d.0
> TDM0 S4 *enabled pci:0000:00:0d.2
> TDM1 S4 *disabled
> TRP0 S4 *disabled
> PXSX S4 *disabled
> TRP1 S4 *enabled pci:0000:00:07.0
> PXSX S4 *disabled
> TRP2 S4 *disabled
> PXSX S4 *disabled
> TRP3 S4 *disabled
> PXSX S4 *disabled
>
> As I said, I don't actually understand what I'm doing here, but I'd
> really like to learn! It would be really cool if I ended up having to
> write and contribute my first driver!
>
> Sorry if I am somehow posting this incorrectly. This is my first time
> communicating here, just trying my best.
You already provided a lot of data, good job :).
I think that we do not need another driver in this case, as the xiaomi-wmi driver
is responsible for handling WMI events on Xiaomi devices. I can check what needs
to be done in order to add support for those additional keyboard events, but for
that i need the full output of acpidump.
Thanks,
Armin Wolf
>
> P.S. CC'ing W_Armin@gmx.de, linux@weissschuh.net and fengwk94@gmail.com
> since I've got the impression you have some experience with this.
>
next prev parent reply other threads:[~2025-07-20 23:23 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-19 23:39 Missing ACPI driver for a keyboard button in Xiaomi RedmiBook Pro 16 Nikita Krasnov
2025-07-20 10:58 ` Nikita Krasnov
2025-07-20 23:17 ` Armin Wolf
2025-07-20 23:23 ` Armin Wolf [this message]
2025-07-22 12:48 ` Nikita Krasnov
2025-07-22 16:09 ` Armin Wolf
2025-07-27 11:23 ` Nikita Krasnov
2025-07-27 22:24 ` Armin Wolf
2025-07-27 23:36 ` Nikita Krasnov
2025-07-28 21:22 ` Armin Wolf
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=68cc7f60-39b1-47f3-9120-82f8b0f26d9c@gmx.de \
--to=w_armin@gmx.de \
--cc=fengwk94@gmail.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux@weissschuh.net \
--cc=nikita.nikita.krasnov@gmail.com \
--cc=platform-driver-x86@vger.kernel.org \
/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