Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 66011 - XDM/KDM not autostarting
Summary: XDM/KDM not autostarting
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] KDE (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Gentoo KDE team
URL: http://forums.gentoo.org/viewtopic.ph...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-01 04:54 UTC by Jure Repinc
Modified: 2005-01-15 03:45 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jure Repinc 2004-10-01 04:54:39 UTC
It looks like quite a few peiople have a problem with KDM not autostarting sometimes after reboot. It helps in most of the cases if you enter some chars with keyboard or move the mouse right away when you see the login prompt. People say that it could be somthing connected to keyboard/mouse input system or some timeout that is set to help some slower systems. See this forum topic for more details about the problem and suggested workarounds:
http://forums.gentoo.org/viewtopic.php?p=1600816#1600816

Reproducible: Sometimes
Steps to Reproduce:
1. Make sure KDM is set as display manager
2. Reboot computer
3. Wait to see the KDM login prompt

Actual Results:  
Sometimes the KDM login prompt doesn't come up even if you wait for a very long
time.

Expected Results:  
The KDM login prompt should always come up.

I'm not sure if this is KDE/KDM problem or some problem with Gentoo startup script.
Comment 1 sir_skiner 2004-10-01 05:16:40 UTC
same here. what i can say more is probably it's not kdm/kde issue because i noticed this bug alsa with simple xdm.
Comment 2 sir_skiner 2004-10-01 05:19:13 UTC
i ment "also" not "alsa" ;|
Comment 3 Jure Repinc 2004-10-01 05:23:36 UTC
I changed the Summary. Does anyone have the same issue with GDM?
Comment 4 Tom Shaw 2004-10-01 09:02:06 UTC
I don't believe this to be a kde bug since mouse or keyboard input will allow
kdm to start as normal. If you just move your mouse around about the time
"local" starts kdm will load up as it should. This seems to have started
happening around Sept. 12th, the link to the forum posts shows that the likely
suspect could be a udev or hotplug update. This problem isn't present sometimes
either when the system starts and "emerge world -e" did not change anything
either.

I'm using a usb keyboard and usb mouse and have evdev support in the kernel.

Comment 5 sir_skiner 2004-10-01 09:36:09 UTC
well, it apears gdm works fine - 3 reboots with no prblems
Comment 6 Juan 2004-10-02 00:41:27 UTC
I believe this is an issue with XDM itself. Even if I have rc.conf set to with DISPLAYMANAGER="xdm", xdm still does not load. It doesn't seem matter what DISPLAYMANAGER is set to.
Comment 7 Jure Repinc 2004-10-09 15:44:19 UTC
I tried reemerging baselayout as some people told me it could help (because /var/lock was changed from 0755 to 0775). Unfortenly it didn't. What else cold be wrong?
Comment 8 listen 2004-10-13 10:31:57 UTC
I found this one in the forum. Maybe the problem has something to do with our bug... Just an idea...

http://forums.gentoo.org/viewtopic.php?t=236345
Comment 9 Craig Bradney 2004-10-17 15:22:40 UTC
I have it on my Athlon running x86, sometimes. I dont have it on this P4 laptop running x86, but it has an ~x86 baselayout for wireless support. Both have KDE 3.3.1.
Comment 10 Craig Bradney 2004-10-18 02:54:31 UTC
Uh oh.. exists on the laptop too :S grr. 
Comment 11 Gregorio Guidi (RETIRED) gentoo-dev 2004-10-25 04:09:05 UTC
I have this theory...

kdm and kdm share code to send authorization stuff to the X server,
this code needs some entropy to produce random bytes, and the entropy
is gathered from DEV_RANDOM.
The code knows the value of DEV_RANDOM from the files in
/usr/X11R6/lib/X11/config/, and xorg-x11-6.8.0 sets that value
to "/dev/random".

It is well-known that reading from /dev/random blocks if there's not enough
entropy in the system, and that mouse movements or keypresses can
produce that entropy...
Comment 12 Gregorio Guidi (RETIRED) gentoo-dev 2004-10-31 09:16:45 UTC
I just realized that to avoid this problem, one can just add 'urandom' as
a service: 'rc-update add urandom default'.

This will preserve the entropy pool across reboots, and kdm will have enough
random bits to create the keys.
Comment 13 Mark 2004-11-13 08:47:22 UTC
It looks like Debian had the same problem at one point.  See http://lists.debian.org/debian-qt-kde/2004/04/msg00215.html for more information on how to confirm it.  The solution is described in http://lists.debian.org/debian-qt-kde/2004/04/msg00224.html which agrees with the /dev/random and entropy theory in comment 11.

Console output:
  mark@localhost ~ $ strings /usr/kde/3.3/bin/kdm | grep urandom
  mark@localhost ~ $ strings /usr/kde/3.3/bin/kdm | grep random
  /dev/random
  Cannot read randomDevice %"s: %m
  Cannot open randomDevice %"s: %m

To fix the problem, edit /usr/X11R6/lib/X11/config/X11.tmpl and change line 1291 from "#   define RandomDeviceFile /dev/random" to "#   define RandomDeviceFile /dev/urandom".  I think kdebase (which contains kdm) needs to be recompiled after this change.
Comment 14 Gregorio Guidi (RETIRED) gentoo-dev 2005-01-10 05:41:14 UTC
I just discovered that the kdm config file 
(/usr/kde/3.3/share/config/kdm/kdmrc)
has an option RandomDevice for this purpose.

If someone tests that it works (set RandomDevice=/dev/urandom there)
then it will be considered the preferred method to solve this issue, and we 
can close this bug.
Comment 15 Michael Garrett 2005-01-15 00:42:21 UTC
Setting RandomDevice to /dev/urandom worked for me.  KDM loads properly now.  Thanks for the tip.
Comment 16 Gregorio Guidi (RETIRED) gentoo-dev 2005-01-15 03:45:46 UTC
Great. Since this is not a real bug, but a (very tricky) configuration issue, 
we can close it now.