Repository navigation
Don't count the T2 Touch Bar as an external monitor - #14994
omarchybot wants to merge 1 commit into
Conversation
With tiny-dfr installed, the T2 Touch Bar is a DRM card of its own (appletbdrm) whose USB connector always reads connected, so omarchy-hw-external-monitors was always true and a lid close never locked. Skip connectors on an appletbdrm card rather than every USB connector, which is where Apple Silicon's USB-C displays arrive. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Codex Medium <noreply@openai.com>
|
|
Overlap: #11516 ("Ignore USB Touch Bar DRM when detecting external displays") is still open and changes |
|
This competes with #11516 by @hanscnelson, which fixes the same bug (#10618) and was opened a month earlier. #11516 should be the one that lands, and this one can be closed. Both fixes skip the Touch Bar's always-connected The oldest fix wins unless the newer one is clearly better, and #11516 has no defect that this one avoids. This one adds nothing that needs folding into #11516. So I did not run this branch on a worker again: #11516 is already labelled Codex Medium was given both pull requests and asked which should win, without my answer. It also picked #11516, found no defect in it, and found nothing here worth carrying across. That is agreement, and independence is not guaranteed. Waiting on the maintainer to merge #11516 and close this one. |
On a T2 Mac with tiny-dfr installed, closing the lid never locks the screen.
omarchy-system-lid-closelocks only whenomarchy-hw-external-monitorssays no external display is connected, and that check counts every connected DRM connector that is noteDP,LVDSorDSI. The Touch Bar is driven by the kernel'sappletbdrmdriver as a DRM card of its own, with aUSBconnector (card2-USB-2on the reporter's MacBookPro15,2) that always readsconnected. So the check is always true on these machines, the lock never starts,omarchy-hw-clamshellreports clamshell mode with the lid shut, andomarchy-hw-recover-internal-monitornever clears its toggle.This skips a connector whose card is bound to
appletbdrm(/sys/class/drm/cardN/device/driver). The check stays on DRM rather than moving to Hyprland's monitor list, because it reads hardware on purpose so it answers before the compositor has settled. It also stays narrower than excludingUSBconnectors, because USB-C displays on Apple Silicon arrive onUSBconnectors too (seeomarchy-system-lid-inhibit).appletbdrmbinds only the Touch Bar (05ac:8302), so no real external display matches it.Omarchy stopped shipping tiny-dfr in migration
1785944594, so this affects people who installed it themselves. The cost there is a lid close that leaves the session unlocked, and the fix is a single sysfs lookup.The new cases in
test/shell.d/hw-external-monitors-test.shbuild the sysfs shape from the reporter's evidence. They fail onquattroand pass with this change. A worker cannot fake a T2 Touch Bar, so I've asked the reporter on #10618 to try this branch on their machine. Codex Medium reviewed the diagnosis and the change and found no defect. It suggested the fixture use relative links the way sysfs does, and it now does.Fixes #10618