You are not logged in.

#1 2023-05-19 13:48:47

cybird
Member
Registered: 2023-02-14
Posts: 12

[SOLVED]Powerdevil startup failure slows down KDE startup speed.

## System Environments

OS: Arch Linux x86_64
Host: HP Pavilion Gaming Laptop 15-dk
Kernel: 6.3.2-arch1-1
DE: Plasma 5.27.5
WM: KWin
WM Theme: Breeze 微风
CPU: Intel i7-9750H (12) @ 4.500GHz
GPU: Intel CoffeeLake-H GT2 [UHD Grap
GPU: NVIDIA GeForce GTX 1660 Ti Mobil
Memory: 15836MiB

## What happened:
After logging in with SDDM, when starting the KDE desktop, the splash screen ends, but the desktop remains black for a long time. However, the mouse cursor is visible, and it takes about 30-50 seconds before the desktop can be accessed normally.

## What I did:
To investigate the cause, I used another computer to SSH into my laptop during the login process and observed the logs. I discovered that during the black screen, Powerdevil failed to start and attempted to restart repeatedly. After several attempts, it seemed to stop the restart, and at that point, the desktop finally loaded.

##Partial log:

5月 18 23:40:09 FlyArch systemd[641]: plasma-powerdevil.service: start operation timed out. Terminating.
5月 18 23:40:09 FlyArch systemd[641]: plasma-powerdevil.service: Failed with result 'timeout'.
5月 18 23:40:09 FlyArch systemd[641]: Failed to start Powerdevil.
5月 18 23:40:09 FlyArch systemd[641]: plasma-powerdevil.service: Scheduled restart job, restart counter is at 3.
5月 18 23:40:09 FlyArch systemd[641]: Stopped Powerdevil.
5月 18 23:40:09 FlyArch systemd[641]: Starting Powerdevil...
5月 18 23:40:09 FlyArch libddcutil[1049]: Initializing.  ddcutil version 1.4.1
5月 18 23:40:09 FlyArch libddcutil[1049]: Library initialization complete.
5月 18 23:40:09 FlyArch org_kde_powerdevil[1049]: org.kde.powerdevil: org.kde.powerdevil.chargethresholdhelper.getthreshold failed "Charge thresholds are not supported by the kernel for this hardware"
5月 18 23:40:14 FlyArch systemd[641]: plasma-powerdevil.service: start operation timed out. Terminating.
5月 18 23:40:14 FlyArch systemd[641]: plasma-powerdevil.service: Failed with result 'timeout'.
5月 18 23:40:14 FlyArch systemd[641]: Failed to start Powerdevil.
5月 18 23:40:14 FlyArch systemd[641]: plasma-powerdevil.service: Scheduled restart job, restart counter is at 4.
5月 18 23:40:14 FlyArch systemd[641]: Stopped Powerdevil.
5月 18 23:40:14 FlyArch systemd[641]: Starting Powerdevil...
5月 18 23:40:14 FlyArch libddcutil[1072]: Initializing.  ddcutil version 1.4.1
5月 18 23:40:14 FlyArch libddcutil[1072]: Library initialization complete.
5月 18 23:40:14 FlyArch org_kde_powerdevil[1072]: org.kde.powerdevil: org.kde.powerdevil.chargethresholdhelper.getthreshold failed "Charge thresholds are not supported by the kernel for this hardware"
5月 18 23:40:20 FlyArch systemd[641]: plasma-powerdevil.service: start operation timed out. Terminating.
5月 18 23:40:20 FlyArch systemd[641]: plasma-powerdevil.service: Failed with result 'timeout'.
5月 18 23:40:20 FlyArch systemd[641]: Failed to start Powerdevil.
5月 18 23:40:20 FlyArch systemd[641]: plasma-powerdevil.service: Scheduled restart job, restart counter is at 5.
5月 18 23:40:20 FlyArch systemd[641]: Stopped Powerdevil.
5月 18 23:40:20 FlyArch systemd[641]: Starting Powerdevil...
5月 18 23:40:20 FlyArch libddcutil[1095]: Initializing.  ddcutil version 1.4.1
5月 18 23:40:20 FlyArch libddcutil[1095]: Library initialization complete.
5月 18 23:40:20 FlyArch org_kde_powerdevil[1095]: org.kde.powerdevil: org.kde.powerdevil.chargethresholdhelper.getthreshold failed "Charge thresholds are not supported by the kernel for this hardware"
5月 18 23:40:25 FlyArch systemd[641]: plasma-powerdevil.service: start operation timed out. Terminating.
5月 18 23:40:25 FlyArch systemd[641]: plasma-powerdevil.service: Failed with result 'timeout'.
5月 18 23:40:25 FlyArch systemd[641]: Failed to start Powerdevil.
5月 18 23:40:25 FlyArch systemd[641]: plasma-powerdevil.service: Scheduled restart job, restart counter is at 6.
5月 18 23:40:25 FlyArch systemd[641]: Stopped Powerdevil.
5月 18 23:40:25 FlyArch systemd[641]: Starting Powerdevil...
5月 18 23:40:25 FlyArch libddcutil[1118]: Initializing.  ddcutil version 1.4.1
5月 18 23:40:25 FlyArch libddcutil[1118]: Library initialization complete.
5月 18 23:40:25 FlyArch org_kde_powerdevil[1118]: org.kde.powerdevil: org.kde.powerdevil.chargethresholdhelper.getthreshold failed "Charge thresholds are not supported by the kernel for this hardware"
5月 18 23:40:29 FlyArch kded5[746]: kscreen.kded: PowerDevil SuspendSession action not available!

## Complete log:
https://pastebin.com/89mdi79r

Although English is not my native language, it seems that the log indicates that I am unable to set the charging threshold for my hardware. What options do I have to resolve this? If not possible, can I limit the number of times Powerdevil starts to speed up desktop startup?

Last edited by cybird (2023-05-20 17:37:57)

Offline

#2 2023-05-19 14:42:07

seth
Member
Registered: 2012-09-03
Posts: 51,143

Re: [SOLVED]Powerdevil startup failure slows down KDE startup speed.

Error shows up in eg. https://bugs.kde.org/show_bug.cgi?id=466181 and https://forum.manjaro.org/t/powerdevil- … 0/52745/16 but isn't the problem there, so probably a red herring.

systemctl --user status plasma-powerdevil.service

Also see https://wiki.archlinux.org/title/Core_d … _core_dump for possibly more data.

Offline

#3 2023-05-19 17:09:43

cybird
Member
Registered: 2023-02-14
Posts: 12

Re: [SOLVED]Powerdevil startup failure slows down KDE startup speed.

The latest Powerdevil removed ddcutil, so I upgraded Powerdevil and removed the ddcutil package, but the issue still seems to persist.
I checked the status of powerdevil.service, and it is running, but there are a few errors in the log:

● plasma-powerdevil.service - Powerdevil
     Loaded: loaded (/usr/lib/systemd/user/plasma-powerdevil.service; static)
     Active: active (running) since Fri 2023-05-19 22:01:27 CST; 2h 57min ago
   Main PID: 4724 (org_kde_powerde)
      Tasks: 7 (limit: 18870)
     Memory: 9.8M
        CPU: 1.575s
     CGroup: /user.slice/user-1000.slice/user@1000.service/background.slice/plasma-powerdevil.service
             └─4724 /usr/lib/org_kde_powerdevil

5月 19 22:01:24 FlyArch systemd[678]: Starting Powerdevil...
5月 19 22:01:24 FlyArch org_kde_powerdevil[4724]: org.kde.powerdevil: org.kde.powerdevil.chargethresholdhelper.getthreshold failed "Charge thresholds are not supported by the kernel for this hardware"
5月 19 22:01:27 FlyArch systemd[678]: Started Powerdevil.
5月 19 22:01:27 FlyArch org_kde_powerdevil[4724]: org.kde.powerdevil: Handle button events action could not check for screen configuration
5月 19 22:01:27 FlyArch org_kde_powerdevil[4724]: org.kde.powerdevil: org.kde.powerdevil.chargethresholdhelper.getthreshold failed "Charge thresholds are not supported by the kernel for this hardware"

I executed `coredumpctl list` and `coredumpctl info match`, but it displayed `No coredumps found`.

Perhaps this is not a major issue, and the slow startup of my desktop may be caused by other reasons. Currently, what I know is that when I disable all startup services in KDE's boot settings, the system immediately enters the desktop right after the splash screen. However, I'm not sure which specific service is causing the problem because sometimes disabling a particular service works, but other times it doesn't. Maybe I should conduct more tests.

Offline

#4 2023-05-19 19:08:39

seth
Member
Registered: 2012-09-03
Posts: 51,143

Re: [SOLVED]Powerdevil startup failure slows down KDE startup speed.

See whether you can start /usr/lib/org_kde_powerdevil manually

5月 18 23:39:48 FlyArch systemd-logind[436]: New session 2 of user username.
…
5月 18 23:39:48 FlyArch systemd[1]: Started Session 2 of User username.
…
5月 18 23:39:52 FlyArch systemd[641]: Starting Powerdevil...
…
5月 18 23:41:00 FlyArch systemd[641]: Started Powerdevil.

Session starts immediately, it takes > 1m to start powerdevil and there's
https://bugs.kde.org/show_bug.cgi?id=455511 so regardless of the charger thing, powerdevil is likely to blame.

Does it matter whether you run on battery or AC?

Offline

#5 2023-05-20 06:30:07

cybird
Member
Registered: 2023-02-14
Posts: 12

Re: [SOLVED]Powerdevil startup failure slows down KDE startup speed.

Thank you for your patient response.
My issue does indeed match the one you mentioned. I have unplugged the AC and switched to battery power, and I have restarted the system, but it did not improve the startup speed. Therefore, it seems unrelated to the AC or battery. It appears that there is currently no solution. Is it possible for me to limit the number of restarts?
Thank you once again for your patient assistance!

Offline

#6 2023-05-20 06:33:14

seth
Member
Registered: 2012-09-03
Posts: 51,143

Re: [SOLVED]Powerdevil startup failure slows down KDE startup speed.

Disable powerdevil?

Offline

#7 2023-05-20 06:40:04

cybird
Member
Registered: 2023-02-14
Posts: 12

Re: [SOLVED]Powerdevil startup failure slows down KDE startup speed.

seth wrote:

See whether you can start /usr/lib/org_kde_powerdevil manually

Additionally, as you suggested, I killed the org_kde_powerdevil process and attempted to manually start the service. It quickly started, and I received three lines of error messages:

org.kde.powerdevil: org.kde.powerdevil.chargethresholdhelper.getthreshold failed "Charge thresholds are not supported by the kernel for this hardware"
org.kde.powerdevil: Handle button events action could not check for screen configuration
org.kde.powerdevil: org.kde.powerdevil.chargethresholdhelper.getthreshold failed "Charge thresholds are not supported by the kernel for this hardware"

At this point, the battery icon in the system tray also appeared correctly.

Offline

#8 2023-05-20 06:57:14

cybird
Member
Registered: 2023-02-14
Posts: 12

Re: [SOLVED]Powerdevil startup failure slows down KDE startup speed.

seth wrote:

Disable powerdevil?

Sorry for the delayed response. I'm not sure how to disable it either.
The command

systemctl --user disable plasma-powerdevil.service

doesn't work for disabling it, and I couldn't find any relevant disable options in KDE settings. However, can still disable it by turning off all the autostart services.
In this case, after restarting the system, the desktop will load very quickly, and there won't be any powerdevil errors.

Last edited by cybird (2023-05-20 06:58:08)

Offline

#9 2023-05-20 07:00:16

seth
Member
Registered: 2012-09-03
Posts: 51,143

Re: [SOLVED]Powerdevil startup failure slows down KDE startup speed.

"kcmshell5 kded"

Otherwise try

systemctl --user mask plasma-powerdevil.service

Offline

#10 2023-05-20 11:12:52

cybird
Member
Registered: 2023-02-14
Posts: 12

Re: [SOLVED]Powerdevil startup failure slows down KDE startup speed.

I disabled powerdevil using `systemctl --user mask`, but after restarting, the startup speed did improve slightly, although it still took at least 15 seconds.
So I suspected there might be other reasons causing the delay. I conducted more detailed tests:

  • I disabled all services but found no effect.

  • I disabled the desktop wallpaper, but it didn't make a difference.

  • I disabled all desktop panels, and I found that I could enter the desktop quickly.

  • Then, I individually disabled some of the tray components and found that the digital clock and system tray significantly increased the black screen time (even though it seemed like I had already entered the desktop).

Therefore, I believe there might be some bugs in plasma-desktop causing this issue, or it could be due to my disk speed slowing down the startup process. Apologies for forgetting to mention my disk configuration. I'm using a SATA SSD, which is faster than an HDD but might not meet the requirements of KDE.
Nevertheless, powerdevil still remains the main factor slowing down the desktop startup. I feel like I have done everything I can, so perhaps temporarily switching to GNOME would be more suitable for me.

Thank you again for your assistance!

Offline

#11 2023-05-20 11:22:30

seth
Member
Registered: 2012-09-03
Posts: 51,143

Re: [SOLVED]Powerdevil startup failure slows down KDE startup speed.

Log out of KDE, move away ~/.config/plasma-org.kde.plasma.desktop-appletsrc and log back in and see what impact that has on the startup time.

Offline

#12 2023-05-20 14:02:41

cybird
Member
Registered: 2023-02-14
Posts: 12

Re: [SOLVED]Powerdevil startup failure slows down KDE startup speed.

I moved this file to another location and then restarted the system. After that, it was able to immediately enter the desktop without a black screen after the splash screen. However, when I restarted it again for the second time, it displayed the wallpaper on my primary screen, but the tray and icons did not appear. The secondary screen experienced a long black screen, and after the black screen ended, everything was functioning normally.

Last edited by cybird (2023-05-20 14:04:18)

Offline

#13 2023-05-20 14:31:43

seth
Member
Registered: 2012-09-03
Posts: 51,143

Re: [SOLVED]Powerdevil startup failure slows down KDE startup speed.

The secondary screen experienced a long black screen, and after the black screen ended, everything was functioning normally.

kscreen issue?
https://wiki.archlinux.org/title/KDE#Un … lution_set
Just move aside that directory as well - though w/ the previous run after moving away plasma-org.kde.plasma.desktop-appletsrc there seems sth. else to be going on.
Did you re-add panels/widgets between those to session starts?

Offline

#14 2023-05-20 15:05:18

cybird
Member
Registered: 2023-02-14
Posts: 12

Re: [SOLVED]Powerdevil startup failure slows down KDE startup speed.

I did not add any widgets. I measured the time it took for it to start up and then immediately restarted it again.
I moved the file to another location once again and restarted the system. My previous observations might have been incorrect.
This time, after the restart, there was indeed a black screen. The primary screen remained on the splash screen, while the secondary screen had already passed the splash screen. The actual time it took to enter the desktop was still quite long.
I apologize for my previous lack of attention to detail, which may have led to some confusion.

Offline

#15 2023-05-20 15:10:28

seth
Member
Registered: 2012-09-03
Posts: 51,143

Re: [SOLVED]Powerdevil startup failure slows down KDE startup speed.

There's also https://bbs.archlinux.org/viewtopic.php?id=285796
If you run top and iotop on different VTs and switch to those during the delay, do they indicate some hot process?

Offline

#16 2023-05-20 15:50:04

cybird
Member
Registered: 2023-02-14
Posts: 12

Re: [SOLVED]Powerdevil startup failure slows down KDE startup speed.

On my computer, there is no delay when starting applications. The delay only occurs when entering the desktop. Once the desktop is loaded, everything runs normally.
I followed your guidance and used top and iotop to observe the resource usage during the black screen period. iotop seemed to be normal. However, in top, I noticed something different. There was a process called "kglobalaccel5" that had a relatively high CPU usage during the waiting process, ranging from 60% to 70%. After the desktop started, its CPU usage seemed to become very low (0%). Although it appears to be a global shortcut service, is it possible that it could affect the startup of the desktop?

Offline

#17 2023-05-20 15:53:49

seth
Member
Registered: 2012-09-03
Posts: 51,143

Re: [SOLVED]Powerdevil startup failure slows down KDE startup speed.

It's not for him either, the symptoms are the same.
The title is misleading, https://bbs.archlinux.org/viewtopic.php … 3#p2100613

There was a process called "kglobalaccel5" that had a relatively high CPU usage during the waiting process, ranging from 60% to 70%.

That even hints at the same direction, I think we've a winner.

What happens if you move the binary away (you obviously won't have any global shortcut support)
Eg you could name it "/usr/bin/not.kglobalaccel5" and then, after the session started, try to launch that manually?

Edit: https://bugs.kde.org/show_bug.cgi?id=306352 has it dowsn to some ~/.Xmodmap - and exists for a decade!

Last edited by seth (2023-05-20 16:02:04)

Offline

#18 2023-05-20 16:30:49

cybird
Member
Registered: 2023-02-14
Posts: 12

Re: [SOLVED]Powerdevil startup failure slows down KDE startup speed.

Yes, we found the culprit! I believe we have indeed achieved victory!

However, we cannot simply remove the binary file directly, as it would result in the desktop freezing indefinitely (for an extremely long time, and I didn't wait until the end).

After conducting multiple tests, the following method proved effective. By accessing "kcmshell5 kded" and disabling the "Keyboard Daemon," followed by closing the tray on the desktop, a program in the tray will still trigger it.

Now, upon entering the system, it will immediately proceed after the splash screen without any black screen! However, the side effect is equally unacceptable as the keyboard may become unresponsive, preventing any character input.
However, we can manually enable this service through the settings using the mouse. In this case, the system desktop will freeze for approximately one minute again.
Nevertheless, we have found it!

Thank you once again for your assistance! Thank you!

Last edited by cybird (2023-05-20 16:42:25)

Offline

#19 2023-05-20 16:58:16

cybird
Member
Registered: 2023-02-14
Posts: 12

Re: [SOLVED]Powerdevil startup failure slows down KDE startup speed.

seth wrote:

https://bugs.kde.org/show_bug.cgi?id=306352 has it dowsn to some ~/.Xmodmap - and exists for a decade!

I did have a .Xmodmap file in my home directory, but I didn't execute "xmodmap." Now I have deleted it, re-enabled the keyboard daemon service, and re-added the tray. Everything seems to be back to normal, and the startup speed is still fast. I never expected it to be the cause of the problem. It's possible that this issue has been resolved. I will perform more tests, and if everything is fine, I will change the title to [SOLVED].

Offline

#20 2023-07-04 11:49:50

du.enzo
Member
Registered: 2023-07-04
Posts: 1

Re: [SOLVED]Powerdevil startup failure slows down KDE startup speed.

Hello everyone,

I was experiencing a similar problem as mentioned in this topic. Although it has been marked as resolved, I would like to share my experience and confirm that after deleting ~/.Xmodmap the problem was solved.

Log before:
Jul 4 08:25:15 archEnzo systemd[909]: plasma-powerdevil.service: start operation timed out. Terminating.
Jul 4 08:25:15 archEnzo systemd[909]: plasma-powerdevil.service: Failed with result 'timeout'.
Jul 4 08:25:15 archEnzo systemd[909]: Failed to start Powerdevil.
Jul 4 08:25:15 archEnzo systemd[909]: plasma-powerdevil.service: Scheduled restart job, restart counter is at 7.
Jul 4 08:25:15 archEnzo systemd[909]: Stopped Powerdevil.
Jul 4 08:25:15 archEnzo systemd[909]: Starting Powerdevil...
Jul 4 08:25:15 archEnzo libddcutil[1921]: Initializing.  ddcutil version 1.4.1
Jul 4 08:25:15 archEnzo libddcutil[1921]: Library initialization complete.
Jul 4 08:25:16 archEnzo org_kde_powerdevil[1921]: org.kde.powerdevil: org.kde.powerdevil.chargethresholdhelper.getthreshold failed "Charge thresholds are not supported by the kernel for this hardware"
Jul 4 08:25:16 archEnzo org_kde_powerdevil[1921]: org.kde.powerdevil: org.kde.powerdevil.backlighthelper.brightness failed
Jul 4 08:25:20 archEnzo plasmashell[1232]: Aborting shell load: The activity manager daemon (kactivitymanagerd) is not running.
Jul 4 08:25:20 archEnzo plasmashell[1232]: 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.
Jul 4 08:25:20 archEnzo systemd[909]: Started Powerdevil.
Jul 4 08:25:20 archEnzo org_kde_powerdevil[1921]: org.kde.powerdevil: Handle button events action could not check for screen configuration
Jul 4 08:25:20 archEnzo org_kde_powerdevil[1921]: org.kde.powerdevil: The profile  "AC" tried to activate "DimDisplay" a non-existent action. This is usually due to an installation problem, a configuration problem, or because the action is not supported

Log After
Jul  4 08:51:31 archEnzo dbus-daemon[295]: [system] Activating service name='org.kde.powerdevil.discretegpuhelper' requested by ':1.31' (uid=1000 pid=1267 comm="/usr/lib/org_kde_powerdevil") (using servicehelper)
Jul  4 08:51:31 archEnzo dbus-daemon[295]: [system] Successfully activated service 'org.kde.powerdevil.discretegpuhelper'

Last edited by du.enzo (2023-07-04 11:56:29)

Offline

Board footer

Powered by FluxBB