[systemd-bugs] [Bug 90339] New: logind should try to avoid suspend races

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed May 6 05:41:09 PDT 2015


https://bugs.freedesktop.org/show_bug.cgi?id=90339

            Bug ID: 90339
           Summary: logind should try to avoid suspend races
           Product: systemd
           Version: unspecified
          Hardware: Other
                OS: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: general
          Assignee: systemd-bugs at lists.freedesktop.org
          Reporter: bugzilla at hadess.net
        QA Contact: systemd-bugs at lists.freedesktop.org

>From http://article.gmane.org/gmane.linux.kernel/1945822 :

>>   The last thing the power manager does, right before
>> writing "mem" to /sys/power/state, is write the wakeup_count that it
>> read earlier to /sys/power/wakeup_count.  If the write fails, the
>> power manager considers the suspend attempt failed, reads the new
>> wakeup_count, and starts a timer (usually 10 seconds) to retry the
>> suspend.  The same thing happens if the write to /sys/power/state
>> fails.
>
> Is this something that logind should do as well?
>

We do it to avoid a race condition where a wakeup event occurs after
userspace has started the suspend process but before anything writes
"mem" to /sys/power/state.  I'm guessing that this is something logind
should be doing as well since the chances of missing a wakeup event
increase the longer any given delay inhibitor takes to delay a
suspend.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-bugs/attachments/20150506/a00c53ef/attachment.html>


More information about the systemd-bugs mailing list