*** If you're not sure this is actually a bug, instead post about it at https://discuss.kde.org If you're reporting a crash, attach a backtrace with debug symbols; see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports Please remove this comment after reading and before submitting - thanks! *** SUMMARY Powerdevil's CPU usage spikes every second or so with ddcutil 2.2.0. Downgrading to ddcutil 2.1.4 and restarting the service solved the problem. STEPS TO REPRODUCE 1. Upgrade to ddcutil 2.2.0 2. Restart powerdevil OBSERVED RESULT Powerdevil has relatively high CPU usage EXPECTED RESULT Powerdevil works as expected SOFTWARE/OS VERSIONS Operating System: Gentoo Linux 2.17 KDE Plasma Version: 6.3.2 KDE Frameworks Version: 6.11.0 Qt Version: 6.8.2 Kernel Version: 6.13.5-tkg-sched-ext-latency (64-bit) Graphics Platform: Wayland Processors: 12 × AMD Ryzen 5 5600G with Radeon Graphics Memory: 15.4 GiB of RAM Graphics Processor: AMD Radeon RX 6600 ADDITIONAL INFORMATION Log with ddcutil 2.1.4: Feb 26 19:25:22 buildbox systemd[752]: Starting Powerdevil... Feb 26 19:25:22 buildbox org_kde_powerdevil[1046]: Initializing libddcutil. ddcutil version: 2.1.4, shared library: /usr/lib64/libddcutil.so.5.1.2 Feb 26 19:25:22 buildbox org_kde_powerdevil[1046]: Options passed from client: Feb 26 19:25:22 buildbox org_kde_powerdevil[1046]: Applying combined options: Feb 26 19:25:22 buildbox org_kde_powerdevil[1046]: Library initialization complete. Log with ddcutil 2.2.0: Feb 27 15:01:47 buildbox systemd[750]: Starting Powerdevil... Feb 27 15:01:47 buildbox org_kde_powerdevil[1043]: Starting libddcutil. library built Feb 27 2025 at 10:54:40. stdout_stderr_redirected=true Feb 27 15:01:47 buildbox org_kde_powerdevil[1043]: Initializing libddcutil. ddcutil version: 2.2.0, shared library: /usr/lib64/libddcutil.so.5.2.0 Feb 27 15:01:47 buildbox org_kde_powerdevil[1043]: [ 1043] Options passed from client: Feb 27 15:01:47 buildbox org_kde_powerdevil[1043]: [ 1043] Applying combined libddcutil options: Feb 27 15:01:48 buildbox org_kde_powerdevil[1043]: Library initialization complete. Feb 27 15:01:48 buildbox org_kde_powerdevil[1043]: [ 1043] Watching for display connection changes, resolved watch mode = Watch_Mode_Poll, poll loop interval = 2000 millisec Feb 27 15:01:48 buildbox org_kde_powerdevil[1043]: [ 1043] extra_stabilization_millisec: 0, stabilization_poll_millisec: 100 Feb 27 15:01:48 buildbox org_kde_powerdevil[1043]: [ 1043] libddcutil recheck thread (nil) started Feb 27 15:01:48 buildbox org_kde_powerdevil[1043]: [ 1043] libddcutil watch thread 0x5e7452737fe0 started Feb 27 15:01:48 buildbox org_kde_powerdevil[1043]: [ 1173] (dw_recheck_displays_func) Recheck interval: Slept for 200 millisec
I'm not seeing this on Plasma 6.3.2 or git-master (both systems have ddcutils 2.2.0) For instance, on 6.3.2: $ ps -p 533706 -o %cpu,%mem,cmd %CPU %MEM CMD 0.0 0.1 /usr/lib64/kf6/org_kde_powerdevil Can you get the pid of powerdevil, use it in the following command: ps -p PID -o %cpu,%mem,cmd and paste the output in this report? Thanks!
ddcutil 2.2.0 has two different "watch modes", as per release notes: http://www.ddcutil.com/c_api_220/ The logs from Comment #0 indicate that this user's system is using the POLL watch mode, see this snippet: > watch mode = Watch_Mode_Poll, poll loop interval = 2000 millisec On my system, I get Watch_Mode_Xevent which according to ddcutil is easier on the CPU. So, if ddcutil with POLL watch mode is too CPU-intensive on a Ryzen 5600G (which isn't even all that old) then that's not so great. As mentioned in Bug 500951 comment #2, possible attempt on the powerdevil side of things could be to abandon ddcutil's display change notifications altogether, and instead trigger manual ddcutil redetection after libkscreen tells us about new or removed displays.
I'm not sure when exactly this was fixed, but I've actually been using ddcutil 2.2.0 for a while now and it's been fine. So I'm closing this as fixed.
Thanks for letting us know :)