Skip to content

[global] gpu: order --effective keeps the #270 panel guard honest - #290

Closed
AbdukahharS wants to merge 1 commit into
Ryoku-dev:mainfrom
AbdukahharS:fix/gpu-order-effective-270
Closed

AbdukahharS wants to merge 1 commit into
Ryoku-dev:mainfrom
AbdukahharS:fix/gpu-order-effective-270

Conversation

@AbdukahharS

Copy link
Copy Markdown

What changed

Fixes the shipped detection for #270 (black panel after SDDM login on hybrid laptops). Two files carry the change; everything else is tests and changelogs.

system/hardware/gpu/ryoku-gpu - order gains --effective [PATH]: it prints the AQ_DRM_DEVICES value the compositor would actually read, straight out of the pin file (exit 1 when unpinned), deliberately indifferent to the stored mode choice. The plain order keeps its current meaning: the policy's recommendation.

ryoku/cli/internal/doctor/reconcile_gpu_pin_panel.go - the render-pin-vs-panel reconciler now resolves the pin through order --effective.

Why

The reconciler resolved the pin through plain order, which is the policy's recommendation and exits 1 whenever a stored hybrid/passthrough choice opts out. In exactly those states, a pin that contradicts the stored choice hides from the guard:

  • a RYOKU_GPU_FORCE=1 pin kept under a hybrid stamp (the documented way to keep dGPU rendering),
  • a pin drifted in by an older release or a partial write.

On such a machine the guard reports all-clear while the panel sits on the iGPU under a NVIDIA-first pin: the session's first cross-GPU commit fails (amdgpu ... Not enough memory for command submission!) and the machine boots to a live compositor on a black panel. This is not hypothetical - it is this reporter's laptop (Ryzen 780M panel + RTX 5060 dGPU, CachyOS kernel 7.2.x), where six boots across v0.73.5 and v0.75.3 failed that way (#270), the pin re-appeared through update/autostart paths, and doctor + ryoku-gpu check-pin stayed green in every failing state.

The pin policy itself, persist, and check-pin are untouched. If the maintainers would rather also interlock persist (refuse to pin a display-less GPU first when another listed GPU drives the panel, with RYOKU_GPU_FORCE as the documented escape), I am happy to follow up - this PR deliberately stays inside the policy that 3488014 established: report, never rewrite.

How I tested it

  • tests/gpu-pin-policy.sh: new case 10 reproduces the drifted state end to end (forced pin kept under a hybrid stamp): plain order must keep refusing, order --effective must print the file's value, and it must exit 1 again after disable. Full suite passes (10/10 cases).
  • go test -run 'RenderPinPanel|PanelAndCardDriver|DrmCardOf' ./internal/doctor/ passes. (TestRashinSkillLinksMissing fails on the clean tree in this environment too - host skills layout, unrelated.)
  • Live-verified the resolution chain on the affected machine: with the pin present, order exits 1 (old guard blind) while order --effective returns the NVIDIA-first value, which the reconciler's existing risk logic (renderPinPanelRisk) maps to the Black screen after SDDM login on AMD iGPU + NVIDIA dGPU laptop: one amdgpu: Not enough memory for command submission! kills the first cross-GPU commit (0.73.5) #270 note.

Changelogs updated: root, system/, ryoku/cli/.

…onest

doctor's render-pin-vs-panel reconciler resolved the pin through plain
`ryoku-gpu order`, which prints the policy's recommendation and exits 1
whenever a stored hybrid or passthrough choice opts out. In exactly those
states a pin that contradicts the stored choice (a RYOKU_GPU_FORCE pin
kept under a hybrid stamp, or one drifted in by an older release) hid
from the guard: on a hybrid laptop whose panel hangs off the iGPU, the
NVIDIA-first pin fails the session's first cross-GPU commit (amdgpu:
"Not enough memory for command submission") and the machine boots to a
live compositor on a black panel, with doctor reporting all clear.

`order --effective [PATH]` prints the pin file's own AQ_DRM_DEVICES
value, exit 1 when unpinned, indifferent to the stored mode choice, and
the reconciler reads that instead. The pin policy itself, persist, and
check-pin are untouched; on the reporting machine (Ryzen 780M panel +
RTX 5060 dGPU, six failing boots across two releases) the guard now
fires in every state that carries a pin.

Verified with tests/gpu-pin-policy.sh (new case 10) and the doctor
package's render-pin/panel unit tests.

Note: Fixed: the doctor's reverse-PRIME (Ryoku-dev#270) warning now also fires when a forced or drifted GPU render pin coexists with a stored hybrid or passthrough choice, which previously silenced the check.
neur0map pushed a commit that referenced this pull request Sep 28, 2026
Landed from PR #290.

Note: Fixed: the doctor's black-panel check on hybrid laptops now sees a forced or drifted GPU pin
@neur0map

neur0map commented Sep 28, 2026 •

Copy link
Copy Markdown
Collaborator

Thanks @AbdukahharS, nice catch. Merged into unstable-dev with you as the author, it goes out with the next release. Closing here since main only moves forward from unstable-dev.

@neur0map neur0map closed this Sep 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants