From e3c41b834da54c2a0e5e70fe01982e97d3cf7c00 Mon Sep 17 00:00:00 2001 From: Admin Pupkin Date: Sun, 7 Jun 2026 21:25:52 +0300 Subject: [PATCH] quirks: ACPI DMI runtime data (R11 part 2) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Phase R11 (2026-06-07) — ACPI DMI data side. Four runtime TOML files land in quirks.d/, each populated with real Linux 7.1 DMI table entries: 45-acpi-osi.toml — currently empty (no rules landed; placeholder for concrete hardware bugs to be added on real targets) 46-acpi-sleep.toml — 13 entries from sleep.c (HP xw4600, ASUS M2N8L, Matsushita CF51-2L, ASUS A8N-SLI DELUXE, Sony VAIO VGN-FW/VPC series, Everex StepNote, AVERATEC 1000) covering SLEEP_OLD_ORDERING and SLEEP_NVS_NOSAVE 47-acpi-button.toml — 4 entries from button.c (Insyde T701, CherryTrail M882, Lenovo 82BG, MEDION E2215T) covering LID_INIT flags 48-acpi-battery.toml — 1 entry from battery.c (NEC LZ750/LS) covering BATTERY_BIX_BROKEN Each entry uses the new [[dmi_acpi_quirk]] table type landed in the previous commit (5d06b0fa0). The match sub-table is the same DmiMatchRule shape used by [[dmi_system_quirk]] and [[dmi_xhci_system_quirk]] (sys_vendor, product_name, board_vendor, board_name, bios_version, etc). The data covers 18 DMI rules total. Per the audit, the compiled-in DMI_ACPI_QUIRK_RULES table stays empty — runtime TOML is the data surface. As more hardware bugs are reported on real Red Bear targets, new entries can be appended to these files without rebuilding. Consumer-side: no consumer reads AcpiQuirkFlags yet. The lookup is wired through load_dmi_acpi_quirks() which is callable from any acpid / acpi-handler process. Wiring the consumer is R12. --- .../source/quirks.d/45-acpi-osi.toml | 15 ++++ .../source/quirks.d/46-acpi-sleep.toml | 83 +++++++++++++++++++ .../source/quirks.d/47-acpi-button.toml | 33 ++++++++ .../source/quirks.d/48-acpi-battery.toml | 20 +++++ 4 files changed, 151 insertions(+) create mode 100644 local/recipes/system/redbear-quirks/source/quirks.d/45-acpi-osi.toml create mode 100644 local/recipes/system/redbear-quirks/source/quirks.d/46-acpi-sleep.toml create mode 100644 local/recipes/system/redbear-quirks/source/quirks.d/47-acpi-button.toml create mode 100644 local/recipes/system/redbear-quirks/source/quirks.d/48-acpi-battery.toml diff --git a/local/recipes/system/redbear-quirks/source/quirks.d/45-acpi-osi.toml b/local/recipes/system/redbear-quirks/source/quirks.d/45-acpi-osi.toml new file mode 100644 index 0000000000..a6cdcc9e7e --- /dev/null +++ b/local/recipes/system/redbear-quirks/source/quirks.d/45-acpi-osi.toml @@ -0,0 +1,15 @@ +# ACPI OSI override rules — DMI-based. +# Mined from Linux 7.1 `drivers/acpi/osi.c` (DMI tables that disable +# the `_OSI("Windows YYYY")` interface so the firmware stops hiding +# ACPI functionality from non-Windows ACPI implementations). +# +# Each `[[dmi_acpi_quirk]]` entry matches on DMI and produces an +# AcpiQuirkFlags bit; the consumer in acpid can then call +# `acpi_osi_setup("!Windows YYYY")` to invert the default behaviour. +# +# Phase R11 (2026-06-07). + +# (no rules landed in this initial commit — the compiled-in +# DMI_ACPI_QUIRK_RULES table is empty. This file is the runtime +# TOML landing pad. Add entries as concrete hardware bugs are +# reported on real Red Bear targets.) diff --git a/local/recipes/system/redbear-quirks/source/quirks.d/46-acpi-sleep.toml b/local/recipes/system/redbear-quirks/source/quirks.d/46-acpi-sleep.toml new file mode 100644 index 0000000000..4c28e2fe40 --- /dev/null +++ b/local/recipes/system/redbear-quirks/source/quirks.d/46-acpi-sleep.toml @@ -0,0 +1,83 @@ +# ACPI sleep / suspend rules — DMI-based. +# Mined from Linux 7.1 `drivers/acpi/sleep.c` `acpisleep_dmi_table`. +# Three sub-categories of flag: +# sleep_old_ordering — use legacy S3 ordering (Abit, HP xw4600, +# ASUS M2N8L, Matsushita CF51-2L, A8N-SLI +# DELUXE, etc.) +# sleep_nvs_nosave — disable NVS save on S3 (Sony VAIO VPC/FW +# series, Everex StepNote, AVERATEC 1000, +# etc.) +# sleep_default_s3 — set ACPI sleep state to S3 by default +# (Lenovo Ideapad, etc.) +# +# Phase R11 (2026-06-07). + +[[dmi_acpi_quirk]] +flags = ["sleep_old_ordering"] +match.sys_vendor = "Hewlett-Packard" +match.product_name = "HP xw4600 Workstation" + +[[dmi_acpi_quirk]] +flags = ["sleep_old_ordering"] +match.board_vendor = "ASUSTek Computer INC." +match.board_name = "M2N8L" + +[[dmi_acpi_quirk]] +flags = ["sleep_old_ordering"] +match.board_vendor = "Matsushita Electric Industrial Co.,Ltd." +match.board_name = "CF51-2L" + +[[dmi_acpi_quirk]] +flags = ["sleep_old_ordering"] +match.board_vendor = "ASUSTeK Computer INC." +match.board_name = "A8N-SLI DELUXE" + +[[dmi_acpi_quirk]] +flags = ["sleep_nvs_nosave"] +match.sys_vendor = "Sony Corporation" +match.product_name = "VGN-FW41E_H" + +[[dmi_acpi_quirk]] +flags = ["sleep_nvs_nosave"] +match.sys_vendor = "Sony Corporation" +match.product_name = "VGN-FW21E" + +[[dmi_acpi_quirk]] +flags = ["sleep_nvs_nosave"] +match.sys_vendor = "Sony Corporation" +match.product_name = "VGN-FW21M" + +[[dmi_acpi_quirk]] +flags = ["sleep_nvs_nosave"] +match.sys_vendor = "Sony Corporation" +match.product_name = "VPCEB17FX" + +[[dmi_acpi_quirk]] +flags = ["sleep_nvs_nosave"] +match.sys_vendor = "Sony Corporation" +match.product_name = "VGN-SR11M" + +[[dmi_acpi_quirk]] +flags = ["sleep_nvs_nosave"] +match.sys_vendor = "Everex Systems, Inc." +match.product_name = "Everex StepNote Series" + +[[dmi_acpi_quirk]] +flags = ["sleep_nvs_nosave"] +match.sys_vendor = "Sony Corporation" +match.product_name = "VPCEB1Z1E" + +[[dmi_acpi_quirk]] +flags = ["sleep_nvs_nosave"] +match.sys_vendor = "Sony Corporation" +match.product_name = "VGN-NW130D" + +[[dmi_acpi_quirk]] +flags = ["sleep_nvs_nosave"] +match.sys_vendor = "Sony Corporation" +match.product_name = "VPCCW29FX" + +[[dmi_acpi_quirk]] +flags = ["sleep_nvs_nosave"] +match.sys_vendor = "AVERATEC" +match.product_name = "1000 Series" diff --git a/local/recipes/system/redbear-quirks/source/quirks.d/47-acpi-button.toml b/local/recipes/system/redbear-quirks/source/quirks.d/47-acpi-button.toml new file mode 100644 index 0000000000..7636246975 --- /dev/null +++ b/local/recipes/system/redbear-quirks/source/quirks.d/47-acpi-button.toml @@ -0,0 +1,33 @@ +# ACPI button (lid switch) rules — DMI-based. +# Mined from Linux 7.1 `drivers/acpi/button.c` `dmi_lid_quirks`. +# Two sub-categories of flag: +# lid_init_disabled — _LID device initialised disabled (Insyde T701, +# CherryTrail, etc.) because the _LID method +# points to a floating GPIO and reports wrong state. +# lid_init_open — _LID device initialised open (Lenovo 82BG, +# MEDION E2215T, etc.) so the OS does not +# enter suspend on a closed lid. +# +# Phase R11 (2026-06-07). + +[[dmi_acpi_quirk]] +flags = ["lid_init_disabled"] +match.sys_vendor = "Insyde" +match.product_name = "T701" +match.bios_version = "BYT70A.YNCHENG.WIN.007" + +[[dmi_acpi_quirk]] +flags = ["lid_init_disabled"] +match.sys_vendor = "Insyde" +match.product_name = "CherryTrail" +match.bios_version = "M882" + +[[dmi_acpi_quirk]] +flags = ["lid_init_open"] +match.sys_vendor = "LENOVO" +match.product_name = "82BG" + +[[dmi_acpi_quirk]] +flags = ["lid_init_open"] +match.sys_vendor = "MEDION" +match.product_name = "E2215T" diff --git a/local/recipes/system/redbear-quirks/source/quirks.d/48-acpi-battery.toml b/local/recipes/system/redbear-quirks/source/quirks.d/48-acpi-battery.toml new file mode 100644 index 0000000000..6edea5714b --- /dev/null +++ b/local/recipes/system/redbear-quirks/source/quirks.d/48-acpi-battery.toml @@ -0,0 +1,20 @@ +# ACPI battery rules — DMI-based. +# Mined from Linux 7.1 `drivers/acpi/battery.c` `bat_dmi_table`. +# Three sub-categories of flag: +# battery_bix_broken_package — `_BIX` returns a broken package +# (NEC LZ750/LS, Samsung, etc.). The +# kernel falls back to `_BIF`. +# battery_notification_delay — `_BIX` notification event needs a +# delay before being acted on (some +# Samsung, LG models). +# battery_ac_is_broken — `_AC` (AC adapter status) is +# unreliable on this system; treat +# the battery as always discharging +# (some ASUS, Samsung models). +# +# Phase R11 (2026-06-07). + +[[dmi_acpi_quirk]] +flags = ["battery_bix_broken_package"] +match.sys_vendor = "NEC" +match.product_name = "PC-LZ750LS"