Skip to content
This repository was archived by the owner on Sep 23, 2021. It is now read-only.
This repository was archived by the owner on Sep 23, 2021. It is now read-only.

Password input problem when resuming from suspend/hibernate #97

Description

@tstsrt

After resuming from suspend/hibernate, the first authentication attempt fails unless backspace is pressed atleast once. Later attempts work normally. This is because stdin isn't flushed before the password is read, and systemd automatically uses /dev/null as stdin, which puts an EOF in the password field. A workaround is to set StandardInput=tty in the service file.
I'm using the following systemd unit to start physlock before suspend. OS is Arch, physlock version is physlock 13, and systemd version is 245.5-2-arch.

[Unit]
Description=Lock the session before suspending
Before=sleep.target

[Service]
User=%I
Type=forking
StandardInput=tty
TTYPath=/dev/tty7
ExecStart=/usr/bin/physlock -d

[Install]
WantedBy=sleep.target

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions