public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Janne Grunau <j@jannau.net>
To: Armin Wolf <W_Armin@gmx.de>
Cc: Jiri Kosina <jikos@kernel.org>,
	Benjamin Tissoires <bentiss@kernel.org>,
	Vishnu Sankar <vishnuocv@gmail.com>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Len Brown <lenb@kernel.org>,
	linux-acpi@vger.kernel.org, linux-input@vger.kernel.org,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] HID: lenovo: Unbreak USB/BT keyboards on non-ACPI platforms
Date: Fri, 16 May 2025 01:05:37 +0200	[thread overview]
Message-ID: <20250515230537.GA1556976@robin.jannau.net> (raw)
In-Reply-To: <b77edae0-50bd-4039-9487-15bb69389c6c@gmx.de>

On Fri, May 16, 2025 at 12:05:11AM +0200, Armin Wolf wrote:
> Am 12.05.25 um 23:55 schrieb Janne Grunau via B4 Relay:
> 
> > From: Janne Grunau <j@jannau.net>
> >
> > Commit 84c9d2a968c8 ("HID: lenovo: Support for ThinkPad-X12-TAB-1/2 Kbd
> > Fn keys") added a dependency on ACPI_PLATFORM_PROFILE to cycle through
> > power profiles. This breaks USB and Bluetooth keyboards on non-ACPI
> > platforms since platform_profile_init() fails. See the warning below for
> > the visible symptom but cause is the dependency on the platform_profile
> > module.
> >
> > [  266.225052] kernel: usb 1-1.3.2: new full-speed USB device number 9 using xhci_hcd
> > [  266.316032] kernel: usb 1-1.3.2: New USB device found, idVendor=17ef, idProduct=6047, bcdDevice= 3.30
> > [  266.327129] kernel: usb 1-1.3.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
> > [  266.327623] kernel: usb 1-1.3.2: Product: ThinkPad Compact USB Keyboard with TrackPoint
> > [  266.328096] kernel: usb 1-1.3.2: Manufacturer: Lenovo
> > [  266.337488] kernel: ------------[ cut here ]------------
> > [  266.337551] kernel: WARNING: CPU: 4 PID: 2619 at fs/sysfs/group.c:131 internal_create_group+0xc0/0x358
> > [  266.337584] kernel: Modules linked in: platform_profile(+) nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct nft>
> > [  266.337685] kernel:  apple_sio spi_apple apple_dart soundcore spmi_apple_controller pinctrl_apple_gpio i2c_pasemi_platform apple_admac i2c_pasemi_core clk_apple_nco xhci_pla>
> > [  266.337717] kernel: CPU: 4 UID: 0 PID: 2619 Comm: (udev-worker) Tainted: G S      W          6.14.4-400.asahi.fc41.aarch64+16k #1
> > [  266.337750] kernel: Tainted: [S]=CPU_OUT_OF_SPEC, [W]=WARN
> > [  266.337776] kernel: Hardware name: Apple Mac mini (M1, 2020) (DT)
> > [  266.337808] kernel: pstate: 61400009 (nZCv daif +PAN -UAO -TCO +DIT -SSBS BTYPE=--)
> > [  266.337834] kernel: pc : internal_create_group+0xc0/0x358
> > [  266.337860] kernel: lr : sysfs_create_group+0x20/0x40
> > [  266.337886] kernel: sp : ffff800086f877a0
> > [  266.337914] kernel: x29: ffff800086f877b0 x28: 0000000000000000 x27: ffffb66d0b338348
> > [  266.337939] kernel: x26: ffffb66d0b338358 x25: ffffb66d528c7c50 x24: ffffb66d507e37b0
> > [  266.337965] kernel: x23: 0000fffebf6708d8 x22: 0000000000000000 x21: ffffb66d0b370340
> > [  266.337991] kernel: x20: ffffb66d0b370308 x19: 0000000000000000 x18: 0000000000000000
> > [  266.338029] kernel: x17: 554e514553007373 x16: ffffb66d4f8c2268 x15: 595342555300656c
> > [  266.338051] kernel: x14: 69666f72702d6d72 x13: 00353236353d4d55 x12: 4e51455300737361
> > [  266.338075] kernel: x11: ffff6adf91b80100 x10: 0000000000000139 x9 : ffffb66d4f8c2288
> > [  266.338097] kernel: x8 : ffff800086f87620 x7 : 0000000000000000 x6 : 0000000000000000
> > [  266.338116] kernel: x5 : ffff6adfc896e100 x4 : 0000000000000000 x3 : ffff6adfc896e100
> > [  266.338139] kernel: x2 : ffffb66d0b3703a0 x1 : 0000000000000000 x0 : 0000000000000000
> > [  266.338155] kernel: Call trace:
> > [  266.338173] kernel:  internal_create_group+0xc0/0x358 (P)
> > [  266.338193] kernel:  sysfs_create_group+0x20/0x40
> > [  266.338206] kernel:  platform_profile_init+0x48/0x3ff8 [platform_profile]
> > [  266.338224] kernel:  do_one_initcall+0x60/0x358
> > [  266.338239] kernel:  do_init_module+0x94/0x260
> > [  266.338257] kernel:  load_module+0x5e0/0x708
> > [  266.338271] kernel:  init_module_from_file+0x94/0x100
> > [  266.338290] kernel:  __arm64_sys_finit_module+0x268/0x360
> > [  266.338309] kernel:  invoke_syscall+0x6c/0x100
> > [  266.338327] kernel:  el0_svc_common.constprop.0+0xc8/0xf0
> > [  266.338346] kernel:  do_el0_svc+0x24/0x38
> > [  266.338365] kernel:  el0_svc+0x3c/0x170
> > [  266.338385] kernel:  el0t_64_sync_handler+0x10c/0x138
> > [  266.338404] kernel:  el0t_64_sync+0x1b0/0x1b8
> > [  266.338419] kernel: ---[ end trace 0000000000000000 ]---
> >
> > Fixes: 84c9d2a968c8 ("HID: lenovo: Support for ThinkPad-X12-TAB-1/2 Kbd Fn keys")
> > Cc: stable@vger.kernel.org
> > Signed-off-by: Janne Grunau <j@jannau.net>
> >
> > ------>8---------
> > I don't see an easy solution to keep the functionality in generic HID
> > code which is used on non-ACPI platforms. Solution for this are not
> > trivial so remove the functionality for now.
> > Cc-ing the ACPI maintainers in the case they can think of a solution for
> > this issue.
> 
> Hi,
> 
> i think we can fix that. We just have to skip the compat stuff if acpi_kobj is NULL (means that ACPI is not used).
> The modern platform profile interface is generic enough to also work on non-ACPI systems.
> 
> Can you test a patch?

I can easily test patches

Janne

  reply	other threads:[~2025-05-15 23:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-12 21:55 [PATCH] HID: lenovo: Unbreak USB/BT keyboards on non-ACPI platforms Janne Grunau via B4 Relay
2025-05-15 22:05 ` Armin Wolf
2025-05-15 23:05   ` Janne Grunau [this message]
2025-05-17 15:58     ` Armin Wolf
2025-05-18  9:43       ` Janne Grunau
2025-05-18 17:46         ` Armin Wolf
2025-05-18 22:03           ` Janne Grunau

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=20250515230537.GA1556976@robin.jannau.net \
    --to=j@jannau.net \
    --cc=W_Armin@gmx.de \
    --cc=bentiss@kernel.org \
    --cc=jikos@kernel.org \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=vishnuocv@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