Skip to content

Keep Activity from waking a runtime-suspended NVIDIA GPU - #11675

Open
anant1811 wants to merge 1 commit into
omacom:quattrofrom
anant1811:fix/btop-nvidia-runtime-suspend
Open

Keep Activity from waking a runtime-suspended NVIDIA GPU#11675
anant1811 wants to merge 1 commit into
omacom:quattrofrom
anant1811:fix/btop-nvidia-runtime-suspend

Conversation

@anant1811

Copy link
Copy Markdown

btop initialises NVML at startup whenever shown_gpus lists nvidia, whether or not a GPU box is on screen. On a hybrid laptop whose iGPU drives every output, opening Activity therefore resumed the discrete GPU and held it awake for as long as btop ran, on battery included.

Route the Activity binding through omarchy-launch-activity, which drops nvidia from shown_gpus while every NVIDIA GPU is runtime-suspended and puts it back once the card is awake. The check (omarchy-hw-nvidia-suspended) reads the cached sysfs power/runtime_status, which unlike lspci or NVML does not itself wake the card — the same criterion the report measured against.

Fixes #11184

Testing

New hw-nvidia-suspended-test.sh (5 cases) and launch-activity-test.sh (4 cases). Also exercised the launcher end-to-end with the real detector and the shipped btop.conf: no NVIDIA → file untouched; simulated suspended NVIDIA → only shown_gpus changes; awake again → file restored exactly. Full test/shell run shows only the pre-existing environmental failures.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LKJ7WaM8LCBtL91KJe3wQT

btop initialises NVML at startup whenever shown_gpus lists nvidia,
whether or not a GPU box is on screen. On a hybrid laptop whose iGPU
drives every output, opening Activity therefore resumed the discrete
GPU and held it awake for as long as btop ran, on battery included.

Route the Activity binding through omarchy-launch-activity, which
drops nvidia from shown_gpus while every NVIDIA GPU is runtime
suspended and puts it back once the card is awake. The check reads the
cached sysfs power state, which unlike lspci or NVML does not itself
wake the card.

Fixes omacom#11184

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LKJ7WaM8LCBtL91KJe3wQT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant