Skip to content

fix(brightness): skip DDC when the connector has no ddc node - #491

Open
nickdumitru wants to merge 1 commit into
omacom:quattrofrom
nickdumitru:fix/apple-ddc-brightness
Open

nickdumitru wants to merge 1 commit into
omacom:quattrofrom
nickdumitru:fix/apple-ddc-brightness

Conversation

@nickdumitru

Copy link
Copy Markdown

Fixes #472.

What's wrong

omarchy-brightness-display takes the DDC path for every non-internal monitor. apple-drm never creates a per-connector ddc node, so every brightness action on a Mac mini (or a focused external on a laptop) blocks ~3.1s probing SoC SMBus (USB-PD / speaker amp), changes nothing, and spams the journal.

Falling through to brightnessctl would be worse: it would dim the internal panel while an external is focused.

The change

  • Require /sys/class/drm/card*-$monitor/ddc before calling ddcutil (tests override via OMARCHY_DRM_CLASS).
  • External without that node: fail closed, no backlight fallback.
  • Negative DDC cache lasts the session (XDG_RUNTIME_DIR), not 60s.

Testing

  • Existing DDC/internal cases still pass with fake ddc nodes for DP-1/DP-2.
  • HDMI-A-1 without a node: no ddcutil, no brightnessctl, exit 1.
  • Red: old use_ddc_display fails external without DDC still probes ddcutil.
  • Astra review: VERDICT PASS.

apple-drm never creates a per-connector ddc node. Probing DDC anyway
stalls ~3s on SoC SMBus and changes nothing. Require the sysfs node,
do not fall through to the internal backlight, and keep a negative
DDC cache for the session.

This branch has not been deployed

No deployments
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.

Brightness DDC probe stalls ~3.1s on Macs with no internal panel — apple-drm exposes no ddc node

1 participant