docs(power): reclaim the sleep docs from the sold box; fix AGENTS.md machine facts

The sleep/wake saga (Alienware-M16a2 research + Sleep-Fix-Guide) framed a
machine sold on 2026-09-28 as 'this system' — the 2026-09-28 identifier
purge missed both because they name no hostname. blankpad probed live:
Lenovo, AMD Ryzen 5 PRO 5650U / Cezanne, unified memory, s2idle only,
no NVIDIA, no ~/GitPackages/llama.cpp.

- research/Sleep-Fix-Guide.md -> .AGENTTRASH (verbatim restatement of the
  research doc's fix steps; PowerCluster overlap census)
- Alienware doc: archive banner, 'this system' -> retired dankware
- linux-power-management.md: scope note (blankpad s2idle-only; NVIDIA
  section is dankware/future-NVIDIA territory), boilerplate AGENTS.md
  cross-ref dropped
- cachyos.md: de-pinned rolling-release kernel versions (7.1.4 doc vs
  7.2.9 live), repo list confirmed verbatim against pacman.conf, SDDM
  confirmed live, verified: 2026-10-19
- AGENTS.md: dev-workstation row rewritten for blankpad; Gitea gotcha
  corrected — remote URLs carry NO token (credential-store file, verified)

Refs #29
This commit is contained in:
Frank
2026-10-19 03:46:02 -07:00
parent 99b9a6a17c
commit 82dd0c7d09
6 changed files with 26 additions and 337 deletions
+6 -3
View File
@@ -100,15 +100,18 @@ secret in every agent's context window on every machine that pulls this repo.
| box | role | GPU | notes | | box | role | GPU | notes |
|-----|------|-----|-------| |-----|------|-----|-------|
| Dev workstation | client box, never runs inference | laptop iGPU + dGPU (non-unified) | mainline llama.cpp at `~/GitPackages/llama.cpp/build/bin/`; this repo lives here at `~/.omp` | | Dev workstation (`blankpad`) | client box, never runs inference | Lenovo laptop, AMD Ryzen 5 PRO 5650U / Cezanne APU (**unified memory**, s2idle sleep only, no dGPU) | this repo lives here at `~/.omp`; the earlier "iGPU + dGPU / `~/GitPackages/llama.cpp`" description belonged to the sold `dankware` box |
| Dankclaw | bench target, secondary models + service stack | Strix Halo APU (**unified memory**) + RTX 3090 (moved over from Dankserver 2026-09) | prod services `frank-dragoon` (halogen-flash-server, :7770, iGPU) and `frank-zealot` (llama.cpp PrismML fork, :7771, 3090); runbooks in the serverAppConfigs vault (`~/Projects/serverAppConfig/serverAppConfigs-docs/LLM/`); ssh: `ssh dankclaw` | | Dankclaw | bench target, secondary models + service stack | Strix Halo APU (**unified memory**) + RTX 3090 (moved over from Dankserver 2026-09) | prod services `frank-dragoon` (halogen-flash-server, :7770, iGPU) and `frank-zealot` (llama.cpp PrismML fork, :7771, 3090); runbooks in the serverAppConfigs vault (`~/Projects/serverAppConfig/serverAppConfigs-docs/LLM/`); ssh: `ssh dankclaw` |
| Dankserver | main-model box | 2× Radeon AI PRO R9700 — non-unified (was RTX 3090 until 2026-09) | runs `frank-archon` (radiance, TP=2, :7770) — **this repo's operator session runs on it**; ssh: `ssh dankserver` | | Dankserver | main-model box | 2× Radeon AI PRO R9700 — non-unified (was RTX 3090 until 2026-09) | runs `frank-archon` (radiance, TP=2, :7770) — **this repo's operator session runs on it**; ssh: `ssh dankserver` |
## Environment gotchas ## Environment gotchas
- Gitea API needs a token: `GITEA_TOKEN` env (gitignored `.env`). No `tea` CLI - Gitea API needs a token: `GITEA_TOKEN` env (gitignored `.env`). No `tea` CLI
installed anywhere. Remote URLs embed the token locally in `.git/config` — that installed anywhere. Remote URLs carry NO embedded token (2026-10-09
file is never pushed; it is not a substitute for the secret gate. credential-store cutover) — git and the API both read
`~/.config/secrets/gitea` (`store --file`, URL-line format; see
`omp-docs/tools/gitea/client-access.md`). That file is never pushed; it is
not a substitute for the secret gate.
- Passwordless sudo (`sudo -n`) works on Dankclaw and Dankserver for systemctl - Passwordless sudo (`sudo -n`) works on Dankclaw and Dankserver for systemctl
verbs only; user units need no sudo at all. verbs only; user units need no sudo at all.
- SSH into both servers is BatchMode-capable from here: - SSH into both servers is BatchMode-capable from here:
@@ -1,7 +1,7 @@
--- ---
type: reference type: reference
title: Alienware M16a2 Linux Sleep/Wake Issues title: Alienware M16a2 Linux Sleep/Wake Issues
description: Comprehensive research on NVIDIA GPU driver state corruption during suspend/resume on Alienware M16a2 with Linux. description: "Sleep/wake research on the Alienware m16 R2 (dankware, sold 2026-09-28): NVIDIA driver state corruption during suspend/resume on Dell hardware. Kept as class-level Dell/Alienware + NVIDIA knowledge."
tags: tags:
- research - research
- sleep-wake - sleep-wake
@@ -12,6 +12,13 @@ timestamp: 2026-01-15
# Alienware M16a2 Linux Sleep/Wake Issues — Comprehensive Research # Alienware M16a2 Linux Sleep/Wake Issues — Comprehensive Research
> **Machine archive (2026-10-19).** "This system" throughout is **dankware**,
> the Alienware m16 R2 client workstation sold 2026-09-28 (see `log.md`). The
> current dev workstation (`blankpad` — AMD Ryzen 5 PRO 5650U / Cezanne APU,
> s2idle only, no NVIDIA GPU) is not this machine. Hardware inventory and
> driver versions are historical; the class-level Dell/Alienware + NVIDIA
> suspend research is retained as durable knowledge.
## Executive Summary ## Executive Summary
The symptom — **screen stays black after waking from sleep (lid close)** — is a well-documented class of issues on Dell/Alienware laptops with NVIDIA GPUs running Linux. The root cause is almost always **NVIDIA GPU driver state corruption during suspend/resume**, compounded by ACPI/sleep state selection issues and BIOS/firmware settings. The symptom — **screen stays black after waking from sleep (lid close)** — is a well-documented class of issues on Dell/Alienware laptops with NVIDIA GPUs running Linux. The root cause is almost always **NVIDIA GPU driver state corruption during suspend/resume**, compounded by ACPI/sleep state selection issues and BIOS/firmware settings.
@@ -21,7 +28,7 @@ The symptom — **screen stays black after waking from sleep (lid close)** — i
## 1. Known Issues with Alienware M16a2 + Linux Sleep States ## 1. Known Issues with Alienware M16a2 + Linux Sleep States
### 1.1 Model Context ### 1.1 Model Context
The Alienware m16 R2 (this system) is equipped with: The Alienware m16 R2 (the retired **dankware** box) is equipped with:
- **Intel Core Ultra 7 155H** (Meteor Lake, 6p+8e cores, 22 threads) - **Intel Core Ultra 7 155H** (Meteor Lake, 6p+8e cores, 22 threads)
- **Intel Arc Graphics** (Meteor Lake-P iGPU) - **Intel Arc Graphics** (Meteor Lake-P iGPU)
- **NVIDIA GeForce RTX 4070 Laptop GPU** (AD106M, Max-Q/Mobile) - **NVIDIA GeForce RTX 4070 Laptop GPU** (AD106M, Max-Q/Mobile)
-312
View File
@@ -1,312 +0,0 @@
---
type: guide
title: Sleep Fix Guide
description: Fix guide for Alienware M16a2 sleep/wake issues on CachyOS with NVIDIA RTX 40-series GPU.
tags:
- research
- sleep-wake
- fix
- nvidia
timestamp: 2026-01-15
---
z
# Alienware M16a2 Sleep/Wake Fix Guide
Based on diagnostics from your system (CachyOS, Kernel 7.1.4, NVIDIA RTX 40-series)
---
## Problem Summary
Your system enters sleep when closing the lid, but the screen stays black on wake. Diagnostics show:
- **Sleep state:** s2idle (Modern Standby) - problematic for NVIDIA hybrid GPUs
- **NVIDIA services:** Disabled (nvidia-suspend.service, nvidia-resume.service)
- **Kernel errors:** ACPI D-Notifier failures, spd5118 resume errors
---
## Fix #1: Enable NVIDIA Suspend Services (⚠️ MOST IMPORTANT)
This is the #1 cause of your issue. The NVIDIA GPU state is not being preserved during suspend.
```bash
# Enable the NVIDIA suspend/resume services
sudo systemctl enable nvidia-suspend.service
sudo systemctl enable nvidia-resume.service
# Verify they're enabled
systemctl status nvidia-suspend.service nvidia-resume.service
```
**Deterministic verification:**
```bash
# This shows "enabled" for both services when the fixes work
systemctl is-enabled nvidia-suspend.service nvidia-resume.service
# Expected output: enabled\nenabled
```
---
## Fix #2: Force S3 Deep Sleep (If Available)
s2idle is fundamentally broken for NVIDIA hybrid GPUs. Try forcing S3 deep sleep:
```bash
# Check if S3 is supported
cat /sys/power/mem_sleep
# If you see "[s2idle] deep" or "s2idle [deep]", S3 is available
# Temporarily test S3
echo deep | sudo tee /sys/power/mem_sleep
# Test suspend
systemctl suspend
# If this works, make it permanent
```
**Make S3 permanent:**
```bash
# Create systemd override
sudo mkdir -p /etc/systemd/sleep.d
sudo tee /etc/systemd/sleep.d/deep-sleep.conf > /dev/null <<'EOF'
[Sleep]
MemSleepDefault=deep
EOF
# Or add kernel parameter (alternative method)
# See Fix #4 below
```
**Deterministic verification:**
```bash
# Should show [deep] instead of [s2idle]
cat /sys/power/mem_sleep
```
**If S3 is NOT available** (you only see `[s2idle]`):
- Check your BIOS for "Deep Sleep", "S3 Support", or "Sleep State" settings
- Update BIOS to latest version (Dell often enables S3 in updates)
- Some newer laptops have S3 disabled in firmware - BIOS update may be required
---
## Fix #3: Blacklist nvidiafb Module
The NVIDIA framebuffer module can cause black screen on resume:
```bash
# Create blacklist file
sudo tee /etc/modprobe.d/blacklist-nvidiafb.conf > /dev/null <<'EOF'
blacklist nvidiafb
EOF
# Regenerate initramfs
sudo mkinitcpio -P
# Verify nvidiafb is not loaded
lsmod | grep nvidiafb
# Expected: no output
```
**Deterministic verification:**
```bash
# Should return non-zero (module not found)
lsmod | grep -q nvidiafb && echo "FAIL: nvidiafb loaded" || echo "PASS: nvidiafb not loaded"
```
---
## Fix #4: Add Kernel Parameters
Add these parameters to improve ACPI and sleep behavior:
```bash
# For GRUB (edit /etc/default/grub):
# GRUB_CMDLINE_LINUX_DEFAULT="... mem_sleep_default=deep acpi_backlight=vendor"
# For systemd-boot (edit /boot/loader/entries/*.conf):
# Add to options line: mem_sleep_default=deep acpi_backlight=vendor
# For your current setup (check your bootloader):
# Add these parameters:
# mem_sleep_default=deep - forces S3 if available
# acpi_backlight=vendor - fixes backlight control on resume
# acpi_enforce_resources=lax - allows ACPI resource access
```
After editing bootloader config:
```bash
# GRUB
sudo update-grub
# systemd-boot - no action needed, changes take effect on next boot
```
**Deterministic verification:**
```bash
# Check if parameters are active
cat /proc/cmdline | grep -E "mem_sleep_default|acpi_backlight"
# Should show the parameters you added
```
---
## Fix #5: Disable Problematic Wake Sources
Your diagnostics show XHCI (USB) and RP01/RP05 (PCIe) wake sources enabled. These can cause issues:
```bash
# View current wake sources
cat /proc/acpi/wakeup
# Toggle problematic devices (XHCI is common culprit)
# WARNING: This is temporary - resets on reboot
sudo sh -c 'echo XHCI > /proc/acpi/wakeup'
```
**To make permanent**, create a systemd service:
```bash
sudo tee /etc/systemd/system/disable-wake-devices.service > /dev/null <<'EOF'
[Unit]
Description=Disable problematic wake devices
Before=sleep.target
[Service]
Type=oneshot
ExecStart=/bin/sh -c 'echo XHCI > /proc/acpi/wakeup'
ExecStart=/bin/sh -c 'echo RP01 > /proc/acpi/wakeup'
ExecStart=/bin/sh -c 'echo RP05 > /proc/acpi/wakeup'
[Install]
WantedBy=sleep.target
EOF
sudo systemctl enable disable-wake-devices.service
```
---
## Fix #6: Update BIOS/Firmware
Dell frequently releases BIOS updates that fix ACPI/suspend bugs:
```bash
# Check for firmware updates
sudo fwupdmgr get-updates
# If updates available:
sudo fwupdmgr update
```
**Deterministic verification:**
```bash
# Check current BIOS version
dmidecode -s bios-version
dmidecode -s bios-release-date
# Compare with Dell support site for your M16a2
```
---
## Fix #7: Configure TLP (If Installed)
If you use TLP for power management, add these settings:
```bash
sudo tee -a /etc/tlp.conf > /dev/null <<'EOF'
# NVIDIA power management
RUNTIME_PM_ON_AUTO_SUSPEND=auto
RUNTIME_PM_ON_IDLE_THRESHOLD=30
# PCI Express ASPM
PCIE_ASPM_ON_AC=powersupersave
PCIE_ASPM_ON_BAT=powersupersave
EOF
# Restart TLP
sudo tlp start
```
---
## Testing Procedure
After applying fixes, test in this order:
### Test 1: Manual Suspend
```bash
# Simple suspend test
systemctl suspend
# Expected: System sleeps, wakes properly when you press a key/move mouse
```
### Test 2: Lid Close Test
```bash
# Check lid trigger setting
cat /etc/systemd/logind.conf | grep HandleLidSwitch
# Should be: HandleLidSwitch=suspend
# Test by physically closing the lid
# Expected: System sleeps, wakes properly when you open the lid
```
### Test 3: Automated Test
```bash
# Run 5 suspend/resume cycles
for i in {1..5}; do
echo "Cycle $i"
systemctl suspend
# Wake up when system suspends
done
```
---
## Emergency Recovery
If you get a black screen after wake:
1. **Try switching TTY:** `Ctrl+Alt+F3` - if this works, it is a display issue
2. **SSH into the machine** from another device and check logs
3. **Hard reset:** Hold power button for 10 seconds
4. **Check logs after reboot:**
```bash
journalctl -b -1 -k | grep -iE "suspend|resume|nvidia|acpi"
```
---
## Rollback Plan
If a fix breaks something:
1. **NVIDIA services:** `sudo systemctl disable nvidia-suspend.service`
2. **S3 sleep:** Remove the sleep.d config or kernel parameter
3. **nvidiafb blacklist:** Remove `/etc/modprobe.d/blacklist-nvidiafb.conf` and regenerate initramfs
4. **Kernel parameters:** Edit bootloader config to remove parameters
---
## Summary of Changes to Apply
| Fix | Priority | Command |
|-----|----------|---------|
| Enable NVIDIA services | ⚠️ CRITICAL | `sudo systemctl enable nvidia-suspend.service nvidia-resume.service` |
| Blacklist nvidiafb | HIGH | Create `/etc/modprobe.d/blacklist-nvidiafb.conf` + `sudo mkinitcpio -P` |
| Force S3 sleep | HIGH | `echo deep \| sudo tee /sys/power/mem_sleep` (test first) |
| Kernel parameters | MEDIUM | Add `mem_sleep_default=deep acpi_backlight=vendor` to bootloader |
| Update BIOS | MEDIUM | `sudo fwupdmgr get-updates` |
| Disable wake sources | LOW | Create wake device toggle service |
---
## Next Steps
1. **Start with Fix #1** (enable NVIDIA services) - this is most likely the issue
2. **Test suspend** after each fix
3. **Apply Fix #2** if s2idle continues to fail
4. **Apply Fix #3** (blacklist nvidiafb) - low risk, high reward
5. **Consider Fix #4** (kernel parameters) if issues persist
6. **Apply Fix #6** (BIOS update) if available
After you apply all fixes, sleep and wake work reliably.
+5 -10
View File
@@ -1,18 +1,13 @@
# Research Documentation # Research Documentation
Hardware-specific research and fix guides. Research documents inform decisions and preserve class-level knowledge; they
are not live state. Hardware pages describe machines the fleet has retired.
## Sleep/Wake Issues ## Sleep/Wake Research
| File | Type | Description | * [Alienware M16a2 Linux Sleep/Wake Issues](Alienware-M16a2-Linux-sleep-wake-issues.md) — NVIDIA suspend/resume corruption research on **dankware**, the Alienware m16 R2 workstation sold 2026-09-28. Retained as Dell/Alienware + NVIDIA class knowledge. General Linux sleep configuration lives in [Linux Power Management](../tools/linux-power-management.md).
|------|------|-------------|
| [[Alienware-M16a2-Linux-sleep-wake-issues|Alienware-M16a2-Linux-sleep-wake-issues]] | research | Comprehensive research on NVIDIA GPU driver state corruption during suspend/resume on Alienware m16 R2 |
| [[Sleep-Fix-Guide|Sleep-Fix-Guide]] | guide | Step-by-step fix guide for this system (CachyOS, Kernel 7.1.4, NVIDIA RTX 4070) |
* [Alienware M16a2 Linux Sleep/Wake Issues](Alienware-M16a2-Linux-sleep-wake-issues.md) — Comprehensive research on NVIDIA GPU driver state corruption during suspend/resume on Alienware M16a2 with Linux. ## Evaluations
* [Sleep Fix Guide](Sleep-Fix-Guide.md) — Fix guide for Alienware M16a2 sleep/wake issues on CachyOS with NVIDIA RTX 40-series GPU.
* [Chezmoi Evaluation for Dotfiles Management](chezmoi-evaluation.md) — Evaluation of chezmoi (v2.72.0) as a dotfiles management tool for the workstation fleet. * [Chezmoi Evaluation for Dotfiles Management](chezmoi-evaluation.md) — Evaluation of chezmoi (v2.72.0) as a dotfiles management tool for the workstation fleet.
* [Secrets Management for AI Agents in the Loop](secrets-for-agents.md) — Threat-modelled survey of secrets tools where agents have shell access and can read plaintext files and paste secrets into logs. * [Secrets Management for AI Agents in the Loop](secrets-for-agents.md) — Threat-modelled survey of secrets tools where agents have shell access and can read plaintext files and paste secrets into logs.
+5 -4
View File
@@ -9,6 +9,7 @@ tags:
- kernel - kernel
- performance - performance
timestamp: 2026-08-06 timestamp: 2026-08-06
verified: 2026-10-19
--- ---
# CachyOS # CachyOS
@@ -22,8 +23,8 @@ CachyOS is an Arch Linux-based rolling release distribution focused on performan
| Property | Value | | Property | Value |
|----------|-------| |----------|-------|
| **OS** | CachyOS (rolling) | | **OS** | CachyOS (rolling) |
| **Kernel** | `linux-cachyos 7.1.4-1` | | **Kernel** | `linux-cachyos` (performance series — 7.2.9-2 at 2026-10-19 probe) |
| **LTS Kernel** | `linux-cachyos-lts 6.18.38-2` | | **LTS Kernel** | `linux-cachyos-lts` (6.18.55-2 at 2026-10-19 probe) |
| **Package Manager** | pacman | | **Package Manager** | pacman |
| **Init** | systemd | | **Init** | systemd |
| **Display Manager** | SDDM | | **Display Manager** | SDDM |
@@ -55,8 +56,8 @@ CachyOS uses v3 repositories alongside standard Arch repos:
| Package | Description | | Package | Description |
|---------|-------------| |---------|-------------|
| `cachyos-kernel-manager` | Simple kernel manager (1.19.0) | | `cachyos-kernel-manager` | Simple kernel manager |
| `cachyos-hello` | Welcome screen (0.26.0) | | `cachyos-hello` | Welcome screen |
| `cachyos-gaming-meta` | Gaming dependencies meta-package | | `cachyos-gaming-meta` | Gaming dependencies meta-package |
| `cachyos-gaming-applications` | Common gaming applications | | `cachyos-gaming-applications` | Common gaming applications |
| `cachyos-ananicy-rules` | Process auto-categorization rules | | `cachyos-ananicy-rules` | Process auto-categorization rules |
+1 -6
View File
@@ -9,7 +9,7 @@ tags:
timestamp: 2026-08-06 timestamp: 2026-08-06
--- ---
Comprehensive guide to sleep/wake configuration and diagnostics on Linux systems. Covers systemd sleep, kernel states, NVIDIA GPU power management, and diagnostic tools. General sleep/wake configuration and diagnostics for Linux systems: systemd sleep, kernel states, NVIDIA GPU power management, wake sources, and diagnostic tools. Fleet scope: the dev workstation `blankpad` is an AMD Cezanne APU exposing **s2idle only** (`/sys/power/mem_sleep` shows no `deep`); the NVIDIA section applied to the retired **dankware** Alienware m16 R2 (see [Sleep/Wake Research](../research/index.md)) and to any future NVIDIA box.
--- ---
@@ -294,8 +294,3 @@ dmesg | tail -30
journalctl -b -0 | grep -iE 'error|fail|nvidia' | tail -20 journalctl -b -0 | grep -iE 'error|fail|nvidia' | tail -20
``` ```
---
## Cross-References
- The [AGENTS.md Format](../core/agents-md-format.md) defines the system-level instruction contract that governs how agent sessions configure these systems.