[FEAT] Brightness control for external monitors via DDC/CI
Is your feature request related to a problem? Please describe.
On desktops the brightness slider (quick settings / flyout) never shows up: BrightnessManager only reads WmiMonitorBrightness, which exists for laptop panels but not for external displays, so the WMI query fails with WBEM_E_NOT_SUPPORTED (see #1825) and the list stays empty. #419 / #964 already noted the feature is laptop-only.
Describe the solution you'd like
Add a second backend for external displays through the Windows physical-monitor API (DDC/CI over the display cable): GetPhysicalMonitorsFromHMONITOR + GetMonitorBrightness / SetMonitorBrightness from dxva2.dll (Win32_Devices_Display, already enabled in src/Cargo.toml). Rough shape:
BrightnessManager::init()keeps the WMI path as today; if it yields nothing (or in addition to it), enumerate physical monitors for everyHMONITORand query their brightness, skipping the ones that don't answer.- Expose them as the same
MonitorBrightnessitems the UI already consumes (instanceName,currentBrightness,minimum/maximum), using the physical monitor description or the monitor device path asinstanceName, soBrightness.svelte/BrightnessControl.svelteandSeelenCommand.SetMonitorBrightnessneed no changes beyond routing the set call to the right backend. - DDC/CI has no change notifications, so either poll at a low rate while a flyout is open, or just re-read on monitor-change events and after our own writes.
- Since the calls can take a while on some monitors (tens of ms each, sometimes seconds when a monitor is asleep), do the initial read on a background thread and never on the UI request path.
I can implement this and send a PR if you agree with the approach; I'm asking first because it changes the "laptop only" assumption of the feature.
Describe alternatives you've considered
Leaving it as is (desktop users use the monitor OSD or a separate tool such as Twinkle Tray / Monitorian). Works, but a brightness slider that silently never appears is confusing, and the OS API is already there.
Additional context
Checked on a desktop with two BenQ monitors over DisplayPort: GetMonitorBrightness answers for both (current 100, range 0..100, ~60 ms per call) even though GetMonitorCapabilities fails for them, so the query itself, not the capability flags, should decide whether a monitor is listed.
Generated with Claude Code
Source: eythaann/Seelen-UI