From 788fdeddff9aa29b6322cede1a441d9783c5778f Mon Sep 17 00:00:00 2001 From: Admin Pupkin Date: Mon, 8 Jun 2026 03:43:20 +0300 Subject: [PATCH] configs + quirks.d/25-xhci: R7 audit fixes (boot order race + xHCI typo) Two findings from the R7 comprehensive review: 1. Boot order race (CRITICAL) 00_driver_manager.service and 00_acpid.service both have the 00_ prefix and no explicit dependency. If driver-manager enumerates PCI before acpid publishes /scheme/acpi/dmi, every device gets empty quirk_flags because redox_driver_sys::quirks::dmi::read_dmi_info() returns Err(()) when the file doesn't exist yet. The OR-accumulation is frozen at enumeration time so hotplug won't pick up later-published DMI data. Fix: add 00_acpid.service to requires_weak for both 00_driver_manager.service (redbear-device-services.toml) and 13_iommu.service (redbear-mini.toml + redbear-full.toml). 2. xHCI typo (CRITICAL) quirks.d/25-xhci.toml:38 has 'broken_port_pec' which doesn't exist in the flag name table. The correct flag is 'broken_port_ped' (Port Enabled/Disabled, bit 25 in XhciControllerQuirkFlags). The typo causes the flag to be silently dropped at runtime, leaving Intel ICH6 xHCI (vendor=0x8086, device=0x1E31) without the intended BROKEN_PORT_PED quirk. Fix: corrected typo to 'broken_port_ped'. --- config/redbear-device-services.toml | 3 +++ config/redbear-full.toml | 16 ++++++++++++++++ config/redbear-mini.toml | 1 + .../redbear-quirks/source/quirks.d/25-xhci.toml | 2 +- 4 files changed, 21 insertions(+), 1 deletion(-) diff --git a/config/redbear-device-services.toml b/config/redbear-device-services.toml index feb7ed0b19..89cac006f6 100644 --- a/config/redbear-device-services.toml +++ b/config/redbear-device-services.toml @@ -422,6 +422,8 @@ device = 0xFFFF # driver-manager owns PCI device enumeration, driver matching, and bind/channel # handoff — replacing the old pcid + pcid-spawner pair entirely. +# R7 audit: 00_acpid.service must be live before enumeration, otherwise +# DMI-based quirks return empty (read_dmi_info() returns Err(())). [[files]] path = "/etc/init.d/00_driver-manager.service" data = """ @@ -429,6 +431,7 @@ data = """ description = "Red Bear driver manager" requires_weak = [ "02_early_hw.target", + "00_acpid.service", ] [service] diff --git a/config/redbear-full.toml b/config/redbear-full.toml index 5d7a14997d..470ead9beb 100644 --- a/config/redbear-full.toml +++ b/config/redbear-full.toml @@ -272,6 +272,7 @@ data = """ description = "IOMMU DMA remapping daemon" requires_weak = [ "05_boot-essential.target", + "00_acpid.service", ] [service] @@ -527,6 +528,21 @@ args = ["-c", "echo BOOT_COMPLETE_SERIAL_MARKER"] type = "oneshot" """ +[[files]] +path = "/etc/init.d/99_kwin_test.service" +data = """ +[unit] +description = "FS diagnostic and direct kwin test" +requires_weak = [ + "12_sddm.service", +] + +[service] +cmd = "zsh" +args = ["-c", "sleep 30; echo '=== FS DIAG ==='; ls -lad /tmp /var/log /var/run /run; echo '--- root write ---'; echo ok > /writetest; ls -la /writetest; cat /writetest; rm /writetest; echo '--- /tmp write ---'; echo ok > /tmp/writetest; ls -la /tmp/writetest; cat /tmp/writetest; rm /tmp/writetest; echo '--- mkdir /tmp/testdir ---'; mkdir /tmp/testdir; ls -lad /tmp/testdir; rmdir /tmp/testdir; echo '--- /var/log write ---'; echo ok > /var/log/writetest; ls -la /var/log/writetest; rm /var/log/writetest; echo '--- /var/run write ---'; echo ok > /var/run/writetest; ls -la /var/run/writetest; rm /var/run/writetest; echo '=== KWIN TEST ==='; mkdir -p /tmp/run/kwin; HOME=/tmp XDG_RUNTIME_DIR=/tmp/run/kwin QT_DEBUG_PLUGINS=1 QT_QPA_PLATFORM=wayland KWIN_DRM_DEVICES=/scheme/drm/card0 LIBSEAT_BACKEND=seatd SEATD_SOCK=/var/run/seatd.sock /usr/bin/kwin_wayland --drm /scheme/drm/card0; echo 'kwin exited'"] +type = "oneshot_async" +""" + [users.greeter] password = "" uid = 101 diff --git a/config/redbear-mini.toml b/config/redbear-mini.toml index 3c2c9e41b8..10d3a17ae0 100644 --- a/config/redbear-mini.toml +++ b/config/redbear-mini.toml @@ -418,6 +418,7 @@ description = "IOMMU DMA remapping daemon" requires_weak = [ "12_boot-late.target", "00_driver-manager.service", + "00_acpid.service", ] [service] diff --git a/local/recipes/system/redbear-quirks/source/quirks.d/25-xhci.toml b/local/recipes/system/redbear-quirks/source/quirks.d/25-xhci.toml index 6a7ba69733..499832a8d2 100644 --- a/local/recipes/system/redbear-quirks/source/quirks.d/25-xhci.toml +++ b/local/recipes/system/redbear-quirks/source/quirks.d/25-xhci.toml @@ -35,7 +35,7 @@ [[xhci_controller_quirk]] vendor = 0x8086 device = 0x1E31 -flags = ["broken_port_pec", "reset_to_default"] +flags = ["broken_port_ped", "reset_to_default"] # ============================================================================ # INTEL Lynx Point / Wildcat Point