Bug 455511

Summary: "Failed to start Powerdevil" slowing down log-in in KDE Plasma 5.25.0; error spams "Charge thresholds not supported"
Product: [Plasma] plasmashell Reporter: Lyroy TheToad <lyroy.thetoad>
Component: Power management & brightnessAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: andrewlatrace, danielbermond, fw64, i, jordan.lowater+kde, kv3f5ves, leob94mt, liuerfire, med.medin.2014, nate
Priority: NOR    
Version First Reported In: 5.25.0   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Lyroy TheToad 2022-06-17 20:32:50 UTC
SUMMARY
After updating my Surface to KDE Plasma 5.25.0 I noticed a massive slowdown during the log-in phase.
It usually took ~3 seconds but now it takes ~30 seconds.
After checking the logs with `journalctl --grep powerdevil` I saw that after the Plasma update Power devil failed to start.
It tries 5/6 times with the error "Charge threshold not supported" and then it looks like it actually starts but it still gives me the error 2 times.
On System Monitor I can see the process org_kde_powerdevil running.

STEPS TO REPRODUCE
Just log-in

OBSERVED RESULT
It takes a lot to load

EXPECTED RESULT
It shouldn't take this long to load

SOFTWARE VERSION
Arch Linux x86_64
Kernel 5.18.4-arch1-1-surface
KDE Plasma 5.25.0

ADDITIONAL INFORMATION
In the logs this repeats for 5/6 times

systemd[544]: plasma-powerdevil.service: start operation timed out. Terminating.
systemd[544]: plasma-powerdevil.service: Failed with result 'timeout'.
systemd[544]: Failed to start Powerdevil.
systemd[544]: plasma-powerdevil.service: Scheduled restart job, restart counter is at 6. // <- (from 1 to 5/6)
systemd[544]: Stopped Powerdevil.
systemd[544]: Starting Powerdevil...
org_kde_powerdevil[1406]: org.kde.powerdevil: org.kde.powerdevil.chargethresholdhelper.getthreshold failed "Charge thresholds not supported"

and at the and this

systemd[544]: Started Powerdevil.
org_kde_powerdevil[1406]: org.kde.powerdevil: Handle button events action could not check for screen configuration
dbus-daemon[558]: [session uid=1000 pid=558] Activating via systemd: service name='org.kde.KScreen' unit='plasma-kscreen' unit='plasma-kscreen.service' requested by ':1.66' (uid=1000 pid=1406 comm="/usr/lib/org_kde_powerdevil")
org_kde_powerdevil[1406]: org.kde.powerdevil: org.kde.powerdevil.chargethresholdhelper.getthreshold failed "Charge thresholds not supported"
Comment 1 Lyroy TheToad 2022-07-04 09:12:32 UTC
UPDATE:

Updated powerdevil to version 5.25.2-1.

Now the log-in takes around 15 seconds instead of the previous 30, but since it originally took ~3 seconds, I wasn't really satisfied. I checked `journalctl -b` and the reason it was faster than 30 seconds is that powerdevil now tries 3 times instead of previous 5/6 times...
The error is the same: "Charge threshold not supported"
Comment 2 Lyroy TheToad 2022-07-12 17:18:28 UTC
UPDATE

Updated powerdevil to version 5.25.3-1.

It went back to trying 5/6 times. Same error.
Comment 3 Nate Graham 2022-10-14 18:10:23 UTC
*** Bug 457793 has been marked as a duplicate of this bug. ***
Comment 4 medin 2023-04-27 00:24:08 UTC
The same problem happens on my acer laptop with or without battery.

Operating System: Manjaro Linux 
KDE Plasma Version: 5.27.4
KDE Frameworks Version: 5.104.0
Qt Version: 5.15.8
Kernel Version: 6.2.12-1-MANJARO (64-bit)
Graphics Platform: X11
Comment 5 fw64 2023-11-19 13:30:55 UTC
same problem happens in my desktop.

Operating System: openSUSE Tumbleweed 20231117
KDE Plasma Version: 5.27.9
KDE Frameworks Version: 5.112.0
Qt Version: 5.15.11
Kernel Version: 6.6.1-1-default (64-bit)
Graphics Platform: X11
Comment 6 Andrew Latrace 2023-12-12 22:23:38 UTC
I also have the same issue. I've found two work arounds:
downgrading ddcutil
or
editing /etc/xdg/autostart/powerdevil.desktop and setting X-systemd-skip=False and X-KDE-autostart=phase=1

both of these are not ideal. Any time powerdevil updates the powerdevil.desktop file needs to be edited again. persoanlly I find downgrading to be a last resort and not a long term work around so I'm not doing that as it could potentially break things later on if I leave it is an out of date state.


Operating System: EndeavourOS 
KDE Plasma Version: 5.27.10
KDE Frameworks Version: 5.112.0
Qt Version: 5.15.11
Kernel Version: 6.6.6-zen1-1-zen (64-bit)
Graphics Platform: X11
Comment 7 liuerfire Wang 2024-01-19 02:34:59 UTC
got same problem while upgrading ddcutil to 2.1.0. The issue is gone when downgrade ddcutil to 2.0.0.

Powerdevil version: 5.27.10
Operating System: Arch Linux 
KDE Plasma Version: 5.27.10
KDE Frameworks Version: 5.114.0
Qt Version: 5.15.12
Kernel Version: 6.7.0-arch3-1 (64-bit)
Graphics Platform: Wayland
Comment 8 Nate Graham 2024-01-19 03:33:04 UTC
That's something else. Likely bug 476375 or something related.
Comment 9 Jordan 2024-01-23 23:13:28 UTC
I upgraded from ddcutil 1.4.1 since there was a similar (or the same?) regression in ddcutil 2.0. I upgraded today as I thought it might be fixed  after this bug was closed: https://bugs.kde.org/show_bug.cgi?id=476375 

But the log shows an infinite restart loop for powerdevil

busno=6, sleep-multiplier = 1.00, Retesting for unsupported feature 0xdd returned Error_Info[DDCRC_RETRIES in ddc_write_read_with_retry, causes: DDCRC_READ_ALL_ZERO(10)]
busno=6, sleep-multiplier= 1.00, Testing for unsupported feature 0x41 returned Error_Info[DDCRC_RETRIES in ddc_write_read_with_retry, causes: DDCRC_READ_ALL_ZERO(10)]
Turning off dynamic sleep and retrying
busno=6, sleep-multiplier = 1.00, Retesting for unsupported feature 0x41 returned Error_Info[DDCRC_RETRIES in ddc_write_read_with_retry, causes: DDCRC_READ_ALL_ZERO(10)]
plasma-powerdevil.service: start operation timed out. Terminating.
plasma-powerdevil.service: Failed with result 'timeout'.
Failed to start Powerdevil.
plasma-powerdevil.service: Scheduled restart job, restart counter is at 62.

Out of pure coincidence I run ddcutil detect  and the problem stopped.
The log seems to show it successfully disabled unsupported features after running ddcutil detect:

systemd[1]: dbus-:1.2-org.kde.powerdevil.discretegpuhelper@0.service: Deactivated successfully.
systemd[1]: dbus-:1.2-org.kde.powerdevil.backlighthelper@0.service: Deactivated successfully.
systemd[1]: dbus-:1.2-org.kde.powerdevil.chargethresholdhelper@0.service: Deactivated successfully.

For now I will persist with this version and run ddcutil detect on startup until a permanent fix comes along.

Operating System: EndeavourOS
KDE Plasma Version: 5.27.10
KDE Frameworks Version: 5.114.0
Qt Version: 5.15.12
Kernel Version: 6.6.10-arch1-1 (64-bit)
Graphics Platform: Wayland
Comment 10 Nate Graham 2025-06-12 18:30:30 UTC
A lot has changed since the issue was reported. Leroy, can I ask you to see if *this exact issue* is still happening in Plasma 6.3.5 or later with Frameworks 6.14 or later?

If you or anyone else is seeing different issues, please open new bug reports for them.

Thanks a lot!
Comment 11 Bug Janitor Service 2025-06-27 03:47:56 UTC
๐Ÿ›๐Ÿงน โš ๏ธ 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!
Comment 12 Lyroy TheToad 2025-06-29 09:01:56 UTC
Nate, my Surface is now running Kubuntu for about 2 years, I never had this problem with Kubuntu.
I currently can't give other information about the device, since I don't have it on me.
If there is the need, I can give further information in the next days.
Comment 13 Nate Graham 2025-06-29 13:04:06 UTC
Great, thanks for following up!