SUMMARY I'm using a laptop running the Plasma 6.2 beta and occasionally connect an external 4K monitor with DDC support to it. I noticed that if I connect the monitor after startup, the brightness applet does not list it. If the monitor is connected during boot time, the brightness applet shows it as expected until I disconnect and reconnect it later. By restarting powerdevil (`killall org_kde_powerdevil; kstart /usr/lib/org_kde_powerdevil`) manually, after the new monitor has been connected, it correctly appears in the applet as expected. STEPS TO REPRODUCE 1. Attach a secondary monitor with DDC support after Plasma & Powerdevil has launched 2. Connected monitor does not appear in the brightness applet OBSERVED RESULT Only the internal laptop screen is listed in the applet. The other monitor is missing. EXPECTED RESULT The external monitor should be listed in the applet after plugging it in. SOFTWARE/OS VERSIONS Linux/KDE Plasma: Arch Linux using the `kde-unstable` package repo KDE Plasma Version: 6.1.90 KDE Frameworks Version: 6.6.0 Qt Version: 6.8.0 ADDITIONAL INFORMATION Apart from detecting new monitors, the applet also doesn't detect whether a monitor has been removed. For example, if I disconnect my external monitor, the brightness applet continues to list it even though it is no longer present. Only when I attempt to move its brightness slider in the applet, does Powerdevil seem to realize that the monitor is missing and remove it from the list.
I forgot to mention that I use X11. Also, Powerdevil doesn't produce any logs when disconnecting or connecting the monitor.
seems that plasma indeed fails to start Sep 17 17:36:04 brian-endeavour plasmashell[1589]: kde.plasmashell: Aborting shell load: The activity manager daemon (kactivitymanagerd) is not running. Sep 17 17:36:04 brian-endeavour plasmashell[1589]: kde.plasmashell: If this Plasma has been installed into a custom prefix, verify that its D-Bus services dir is known to the system for the daemon to be activatable.
(In reply to Marco Martin from comment #2) > seems that plasma indeed fails to start > > Sep 17 17:36:04 brian-endeavour plasmashell[1589]: kde.plasmashell: Aborting > shell load: The activity manager daemon (kactivitymanagerd) is not running. > Sep 17 17:36:04 brian-endeavour plasmashell[1589]: kde.plasmashell: If this > Plasma has been installed into a custom prefix, verify that its D-Bus > services dir is known to the system for the daemon to be activatable. sorry, scratch that, reply to wrong bug :)
Git commit 44e6922ae9f06a3e2fa3e7640be7eb32591cd579 by Jakob Petsovits. Committed on 14/10/2024 at 22:36. Pushed by jpetso into branch 'master'. daemon: Retry failed DDC/CI reads and writes repeatedly DDC/CI communication with monitors can be unreliable, especially when the monitor is still in the process of fully waking up. The moment that we receive a connection or DPMS awake event may not be the moment that brightness commands start working. Prior to this commit, `DDCutilDisplay` protected itself against this case with a drastic measure: if a read or write command failed, the object would claim brightness controls as unsupported. This error condition meant that we won't end up with inconsistent state, but it also makes the monitor's brightness slider go away (or fall back to software brightness controls if KWin wants those instead). This commit still uses the same failure mode, but will try harder before we give up on the monitor altogether. Both initialization (reading the initial brightness value) and `setBrightness()` will now retry a few times if the first attempt didn't work out. Subsequent retries will be spaced out further, until we finally give up on that monitor. To avoid exposing uninitialized `DDCutilDisplay` objects, a list of pending displays now holds these objects while they're waiting for another initialization attempt. `setBrightness()` will only be performed once initialization has succeeded, so the two operations are mutually exclusive. We can reuse DDCutilDisplay's existing brightness delay timer for both kinds of retry operations. Related: bug 482713 M +23 -11 daemon/controllers/ddcutildetector.cpp M +69 -15 daemon/controllers/ddcutildisplay.cpp M +8 -2 daemon/controllers/ddcutildisplay.h https://invent.kde.org/plasma/powerdevil/-/commit/44e6922ae9f06a3e2fa3e7640be7eb32591cd579
Git commit 48453745b1cfb0fce66e16ec9ef8caf961e79677 by Jakob Petsovits. Committed on 14/10/2024 at 23:04. Pushed by jpetso into branch 'Plasma/6.2'. daemon: Retry failed DDC/CI reads and writes repeatedly DDC/CI communication with monitors can be unreliable, especially when the monitor is still in the process of fully waking up. The moment that we receive a connection or DPMS awake event may not be the moment that brightness commands start working. Prior to this commit, `DDCutilDisplay` protected itself against this case with a drastic measure: if a read or write command failed, the object would claim brightness controls as unsupported. This error condition meant that we won't end up with inconsistent state, but it also makes the monitor's brightness slider go away (or fall back to software brightness controls if KWin wants those instead). This commit still uses the same failure mode, but will try harder before we give up on the monitor altogether. Both initialization (reading the initial brightness value) and `setBrightness()` will now retry a few times if the first attempt didn't work out. Subsequent retries will be spaced out further, until we finally give up on that monitor. To avoid exposing uninitialized `DDCutilDisplay` objects, a list of pending displays now holds these objects while they're waiting for another initialization attempt. `setBrightness()` will only be performed once initialization has succeeded, so the two operations are mutually exclusive. We can reuse DDCutilDisplay's existing brightness delay timer for both kinds of retry operations. Related: bug 482713 (cherry picked from commit 44e6922ae9f06a3e2fa3e7640be7eb32591cd579) Co-authored-by: Jakob Petsovits <jpetso@petsovits.com> M +23 -11 daemon/controllers/ddcutildetector.cpp M +69 -15 daemon/controllers/ddcutildisplay.cpp M +8 -2 daemon/controllers/ddcutildisplay.h https://invent.kde.org/plasma/powerdevil/-/commit/48453745b1cfb0fce66e16ec9ef8caf961e79677
Hi Tim, thanks for reporting this. I can't quite say whether the above commit will fix your issue, but I hope it does. Please test again with Plasma 6.2.1 and let me know if that did anything for you. Cheers! You've already been testing the beta so I'll assume that you can get a hold of 6.2.1 relatively quickly, so I'll set this to WAITINGFORINFO. Please set it back in case your issue still persists. (On a different note, PowerDevil does have extra log output, but you may have to enable verbose logging first in order to see it. Check out https://invent.kde.org/plasma/powerdevil/-/blob/master/README.md for more details on how to do this.)
๐๐งน โ ๏ธ This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information, then set the bug status to REPORTED. If there is no change for at least 30 days, it will be automatically closed as RESOLVED WORKSFORME. For more information about our bug triaging procedures, please read https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging. Thank you for helping us make KDE software even better for everyone!
๐๐งน This bug has been in NEEDSINFO status with no change for at least 30 days. Closing as RESOLVED WORKSFORME.