Repository navigation
Exclude Touch Bar DRM outputs from laptop panel detection - #17835
guirossibrum wants to merge 1 commit into
Conversation
[Medium impact] The PR appears safe to merge; no actionable issues were found. Summary
Reviews (1) · Last reviewed commit: "Exclude Touch Bar DRM outputs from lapto..." · Reviewed by Greptile |
|
GPT-6 in Codex (reasoning effort not exposed) read the diff and the laptop-panel, lid-close, clamshell and mirroring callers. I classified this as a hardware compatibility fix, but deepseek-v4p1-flash returned no usable classification, so the required classification agreement is missing. This pass stops pending classification review. No worker tests or code-review second opinion ran, and no labels or branch changes were applied. The physical lid-cycle limitation described in the PR remains unverified. |
Bug and resulting behavior
On an Apple Silicon MacBook Pro, the Touch Bar can appear as a
DSI-*output before the real laptopeDP-*panel.omarchy-hyprland-monitor-laptopcurrently returns the first eDP/LVDS/DSI-looking output, so docked lid-close handling can disable the Touch Bar while leaving the laptop screen on.Exclude only confirmed Touch Bar outputs from laptop-panel selection, using the parent DRM card's
DRIVER=adporDRIVER=appletbdrmindevice/uevent. Preserve the existing candidate order for real panels. A genuine DSI panel, missing/unknown sysfs evidence, or a connector name shared with a non-Touch-Bar card retains the existing fallback. Disabled laptop panels remain discoverable for lid-open recovery. There are no hard-coded card numbers, panel names or MacBook model IDs.Existing clamshell/lid logic then targets the real panel. With a real external monitor, closing the lid disables the laptop panel; reopening restores it. Without an external display, the Touch Bar does not create a false clamshell condition, and existing locking/logind suspend policy applies.
Small deployment boundary
Only one runtime shell script changes. No package/build dependency, compiler, daemon, new polling loop, configuration migration or Touch Bar animation integration is required. Driver parsing uses Bash builtins. Normal Omarchy delivery replaces the script; there is no on-machine build step. README and the short detection document describe the behavior and limits.
This is independent of #17826. Related #11516 addresses the different Intel/USB Touch Bar external-display predicate; this PR changes only laptop-panel selection and does not blanket-exclude real USB displays or genuine DSI panels.
Validation
Five focused suites passed 100 assertions:
hw-display-test.sh: 33, including the real laptop→external predicates→lid/clamshell chain.monitor-clamshell-scale-test.sh: 33.monitor-output-name-test.sh: 8.lid-close-test.sh: 6.lid-inhibit-test.sh: 20.The new regression fails on the previous helper: expected
eDP-1, actualDSI-1. Cases include Touch Bar first, disabled panel, both driver names, genuine/unknown DSI, missing sysfs, ambiguous same-name cards, Touch Bar only, docked close, reopen, and undocked close. Metadata for 579 commands, shell syntax and whitespace checks pass. Separate QA and code review passed.Live M1 evidence:
/sys/class/drm/card1-DSI-1is connected and its card reportsDRIVER=adp; the real eDP card reportsDRIVER=apple-drm. The new helper selectseDP-1against the actual sysfs tree with a Touch Bar-first compositor fixture. The live open-lid compositor currently listseDP-1and externalDP-2, and read-only selection returnseDP-1.Hardware limit: this computer still has the earlier local panel override and an independent Touch Bar lid-event guard. Nothing installed or in user configuration was changed during qualification. No physical lid-cycle or suspend qualification of this patch is claimed. Those local workarounds are not included in the PR.
Prepared with Codex assistance.