quirks: ACPI DMI runtime data (R11 part 2)

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.
This commit is contained in:
2026-06-07 21:25:52 +03:00
parent 5d06b0fa03
commit e3c41b834d
4 changed files with 151 additions and 0 deletions
@@ -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.)
@@ -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"
@@ -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"
@@ -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"