[systemd-devel] systemd 208:trouble with inactive user sessions at non-seat0 seats
David Herrmann
dh.herrmann at gmail.com
Wed Nov 20 13:58:00 PST 2013
Hi
On Tue, Nov 19, 2013 at 7:13 PM, Laércio de Sousa <lbsousajr at gmail.com> wrote:
> Hi there!
>
> I'm testing both Fedora 20 Beta and openSUSE 13.1 in my multiseat system
> (with GNOME 3.10, GDM 3.10.0.1 and systemd 208). I'm currently observing a
> strange behaviour which didn't occur in previous distro release (with GNOME
> 3.8.4 and systemd 204).
>
> When I boot my system, gdm greeter session at both seat0 and non-seat0 seats
> are active, as expected. However, when a user logs in at a non-seat0 seat,
> the user session gets inactive. Nevertheless, I can activate it manually
> with command "loginctl activate <user-session-id>", but if that user logs
> out, the new greeter session now becomes inactive.
>
> I suspect this strange behaviour is related to that generic multi-session
> support introduced in systemd 208. I can see that, when a user logs in, the
> greeter and user sessions coexist for a while, one at "closing" state and
> the other at "online" state, depending on whether the user logs in or out.
>
> What could it be? Lack of generic multi-session support in GDM?
I've appended a patch which avoids the situation without an active
session. Can you give it a try? I won't be able to test my multi-seat
setup before Sunday, sorry.
Thanks
David
diff --git a/src/login/logind-seat.c b/src/login/logind-seat.c
index b30c4ce..d52e05b 100644
--- a/src/login/logind-seat.c
+++ b/src/login/logind-seat.c
@@ -228,7 +228,7 @@ int seat_apply_acls(Seat *s, Session *old_active) {
}
int seat_set_active(Seat *s, Session *session) {
- Session *old_active;
+ Session *old_active, *i;
assert(s);
assert(!session || session->seat == s);
@@ -236,6 +236,13 @@ int seat_set_active(Seat *s, Session *session) {
if (session == s->active)
return 0;
+ /* if no VTs, avoid having no active session */
+ if (!seat_has_vts(s) && !session) {
+ LIST_FOREACH(sessions_by_seat, i, s->sessions)
+ if (i != s->active)
+ session = s->active;
+ }
+
old_active = s->active;
s->active = session;
More information about the systemd-devel
mailing list