You are not logged in.

#1 2014-06-04 08:27:38

miro279
Member
Registered: 2010-10-02
Posts: 156

[SOLVED] kdm not starting (sometimes)

On booting I sometimes get the message:

kdm[1149]: X server startup timeout, terminating
kdm[1149]: X server for display :0 cannot be started, session disabled

rebooting the system kdm always starts on the second attempt.

can someone help to debug? thanks a lot!

Last edited by miro279 (2014-06-16 08:32:26)

Offline

#2 2014-06-04 10:31:04

berbae
Member
From: France
Registered: 2007-02-12
Posts: 1,304

Re: [SOLVED] kdm not starting (sometimes)

In '/usr/share/config/kdm/kdmrc' you have

# Core config for local displays
[X-:*-Core]
# How often to try to run the X-server. Running includes executing it and
# waiting for it to come up.
# Default is 1
#ServerAttempts=1
# How long to wait for a local X-server to come up.
# Default is 30
#ServerTimeout=30
# The command line to start the X-server, without display number and VT spec.
# This string is subject to word splitting.
# Default is "/usr/bin/X"
ServerCmd=/usr/bin/X
# Additional arguments for the X-servers for local sessions.
# This string is subject to word splitting.
# Default is ""
ServerArgsLocal=-nolisten tcp

You may try to change the 'ServerTimeout' value to something higher...

Offline

#3 2014-06-10 07:05:39

miro279
Member
Registered: 2010-10-02
Posts: 156

Re: [SOLVED] kdm not starting (sometimes)

I set 60sec, but no change by that. Also I guess if the server times out in 30sec there must be some problem..
Funny thing is, it always doesn't work on the first boot of a day and always works after a reboot..

Offline

#4 2014-06-10 09:08:18

berbae
Member
From: France
Registered: 2007-02-12
Posts: 1,304

Re: [SOLVED] kdm not starting (sometimes)

Have you try to change the 'ServerAttempts' value to more than 1?

Offline

#5 2014-06-13 08:37:11

miro279
Member
Registered: 2010-10-02
Posts: 156

Re: [SOLVED] kdm not starting (sometimes)

This works. The first attempt on the day fails it then restarts successfully. So this is a workaround bit no solution to the problem.
In /var/log/kdm.log I find:

klauncher(1746) kdemain: No DBUS session-bus found. Check if you have started the DBUS server.
kdeinit4: Communication error with launcher. Exiting!
kdmgreet(1734)/kdecore (K*TimeZone*): KSystemTimeZones: ktimezoned initialize() D-Bus call failed:  "Not connected to D-Bus server"

might this be related?

Offline

#6 2014-06-13 15:30:10

berbae
Member
From: France
Registered: 2007-02-12
Posts: 1,304

Re: [SOLVED] kdm not starting (sometimes)

Can you post the result of 'systemctl list-dependencies' please?
You can study your boot with 'systemd-analyze' to try to determine what takes time to start.

Offline

#7 2014-06-14 09:17:30

miro279
Member
Registered: 2010-10-02
Posts: 156

Re: [SOLVED] kdm not starting (sometimes)

default.target
● ├─kdm.service
● └─multi-user.target
●   ├─acpid.service
●   ├─atieventsd.service
●   ├─catalyst-hook.service
●   ├─clamd.service
●   ├─cpupower.service
●   ├─cronie.service
●   ├─cups.path
●   ├─dbus.service
●   ├─freenet.service
●   ├─freshclamd.service
●   ├─hdapsd.service
●   ├─laptop-mode.service
●   ├─lm_sensors.service
●   ├─logrotate.timer
●   ├─man-db.timer
●   ├─NetworkManager.service
●   ├─shadow.timer
●   ├─syslog-ng.service
●   ├─systemd-ask-password-wall.path
●   ├─systemd-logind.service
●   ├─systemd-user-sessions.service
●   ├─tor.service
●   ├─updatedb.timer
●   ├─basic.target
●   │ ├─alsa-restore.service
●   │ ├─alsa-state.service
●   │ ├─paths.target
●   │ ├─slices.target
●   │ │ ├─-.slice
●   │ │ └─system.slice
●   │ ├─sockets.target
●   │ │ ├─acpid.socket
●   │ │ ├─cups.socket
●   │ │ ├─dbus.socket
●   │ │ ├─dm-event.socket
●   │ │ ├─saned.socket
●   │ │ ├─systemd-initctl.socket
●   │ │ ├─systemd-journald.socket
●   │ │ ├─systemd-shutdownd.socket
●   │ │ ├─systemd-udevd-control.socket
●   │ │ └─systemd-udevd-kernel.socket
●   │ ├─sysinit.target
●   │ │ ├─dev-hugepages.mount
●   │ │ ├─dev-mqueue.mount
●   │ │ ├─kmod-static-nodes.service
●   │ │ ├─proc-sys-fs-binfmt_misc.automount
●   │ │ ├─sys-fs-fuse-connections.mount
●   │ │ ├─sys-kernel-config.mount
●   │ │ ├─sys-kernel-debug.mount
●   │ │ ├─systemd-ask-password-console.path
●   │ │ ├─systemd-binfmt.service
●   │ │ ├─systemd-journal-flush.service
●   │ │ ├─systemd-journald.service
●   │ │ ├─systemd-modules-load.service
●   │ │ ├─systemd-random-seed.service
●   │ │ ├─systemd-sysctl.service
●   │ │ ├─systemd-tmpfiles-setup-dev.service
●   │ │ ├─systemd-tmpfiles-setup.service
●   │ │ ├─systemd-udev-trigger.service
●   │ │ ├─systemd-udevd.service
●   │ │ ├─systemd-update-utmp.service
●   │ │ ├─systemd-vconsole-setup.service
●   │ │ ├─cryptsetup.target
●   │ │ ├─local-fs.target
●   │ │ │ ├─-.mount
●   │ │ │ ├─boot.mount
●   │ │ │ ├─home.mount
●   │ │ │ ├─systemd-fsck-root.service
●   │ │ │ ├─systemd-remount-fs.service
●   │ │ │ ├─tmp.mount
●   │ │ │ └─tmp.mount
●   │ │ └─swap.target
●   │ │   ├─dev-disk-by\x2did-ata\x2dHITACHI_HTS723216L9SA60_090507FC1223NPH0GY6D\x2dpart5.swap
●   │ │   ├─dev-disk-by\x2did-wwn\x2d0x5000cca586ce4f98\x2dpart5.swap
●   │ │   ├─dev-disk-by\x2dlabel-swap.swap
●   │ │   ├─dev-disk-by\x2dlabel-swap.swap
●   │ │   ├─dev-disk-by\x2dpartlabel-Linux\x5cx20swap.swap
●   │ │   ├─dev-disk-by\x2dpartuuid-dee62d49\x2d0bc6\x2d466d\x2dac37\x2dc764dba9819c.swap
●   │ │   ├─dev-disk-by\x2duuid-d04948bb\x2d804f\x2d4f94\x2dabc0\x2dd665e711193c.swap
●   │ │   ├─dev-sda5.swap
●   │ │   └─dev-sda5.swap
●   │ └─timers.target
●   │   └─systemd-tmpfiles-clean.timer
●   ├─getty.target
●   │ └─getty@tty1.service
●   └─remote-fs.target

I'll have a look on systemd-analyze tomorrow on first boot!

Offline

#8 2014-06-14 09:42:46

miro279
Member
Registered: 2010-10-02
Posts: 156

Re: [SOLVED] kdm not starting (sometimes)

ok, I found two processes that are missing on second boot that took a lot of time on the first..

1min 7.530s updatedb.service
         56.069s man-db.service

You think kdm just times out because the system is too slow? These processes run in parallel, right? What could I do about that?

Offline

#9 2014-06-14 21:48:32

berbae
Member
From: France
Registered: 2007-02-12
Posts: 1,304

Re: [SOLVED] kdm not starting (sometimes)

Yes I am pretty sure this is the problem.
The two services are controlled by a systemd timer and there are of 'Type=oneshot':

Behavior of oneshot is similar to simple; however, it is expected that the process has to exit before systemd starts follow-up units.

I have given a way to change the OnCalendar value of the timers at https://bbs.archlinux.org/viewtopic.php?id=180263

Offline

#10 2014-06-16 08:35:25

miro279
Member
Registered: 2010-10-02
Posts: 156

Re: [SOLVED] kdm not starting (sometimes)

Ok, I took out the updatedb process as suggested in yout post which solved the problem. Still I think this is a structural problem in systemd. A process taking some time shouldn't result in a x-server timeout. Why is this process not marked 'Type=simple'?

Thanks a lot for your help!

Offline

#11 2014-06-16 12:02:58

whaler
Member
From: Oslo, Norway
Registered: 2008-03-25
Posts: 324

Re: [SOLVED] kdm not starting (sometimes)

Although your problem is marked solved, I thought I should mention a blog post by Martin Gräßlin the other day

http://blog.martin-graesslin.com/blog/2 … in-prefix/

Offline

Board footer

Powered by FluxBB