Skip to content

fix xorg fallback

Ray Strode requested to merge wip/fix-xorg-fallback into master

From #gnome-shell conversation with @iainl :

<Laney> halfline: how does the wayland -> x fallback work in gdm?
<Laney> I didn't find a piece of code that looks like "that failed, now try x" in a bit of grepping around
<halfline> https://gitlab.gnome.org/GNOME/gdm/blob/master/daemon/gdm-local-display-factory.c#L331
<halfline> if status == GDM_DISPLAY_FAILED and session_type == "wayland" set session_type to NULL (whic,h probably confusingly, means "X11")
<Laney> NULL means x?
<Laney> ahhhhh
<Laney> and it's initialised to "wayland" somewhere?
<bochecha> Laney: it's because X11, « c'est nul ! »
<halfline> https://gitlab.gnome.org/GNOME/gdm/blob/master/daemon/gdm-local-display-factory.c#L493
<bochecha> (feel free to ask didrocks what that means :P)
<Laney> heh
<Laney> halfline: so does this all look normal to you https://paste.fedoraproject.org/paste/gB7IChqvliwWRudX5XZJbg ? gnome-shell exits 1, but there's no gdm-x-session shizzle
<Laney> apparently gnome-session still exits 0 in that case, but that looks normal?
<halfline> Laney: i mean it looks plausibly nomral
<halfline> *normal
<halfline> note this code:
<halfline>         elapsed = g_timer_elapsed (self->priv->server_timer, NULL);•
<halfline>         if (elapsed < 3) {•
<halfline>                 g_warning ("GdmDisplay: display lasted %lf seconds", elapsed);•
<halfline>                 _gdm_display_set_status (self, GDM_DISPLAY_FAILED);•
<halfline>         } else {•
<halfline> though you made it to 2.5 seconds of the 3 second cut off, that's pushing it :-)
<halfline> so the question is, why didn't it fall back
<Laney> yeah
<Laney> I'm sprinkling g_debug around now
* Laney doesn't really know how to run gdm in gdb
<halfline> yea i think g_debug is the way to go
<halfline> more future proof anyway
<halfline> create_display just got some changes, so i'm guessing it's related to those changes
<halfline> Laney: probably gdm_get_login_window_session_id is returning the session id of the session that just failed
<Laney>                 /* If we already have a login window, switch to it */
<Laney>                 if (gdm_get_login_window_session_id (seat_id, &login_session_id)) {
<Laney> we end up going in there
<Laney> right, it's giving back that one
<halfline> https://paste.fedoraproject.org/paste/2ifanrFyd52Ezvc1u8XKeg
<halfline> maybe try that ^
<halfline> err well there's a leak
<halfline> Laney: https://paste.fedoraproject.org/paste/fOBR6D-VMea-9XZqRcRH0A
<halfline> (same as before but git am'able and fixes the leak
<halfline> )
* Laney checks
<Laney> halfline: yah, I have nice pixels now
<halfline> okay i'll push
  1. https://paste.fedoraproject.org/paste/gB7IChqvliwWRudX5XZJbg
  2. https://paste.fedoraproject.org/paste/2ifanrFyd52Ezvc1u8XKeg
  3. https://paste.fedoraproject.org/paste/fOBR6D-VMea-9XZqRcRH0A
Edited by Ray Strode

Merge request reports