You are not logged in.

#1 2012-06-24 09:57:25

janoliver
Member
Registered: 2011-06-01
Posts: 54

systemd: Slim fails to start automatically after boot

Hi, after some update a couple of weeks ago (I don't remember exactly), slim fails to start after boot. I use systemd and just had enabled the slim.service file that is included in the package. After boot, I can login on the tty and then restart the slim.service, and everything works.

In the slim.log file it says:

Fatal server error:
no screens found 

[...]

Giving up.
slim: unable to connect to X server
/usr/bin/xauth:   file /var/run/slim.auth does not exist

It seems like slim is started before X, since everything works when I restart the service manually. What is causing this problem and how can I solve it?

Best regards and thanks,
Jan Oliver

Offline

#2 2012-06-24 10:12:19

swanson
Member
From: Sweden
Registered: 2011-02-05
Posts: 759

Re: systemd: Slim fails to start automatically after boot

How does your slim.servcie look like? Mine;

/usr/lib/systemd/system/slim.service
[Unit]
Description=SLiM Simple Login Manager
After=systemd-user-sessions.service

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

[Install]
WantedBy=graphical.target

Do you still use rc.conf for anything? For example slim? What does journactl | grep slim say? And systemd-analyze?

Offline

#3 2012-06-24 10:17:47

janoliver
Member
Registered: 2011-06-01
Posts: 54

Re: systemd: Slim fails to start automatically after boot

journalctl is currently not working, I have to dig into that as well.
My slim.service looks exactly the same.
I don't really know how to draw information from systemd-analyze... Is it not just for the purpose of benchmarking/timing the start of services or so?

Offline

#4 2012-06-24 10:21:08

swanson
Member
From: Sweden
Registered: 2011-02-05
Posts: 759

Re: systemd: Slim fails to start automatically after boot

I think systemd-analyze would give a nice overview of started services as it lists them.

Offline

#5 2012-06-24 10:24:55

swanson
Member
From: Sweden
Registered: 2011-02-05
Posts: 759

Re: systemd: Slim fails to start automatically after boot

Oh, sorry I meant systemd-analyze blame , of course. (I'm on my netbook with ol' rc.conf)

Offline

#6 2012-06-24 10:28:10

janoliver
Member
Registered: 2011-06-01
Posts: 54

Re: systemd: Slim fails to start automatically after boot

oliarch ~ sudo systemd-analyze blame
  2460ms net-auto-wireless.service
   243ms rsyslog.service
   239ms sshd.service
   183ms console-kit-log-system-start.service
   136ms systemd-logind.service
   124ms console-kit-daemon.service
   119ms systemd-udev-trigger.service
    99ms systemd-sysctl.service
    82ms systemd-readahead-replay.service
    80ms systemd-vconsole-setup.service
    63ms systemd-user-sessions.service
    62ms systemd-remount-fs.service
    58ms systemd-readahead-collect.service
    55ms sys-kernel-debug.mount
    43ms dev-sda2.swap
    43ms dev-mqueue.mount
    42ms dev-hugepages.mount
    26ms systemd-tmpfiles-setup.service
    20ms srv.mount
    13ms tmp.mount
    12ms systemd-udev.service
    10ms boot.mount
     9ms home.mount
oliarch ~ sudo journalctl --no-pager -a | grep slim
Jun 24 14:25:01 oliarch systemd[1]: slim.service: main process exited, code=exited, status=1
Jun 24 14:25:01 oliarch systemd[1]: Unit slim.service entered failed state.

Offline

#7 2012-06-24 10:55:44

swanson
Member
From: Sweden
Registered: 2011-02-05
Posts: 759

Re: systemd: Slim fails to start automatically after boot

I'm no expert on systemd, but it looks ok to me. Is your slim updated? How do you start your session manager? It might be a question of console-kit since slim from version 1.3.x has new built in support for console-kit and it's no longer necessary to add console-kit to .xinitrc. Just a thought ...

Offline

#8 2012-06-24 11:01:49

89c51
Member
Registered: 2012-06-05
Posts: 741

Re: systemd: Slim fails to start automatically after boot

Something like

systemctl status slim.service 

will give you more info on your problem i think

if you run it as root it also gives you log messages

Last edited by 89c51 (2012-06-24 11:06:02)

Offline

#9 2012-06-24 11:18:23

janoliver
Member
Registered: 2011-06-01
Posts: 54

Re: systemd: Slim fails to start automatically after boot

swanson wrote:

I'm no expert on systemd, but it looks ok to me. Is your slim updated? How do you start your session manager? It might be a question of console-kit since slim from version 1.3.x has new built in support for console-kit and it's no longer necessary to add console-kit to .xinitrc. Just a thought ...

I am pretty sure I load it the right way;

login_cmd exec ck-launch-session dbus-launch /bin/bash -login ~/.xinitrc %session

in .xinitrc I only use "exec i3"

systemctl status doesn't help. sad

Offline

#10 2012-06-24 11:28:45

swanson
Member
From: Sweden
Registered: 2011-02-05
Posts: 759

Re: systemd: Slim fails to start automatically after boot

I don't nthink this is necessary; ck-launch-session anymore. And note that systemd already started a console-kit servcice/session. As I said, slim version 1.3.x handels console-kit by itself. What does ck-list-session say? Before your manual start  and after?

EDIT; From my slim.conf;

login_cmd           exec /bin/bash -login ~/.xinitrc %session

(You might try without dbus-launch as well, )

EDIT #2: ck-list-sessions

(My netbook is too small to type on)

Last edited by swanson (2012-06-24 11:42:35)

Offline

Board footer

Powered by FluxBB