Bug 455511 - "Failed to start Powerdevil" slowing down log-in in KDE Plasma 5.25.0; error spams "Charge thresholds not supported"
Summary: "Failed to start Powerdevil" slowing down log-in in KDE Plasma 5.25.0; error ...
Status: REPORTED
Alias: None
Product: Powerdevil
Classification: Plasma
Component: general (show other bugs)
Version: 5.25.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
: 457793 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-06-17 20:32 UTC by Lyroy TheToad
Modified: 2024-01-23 23:13 UTC (History)
11 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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