[Powerdevil] [Bug 354250] "Switch User" sometimes sends computer to Standby
Oliver Henshaw via KDE Bugzilla
bugzilla_noreply at kde.org
Tue Jun 28 20:04:31 UTC 2016
https://bugs.kde.org/show_bug.cgi?id=354250
--- Comment #21 from Oliver Henshaw <oliver.henshaw at gmail.com> ---
> @Oliver: Thanks for the investigation. Indeed, this looks like the cause for
> the issue. When PowerDevil gets stuck because X blocks it never notices it's
> no longer in the active session and shit hits the fan.
>
Actually if you set QT_MESSAGE_PATTERN so you see timestamps, e.g. following
https://woboq.com/blog/nice-debug-output-with-qt.html , and compare it to your
watch: then you see that the suspend session calls only happen after you've
switched to the other user. The "Current session is now active" lines only
happen later because (a) that's how the timing of dbus-vs-xcb events works out,
and (b) powerdevil does a roundtrip back to the logind dbus service to see what
the currently active session is.
So it gets events fired when it wasn't active, but not until it's active again.
Then the policy code checks whether it's active and of course it is, so the
suspend goes ahead. Then the active-tracking parts of powerdevil realise it's
active just after it resumes.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the Plasma-devel
mailing list