Skip to content

systemd-inhibit does not let the system sleep after inhibitor is released #14812

@lrustand

Description

@lrustand

systemd version the issue has been seen with

242

Used distribution

Ubuntu 19.10

Expected behaviour you didn't see

After systemd-inhibit terminates system should be allowed to go to sleep. If the autosuspend timeout is already reached when systemd-inhibit terminates I would expect it to suspend immediately.

Unexpected behaviour you saw

If systemd-inhibit is allowed to run longer than the autosuspend timeout, the system will not automatically suspend even after systemd-inhibit terminates. Autosuspend works correctly if systemd-inhibit terminates before the autosuspend takes place. The system will also autosuspend after systemd-inhibit has terminated if I move the mouse or otherwise cause the screen to turn on, and then leave it sitting idle again for the full autosuspend timeout.

Steps to reproduce the problem

  1. Start a long running command with systemd-inhibit like so: systemd-inhibit sleep SOME_NUMBER_GREATER_THAN_AUTOSUSPEND_TIMEOUT.
  2. Wait for the command to terminate.
  3. Watch as the system stays on and doesn't suspend even if left idle for a long time after systemd-inhibit terminates.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions