Open vigiraud opened 7 months ago
Thank you for the report.
This seems like a new problem, I appreciate all the investigative work. I am guessing somehow the work we are doing on loginctl
is correct. I am not 100% sure what that problem is.
I am met with the same issue (currently testing with sway, but it happens with other sessions too).
When trying to start sway for the 2nd time I get:
Started Tiling Wayland compositor and replacement for the i3 window manager.
00:00:00.002 [ERROR] [wlr] [libseat] [libseat/backend/logind.c:642] Could not check if session was active: No such device or address
00:00:00.002 [ERROR] [wlr] [libseat] [libseat/libseat.c:79] No backend was able to open a seat
00:00:00.002 [ERROR] [wlr] [backend/session/session.c:83] Unable to create seat: Function not implemented
00:00:00.002 [ERROR] [wlr] [backend/session/session.c:248] Failed to load session backend
00:00:00.002 [ERROR] [wlr] [backend/backend.c:79] Failed to start a session
00:00:00.002 [ERROR] [wlr] [backend/backend.c:359] Failed to start a DRM session
00:00:00.002 [ERROR] [sway/server.c:137] Unable to create backend
sway.service: Main process exited, code=exited, status=1/FAILURE
sway.service: Failed with result 'exit-code'.
This issue can only be solved by restarting lemurs.
My assumption is lemurs is either blocking the logind access for sway or is otherwise making it impossible for sway to check the user's active session.
Looking deeper into this I think I found the culprit: Lemur never fully closes the seat for the user after the user attempts to end the session and the seat remains in state "closing".
$ loginctl show-session c2
Id=c2
User=1000
Name=user
Timestamp=Tue 2024-05-28 08:48:23 CEST
TimestampMonotonic=632170501
VTNr=2
Seat=seat0
TTY=tty2
Remote=no
Service=lemurs
Scope=session-c2.scope
Leader=3017
Audit=4294967295
Type=wayland
Class=user
Active=no
State=closing
IdleHint=no
IdleSinceHint=0
IdleSinceHintMonotonic=0
LockedHint=no
When looking at the user's status it becomes clear that lemurs lowered itself into the session scope, but never exited (the below omits non-useful data) and is the only process keeping that seat alive:
$ loginctl user-status 1000
user (1000)
Since: Tue 2024-05-28 08:38:15 CEST; 38min ago
State: active
Sessions: *4 c2
Linger: no
Unit: user-1000.slice
├─session-4.scope
│ ├─3063 "login -- user"
│ ├─5394 -zsh
│ └─6038 loginctl user-status 1000
├─session-c2.scope
│ └─3017 /usr/bin/lemurs
[..]
Looking at the above, my assumption would be, that lemurs needs to exit at that point in time to free the seat, or lower a process into that seat (for handling) which may exit.
When choosing the first route I guess lemurs.service would have to be able to automatically restart.
As is, lemurs blocks a login after an initial login and logout, because the lemurs presented to the user at that point runs in the scope of the session that the previous user exited.
Hi, thanks for this project ! I just did a fresh installation of Arch with XFCE. I need to have two different users, let's say
Which translates to :
alice
andbob
. So I followed the instructions, and after booting my computer, Lemurs works perfectly fine and I can easily log into any user. Once I have logged out, I get back to Lemurs as expected. If I try to log to the same user, it will work fine once again. However, if I try to log to the other user, I get to a screen with nothing but this :I can't find my mouse, and the keyboard becomes unresponsive on this tty.
Here's what I have in my
journalctl -xeu lemurs
:The errors about
pam_loginuid
happen when I log in for the first time, where it seemingly work without problems.I tried to disable lemurs, and to switch between users without any display manager, on the same tty, by launching XFCE just with the
startxfce4
script. It works without issues.Here is the
/var/log/lemurs.log
I obtain when I first succesfully log asalice
, logout, and then fail to log asbob
:lemurs.client.log
andlemurs.xorg.log
are empty. Something strange that I noticed is that when I boot my computer, successfully log in aalice
for example, then logout to go back to lemurs, if I go to another tty and typeloginctl
, this is what I get:Where we can see that the session which is supposed to be closed, is stuck in the
closing
state... I don't know what to do, I'm not even sure where the problem comes from. Was a multi-users setup tested on lemurs ? Thanks.