the-cavalry / light-locker

A simple session-locker for lightdm
GNU General Public License v2.0
220 stars 22 forks source link

--no-lock-on-lid prevents unlocking when laptop lid closed #102

Open valderman opened 6 years ago

valderman commented 6 years ago

When running on a laptop with the lid closed (for instance, when connected to a dock), starting light-locker with the --no-lock-on-lid option initiates the locking process, but prevents it from completing until the lid is opened. Consequently, it's impossible to unlock the screen, unless one first opens the lid to allow the locking process to finish.

As far as I understand, the --no-lock-on-lid flag is intended to prevent locking in response to the lid close event, not prevent any and all locking while the lid is closed. Even if this understanding is incorrect, the current behavior essentially puts light-locker in a halfway-locked state, which isn't what you'd want in either scenario.

EDIT: running with --no-lock-on-lid --no-late-locking does not exhibit this issue. It seems that this behavior is at least partially intentional, but both the behavior and the reason for it is non-obvious and could use some documentation.

Steps to reproduce:

  1. Make sure you're using a laptop.
  2. Make sure that light-locker is started with --no-lock-on-lid.
  3. Plug in and configure external monitor and keyboard.
  4. Close laptop lid, ensuring that the laptop doesn't suspend or hibernate.
  5. Lock screen: light-locker-command -l

Expected result: The external monitor is blanked, then turned off. Pressing any key on the keyboard brings up lock screen with password entry field.

Actual result: The external monitor is blanked, then hangs indefinitely, not reacting to keyboard or mouse input. When the laptop lid is opened, the locking process completes successfully, and any input after this brings up the lock screen with password entry field.

brianj29 commented 5 years ago

I've observed the same behavior using version 1.8.0, as installed with Xubuntu 18.04. Lenovo ThinkPad T450 laptop with a dock, two external monitors, keyboard and mouse. Locking the screen results in blank (but not powered down) monitors with no response to keyboard or mouse, which persists until the laptop lid is opened. Then the lock sequence proceeds, the monitors power down, and I can then unlock normally.

Invoking light-locker with the --no-late-locking flag resolves the problem.