* [Bug 221238] New: lg-laptop: Spurious ACK and dropped keystrokes due to unprotected i8042 port access
@ 2026-03-15 11:15 bugzilla-daemon
2026-03-15 11:18 ` [Bug 221238] " bugzilla-daemon
` (9 more replies)
0 siblings, 10 replies; 11+ messages in thread
From: bugzilla-daemon @ 2026-03-15 11:15 UTC (permalink / raw)
To: platform-driver-x86
https://bugzilla.kernel.org/show_bug.cgi?id=221238
Bug ID: 221238
Summary: lg-laptop: Spurious ACK and dropped keystrokes due to
unprotected i8042 port access
Product: Drivers
Version: 2.5
Hardware: Intel
OS: Linux
Status: NEW
Severity: normal
Priority: P3
Component: Platform_x86
Assignee: drivers_platform_x86@kernel-bugs.osdl.org
Reporter: alfonso.garcia.frey@gmail.com
Regression: No
The lg-laptop driver (drivers/platform/x86/lg-laptop.c) communicates with the
LG embedded controller using raw inb()/outb() on i8042 ports 0x60/0x64,
completely bypassing the kernel's i8042 driver and its locking (i8042_mutex /
i8042_lock). This causes a race condition between lg-laptop EC transactions and
the atkbd driver's interrupt handling, resulting in:
1. atkbd serio0: Spurious ACK on isa0060/serio0. Some program might be trying
to access hardware directly.
2. Intermittent key drops — keys (particularly on the left side of the
keyboard matrix: s, w, left Ctrl) stop responding for several seconds.
3. Occasional phantom or misinterpreted scancodes.
The problem has worsened significantly since battery_hook_register() was added
to the driver (commit 822933b1b29), which causes periodic EC access in the
background on every battery status poll — independent of any user Fn-key
interaction.
Steps to reproduce:
1. Boot any LG Gram laptop (tested on 16Z90Q-G.AD76F, 2022 model) with the
lg_laptop module loaded.
2. Use the keyboard normally for 10-30 minutes.
3. Observe dmesg | grep "Spurious ACK" — messages accumulate over time.
4. Keys intermittently stop registering input.
Frequency:
- Kernel 6.8.0-101 (with battery_hook_register): ~28 spurious ACKs/day,
frequent key drops
- Kernel 5.15.0-171 (without battery hook): ~7 spurious ACKs/day, less
frequent key drops
- Blacklisting lg_laptop: 0 spurious ACKs, no key drops (confirms the driver
as the cause)
Hardware:
- LG Gram 16Z90Q-G.AD76F (2022)
- Built-in PS/2 keyboard: AT Translated Set 2 keyboard (i8042,
isa0060/serio0)
Affected kernel versions:
- 5.15.0-171-generic (Ubuntu/Mint)
- 6.8.0-101-generic (Ubuntu HWE)
- Likely all versions since driver inclusion (4.14+), worsened after battery
hook addition
Proposed fix:
Wrap the raw port I/O sequences in lg-laptop.c with i8042_lock_chip() /
i8042_unlock_chip() to serialize access with the kernel's i8042 interrupt
handler:
#include <linux/i8042.h>
static int lg_ec_read(unsigned char addr, unsigned char *val)
{
int ret;
ret = i8042_lock_chip();
if (ret)
return ret;
/* existing inb/outb sequence */
i8042_unlock_chip();
return 0;
}
This is the same approach used by other drivers that need direct EC port
access. All functionality is preserved.
Current workaround:
echo "blacklist lg_laptop" | sudo tee
/etc/modprobe.d/blacklist-lg-laptop.conf
This eliminates the issue but disables keyboard backlight, fan mode, battery
care, and Fn-key hotkey support.
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are watching the assignee of the bug.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug 221238] lg-laptop: Spurious ACK and dropped keystrokes due to unprotected i8042 port access
2026-03-15 11:15 [Bug 221238] New: lg-laptop: Spurious ACK and dropped keystrokes due to unprotected i8042 port access bugzilla-daemon
@ 2026-03-15 11:18 ` bugzilla-daemon
2026-03-15 11:29 ` [Bug 221238] lg-laptop: Spurious ACK and dropped keystrokes caused by ACPI method calls conflicting with i8042 driver bugzilla-daemon
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: bugzilla-daemon @ 2026-03-15 11:18 UTC (permalink / raw)
To: platform-driver-x86
https://bugzilla.kernel.org/show_bug.cgi?id=221238
Alfonso GARCIA FREY (alfonso.garcia.frey@gmail.com) changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |platform-driver-x86@vger.ke
| |rnel.org
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are on the CC list for the bug.
You are watching the assignee of the bug.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug 221238] lg-laptop: Spurious ACK and dropped keystrokes caused by ACPI method calls conflicting with i8042 driver
2026-03-15 11:15 [Bug 221238] New: lg-laptop: Spurious ACK and dropped keystrokes due to unprotected i8042 port access bugzilla-daemon
2026-03-15 11:18 ` [Bug 221238] " bugzilla-daemon
@ 2026-03-15 11:29 ` bugzilla-daemon
2026-03-15 11:34 ` bugzilla-daemon
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: bugzilla-daemon @ 2026-03-15 11:29 UTC (permalink / raw)
To: platform-driver-x86
https://bugzilla.kernel.org/show_bug.cgi?id=221238
Alfonso GARCIA FREY (alfonso.garcia.frey@gmail.com) changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|lg-laptop: Spurious ACK and |lg-laptop: Spurious ACK and
|dropped keystrokes due to |dropped keystrokes caused
|unprotected i8042 port |by ACPI method calls
|access |conflicting with i8042
| |driver
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are on the CC list for the bug.
You are watching the assignee of the bug.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug 221238] lg-laptop: Spurious ACK and dropped keystrokes caused by ACPI method calls conflicting with i8042 driver
2026-03-15 11:15 [Bug 221238] New: lg-laptop: Spurious ACK and dropped keystrokes due to unprotected i8042 port access bugzilla-daemon
2026-03-15 11:18 ` [Bug 221238] " bugzilla-daemon
2026-03-15 11:29 ` [Bug 221238] lg-laptop: Spurious ACK and dropped keystrokes caused by ACPI method calls conflicting with i8042 driver bugzilla-daemon
@ 2026-03-15 11:34 ` bugzilla-daemon
2026-03-15 13:56 ` bugzilla-daemon
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: bugzilla-daemon @ 2026-03-15 11:34 UTC (permalink / raw)
To: platform-driver-x86
https://bugzilla.kernel.org/show_bug.cgi?id=221238
--- Comment #1 from Alfonso GARCIA FREY (alfonso.garcia.frey@gmail.com) ---
Correction to the original description after creating a local test patch:
The original report incorrectly states the driver uses "raw inb()/outb() calls"
and references a battery_hook_register() function. Neither is accurate. The
actual situation:
The lg-laptop driver calls ACPI methods WMAB, WMBB, and GGOV via
acpi_evaluate_object(). These firmware-defined methods internally access the EC
through I/O ports shared with the i8042 keyboard controller, without
coordination with the kernel's i8042 driver. This causes the race condition
between ACPI method execution and atkbd interrupt handling, producing the
spurious ACKs and key drops.
The proposed fix remains the same — wrap acpi_evaluate_object() calls with
i8042_lock_chip() / i8042_unlock_chip() — but the reason is to serialize ACPI
method execution (which internally touches i8042 ports) with the i8042
interrupt handler, not to protect direct port I/O in the driver itself.
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are on the CC list for the bug.
You are watching the assignee of the bug.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug 221238] lg-laptop: Spurious ACK and dropped keystrokes caused by ACPI method calls conflicting with i8042 driver
2026-03-15 11:15 [Bug 221238] New: lg-laptop: Spurious ACK and dropped keystrokes due to unprotected i8042 port access bugzilla-daemon
` (2 preceding siblings ...)
2026-03-15 11:34 ` bugzilla-daemon
@ 2026-03-15 13:56 ` bugzilla-daemon
2026-03-15 13:58 ` bugzilla-daemon
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: bugzilla-daemon @ 2026-03-15 13:56 UTC (permalink / raw)
To: platform-driver-x86
https://bugzilla.kernel.org/show_bug.cgi?id=221238
Armin Wolf (W_Armin@gmx.de) changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |W_Armin@gmx.de
--- Comment #2 from Armin Wolf (W_Armin@gmx.de) ---
Can you share the output of "acpidump" on your machine?
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are on the CC list for the bug.
You are watching the assignee of the bug.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug 221238] lg-laptop: Spurious ACK and dropped keystrokes caused by ACPI method calls conflicting with i8042 driver
2026-03-15 11:15 [Bug 221238] New: lg-laptop: Spurious ACK and dropped keystrokes due to unprotected i8042 port access bugzilla-daemon
` (3 preceding siblings ...)
2026-03-15 13:56 ` bugzilla-daemon
@ 2026-03-15 13:58 ` bugzilla-daemon
2026-03-15 14:51 ` bugzilla-daemon
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: bugzilla-daemon @ 2026-03-15 13:58 UTC (permalink / raw)
To: platform-driver-x86
https://bugzilla.kernel.org/show_bug.cgi?id=221238
--- Comment #3 from Alfonso GARCIA FREY (alfonso.garcia.frey@gmail.com) ---
Created attachment 309669
--> https://bugzilla.kernel.org/attachment.cgi?id=309669&action=edit
acpidump
acpidump
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are on the CC list for the bug.
You are watching the assignee of the bug.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug 221238] lg-laptop: Spurious ACK and dropped keystrokes caused by ACPI method calls conflicting with i8042 driver
2026-03-15 11:15 [Bug 221238] New: lg-laptop: Spurious ACK and dropped keystrokes due to unprotected i8042 port access bugzilla-daemon
` (4 preceding siblings ...)
2026-03-15 13:58 ` bugzilla-daemon
@ 2026-03-15 14:51 ` bugzilla-daemon
2026-03-15 21:07 ` bugzilla-daemon
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: bugzilla-daemon @ 2026-03-15 14:51 UTC (permalink / raw)
To: platform-driver-x86
https://bugzilla.kernel.org/show_bug.cgi?id=221238
--- Comment #4 from Armin Wolf (W_Armin@gmx.de) ---
The ACPI bytecode indeed creates a operation region for the atkbd IO ports, but
said operation region is unused. So this cannot be the cause of your issues.
Can you check if the battery limit exposed by the driver actually works and
returns the correct values previously written to it?
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are on the CC list for the bug.
You are watching the assignee of the bug.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug 221238] lg-laptop: Spurious ACK and dropped keystrokes caused by ACPI method calls conflicting with i8042 driver
2026-03-15 11:15 [Bug 221238] New: lg-laptop: Spurious ACK and dropped keystrokes due to unprotected i8042 port access bugzilla-daemon
` (5 preceding siblings ...)
2026-03-15 14:51 ` bugzilla-daemon
@ 2026-03-15 21:07 ` bugzilla-daemon
2026-03-19 4:04 ` bugzilla-daemon
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: bugzilla-daemon @ 2026-03-15 21:07 UTC (permalink / raw)
To: platform-driver-x86
https://bugzilla.kernel.org/show_bug.cgi?id=221238
--- Comment #5 from Alfonso GARCIA FREY (alfonso.garcia.frey@gmail.com) ---
Tested battery_care_limit on kernel 5.15.0-171 with the stock lg-laptop module:
# cat /sys/devices/platform/lg-laptop/battery_care_limit
100
# echo 80 > /sys/devices/platform/lg-laptop/battery_care_limit
# cat /sys/devices/platform/lg-laptop/battery_care_limit
80
# echo 100 > /sys/devices/platform/lg-laptop/battery_care_limit
# cat /sys/devices/platform/lg-laptop/battery_care_limit
100
It looks like it works correctly for both values (80 and 100).
I also acknowledge that my original report incorrectly stated the driver uses
"raw inb()/outb()" — it actually uses acpi_evaluate_object() for
WMAB/WMBB/GGOV. The reference to battery_hook_register() is also incorrect for
5.15. Apologies for the inaccuracies.
The spurious ACK messages and key drops do still occur with the stock module
loaded and stop when the module is blacklisted (17 spurious ACKs per boot on
5.15, 114 on 6.8).
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are on the CC list for the bug.
You are watching the assignee of the bug.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug 221238] lg-laptop: Spurious ACK and dropped keystrokes caused by ACPI method calls conflicting with i8042 driver
2026-03-15 11:15 [Bug 221238] New: lg-laptop: Spurious ACK and dropped keystrokes due to unprotected i8042 port access bugzilla-daemon
` (6 preceding siblings ...)
2026-03-15 21:07 ` bugzilla-daemon
@ 2026-03-19 4:04 ` bugzilla-daemon
2026-03-19 13:01 ` bugzilla-daemon
2026-03-25 23:18 ` bugzilla-daemon
9 siblings, 0 replies; 11+ messages in thread
From: bugzilla-daemon @ 2026-03-19 4:04 UTC (permalink / raw)
To: platform-driver-x86
https://bugzilla.kernel.org/show_bug.cgi?id=221238
--- Comment #6 from Armin Wolf (W_Armin@gmx.de) ---
Can you check if the spurious ACKs still happen with a recent kernel version?
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are on the CC list for the bug.
You are watching the assignee of the bug.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug 221238] lg-laptop: Spurious ACK and dropped keystrokes caused by ACPI method calls conflicting with i8042 driver
2026-03-15 11:15 [Bug 221238] New: lg-laptop: Spurious ACK and dropped keystrokes due to unprotected i8042 port access bugzilla-daemon
` (7 preceding siblings ...)
2026-03-19 4:04 ` bugzilla-daemon
@ 2026-03-19 13:01 ` bugzilla-daemon
2026-03-25 23:18 ` bugzilla-daemon
9 siblings, 0 replies; 11+ messages in thread
From: bugzilla-daemon @ 2026-03-19 13:01 UTC (permalink / raw)
To: platform-driver-x86
https://bugzilla.kernel.org/show_bug.cgi?id=221238
--- Comment #7 from Alfonso GARCIA FREY (alfonso.garcia.frey@gmail.com) ---
Tested with kernel 6.8.0-106. The spurious ACKs still occur — in fact they are
significantly worse:
- Kernel 5.15.0-171: ~17 spurious ACKs per boot
- Kernel 6.8.0-106: ~114 spurious ACKs per boot
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are on the CC list for the bug.
You are watching the assignee of the bug.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug 221238] lg-laptop: Spurious ACK and dropped keystrokes caused by ACPI method calls conflicting with i8042 driver
2026-03-15 11:15 [Bug 221238] New: lg-laptop: Spurious ACK and dropped keystrokes due to unprotected i8042 port access bugzilla-daemon
` (8 preceding siblings ...)
2026-03-19 13:01 ` bugzilla-daemon
@ 2026-03-25 23:18 ` bugzilla-daemon
9 siblings, 0 replies; 11+ messages in thread
From: bugzilla-daemon @ 2026-03-25 23:18 UTC (permalink / raw)
To: platform-driver-x86
https://bugzilla.kernel.org/show_bug.cgi?id=221238
--- Comment #8 from Armin Wolf (W_Armin@gmx.de) ---
Can you test this with kernel 6.19?
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are on the CC list for the bug.
You are watching the assignee of the bug.
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2026-03-25 23:18 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-15 11:15 [Bug 221238] New: lg-laptop: Spurious ACK and dropped keystrokes due to unprotected i8042 port access bugzilla-daemon
2026-03-15 11:18 ` [Bug 221238] " bugzilla-daemon
2026-03-15 11:29 ` [Bug 221238] lg-laptop: Spurious ACK and dropped keystrokes caused by ACPI method calls conflicting with i8042 driver bugzilla-daemon
2026-03-15 11:34 ` bugzilla-daemon
2026-03-15 13:56 ` bugzilla-daemon
2026-03-15 13:58 ` bugzilla-daemon
2026-03-15 14:51 ` bugzilla-daemon
2026-03-15 21:07 ` bugzilla-daemon
2026-03-19 4:04 ` bugzilla-daemon
2026-03-19 13:01 ` bugzilla-daemon
2026-03-25 23:18 ` bugzilla-daemon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox