From 8d32297dcdf8b577315834566b973e42eed5eb12 Mon Sep 17 00:00:00 2001 From: Ryan Yin Date: Mon, 2 Nov 2026 01:00:50 +0800 Subject: [PATCH] refactor(ai): reset the Insta360 Link on resume via a usbcore quirk USB_QUIRK_RESET_RESUME ("b") makes usbcore reset the camera instead of resuming it, and uvcvideo implements reset_resume, so the resume hook that ran usbreset after S3 is no longer needed. Assisted-by: Claude Code (claude-opus-5-5) --- WORKAROUNDS.md | 2 +- hosts/idols-ai/default.nix | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/WORKAROUNDS.md b/WORKAROUNDS.md index ca3bdf41..43b46592 100644 --- a/WORKAROUNDS.md +++ b/WORKAROUNDS.md @@ -32,7 +32,7 @@ A setting that works around a bug or a hardware quirk. | ID | What & where | Why | Removal condition | Added | Revisit | Status | | ------ | --------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- | --------------------------------------------------------------------------------------------------- | ------ | | WA-009 | USB-SATA bridge mitigations (`usbcore.autosuspend=-1`, `usb-storage.delay_use=10`) — `hosts/12kingdoms-youko/default.nix` | flaky JMicron JMS567 resets with UDMA-CRC and I/O errors | Drop once the bridge/controller is replaced; the signal is smartctl CRC/media errors | 2026-09-21 | on hardware change or CRC errors | active | -| WA-010 | Insta360 Link USB reset on S3 resume — `hosts/idols-ai/default.nix` | the camera stays enumerated with a stalled UVC endpoint after resume | Drop after the Insta360 firmware or the kernel `uvcvideo` fixes it | 2026-08-01 | on kernel or firmware change | active | +| WA-010 | Insta360 Link reset-resume quirk (`usbcore.quirks=2e1a:4c01:b`) — `hosts/idols-ai/default.nix` | the camera stays enumerated with a stalled UVC endpoint after resume | Drop after the Insta360 firmware or the kernel `uvcvideo` fixes it | 2026-08-01 | on kernel or firmware change | active | | WA-011 | Kernel module blacklist (`esp4`, `esp6`, `rxrpc`) — `hardening/kernel-hardening.nix` | attack surface for the Dirty Frag LPE (CVE-2026-43284 / CVE-2026-43500) | Kept as defence in depth; drop only if something needs those modules | 2026-10-03 | rarely | active | | WA-018 | user-owned `~/.ssh/config` + disabled systemd ssh-proxy include — `home/base/tui/ssh.nix`, `modules/nixos/base/ssh.nix` | bwrap exposes root-owned store files as `nobody` | Drop once sandboxes preserve store ownership | 2026-10-06 | when sandbox layout changes | active | | WA-019 | programs.steam.extraCompatPackages = [ pkgs.dwproton-bin pkgs.proton-ge-bin ] — modules/nixos/desktop/gaming.nix | ACE games fail on GE/mainline Proton, work with DW-Proton | Drop once mainline or GE-Proton runs these games (GE-Proton#433) | 2026-10-07 | on Proton/GE bump | active | diff --git a/hosts/idols-ai/default.nix b/hosts/idols-ai/default.nix index f3a5beba..68dabc4f 100644 --- a/hosts/idols-ai/default.nix +++ b/hosts/idols-ai/default.nix @@ -118,12 +118,8 @@ in # works without sudo. hardware.i2c.enable = true; - # Re-evaluate after the Insta360 Link firmware or the kernel's uvcvideo changes. - powerManagement.resumeCommands = '' - # Insta360 Link may stay enumerated with a stalled UVC endpoint after S3 resume. - ${pkgs.coreutils}/bin/sleep 1 - ${pkgs.usbutils}/bin/usbreset 2e1a:4c01 || true - ''; + # Insta360 Link: reset instead of resume, or its UVC endpoint stalls after S3 (WA-010). + boot.kernelParams = [ "usbcore.quirks=2e1a:4c01:b" ]; networking = { inherit hostName;