Code review comment for lp:~kdub/powerd/fix-1258655

Revision history for this message
Seth Forshee (sforshee) wrote :

On Thu, Dec 19, 2013 at 05:54:59PM -0000, Kevin DuBois wrote:
> unity-mir gets two on's from one button press, one from http://bazaar.launchpad.net/~phablet-team/powerd/trunk/view/head:/src/display.c#L415 and one from http://bazaar.launchpad.net/~phablet-team/powerd/trunk/view/head:/src/display.c#L263. The two on's don't happen everytime, they happen like races.
>
> This isn't a dbus race, that code all checked out (best I can tell). Its that two requests are actually sent out in response to a button press. Sometimes the FB is not ready when one of these 'on' requests happens.
>
> >From mir's perspective, all the errors emanate from the FB device not being able to post/blank/etc. Best I can tell, the FB is sometimes not available from a power perspective when one of the on calls comes.

With reference to my comments on the bug, I suspect the first call comes
before the earlysuspend gets around to suspending the framebuffer, and
the second comes when it has been suspended and then resumed. It's a
race with the earlysuspend code in the kernel, which turns out to be
asynchronous with writing to /sys/power/state.

« Back to merge proposal