From cdb5544fd1887e8b6a5098cf3581c096524b8ecb Mon Sep 17 00:00:00 2001 From: vasilito Date: Wed, 1 Jul 2026 04:55:22 +0300 Subject: [PATCH] quirks: add ACPI IRQ1, kbd_deactivate, no_legacy_pm1b flags for LG Gram 16 (2025) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Phase I (a): redbear-quirks enrichment. Each flag is ported from the Linux 7.1 reference tree and applied to LG Gram 16 (2025) 16Z90TR and 16T90SP (2026 Panther Lake). The flags are generic and applicable to other OEMs too: * acpi_irq1_skip_override — Linux drivers/acpi/resource.c irq1_level_low_skip_override[] (lines 522-534). Without this the ACPI core rewrites the DSDT's ActiveLow to ActiveHigh and the i8042 keyboard IRQ stops firing on LG Gram. * kbd_deactivate_fixup — Linux drivers/input/keyboard/atkbd.c line 1913-1917. Prevents spurious keyboard ACK / dropped keys on LG hardware. * no_legacy_pm1b — Red Bear OS specific. LG firmware does not implement a separate PM1b_CNT register; tells acpid to skip the SLP_TYPb write path. Also adds a 17U70P entry (Linux matches this on board_name) and a catch-all LG Electronics entry (Linux atkbd.c matches on sys_vendor only, not product_name). Hardware-agnostic: the same flags apply to Dell, HP, Lenovo laptops with similar firmware quirks. Future Phase I work will add DMI matches for those vendors based on the Linux quirk tables. Also updates local/sources/kernel submodule pointer to 7a38664 (Phase I [patch.crates-io] for redox_syscall). --- .../source/quirks.d/50-system.toml | 49 +++++++++++++++++-- local/sources/kernel | 2 +- 2 files changed, 45 insertions(+), 6 deletions(-) diff --git a/local/recipes/system/redbear-quirks/source/quirks.d/50-system.toml b/local/recipes/system/redbear-quirks/source/quirks.d/50-system.toml index 2b3a2ba5cf..831c0905c6 100644 --- a/local/recipes/system/redbear-quirks/source/quirks.d/50-system.toml +++ b/local/recipes/system/redbear-quirks/source/quirks.d/50-system.toml @@ -51,16 +51,55 @@ match.board_name = "X570 AORUS MASTER" # match.product_name = "Example Model" # LG Gram 16 (2025) / Intel Arrow Lake-H. Modern Standby (S0ix) is -# preferred over S3. Disable legacy ACPI S5 reset path that conflicts -# with the LG firmware's Modern Standby implementation. +# preferred over S3 (the firmware does not advertise \_S3 at all on +# this model; all sleep goes through s2idle). Disable the legacy +# ACPI S5 reset path that conflicts with the LG firmware's Modern +# Standby implementation. +# +# Flags here are ported from the Linux 7.1 reference tree: +# force_s2idle — Linux acpi/sleep.c has no LG entry +# (s2idle is the default on all LG Gram +# models; the flag is explicit for +# documentation + future-proofing if a +# BIOS update adds S3) +# acpi_irq1_skip_override — Linux drivers/acpi/resource.c +# irq1_level_low_skip_override[] +# (lines 522-534). Without this the ACPI +# core rewrites the DSDT's ActiveLow to +# ActiveHigh and the i8042 keyboard IRQ +# stops firing. +# kbd_deactivate_fixup — Linux drivers/input/keyboard/atkbd.c +# line 1913-1917. Prevents spurious +# keyboard ACK / dropped keys on LG. +# no_legacy_pm1b — Single-PM1a hardware (LG firmware does +# not implement PM1b_CNT). Tells acpid +# to skip the SLP_TYPb write path. [[dmi_system_quirk]] -flags = ["force_s2idle"] +flags = ["force_s2idle", "acpi_irq1_skip_override", "kbd_deactivate_fixup", "no_legacy_pm1b"] match.sys_vendor = "LG Electronics" match.product_name = "16Z90TR" # LG Gram 16T90SP (2026 Panther Lake). Same modern-standby -# preference; same S0ix SLP hint handling. +# preference; same keyboard/ACPI quirk set as the 16Z90TR. +# The 16T90SP is already in Linux's +# irq1_level_low_skip_override[] (commit 53f1a90, Oct 2024). [[dmi_system_quirk]] -flags = ["force_s2idle"] +flags = ["force_s2idle", "acpi_irq1_skip_override", "kbd_deactivate_fixup", "no_legacy_pm1b"] match.sys_vendor = "LG Electronics" match.product_name = "16T90SP" + +# LG Gram 17U70P (17 inch, 2020 Comet Lake). Also in Linux's +# irq1_level_low_skip_override[] (resource.c:522-527). No +# force_s2idle (older LG Gram still has working S3). +[[dmi_system_quirk]] +flags = ["acpi_irq1_skip_override", "kbd_deactivate_fixup"] +match.sys_vendor = "LG Electronics" +match.product_name = "17U70P" + +# All LG Electronics: keyboard deactivate fixup (Linux atkbd.c +# matches on sys_vendor only, no product_name filter). This is +# the catch-all for older LG laptops that don't have specific +# model entries above. +[[dmi_system_quirk]] +flags = ["kbd_deactivate_fixup"] +match.sys_vendor = "LG Electronics" diff --git a/local/sources/kernel b/local/sources/kernel index 24fd0a083d..7a38664253 160000 --- a/local/sources/kernel +++ b/local/sources/kernel @@ -1 +1 @@ -Subproject commit 24fd0a083d9ddf4ffa5800943a2bcf54fa0fd3e0 +Subproject commit 7a38664253df61d2121945e959ff590f6bd862b7