https://bugs.kde.org/show_bug.cgi?id=421662

--- Comment #8 from Gabriel Marcano <gabemarc...@yahoo.com> ---
Here's the PowerDevil commit that introduced the delay:
https://github.com/KDE/powerdevil/commit/eca79138c15575f6f523a8680919b407f84da2e2

It's a conscious decision by the powerdevil developers. As far as I can tell,
even though powerdevil takes 5 seconds to post an inhibit request, they DO
track if they receive an uninhibit request before those 5 seconds are up
(https://github.com/KDE/powerdevil/blob/master/daemon/powerdevilpolicyagent.cpp#L599).
As far as I can tell powerdevil returns a cookie immediately, so elisa should
receive one before the inhibit is officially posted.

In other words, for some reason elisa isn't sending a request when it should to
uninhibit. I "fixed" this problem by doing synchronous dbus commands on the
destructor (not ideal, because of possible exceptions? Maybe? Not sure, haven't
looked to see how dangerous calling dbus related classes in the destructor is),
making sure that if we have a cookie, to send a message to uninhibit.

I could do a bit more digging to make sure
https://github.com/KDE/elisa/blob/master/src/audiowrapper_qtmultimedia.cpp#L194
is being fired when we're exiting, and that elisa is actually requesting for
the power manager to be uninhibited.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to