diff options
author | Hans de Goede <hdegoede@redhat.com> | 2018-09-04 08:12:34 +0200 |
---|---|---|
committer | Ray Strode <rstrode@redhat.com> | 2018-09-25 14:52:43 -0400 |
commit | c71bc5d6c3bc2ec448b5c72ce9a811d9c0c7905e (patch) | |
tree | 7f071d83bcc8d48654b83d1b61acbc9b687590f6 /daemon/gdm-local-display-factory.c | |
parent | 39fb4ff64e6a0653e70a3bfab31da47b49227d59 (diff) | |
download | gdm-c71bc5d6c3bc2ec448b5c72ce9a811d9c0c7905e.tar.gz |
local-display-factory: Remove initial VT is in use check
The initial VT is in use check in on_vt_changed() is racy, when switching
to VT1 from an active session, on_vt_changed() may run before logind has
processed the VT change and then sd_seat_get_active() will return the
active session which we are switching away from. This results in the greeter
not being started on VT1.
On my system gdm reliably wins the race resulting in not getting a greeter
when manually switching from an active session to VT1.
gdm already starts the greeter unconditionally from
gdm_local_display_factory_sync_seats() on both startup and when an user
session exits. gdm also starts it unconditionally when selecting
"Switch user" from an user session.
Now autologin sessions avoid the initial VT as well.
So we now can assume that the initial VT is free for the login screen's
use. And create_display already checks for and re-uses
an existing greeter, so we can safely remove the racy check.
Diffstat (limited to 'daemon/gdm-local-display-factory.c')
-rw-r--r-- | daemon/gdm-local-display-factory.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/daemon/gdm-local-display-factory.c b/daemon/gdm-local-display-factory.c index fc6865eb..be4bac0a 100644 --- a/daemon/gdm-local-display-factory.c +++ b/daemon/gdm-local-display-factory.c @@ -774,19 +774,6 @@ on_vt_changed (GIOChannel *source, return G_SOURCE_CONTINUE; } - ret = sd_seat_get_active ("seat0", &active_session_id, NULL); - - if (ret == 0) { - g_autofree char *state = NULL; - ret = sd_session_get_state (active_session_id, &state); - - /* if there's something already running on the active VT then bail */ - if (ret == 0 && g_strcmp0 (state, "closing") != 0) { - g_debug ("GdmLocalDisplayFactory: initial VT is in use, so ignoring"); - return G_SOURCE_CONTINUE; - } - } - if (gdm_local_display_factory_use_wayland ()) session_type = "wayland"; |