Why does light-locker keep the screen black after unlock?

Solution 1:

TL;DR: light-locker keeps the screen black if systemd cannot read /proc

  • light-locker depends on dbus providing IPC.
  • dbus depends on systemd-logind providing session information.
  • systemd-logind depends on /proc providing process information.

Meaning this will not work very well together:

$ file /sbin/init
/sbin/init: symbolic link to /lib/systemd/systemd
$ mount | grep proc
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime,hidepid=2,gid=1337)

And neither can be expected to:

hidepid isn't really compatible with systemd. sorry. [..] Anyway, closing as this was not caused by systemd. -- Lennart Poettering

Partial Solution 1

Partial solution, because it comes with information disclosure.

Allow unprivileged programs (such as systemd, after dropping privileges) to access other users process info in /proc.

$ sudo mount -o remount,hidepid=0 /proc
 # and fix /etc/fstab accordingly

Partial Solution 2

Partial solution, because systemd might break in other places, not just logind.

Add systemd-logind to the appropriate group, most conveniently achieved by adding a service Drop-In.

$ addgroup showpid
$ adduser myuser showpid
$ sudo mount -o remount,hidepid=2,gid=showpid /proc
 # and fix /etc/fstab accordingly
$ echo -e '[Service]\nSupplementaryGroups=showpid' | sudo tee /etc/systemd/system/systemd-logind.service.d/10-showpid.conf
$ sudo systemctl daemon-reload
$ sudo systemctl restart systemd-logind

After either solution, the Got session-id: (null) message should look more like Got session-id: /org/freedesktop/login1/c7 and light-locker will be able to communicate properly via dbus.


What should i have done do figure this out way faster?

  • If something changed, and you cannot quickly figure out what changed, just grab the backup already and diff -ruiN the whole system.
  • Document the first time an issue occured more precisely, so sorting logfiles/IDS reports by time will quickly reveal the relevant cause.
  • File more bug reports. Applications silently failing under conditions that will later cause headache and/or system lockup is unacceptable.