openSUSE 12.1 Systemd fails to start X(DM)

Hi all,

These are the symptoms I’m struggling to find a solution for:
Booting with sysvinit: all OK
Booting with systemd: seems to “hang” after mounting the file systems, which is not the case, since, after about 40 secs I get the console’s login prompt. If I login and excute “rcxdm start” with root permissions, the X server starts and the graphical login screen shows up, I can login and all is normal until next boot. This is what I see in /var/log/messages


Nov 24 15:22:01 knurpht xdm[1006]: Starting service gdm
Nov 24 15:22:01 knurpht xdm[1006]: ** (gdm:1078): WARNING **: Couldn't connect to system bus: Failed to connect to socket /var/run/dbus/system_bus_socket: Bestand of map bestaat niet
Nov 24 15:22:01 knurpht startproc: startproc:  exit status of parent of /usr/sbin/gdm: 1

taking a look learns that the pid file exists, so I suspect systemd to have something wrong in the ordering of the services, or xdm should try again if it fails, but I wouldn’t know how to “set” this for systemd

Any help appreciated.

I just barely got a handle on using systemd, but I found a suggestion if you use gnome (gdm). Create a text file…

name: systemd-user-sessions.service
location:** /lib/systemd/system**
contents as followings:

[Unit]
Description=Gnome Display Manager
Requires=dev-tty7.device
After=dev-tty7.device systemd-user-sessions.service

[Service]
ExecStart=/usr/sbin/gdm -nodaemon
StandardOutput=syslog

[Install]
WantedBy=graphical.target

Then run the following terminal command:

sudo systemctl enable /lib/systemd/system/systemd-user-sessions.service

This command then seems to place the file in /etc/systemd/system/graphical.target.wants where it is run on startup. Anyway, it might be worth a try if you are trying to get gnome to run at startup.

Thank You,

On 2011-11-24 16:06, Knurpht wrote:
>
> Hi all,
>
> These are the symptoms I’m struggling to find a solution for:
> Booting with sysvinit: all OK
> Booting with systemd: seems to “hang” after mounting the file systems,
> which is not the case, since, after about 40 secs I get the console’s
> login prompt.

I think this is because, contrary to systemV, systemd boots almost
silently, so it apparently stalls.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

I guess I caused it myself some way or another. I have a spare 64GB SSD, did the same install (AFAIK), no issues at all.

Hummm … I’m currently working on my first 12.1 setup (lol). It seems that setting initdefault to 3 wasn’t enough to enforce runlevel 3 (which doesn’t surprise me). I set up xdm as default displaymanager - as I always do - in my install script (by setting the value of DISPLAYMANAGER to xdm in /etc/sysconfig/displaymanager). After rebooting this system for the first time - although I’m far from being done yet - I saw a nice green customized xdm login screen from where I could log in in twm, icewm or others. Anyway, this was not exactly what I expected (I expected a console login), but as far as I can tell, xdm is still doing its job.

Got it - sorry for answering to myself. I had it fixed already on Fedora since version 15 (or earlier).

ln -sfn /lib/systemd/system/runlevel3.target /etc/systemd/system/default.target

As for xdm.service. it is supposed (?) to look like this:

[Unit]
Description=X-Window Display Manager on %I
Requires=dev-%i.device
After=dev-%i.device systemd-user-sessions.service

[Service]
ExecStart=/usr/bin/xdm -nodaemon

[Install]
Alias=graphical.target.wants/xdm@tty7.service

(according to http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/x11-apps/xdm/files/xdm.service?revision=1.1 and [PATCH] Support installing systemd unit file.]([PATCH] Support installing systemd unit file.)) but I don’t see it anywhere as a file - on openSUSE and Fedora. It can be started with systemctl though:

# systemctl start xdm.service

Then it shows up as a service:

# systemctl status xdm.service
xdm.service - LSB: X Display Manager
          Loaded: loaded (/etc/init.d/xdm)
          Active: active (running) since Sun, 27 Nov 2011 02:11:25 -0800; 32min ago
         Process: 3022 ExecStart=/etc/init.d/xdm start (code=exited, status=0/SUCCESS)
          CGroup: name=systemd:/system/xdm.service
                   3053 /usr/bin/xdm
                   3055 /usr/bin/X -dpi 96 -br vt7 -auth /var/lib/xdm/auth...