Bug 1529175 - Gnome Wayland session cannot start
Gnome Wayland session cannot start
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: gnome-session (Show other bugs)
7.5
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Ray Strode [halfline]
Desktop QE
:
Depends On:
Blocks: 1527213
  Show dependency treegraph
 
Reported: 2017-12-26 16:39 EST by Matěj Cepl
Modified: 2018-05-17 10:39 EDT (History)
7 users (show)

See Also:
Fixed In Version: gnome-session-3.26.1-10.el7
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-04-10 09:10:18 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
output of journalctl -xb (355.11 KB, text/plain)
2017-12-26 16:39 EST, Matěj Cepl
no flags Details
output of journalctl -xb (408.28 KB, text/plain)
2018-01-17 05:47 EST, Matěj Cepl
no flags Details
backtrace (abrt fails to do anything for me) (18.83 KB, text/plain)
2018-01-17 05:48 EST, Matěj Cepl
no flags Details
save: make sure app state is written into desktop file (40.92 KB, patch)
2018-01-17 10:03 EST, Ray Strode [halfline]
no flags Details | Diff
save: make sure app state is written into desktop file (43.69 KB, patch)
2018-01-17 10:24 EST, Ray Strode [halfline]
no flags Details | Diff
autostart: ensure gnome-shell and mutter get right autostart phase (4.19 KB, patch)
2018-01-18 10:29 EST, Ray Strode [halfline]
no flags Details | Diff


External Trackers
Tracker ID Priority Status Summary Last Updated
GNOME Bugzilla 790913 None None None 2018-01-17 09:32 EST
Red Hat Product Errata RHBA-2018:0770 None None None 2018-04-10 09:11 EDT

  None (edit)
Description Matěj Cepl 2017-12-26 16:39:18 EST
Created attachment 1372606 [details]
output of journalctl -xb

Description of problem:
Not sure what's the problem, but after upgrades (with RHEL-Nightly) I cannot start Wayland session, which worked before. I successfully login from GDM, screen switch to the neutral grey background (which is not my current background, I have an image as the one), and then I get back to the GDM login.

X session works (that's what I have running right now). 

Version-Release number of selected component (if applicable):
gnome-settings-daemon-3.26.2-3.el7.x86_64
gnome-session-3.26.1-8.el7.x86_64
mutter-3.26.2-6.el7.x86_64
gnome-shell-3.26.2-2.el7.x86_64
gnome-session-wayland-session-3.26.1-8.el7.x86_64
xorg-x11-server-Xwayland-1.19.5-2.el7.x86_64

How reproducible:
100% (5 out of 5 in line)
Comment 2 Matěj Cepl 2018-01-17 05:47 EST
Created attachment 1382344 [details]
output of journalctl -xb

Wayland, still doesn't work, but now I have even coredump from gnome-shell failing.

Using

xorg-x11-xauth-1.0.9-1.el7.x86_64
xorg-x11-drv-void-1.4.1-2.el7.x86_64
xorg-x11-drv-libinput-0.25.0-2.el7.x86_64
xorg-x11-drv-vmmouse-13.1.0-1.el7.x86_64
xorg-x11-fonts-Type1-7.5-9.el7.noarch
xorg-x11-server-utils-7.7-20.el7.x86_64
xorg-x11-drv-vesa-2.3.2-25.1.el7.x86_64
xorg-x11-drv-fbdev-0.4.3-25.el7.x86_64
xorg-x11-utils-7.5-22.el7.x86_64
xorg-x11-drv-nouveau-1.0.13-3.el7.x86_64
xorg-x11-server-common-1.19.5-2.el7.x86_64
xorg-x11-drv-intel-2.99.917-27.20160929.el7.x86_64
gnome-settings-daemon-3.26.2-3.el7.x86_64
xorg-x11-server-Xorg-1.19.5-2.el7.x86_64
xorg-x11-drv-wacom-0.34.2-4.el7.x86_64
xorg-x11-drv-evdev-2.10.5-2.1.el7.x86_64
gnome-shell-browser-plugin-3.26.2-2.el7.x86_64
mutter-debuginfo-3.26.2-6.el7.x86_64
xorg-x11-drv-dummy-0.3.7-1.el7.x86_64
xorg-x11-server-Xwayland-1.19.5-2.el7.x86_64
xorg-x11-xinit-1.3.4-2.el7.x86_64
xorg-x11-drv-vmware-13.2.1-1.el7.x86_64
mutter-3.26.2-6.el7.x86_64
xorg-x11-drv-v4l-0.2.0-47.el7.x86_64
xorg-x11-drv-ati-7.10.0-1.el7.x86_64
gnome-shell-3.26.2-2.el7.x86_64
Comment 3 Matěj Cepl 2018-01-17 05:48 EST
Created attachment 1382345 [details]
backtrace (abrt fails to do anything for me)
Comment 4 Matěj Cepl 2018-01-17 05:49:13 EST
(Xorg session works just fine, that's what I am using right now)
Comment 5 Olivier Fourdan 2018-01-17 07:39:13 EST
Can you do the following:

1. Log in Xorg (as that works)
2. Reset the value of “auto-save-session” to its default

   $ dconf reset /org/gnome/gnome-session/auto-save-session

3. Log out ands retry to log in GNOME on Wayland
Comment 6 Matěj Cepl 2018-01-17 08:21:27 EST
(In reply to Olivier Fourdan from comment #5)
> Can you do the following:
> 
> 1. Log in Xorg (as that works)
> 2. Reset the value of “auto-save-session” to its default
> 
>    $ dconf reset /org/gnome/gnome-session/auto-save-session
> 
> 3. Log out ands retry to log in GNOME on Wayland

I switched off auto-save-session in the proper dialogue (so yes /org/gnome/gnome-session/auto-save-session is false), logged out, and then rm -rf ~/.config/gnome-session/. Now I have Wayland session working.
Comment 7 Olivier Fourdan 2018-01-17 08:40:04 EST
(In reply to Matěj Cepl from comment #6)
> I switched off auto-save-session in the proper dialogue (so yes
> /org/gnome/gnome-session/auto-save-session is false), logged out, and then
> rm -rf ~/.config/gnome-session/. Now I have Wayland session working.

So, from what I could observe (reproduced on two different machines locally), enabling “auto-save-session” in gnome-session settings will break the Wayland session, from the logs it looks like it's trying to start  X11 specific stuff and fails, and gives up with a “Unrecoverable failure in required component”)

Disabling the option is not sufficient, one has to move the saved session away (e.g. mv ~/.config/gnome-session ~/.config/gnome-session.old) to be able to log in again.

But there might be more than one bug there (which would not be surprising given that the option is off by default, so unlikely most people will hit that bug), because the backtrace (attachment 1382345 [details]) shows a crash in mutter X11's session management code, trying to save the state of a client window while the workspace is NULL (thus the crash).

Considering that the workspace is supposed to be set in _meta_window_shared_new() (via set_workspace_state()), I would like to have access to the core file from gnome-shell, could you place it somewhere where I could download it?

→ Meanwhile, there is clearly a bug with gnome-session and Wayland.

To reproduce:

1. Set /org/gnome/gnome-session/auto-save-session to TRUE
2. Try to log in Wayland session.
Comment 8 Matěj Cepl 2018-01-17 08:47:04 EST
(In reply to Olivier Fourdan from comment #7)
> I would like to have access to the core file from gnome-shell, could you place it somewhere where I could download it?

Damn, sorry, I have already removed it (after generating that backtrace).
Comment 10 Ray Strode [halfline] 2018-01-17 10:03 EST
Created attachment 1382434 [details]
save: make sure app state is written into desktop file

There are a number of important bits of app state written into
an applications desktop file that needs to be restored when
the session is saved.  For instance, the phase in which the client
should get started.

That state is currently stored on the GsmApp object, which is
inaccessible, from the client save function.

This commit adds the neccesary plumbing to route the GsmApp object
associated with a client to the client save function, and also
adds code to allow the app object to augment the client keyfile at
save time.

https://bugzilla.gnome.org/show_bug.cgi?id=790913
Comment 11 Ray Strode [halfline] 2018-01-17 10:24 EST
Created attachment 1382511 [details]
save: make sure app state is written into desktop file

There are a number of important bits of app state written into
an applications desktop file that needs to be restored when
the session is saved.  For instance, the phase in which the client
should get started.

That state is currently stored on the GsmApp object, which is
inaccessible, from the client save function.

This commit adds the neccesary plumbing to route the GsmApp object
associated with a client to the client save function, and also
adds code to allow the app object to augment the client keyfile at
save time.

https://bugzilla.gnome.org/show_bug.cgi?id=790913
Comment 12 Ray Strode [halfline] 2018-01-17 10:25:15 EST
one thing this patch doesn't do is deal with already saved session files missing the required information, we'll need to some work on that.
Comment 13 Olivier Fourdan 2018-01-17 10:37:46 EST
attachment 1382511 [details] works in my test case and avoids the issue (i.e. saving a session doesn't stop from logging in GNOME on Wayland anymore).
Comment 14 Ray Strode [halfline] 2018-01-18 10:29 EST
Created attachment 1382946 [details]
autostart: ensure gnome-shell and mutter get right autostart phase

Previous versions of gnome-shell neglected to save the autostart phases
for required components in the session state. While that is now fixed,
users may still have old saved state that lack the autostart phase.

In order to ease upgrades, this commit manually adds in the phases that
are important for a functioning GNOME desktop.
Comment 15 Ray Strode [halfline] 2018-01-18 10:30:26 EST
^ i think this should fix the upgrade situation. my 7.5 vm is a little butchered up right now, so i can't easily test it yet.  going to start a fresh install and push following testing.
Comment 21 Olivier Fourdan 2018-01-19 09:51:01 EST
Ok, sorry for the false positive.

Removing the "phase" from saved-session/org.gnome.Shell.desktop does indeed prevent from login in Wayland even with attachment 1382946 [details]

I've added some traces which show that the app_id is "org.gnome.Shell.desktop", not just "org.gnome.Shell" so the g_strcmp0() won't match.

So using:

 if (g_strcmp0 (app_id, "org.gnome.Shell.desktop") == 0)

fixes the issue apparently...
Comment 33 Matěj Cepl 2018-02-08 09:05:48 EST
OK, if it is not problem that the Wayland session crashes, then everything is perfect, and this bug could be verified.
Comment 36 errata-xmlrpc 2018-04-10 09:10:18 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:0770

Note You need to log in before you can comment on or make changes to this bug.