In my experience, this was because we load the greeter synchronously, blocking handling of the power-release event. If loading the greeter took longer than 2s, the dialog would come up because it never saw the power-release event. And often loading the background image could slow that down enough for 2s. Or maybe that dbus-daemon hogging the CPU could also exacerbate it.
But the branch that was linked *was* relevant because it made the problem exceedingly difficult to experience (I never did), despite the fact that it didn't *fix* the problem of synchronously loading. But with the linked branch [1] we are just loading QML code instead of image files, which is small enough to not delay loading over 2s.
Simply making the greeter load async (by setting "asynchronous: true" on its loader) is actually a little tough, because of timing issues.
In my experience, this was because we load the greeter synchronously, blocking handling of the power-release event. If loading the greeter took longer than 2s, the dialog would come up because it never saw the power-release event. And often loading the background image could slow that down enough for 2s. Or maybe that dbus-daemon hogging the CPU could also exacerbate it.
But the branch that was linked *was* relevant because it made the problem exceedingly difficult to experience (I never did), despite the fact that it didn't *fix* the problem of synchronously loading. But with the linked branch [1] we are just loading QML code instead of image files, which is small enough to not delay loading over 2s.
Simply making the greeter load async (by setting "asynchronous: true" on its loader) is actually a little tough, because of timing issues.
[1] https:/ /code.launchpad .net/~mterry/ unity8/ cache-greeter- bg/+merge/ 239144