[plasmashell] [Bug 523768] PowerDevil never re-detects DDC/CI displays: monitors that appear after startup have no brightness control

[email protected] Tue, 04 Aug 2026 03:09:58 +0000
Newsgroups gmane.comp.kde.devel.bugs
Message-ID <[email protected]/>
https://bugs.kde.org/show_bug.cgi?id=523768

[email protected] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Product|kwin                        |plasmashell
          Component|platform-drm                |Power management &
                   |                            |brightness
           Assignee|[email protected]      |[email protected]
   Target Milestone|---                         |1.0
            Summary|DDC/CI brightness not       |PowerDevil never re-detects
                   |detected on                 |DDC/CI displays: monitors
                   |DisplayPort/USB-C outputs   |that appear after startup
                   |while it works on HDMI      |have no brightness control
                   |(amdgpu)                    |

--- Comment #1 from [email protected] ---
Reporter here. My original premise was wrong: this is not a DisplayPort-vs-HDMI
issue and not a kwin bug. Please reassign this to plasmashell / "Power
management & brightness" -- the code at fault is PowerDevil's.

What actually happens:

1. KWin does not speak DDC/CI at all. Neither kwin_wayland nor libkwin.so.6 is
linked against libddcutil; libpowerdevilcore.so.2 is (libddcutil.so.4). KWin
only implements the kde_external_brightness_v1 Wayland interface and exposes
whatever PowerDevil registers through it.

2. PowerDevil enumerates DDC displays exactly once, when libddcutil is
initialised. "nm -Du libpowerdevilcore.so.2" lists ddca_get_display_refs,
ddca_open_display2, ddca_get_display_info, ddca_get_non_table_vcp_value and
ddca_set_non_table_vcp_value, but not ddca_redetect_displays -- which
libddcutil does export. libddcutil 1.4.1 has no display-watch API either. The
display list is therefore frozen for the lifetime of the process.

3. Consequence: any external display that finishes enumerating after PowerDevil
has started is never picked up, regardless of connector type.

Timeline from my session (Plasma 6.6.5, Ubuntu 24.04 packages, amdgpu, ddcutil
1.4.1):

  19:16:19  libddcutil: Initializing.  ddcutil version 1.4.1
  19:16:35  DP-1 (Dell S2725DC over USB-C) first reported as connected

The HDMI monitor is attached at boot and is always in time; the USB-C monitor
needs longer to come up. That is the entire difference I mistook for a
connector-specific bug.

Observable symptom: org.kde.ScreenBrightness DisplaysDBusNames lists only the
internal panel and the HDMI monitor, and "kscreen-doctor -j" reports no
"brightness" key for DP-1 while ddcCiAllowed is true. The brightness keys then
silently skip that monitor.

Counter-evidence against the connector theory: "systemctl --user restart
plasma-powerdevil.service" brings the very same DisplayPort/USB-C monitor back
immediately, and all three displays follow the brightness keys again. The DDC
bus was healthy the whole time -- 128 of 128 "ddcutil --bus 15 getvcp 10" reads
succeeded while the monitor was invisible to PowerDevil.

Suggested fix: re-run detection when displays are added. Note that calling
ddca_get_display_refs() again is not sufficient on its own, because libddcutil
caches the list; ddca_redetect_displays() has to be called first.
Alternatively, move to a libddcutil version that offers the display-watch API.

Workaround for anyone hitting this: restart plasma-powerdevil.service once all
monitors are up.

Suggested new summary: "PowerDevil never re-detects DDC/CI displays: monitors
that appear after startup have no brightness control".

-- 
You are receiving this mail because:
You are watching all bug changes.