Bug 391139

Summary: Powerdevil very slow in paging user about power states
Product: [Unmaintained] Powerdevil Reporter: Zakhar <zakhar.nasimov>
Component: generalAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED NOT A BUG    
Severity: normal CC: kde
Priority: NOR    
Version First Reported In: 5.12.2   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: monitor log from dbus-monitor

Description Zakhar 2018-02-27 04:37:38 UTC
Laptop connected to AC then disconnected powerdevil issues a page to user stating PC has been disconnected, however it takes over 3-4 seconds to do so. Same goes for attaching laptop to AC also yields same slowness.
Comment 1 Zakhar 2018-02-27 04:39:28 UTC
After further testing I verified connecting PC to AC yields notifications far quicker than disconnecting.
Comment 2 Kai Uwe Broulik 2018-02-27 07:07:35 UTC
Can you monitor DBus to see what takes so long? If UPower takes a while to notify us there's nothing we could do. Is this just about the notification or does the battery icon also take a while to update?
Comment 3 Zakhar 2018-02-27 08:19:45 UTC
I will do it if Im told what commands need issuing to disclose relevant data.
Comment 4 Kai Uwe Broulik 2018-02-27 08:48:07 UTC
Easiest would be running "dbus-monitor" on console or using "bustle" which lets you record DBus traffic.

I could imagine two scenarios:
1.) UPower (and/or the kernel driver/or ACPI) taking a while to realize
2.) KNotification being slow and taking a while to spawn the notification (if that's the case the battery icon would update immediately)

Thanks!
Comment 5 Christoph Feck 2018-02-27 12:16:20 UTC
Please do not confirm your own tickets, unless you inspected the source code to confirm that the issue is indeed in KDE software.
Comment 6 Zakhar 2018-02-27 22:20:54 UTC
Created attachment 111068 [details]
monitor log from dbus-monitor
Comment 7 Zakhar 2018-03-28 23:48:43 UTC
This was an issue with laptop-mode-tools powerdevil was not at fualt here.