Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 390609

Summary: >=gnome-base/gdm-3.2 fails to start because dbus is not running
Product: Gentoo Linux Reporter: Guido Flohr <guido>
Component: [OLD] GNOMEAssignee: Gentoo Linux Gnome Desktop Team <gnome>
Status: RESOLVED FIXED    
Severity: normal CC: gentoo, isparavanje, maxbritov, x11
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 342661, 387957    

Description Guido Flohr 2011-11-15 11:50:03 UTC
With

    x11-base/xorg-server-1.10.4-r1
    sys-apps/dbus-1.4.16-r2
    gnome-base/gdm-3.2.1.1-r1

gdm fails to start because /etc/init.d/xdm is started before /etc/init.d/dbus.

Changing the execution order by adding “before xdm” to /etc/init.d/dbus fixed the problem here.

Reproducible: Always




Output of rc-update:

            alsasound | boot                         
             bootmisc | boot                         
                 dbus |      default                 
                devfs |                       sysinit
                dmesg |                       sysinit
                 fsck | boot                         
             hostname | boot                         
              hwclock | boot                         
              keymaps | boot                         
            killprocs |              shutdown        
                local |      default                 
           localmount | boot                         
              modules | boot                         
             mount-ro |              shutdown        
                 mtab | boot                         
               net.lo | boot                         
             netmount |      default                 
           ntp-client |      default                 
               procfs | boot                         
                 root | boot                         
            savecache |              shutdown        
                 sshd |      default                 
                 swap | boot                         
               sysctl | boot                         
            syslog-ng |      default                 
         termencoding | boot                         
                 udev |                       sysinit
       udev-postmount |      default                 
              urandom | boot                         
           vixie-cron |      default                 
                  xdm |      default
Comment 1 Alexandre Rostovtsev (RETIRED) gentoo-dev 2011-11-15 17:33:25 UTC
This needs to be fixed in /etc/init.d/xdm.

@x11: OK to change "use consolekit xfs" to "use dbus consolekit xfs" in /etc/init.d/xdm?

(Note that gdm rdepends on sys-apps/dbus, so this should be sufficient to ensure that dbus gets started before gdm.)
Comment 2 Chí-Thanh Christopher Nguyễn gentoo-dev 2011-11-16 01:56:55 UTC
Maybe "after dbus" would be better, as not all DMs need dbus.
Comment 3 Alexandre Rostovtsev (RETIRED) gentoo-dev 2011-11-16 02:34:56 UTC
(In reply to comment #2)
> Maybe "after dbus" would be better, as not all DMs need dbus.

But "after dbus" will still result in a non-functional gdm for users who haven't added dbus to their default runlevel.

And realistically, if you have dbus installed, you almost certainly want to start it before X. Even if you are only running xdm and twm, dbus is still needed for input device hotplugging.

However, if you really think that it makes sense to allow users who already have dbus installed to run kdm without starting dbus, then I suppose the requirement for gdm will have to be special-cased:

local MY_XDM
MY_XDM=$(echo "${DISPLAYMANAGER}" | tr '[:upper:]' '[:lower:]')
if [[ $MY_XDM = "gdm" || $MY_GDM = "gnome" ]]; then
	use dbus
fi
Comment 4 Alexandre Rostovtsev (RETIRED) gentoo-dev 2011-11-16 02:37:39 UTC
(In reply to comment #3)
sorry, typo, that should be
if [[ $MY_XDM = "gdm" || $MY_XDM = "gnome" ]]; then
Comment 5 Chí-Thanh Christopher Nguyễn gentoo-dev 2011-11-16 03:53:49 UTC
If I understand correctly, gnome-shell depends on NetworkManager anyway, which already needs dbus. So gnome3 users will have it started before gdm. Relying on the dependencies of other init scripts is not so great, but starting dbus just because it is installed isn't either.

Also I think only input device hotplugging needs dbus, but input device autoconfiguration doesn't.
Comment 6 LeDabe 2011-11-16 04:24:19 UTC
Hello

I've had this problem

I've solved it by adding dbus in the boot level, not default.
Comment 7 Alexandre Rostovtsev (RETIRED) gentoo-dev 2011-11-16 04:51:59 UTC
(In reply to comment #5)
> If I understand correctly, gnome-shell depends on NetworkManager anyway, which
> already needs dbus.

Yes, you are correct; libgnome-shell links to libnm-glib, and therefore gnome-shell has networkmanager in its DEPEND and RDEPEND.

> So gnome3 users will have it started before gdm.

No. First of all, gnome-shell works perfectly fine without a running networkmanager process (although in practice, I expect that almost all gnome3 users will be running networkmanager, e.g. in order to be able to use the pretty network config GUI). Second, without an explicit dependency in the xdm init script, there is no guarantee that networkmanager or dbus will be started before gdm. Third, in fact there is no need for networkmanager to be started before gdm: gnome-shell automatically disables many features when in gdm mode, and network configuration is one of those features.

By contrast, without dbus, gnome-shell (and gdm) will simply fail.


If you don't want the "use dbus" enabled for all display managers, at least please special-case enable it for gdm.
Comment 8 Chí-Thanh Christopher Nguyễn gentoo-dev 2011-11-16 21:55:08 UTC
I think the special case for gdm is not so elegant.

I have added "after dbus" to the xdm init script. Let's watch this situation. If users keep on hitting the bug, we can make xdm always start dbus.
Comment 9 Maxim Britov 2011-11-20 23:25:14 UTC
Masked gdm>2.21 have this known issue too (#327257)
Comment 10 Eric Chatellier 2011-11-21 14:04:26 UTC
Same error for me.
Comment 11 Chí-Thanh Christopher Nguyễn gentoo-dev 2011-11-24 13:12:20 UTC
xorg-server-1.11.2-r2 added "use dbus" to the init script. It is apparently needed not only for gdm (bug 391275).
Comment 12 Alexandre Rostovtsev (RETIRED) gentoo-dev 2011-12-02 16:40:53 UTC
*** Bug 392927 has been marked as a duplicate of this bug. ***
Comment 13 Kobboi 2012-09-26 11:31:15 UTC
I am still hitting this one on my up-to-date ~amd64 system. What extra information shoud I supply?
Comment 14 Chí-Thanh Christopher Nguyễn gentoo-dev 2012-09-26 12:46:31 UTC
The "use dbus" only comes into effect when /etc/init.d/xdm is started through some runlevel.