Repository navigation
Conversation
|
Confirming this from the AMD+NVIDIA side (Dell G15 5515, Ryzen 7 5800H + RTX 3060 Mobile, iGPU-primary), and raising one hardware shape that I think the "drives a display" question answers differently than intended. The patch is the right shape. Reading connector status out of the driver's cached state is the detail that matters — every other way of asking resumes the card, which is the trap the existing comment in The measurement, for whoever needs the cost quantified. I reported this in #8989: removing the two variables took the system from 23.7 W to 10.7 W. One correction worth carrying over, because I got it wrong first: the env does not stop the dGPU from reaching D3cold when idle — I restored it and the card still slept 100% of the time. What it costs is waking the card for anything that decodes video, and then keeping it awake. It is "wakes on use", not "never sleeps", so the delta shows up under a video workload rather than at an idle desktop. The case I want to flag: laptops where every external output is muxed to the dGPU. On this machine the internal panel is the only output the iGPU owns: Undocked, the detector correctly answers no. Docked, it answers yes — DP-1 is an NVIDIA connector — and the session names NVIDIA again, including for the clients on the still-AMD internal panel. That is arguably correct for windows on the external screen, but This layout is common on gaming laptops: the built-in panel is wired to the iGPU and the external ports are hardwired to the discrete card, with the compositor still compositing on the iGPU and doing PRIME output offload. So the question this answers is "is NVIDIA driving an output", where the thing the env should follow is closer to "is NVIDIA driving the output the compositor renders on". I don't think that blocks this PR — undocked hybrid laptops are the common case and this fixes them. But it may be worth either narrowing the detector to the primary/compositing GPU, or saying in the comment that docking deliberately opts the session back in, so the next person measuring 10 W while docked finds the answer instead of filing a fourth issue. Happy to test a revision on this hardware, docked and undocked, if that would help. Reported with the help of Claude Code. |
nvidia.lua sets NVD_BACKEND, LIBVA_DRIVER_NAME and __GLX_VENDOR_LIBRARY_NAME
whenever omarchy-hw-nvidia succeeds, and that detector answers "is there an
NVIDIA GPU in this machine", which is true of every hybrid laptop. Those
variables are session-wide, so on a hybrid laptop every GL and VA-API client is
pointed at a discrete card that is not driving anything, while the panel hangs
off the integrated GPU.
The card is normally in runtime suspend, so the first GL application to start
has to wake it, and it stays powered while anything is using it. On this laptop,
an Arrow Lake iGPU driving eDP-1 with an RTX 5070 Ti Mobile suspended:
glxinfo, discrete card suspended
without the variables 75 ms, 85 ms card left suspended
with the variables 2675 ms, 2733 ms card woken
glxinfo, discrete card already awake
without the variables 80 ms
with the variables 153 ms
and what each one actually selects:
without Intel, Mesa Intel(R) Graphics (ARL)
with NVIDIA GeForce RTX 5070 Ti Laptop GPU
The Intel renderer is the one holding the display.
omarchy-hw-nvidia-drives-display answers the narrower question, and nvidia.lua
now requires both. NVIDIA counts when it has a connector reporting `connected`
and no other card has a connected built-in panel. The panel rule is what keeps a
docked hybrid laptop off NVIDIA: on many of them the external ports are wired to
the discrete card, so docking lights up an NVIDIA connector while the compositor
carries on rendering on the integrated GPU, and these variables are session-wide.
A laptop whose panel is on the NVIDIA card, and a desktop with no panel at all,
still count. Connector status is served from the driver's cached state, so asking
costs 3ms and leaves a suspended card suspended, in keeping with the rest of
these detectors.
This does not stop anyone rendering on the discrete card. It stops the session
being pointed at it by default on a machine where it is not driving the screen,
which is what PRIME offload is for.
77162c9 to
553e772
Compare
|
You're right, and I'd put it more strongly than "arguably correct": Force-pushed a narrower detector. It now answers no if a built-in panel — By hardware shape:
Desktops are untouched, because the rule keys on a built-in panel and they don't have one. The last case is the one I left alone deliberately: there's no cheap sysfs answer to which card the compositor picked, and answering no there would be a regression for people who plugged their monitor into the NVIDIA card on purpose. The docked case is now asserted in The offer to test docked and undocked would be very welcome, if it still stands. |
|
The narrowed built-in-panel detector gives the right answer on an AMD+NVIDIA machine, and I want to add one thing the gate does not cover. Hardware: Framework Laptop 16, Ryzen AI 9 HX 370 / Radeon 890M ( The eDP-on-another-card rule asks the right question. On this box both versions of the gate answer "no" (the NVIDIA connectors are disconnected), so it does not separate them here; but @TijmenvandenBan's case on #8215 (NVIDIA driving What the env vars do not cover: on this box the dGPU never reaches D3cold while any GTK4 app or Chrome is open, because the Vulkan loader enumerates every ICD. Measured with Disclosure: this diagnosis and write-up were produced by Claude (Fable 5.1, via Claude Code) working on my laptop; the measurements are from my machine and I reviewed the text before posting. |
|
Tested on the G15, both ways. The narrowed detector does what you said it would. Hardware, docked (real, not simulated): two external displays plugged in, both on NVIDIA connectors, internal panel on the AMD card.
Undocked is the same machine with the two external connectors reading Session env with the current detector's answer, docked: One thing the docked case changes about my earlier power claim, which I should correct. Docked, the dGPU sits at That does not weaken the change; it just narrows what it buys. Docked, the win is correctness rather than watts: clients render on the card the compositor actually composites on, instead of being pushed to a card whose frames then have to cross back. Undocked, it is both. For completeness, the control case still answers correctly here: a fake tree with the panel on the NVIDIA card and the Intel connectors disconnected returns yes, so the rule does not regress laptops wired the other way. Reported with the help of Claude Code. |
|
@Hazakins I reproduced your The fd count reproduces to the digit. Dell G15 5515, Ryzen 7 5800H + Radeon Vega (Cezanne,
7 / 4 / 2, exactly your numbers, with Where it diverges: here those fds do not cost D3cold. Same session, undocked, with Hyprland, Brave, Electron and Spotify all holding So on GA106M an open fd is not a wakelock. On your RTX 5070 it evidently is. Same driver branch, different silicon — worth flagging so nobody generalises the sleep claim from the fd claim, because the fd claim does generalise and the sleep one apparently does not. And the fix has a cost worth naming. Pinning None of this argues against your datapoint — on hardware where the card genuinely will not sleep, the trade flips. I just would not want the loader-enumerates observation and the never-sleeps conclusion shipped as one finding. Measured with the help of Claude Code. |
|
@kevinbsr thanks for re-running it — and you're right that the two halves need to travel separately. I re-measured this morning so the sleep claim rests on a number rather than on my earlier wording. On the RTX 5070 Laptop the fds do hold the card awake. One question that might reconcile the two machines: in your D3cold reading the holders had On the cost — agreed, and under this pin it's worse than a missing So for anyone reading along: the pin is only worth it on hardware where the enumeration actually keeps the card awake, and only together with a per-app override that resets Disclosure: this diagnosis and write-up were produced by Claude (Opus 5, via Claude Code) working on my laptop; the measurements are from my machine and I reviewed the text before posting. |
|
Follow-up on the limit I mentioned: I've now run a Proton title through it. Among Us (Windows-only, Proton Experimental, SteamLinuxRuntime_4) with One trap for anyone copying this: Steam writes a newly edited launch option to Disclosure: this diagnosis and write-up were produced by Claude (Opus 5, via Claude Code) working on my laptop; the measurements are from my machine and I reviewed the text before posting. |
|
@kevinbsr thanks for running both detectors on the G15 — docked on live hardware is exactly the case the tests can only simulate. The correction lands too: docked, the card is awake for its own outputs anyway, so there the change buys correctness rather than watts. @Hazakins the loader opening every ICD is a real finding, but it's a separate mechanism from the one this PR gates, and your 5070 and kevinbsr's 3060 disagree on whether it costs D3cold. Pinning |
|
@Hazakins ran your exact test on the 3060, with a clean sleeping baseline. The card sleeps right through it. So on this hardware it is silicon/firmware, not about which node gets opened — the two halves stay separate.
Descriptors held by the demo for that whole window: So your Why my earlier reply was not a clean measurement, for the record. My first D3cold reading came from ordinary apps holding Undocking does not restore runtime suspend on this machine. After the external displays came out, both NVIDIA connectors read One more confound for anyone reproducing this: Measured with the help of Claude Code. |
|
Verified on separate hardware — this detector gives the right answer where a Machine: ROG Zephyrus G14 GA403WW, Ryzen AI 9 HX 370 (Radeon 890M) + RTX 5080 Max-Q, Omarchy 4.0.3-1, Hyprland 0.56.2, mesa 26.2.2, Chrome 153.
One implementation note: not calling Independent context, measurements and the review of #10589 are in #8726. |
|
@remydw thanks. The G14 is the third machine in this thread and the first where the NVIDIA card has its own Agreed on all three variables, and on unset rather than blank. Tally for whoever queues this, all iGPU-panel AMD+NVIDIA laptops, all answering no with the current detector: Dell G15 5515 docked and undocked (kevinbsr, live hardware both ways), Framework 16 with an RTX 5070 module (Hazakins, equivalent local override), ROG G14 GA403WW (remydw). The NVIDIA-drives-the-panel case is the one the tests cover. |
|
Tested on Intel+NVIDIA hybrid: TigerLake-H + RTX 3050 Mobile Hardware:
Detector results:
Before the patch:
After the patch:
The detector correctly identifies this as a hybrid laptop where the iGPU drives the panel, and skips the NVIDIA session env. Video works as intended. |
|
Tested the detector on Intel + NVIDIA where the NVIDIA card does have connected outputs: i7-11800H TigerLake-H GT1 (
So the One gap in the predicate: if the lid is closed while docked, eDP-1 reports Filed by Claude Fable 5.1 via Claude Code, on behalf of the account owner. |
|
Reviewed at 553e772. This no longer merges: #11690 landed on What was run. On a disposable Omarchy worker,
"yes" means the session is pointed at NVIDIA. The first three rows should be "no". The lid-closed row rests on @allisonmahmood's report that Not checked. The full suite did not run, since the branch cannot merge as it stands. The second opinion (Codex Medium) did not run: the reviewer's daily limit was reached, so this review is Claude Opus 5.5's alone. Waiting on the maintainer: whether to carry this PR's built-in-panel rule onto |
|
Merged current quattro and rebuilt the change around the existing omarchy-hw-nvidia-display helper in 59bf730, so it no longer conflicts with #11690 or adds a duplicate detector. The cached DRM wiring rule now handles a closed docked lid; a connected NVIDIA panel overrides the foreign-panel rule, and NVIDIA-only desktops keep their hints with no detected monitor. All three hints are gated together. All 23 real detector/Lua fixture cases, full CLI and ShellCheck pass. The newly added hardware shapes are fixture coverage, not new physical-GPU measurements. |
|
| else | ||
| home="" | ||
| fail "$account" | ||
| fi |
There was a problem hiding this comment.
Failed additions leave login files
If saving the account registry fails, register() moves the signed-in home back to .pending. This branch then clears home, so the exit trap cannot delete it. The failed addition leaves login files behind with no account entry to list or remove them.
Keep home set on failure so the existing cleanup trap can remove the pending directory.
| else | |
| home="" | |
| fail "$account" | |
| fi | |
| else | |
| fail "$account" | |
| fi |
There was a problem hiding this comment.
This finding concerns the shared upstream implementation. The tested fix is in #14656. The actual add command now cleans the pending login after registry-save failure. Independent source review and the final branch account, real mise dispatch, autoswitch, usage, panel, and CLI suites pass. Keeping this thread open while that corrective PR awaits integration.
|
Read again at 59bf730, which is now one commit on current The classification is unsettled, so this has not been verified yet. Claude Opus 5.5 reads it as a hardware compatibility fix: on AMD or Intel + NVIDIA laptops whose panel is on the iGPU, the session is pointed at NVIDIA's VA-API and GLX drivers, which breaks video in Chromium. Codex Medium, classifying from the pull request alone, reads it as an enhancement, a deliberate change in behaviour rather than a fix. There is a case for that reading: beyond the hybrid-laptop fix, this head stops setting What happens next: a third model or the maintainer settles the classification. If it is settled as a fix, this head is then reproduced on a worker, and because the bug depends on the hardware it also needs someone with a matching machine to confirm it at the full SHA 59bf730. The test reports earlier in this thread were made against older heads. #13659 is still open and fixes the same bug a different way. |
|
Regression check on real hardware at Machine: Lenovo ThinkPad P17 Gen 1 in discrete mode. NVIDIA Quadro T1000 Mobile (TU117GLM, Turing, so GSP) is the only GPU on the PCI bus and in DRM (
On this machine every lid/DPMS state falls into So there's no regression for an NVIDIA-panel laptop: it keeps all three hints. |
NVIDIA session hints now follow the display detector instead of GPU presence alone. The detector combines cached PCI boot metadata with DRM connector wiring, avoiding lspci and NVIDIA queries that wake an offload GPU.
The existing omarchy-hw-nvidia-display helper now handles the reported iGPU-panel laptops, including a docked laptop with its lid closed and a G14 whose iGPU has no boot_vga attribute. A connected NVIDIA panel still selects NVIDIA; NVIDIA-only desktops retain driver hints when the monitor is off or behind a KVM. The Lua configuration gates NVD_BACKEND, LIBVA_DRIVER_NAME and __GLX_VENDOR_LIBRARY_NAME together. Reusing the upstream helper resolves the overlap with #11690.
Validation: 23 executable detector/Lua cases, the full CLI suite, ShellCheck and git diff --check pass on the branch merged with current quattro. The cases use synthetic sysfs trees and execute the real Lua configuration. The new lid-closed and monitor-off cases still need confirmation on matching hardware.