# managed by Ansible [Unit] Description=sleep.target of a systemd user session Before=suspend.target sleep.target hibernate.target StopWhenUnneeded=yes [Service] Type=oneshot ExecStart=/usr/bin/systemctl --user start suspend.target ExecStop=/usr/bin/systemctl --user stop suspend.target User=%I Environment=DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/%I/bus RemainAfterExit=yes [Install] WantedBy=suspend.target sleep.target hibernate.target