the-cavalry / light-locker

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

Fix systemd support #153

Open RA-Kooi opened 4 years ago

RA-Kooi commented 4 years ago

The previous developer left in a debug remnant breaking systemd support.

Edit: I initially thought this was all there was to it, but it turns out more was broken. I have made the necessary changes to support modern GNOMEisms, but I haven't extensively tested this. Works on my VM running Arch Linux with Pantheon DE and LightDM.

Fixes: #141, #145, and possibly #151

attackzero commented 3 years ago

Hi! Arch Linux packaged these commits with its newest light-locker package (1.9.0-3), and when I unlock my machine, I get a black screen. In order to recover, I have to switch to another VT, kill light-locker, then switch back to VT7.

I am running XFCE (4.14), LightDM (1.30), and systemd (247.1).

I downgraded the package to the previous version (1.9.0-2), and it does not exhibit this behavior. I ran light-locker with the --debug flag, and it is throwing a number of dbus errors. The log is attached.

I am not the only person having this issue, see the Arch Linux bug tracker here.

light-locker-log.txt

CodingCellist commented 3 years ago

Hello. As attackzero said, these commits seem to cause problems with unlocking the session on Arch.

Setup:

I get the same log output about dbus.

Please let me know if there is anything I can do to help narrow down the problem or test fixes :)

GambitVKM commented 3 years ago

Have this problem too. XFCE 4.14, systemd 247.1, LightDM 1.30.0.

RA-Kooi commented 3 years ago

So apparently this broke with systemd changing, I will see if I can reproduce this and fix this.

RA-Kooi commented 3 years ago

I have fixed the problem for XFCE and Pantheon.

@CodingCellist can you test this change on your i3 setup?

CodingCellist commented 3 years ago

Hi @RA-Kooi , thanks for fixing this! :) I have tested it on my i3 setup, from locking, screen timeout, and closing the laptop lid, and it all seems to work with your latest commit. Only weird thing is that it appears to take a couple of seconds to register the locking, during which I can access and interact with whatever is on the screen. However, this might be unrelated to the locker.

I get some error output which I have included in the log-file below, although full disclosure: I have very little GNOME stuff installed, and I don't use a compositor either (in case those details are relevant). output.log

RA-Kooi commented 3 years ago

Looks like it fails to grab the screen, which I also saw happen in my VM. I'm really not familiar enough with this to know how fix that, and I'll be honest, I don't feel a lot for investigating and fixing it. Happy locking works for you too now though.

Personally on my main install I use i3lock-multimonitor. The only reason I started working on this was to see how well Pantheon works on Arch Linux (spoiler alert, not well). It also looks like upstream has abandoned light-locker, as I haven't seen any activity happen on anything related to it.

So if you use this because of tty locking, you can use physlock in conjunction with i3lock(-multimonitor) as an alternative:

physlock -l && /opt/i3lock-multimonitor/lock -a -n && physlock -L
attackzero commented 3 years ago

I have fixed the problem for XFCE and Pantheon.

@CodingCellist can you test this change on your i3 setup?

Thanks for your work on this! :)