fix(nb): stop suspend crashes and the login-time lid suspend #394

Merged
dominik.polakovics merged 1 commit from fix/nb-suspend-crashes into main 2026-09-15 12:21:08 +02:00

Problem

nb "shuts down" when left alone, or goes from suspend straight to off. Logging in with the lid shut is also slow.

Evidence

Crashes in suspend. Every boot since Aug 9 begins with:

x86/amd: Previous system reset reason [0x08000800]: an uncorrected error caused a data fabric sync flood event

Every preceding boot ends at PM: suspend entry (s2idle) and never resumes. That's 9/9, triggered by both the swayidle timeout and the lid.

  • BIOS has been 03.18 in every boot since May.
  • Both kernel params date from Oct 2025, and the 20+ boots before Aug 9 had no resets.
  • The resets start with kernel 6.18.43 and continue through 6.18.51, so a 6.18.4x regression is the likely trigger. pcie_aspm=force and ppfeaturemask=0xffffffff are the usual amplifiers for this reset: forced ASPM plus every GPU power feature, validated or not, during resume.

Slow login. On boots -4, -3, -1 and 0, systemd-logind: Suspending... fires 0.1s after the user session is created. The lid is shut and DP-2 is connected, but at the greeter→sway handover no output is enabled, so logind doesn't treat the machine as docked. The machine then sits in s2idle until a key is pressed (10:57:17 → 10:59:52 this morning).

Resume hook. ${pkgs.util-linux}/bin/sync doesn't exist, so sleep-actions exits 127 on every resume, before the btrfs remounts run.

Changes

  • Drop pcie_aspm=force and amdgpu.ppfeaturemask=0xffffffff.
  • logind ignores the lid. sway's lid:on runs lid-close: it disables eDP-1 when an external output is attached and suspends otherwise.
  • Use coreutils for sync.

Trade-offs / follow-ups

  • Closing the lid at the greeter or a TTY no longer suspends.
  • If sync floods continue, the next step is pinning or changing the kernel, then suspend-then-hibernate as a safety net.

🤖 Generated with Claude Code

## Problem nb "shuts down" when left alone, or goes from suspend straight to off. Logging in with the lid shut is also slow. ## Evidence **Crashes in suspend.** Every boot since Aug 9 begins with: ``` x86/amd: Previous system reset reason [0x08000800]: an uncorrected error caused a data fabric sync flood event ``` Every preceding boot ends at `PM: suspend entry (s2idle)` and never resumes. That's 9/9, triggered by both the swayidle timeout and the lid. - BIOS has been 03.18 in every boot since May. - Both kernel params date from Oct 2025, and the 20+ boots before Aug 9 had no resets. - The resets start with kernel 6.18.43 and continue through 6.18.51, so a 6.18.4x regression is the likely trigger. `pcie_aspm=force` and `ppfeaturemask=0xffffffff` are the usual amplifiers for this reset: forced ASPM plus every GPU power feature, validated or not, during resume. **Slow login.** On boots -4, -3, -1 and 0, `systemd-logind: Suspending...` fires 0.1s after the user session is created. The lid is shut and DP-2 is connected, but at the greeter→sway handover no output is enabled, so logind doesn't treat the machine as docked. The machine then sits in s2idle until a key is pressed (10:57:17 → 10:59:52 this morning). **Resume hook.** `${pkgs.util-linux}/bin/sync` doesn't exist, so `sleep-actions` exits 127 on every resume, before the btrfs remounts run. ## Changes - Drop `pcie_aspm=force` and `amdgpu.ppfeaturemask=0xffffffff`. - logind ignores the lid. sway's `lid:on` runs `lid-close`: it disables eDP-1 when an external output is attached and suspends otherwise. - Use `coreutils` for `sync`. ## Trade-offs / follow-ups - Closing the lid at the greeter or a TTY no longer suspends. - If sync floods continue, the next step is pinning or changing the kernel, then suspend-then-hibernate as a safety net. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
- Drop pcie_aspm=force and amdgpu.ppfeaturemask=0xffffffff; every boot
  since Aug 9 follows a data fabric sync flood reset taken in s2idle.
- logind ignores the lid; sway's lid:on runs lid-close, which suspends
  only without an external output. logind was suspending at the
  greeter→sway handover with the lid shut, stalling login until a key.
- Resume hook called util-linux's nonexistent sync, aborting before the
  btrfs remounts; use coreutils.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
dominik.polakovics deleted branch fix/nb-suspend-crashes 2026-09-15 12:21:08 +02:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Cloonar/nixos!394
No description provided.