repositories

NixDaemon

NixOS pentest workstation as one flake — IceBreaker's successor

clonegit clone https://git.daemon-sec.xyz/NixDaemon.git
README.mdMarkdown117 lines8.6 KiBsource raw download

Carried from the Omarchy/Arch install (daemon-sec-dotfiles/tooling/keyboard-fix) on 2026-10-14 as reference. None of it is applied by NixDaemon: the fix needs a kernel parameter or an out-of-tree module, which belongs in a deliberate change to modules/hosts/laptop, not a dotfiles move. Build artifacts were left behind.

Internal keyboard — diagnosis & playbook#

Machine: PCSpecialist Valeon II 17 = TongFang GM7RGxM barebone (Uniwill EC), Ryzen 9 6900HX, BIOS N.1.13A05 (2023-02-16), EC firmware 1.17, Arch/Omarchy, Limine UKI. Tool: ~/keyboard-fix/inkbd (run inkbd help).

Root cause (CONFIRMED — types in BIOS setup, 2026-08-24)#

This laptop family has a known Linux-only dead-keyboard bug. Since kernel 6.0 ("ACPI: resource: skip IRQ override on AMD Zen platforms", bug 216118), Linux no longer applies the MADT IRQ override on AMD Zen. TongFang AMD barebones declare keyboard IRQ 1 falling-edge in the DSDT and need that override to rising-edge — without it, the EC's PS/2 replies raise interrupts late or not at all, atkbd's 200 ms ACK waits time out, and the keyboard is dead in Linux while working in BIOS (and Windows).

The kernel fixes this per-board via the irq1_edge_low_force_override[] DMI table in drivers/acpi/resource.c. Sibling boards are all in it — GMxRGxx (XMG CORE 15 M22 / TUXEDO Stellaris 15 Gen4), MECH-17 (= TongFang GM7RG7N, the same-generation 17" chassis, patched Jan 2025), GMxBGxx, GM5HG0A, … — but GM7RGxM is in neither kernel quirk table (verified against mainline master), so this board falls through to the Zen skip.

A same-model report exists: PCSpecialist Valeon II 17 on EndeavourOS, Jan 2023, "keyboard isn't responding at all, on any distro", worked a couple of months earlier — timing matches the kernel 6.0 rollout. https://forum.endeavouros.com/t/internal-laptop-keyboard-not-responding/36675

Evidence collected on this machine (2026-08-23/24)#

The fix program: enable-keyboard#

sudo ./enable-keyboard — run it, follow what it says, run it again after a reboot. It:

  1. installs the pnpacpi=off boot preset (Limine drop-in shared with inkbd boot, so inkbd boot revert works) after checking the FADT advertises an 8042, then asks for one reboot;
  2. verifies the result on the next run (atkbd init clean + ledecho replies now in-window);
  3. sudo ./enable-keyboard now = no-reboot path: builds/loads irq1fix/irq1fix.ko, which flips IRQ 1 to active-high inside the kernel's IOAPIC bookkeeping while i8042 is safely unbound, then rebinding i8042 makes the kernel itself program the corrected IOAPIC entry. Fully validated before writing (refuses on any mismatch), now revert restores the original state exactly. After one verified success, sudo ./enable-keyboard persist re-applies it at every boot.

Why pnpacpi=off and not the i8042.* quirks (verified against v7.1 source, research/ has the full trail): the wrong polarity is programmed by the PNP-ACPI core at early boot — it parses the DSDT's IRQ (Edge, ActiveLow, …) for PS2K and registers GSI 1 accordingly before i8042 even loads. So i8042.nopnp (the old "tongfang" preset) cannot fix this bug; pnpacpi=off stops the wrong programming at its source and the pin keeps the ISA edge/active-high default the EC needs. Confirmed fixing exactly this bug on sibling TongFang Zen boards (Arch BBS 291569). i8042.dumbkbd on those boards: ~1 s key-release delay + runaway repeat — near-unusable. Never direct.

What to do, in order#

  1. BIOS typing test — DONE 2026-08-24: types in BIOS. Kernel/firmware class confirmed; all hardware steps (EC reset, re-flash-for-fault, any disassembly) are pruned.
  2. sudo ./enable-keyboard (or sudo ./enable-keyboard now to skip the reboot). sudo inkbd diag any time for the deep no-reboot probe (also dumps live IRQ 1 trigger config + MADT overrides + DSDT IRQ descriptors — the DSDT dump also settles the Shared flag question for the upstream patch, see below).
  3. Durable local fix without kernel rebuild — DSDT override (optional, elegant): fix the DSDT's PS2K descriptor to Interrupt (ResourceConsumer, Edge, ActiveHigh, Shared) (the extended descriptor both fixes the polarity and bypasses the kernel's Zen-skip logic entirely), bump the OEM revision, ship it via mkinitcpio's acpi_override hook (works with the Limine UKI — same early-cpio mechanism as microcode). Confirmed fixing exactly this bug on a sibling board (Arch BBS 291569, user raorn). Caveats: needs kernel lockdown off; redo after any BIOS update.
  4. Durable fix — BIOS/EC update. XMG ships BIOS N1.15A14 / EC 1.18.xx (2025-01-22) for the identical barebone (XMG NEO 17 M22), changelog: "fixed keyboard issue with Linux kernel 6.0 or later" (+ AMD SinkClose fix). This machine runs N.1.13A05 / EC 1.17, which predates it. PCSpecialist publish no downloads — open a support ticket asking for their equivalent post-N.1.13 BIOS/EC for the Valeon II 17, citing the XMG changelog: https://download.schenker-tech.de/package/xmg-neo-15-m22-id-xne15am22-xmg-neo-17-m22-id-xne17am22/ Ask in the same ticket whether the Fn+D+Power BIOS-recovery flash accepts a USB keyboard.
    • Do not cross-flash the XMG image on the PCS-branded board: unsanctioned, brick risk, and BIOS recovery may require the (currently dead) internal keyboard.
  5. Upstream option (helps everyone with this board — never submitted by anyone, verified via patchwork): 0001-acpi-resource-irq1-override-gm7rgxm.patch in this folder adds DMI_BOARD_NAME "GM7RGxM" to irq1_edge_low_force_override[]; dry-run-applies cleanly to v7.1. Before mailing, confirm from the inkbd diag DSDT dump that PS2K uses a legacy IRQ (Edge, ActiveLow, Shared) descriptor — the kernel's override row only matches shareable==1 legacy descriptors.
  6. EC reset (only if dead in BIOS, or everything above failed): shutdown, unplug AC, open bottom cover, disconnect main battery (ideally CMOS cell too), hold power 30–60 s, reassemble, boot straight into BIOS and retest; then BIOS "Load Defaults". No pinhole/Fn-combo reset exists for this chassis. Follow with a support-supplied EC re-flash even at the same version (XMG's own prescription for EC-side keyboard faults).

Notes / gotchas#