Bug 1243856

Summary: allow headless gnome-shell start
Product: Red Hat Enterprise Linux 7 Reporter: Florian Müllner <fmuellner>
Component: gnome-shellAssignee: Florian Müllner <fmuellner>
Status: CLOSED ERRATA QA Contact: Desktop QE <desktop-qa-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.2CC: desktop-qa-list, fmuellner, mclasen, mdomonko, tpelka, vbenes
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: gnome-shell-3.14.4-18.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1212702
: 1273986 (view as bug list) Environment:
Last Closed: 2015-11-19 07:16:08 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1212702, 1273984    
Bug Blocks: 1273986    
Attachments:
Description Flags
screenshot none

Description Florian Müllner 2015-07-16 13:18:04 UTC
+++ This bug was initially created as a clone of Bug #1212702 +++

Description of problem:
We need to start gnome shell without monitor attached. We may use dummy driver as a workaround for testing now but this has some implications in policykit not taking session the same way as real one (more details here 1181816).

There is an upstream bug that deals with this issue for gnome 3.16 but it wasn't solved.  
https://bugzilla.gnome.org/show_bug.cgi?id=730551

Version-Release number of selected component (if applicable):
mutter-3.14.2-1.el7.x86_64
gnome-shell-3.14.2-3.el7.x86_64

How reproducible:
always

Steps to Reproduce:
1.obtain a box with supported card (nvidia/intel/amd)
2.disconnect monitor
2.boot to graphical env
3.connect monitor back

Actual results:
crash

Expected results:
no crash


Additional info:

Comment 2 Michal Domonkos 2015-07-17 11:37:49 UTC
Actually, this still doesn't work with

  gnome-shell-3.14.4-18.el7.x86_64
  mutter-3.14.4-5.el7.x86_64

The following error appears in the journal:

Jul 17 13:01:30 underdesk gnome-session[2665]: (gnome-shell:2714): Gjs-WARNING **: JS ERROR: TypeError: monitor is null
Jul 17 13:01:30 underdesk gnome-session[2665]: LayoutManager<._updateTrayBarrier@resource:///org/gnome/shell/ui/layout.js:513
Jul 17 13:01:30 underdesk gnome-session[2665]: wrapper@resource:///org/gnome/gjs/modules/lang.js:169
Jul 17 13:01:30 underdesk gnome-session[2665]: LayoutManager<._monitorsChanged@resource:///org/gnome/shell/ui/layout.js:532
Jul 17 13:01:30 underdesk gnome-session[2665]: wrapper@resource:///org/gnome/gjs/modules/lang.js:169
Jul 17 13:01:30 underdesk gnome-session[2665]: LayoutManager<._init@resource:///org/gnome/shell/ui/layout.js:253
Jul 17 13:01:30 underdesk gnome-session[2665]: wrapper@resource:///org/gnome/gjs/modules/lang.js:169
Jul 17 13:01:30 underdesk gnome-session[2665]: _Base.prototype._construct@resource:///org/gnome/gjs/modules/lang.js:110
Jul 17 13:01:30 underdesk gnome-session[2665]: Class.prototype._construct/newClass@resource:///org/gnome/gjs/modules/lang.js:204
Jul 17 13:01:30 underdesk gnome-session[2665]: _initializeUI@resource:///org/gnome/shell/ui/main.js:135
Jul 17 13:01:30 underdesk gnome-session[2665]: start@resource:///org/gnome/shell/ui/main.js:112
Jul 17 13:01:30 underdesk gnome-session[2665]: @<main>:1
Jul 17 13:01:30 underdesk gnome-session[2665]: ** Message: Execution of main.js threw exception: JS_EvaluateScript() failed
Jul 17 13:01:31 underdesk gnome-session[2665]: (gnome-settings-daemon:2691): GLib-GIO-CRITICAL **: g_dbus_proxy_call_internal: assertion 'G_IS_DBUS_PROXY (proxy)' failed

Comment 3 Florian Müllner 2015-07-17 13:34:33 UTC
Sorry, my bad - I wrote and tested this on master and backported the result, so I missed some bits that have been removed since 3.14. Those bits should now be fixed with

  gnome-shell-3.14.4-19.el7
  mutter-3.14.4-6.el7

Comment 4 Michal Domonkos 2015-07-17 14:50:53 UTC
Appreciate your fast response, Florian!

The JS ERROR is gone now, however gnome-shell still doesn't start:

Jul 17 16:44:52 underdesk gnome-session[2661]: Entering running state
Jul 17 16:44:57 underdesk gnome-session[2661]: (gnome-settings-daemon:2688): media-keys-plugin-WARNING **: 4: GDBus.Error:org.freedesktop.DBus.Error.NoReply: Message did not receive a reply (timeout by message bus
Jul 17 16:44:57 underdesk gnome-session[2661]: current session already has an ibus-daemon.
Jul 17 16:44:58 underdesk gnome-session[2661]: WARNING: App 'gnome-shell.desktop' respawning too quickly
Jul 17 16:44:58 underdesk gnome-session[2661]: gnome-session[2661]: WARNING: App 'gnome-shell.desktop' respawning too quickly
Jul 17 16:44:58 underdesk gnome-session[2661]: Unrecoverable failure in required component gnome-shell.desktop
Jul 17 16:44:59 underdesk gnome-session[2661]: (gnome-settings-daemon:2688): GLib-GIO-CRITICAL **: g_dbus_proxy_call_internal: assertion 'G_IS_DBUS_PROXY (proxy)' failed

Comment 5 Florian Müllner 2015-07-17 15:55:52 UTC
Does it work if you start up with a monitor attached, then unplug and replug it? I'm currently in the process of installing a 7.2 VM, hopefully I'll be able to test headless startup there ...

Comment 6 Michal Domonkos 2015-07-17 16:16:00 UTC
I can definitely try what you suggested, however I'm just leaving and will be on vacation next week.  If you are not wiser till then, I'll get back to you the week after (starting Monday 27).

Comment 8 Florian Müllner 2015-07-24 17:56:21 UTC
(In reply to Florian Müllner from comment #5)
> I'm currently in the process of installing a 7.2 VM, hopefully I'll be
> able to test headless startup there ...

Unfortunately it doesn't look like it - I can remove the video output in virt-manager, but only re-add it when powered off. gdm/gnome-shell appeared to be running fine though (as seen from an SSH login), and with a couple more fixes[0] I'm able to use xrandr from within a user session to turn outputs off and on. I'm afraid for now I'm out of ideas how to do any better without access to the real thing, so punting back to testing.


[0] mutter-3.14.4-9.el7
    gnome-shell-3.14.4-23.el7
    gnome-shell-extensions-3.14.4-7.el7

Comment 9 Michal Domonkos 2015-07-28 15:56:14 UTC
(In reply to Florian Müllner from comment #5)
> Does it work if you start up with a monitor attached, then unplug and replug
> it?

Yes, the image comes up fine on the monitor in this case you described.  Currently I'm using:

mutter-3.14.4-9.el7.x86_64
gnome-shell-3.14.4-23.el7.x86_64

However, headless boot still doesn't work with these packages as no gnome-shell process is started.  Here's the current log (same messages as before):

Jul 28 17:52:36 underdesk gnome-session[2683]: Entering running state
Jul 28 17:52:38 underdesk gnome-session[2683]: (gnome-settings-daemon:2711): media-keys-plugin-WARNING **: 4: GDBus.Error:org.freedesktop.DBus.Error.NoReply: Message did not receive a reply (timeout by message bus
Jul 28 17:52:39 underdesk gnome-session[2683]: current session already has an ibus-daemon.
Jul 28 17:52:39 underdesk gnome-session[2683]: gnome-session[2683]: WARNING: App 'gnome-shell.desktop' respawning too quickly
Jul 28 17:52:39 underdesk gnome-session[2683]: WARNING: App 'gnome-shell.desktop' respawning too quickly
Jul 28 17:52:39 underdesk gnome-session[2683]: Unrecoverable failure in required component gnome-shell.desktop
Jul 28 17:52:40 underdesk gnome-session[2683]: (gnome-settings-daemon:2711): GLib-GIO-CRITICAL **: g_dbus_proxy_call_internal: assertion 'G_IS_DBUS_PROXY (proxy)' failed

Comment 10 Michal Domonkos 2015-07-28 16:04:15 UTC
The log is from:
# journalctl -b /usr/bin/gnome-session

Comment 16 Michal Domonkos 2015-10-06 09:46:58 UTC
Created attachment 1080191 [details]
screenshot

Comment 25 errata-xmlrpc 2015-11-19 07:16:08 UTC
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://rhn.redhat.com/errata/RHBA-2015-2216.html