Bug 96772 - kdm fails to start xserver
Summary: kdm fails to start xserver
Status: RESOLVED FIXED
Alias: None
Product: kdm
Classification: Miscellaneous
Component: general (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: kdm bugs tracker
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-11 11:25 UTC by Finn-Arne Johansen
Modified: 2008-05-19 17:30 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
/var/log/daemon from were I waited a long time before pressing a key (7.17 KB, text/plain)
2005-02-09 20:24 UTC, Finn-Arne Johansen
Details
/var/log/daemon.log from where I pressed a key within seconds after kdm was started (17.42 KB, text/plain)
2005-02-09 20:25 UTC, Finn-Arne Johansen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Finn-Arne Johansen 2005-01-11 11:25:51 UTC
Version:            (using KDE KDE 3.3.1)
Installed from:    Debian testing/unstable Packages
OS:                Linux

Well, if it's a Crash or if it's a bug I'm not sure

I'm preparing the use of Lessdisks as a diskless workstation for Debian edu, and while kdm works without problems using a normal workstation (with local disk), kdm wont start unless i press a key when the console login prompt appears. And I mean any key - Shift, enter, space (I have not tested that many). If I wait to long, I have to log in and do
 /etc/init.d/kdm restart

I have tried to log in via ssh and debug this, but there are no signs of whats failing. 

Please advice me on how to debug this.

For now I've chosen to use gdm as this works without problem. (It even uses locale properly, and manages to use kde as the default window manager when no window-manager is choosen (but that's another bug I guess)
Comment 1 Finn-Arne Johansen 2005-01-11 11:27:14 UTC
look at http://article.gmane.org/gmane.linux.debian.devel.education/3695 for more info
Comment 2 Oswald Buddenhagen 2005-01-26 01:14:24 UTC
i've seen such a report already, but just can't find it ...
oh, and from time to time i'm seeing this on one machine myself.
if the server does not come up fast enough, kdm will give up and kill it away - then one has to re-activate the display.
still i think this is an X-server problem. dunno why gdm never seems to trigger such problems ... :}
you may want to check "kdm -debug 1"'s daemon.* syslog output (rather unimportant in this case) and the X server log file.
Comment 3 Finn-Arne Johansen 2005-01-26 08:55:34 UTC
What - you said this is invalid - even though it happens _every_time_ i restart these clients ? 
And this is a known bug ? 
I'll try and do a debugging on this, but resolving this as invalid, really makes me want to ditch kdm and kde. PLease reopen - and lets debug this. 
Comment 4 Finn-Arne Johansen 2005-01-26 08:56:28 UTC
I will attach new info as son as possible
Comment 5 Oswald Buddenhagen 2005-01-26 09:37:40 UTC
you didn't get the idea. this is no kdm bug. it is an x server problem kdm just happens to trigger. so as far as kde is concerned, this _is_ invalid.
anyway, if you can provide useful information, we _might_ be able to come up with a workaround.
you can start with disabling power management features - i remember this having some relation the the other report i mentioned.
Comment 6 Finn-Arne Johansen 2005-02-08 20:36:14 UTC
I Did a short test on this one, namely created a small script /usr/local/bin/debug_kdm, and placed it in the /etc/kde3/kdm/Xservers script as a line: 
 :0 local@tty1 /usr/local/bin/debug_kdm /usr/X11R6/bin/X -nolisten tcp

(This was then the only line that were not commented out)

in /usr/local/bin/debug_kdm I just logged that it actually was called, the environment variables, and the commandline that was called, (and I actually called it). 

During boottime no logfile were created. 
if I logged in and did a invoke-rc.d kdm restart, the logfile was created, and kdm was actually started. 

So this leads me to thinking that it's actually a kdm bug. But it may be the bug of the debian-package - I'll file a bug in debian as well. 

Comment 7 Oswald Buddenhagen 2005-02-09 10:46:20 UTC
please read the "it does not work" section of the kdm readme.
i need the daemon.* syslog.
Comment 8 Finn-Arne Johansen 2005-02-09 20:23:38 UTC
I'll attach two instances off /var/log/daemon.log after I've set debug-level to 7

daemon_worked.log: here I pressed the left "Shift-key" within a few seconds after kdm was started
daemon_worked.log: Here I waited a long time before I pressed a key. 

You can see the differences on the entry that says
  Cannot read randomDevice "/dev/random": No such file or directory
Not sure if the randomDevice is the reason, and I'm not sure what causes /dev/random to be not readable. The device exists, but It's impossible to read from it. 
Comment 9 Finn-Arne Johansen 2005-02-09 20:24:36 UTC
Created attachment 9507 [details]
/var/log/daemon from were I waited a long time before pressing a key
Comment 10 Finn-Arne Johansen 2005-02-09 20:25:28 UTC
Created attachment 9508 [details]
/var/log/daemon.log from where I pressed a key within seconds after kdm was started
Comment 11 Oswald Buddenhagen 2005-02-09 21:54:10 UTC
> Cannot read randomDevice "/dev/random": No such file or directory 
>
holy moly ... this explains everything, sort of.
do you have RandomDevice=/dev/random line in kdmrc?
Comment 12 Finn-Arne Johansen 2005-02-10 07:59:52 UTC
no, greping for random gives me this: 
#RandomDevice=/dev/altrandom
# If empty, a random name in the AuthDir directory will be used.
# Random seed for forging saved session types, etc. of unknown users.
# This value should be random but constant across the login domain.
#PluginOptions=SomeKey=randomvalue,Foo=bar
Comment 13 Finn-Arne Johansen 2005-02-10 15:57:17 UTC
I had another test this, and he added a line
RandomDevice=/dev/urandom

Then kdm works. (I'll verify this myself as well)
Comment 14 micromoog 2005-02-15 17:26:49 UTC
I had the exact same problem on the Gentoo x86 branch, and adding RandomDevice=/dev/urandom to kdmrc (under the General section) fixed it for me as well.

To aid searchers in finding this thread, here are the messages from /var/log/messages when kdm fails to start:

Feb 14 11:24:40 topaz kdm[8161]: X server startup timeout, terminating
Feb 14 11:24:40 topaz kdm[8161]: X server for display :0 can't be started, session disabled

I strongly suspect the problem began when I switched my system from devfs to udev.  Implications are left as an exercise to the reader.
Comment 15 Oswald Buddenhagen 2005-02-15 17:31:06 UTC
fixed in head.
theoretically it should not ever try to use random if urandom is there (at configure time).