FS#16827 - [xorg] X running at 100% CPU when KDM started via /etc/rc.conf

Attached to Project: Arch Linux
Opened by Tom (t0mmyw) - Saturday, 24 October 2009, 18:37 GMT
Last edited by Jan de Groot (JGC) - Friday, 13 November 2009, 21:43 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Jan de Groot (JGC)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
When using KDE 4.3.2, with KDM being started via DAMEONS in /etc/rc.conf, X runs at 100% CPU.

Steps to reproduce:
Have KDM start via DAEMONS in /etc/rc.conf and then simply log in and you will see X running at 100%. See the following thread on the Arch forums for complaints about this bug:

http://bbs.archlinux.org/viewtopic.php?id=81798&p=1

Solution:
Remove KDM from the DAEMONS list in /etc/rc.conf. To start KDM on boot, edit /etc/inittab to start in runlevel 5 by default.

# Boot to X11
id:5:initdefault:

Then enable KDM to start at boot time.

x:5:respawn:/usr/bin/kdm -nodaemon

Make sure the line with kdm is uncommented and all the other lines are commented out.

I have been running it this way for a day or two and it seems to have solved the high cpu usage issue. One other user on the post above has confirmed that this fixes it as well.

Please review the bug and workaround. If this is more of a KDE bug rather than Arch bug, please let me know and I'll open up the bug with KDE.

Thanks.
This task depends upon

Closed by  Jan de Groot (JGC)
Friday, 13 November 2009, 21:43 GMT
Reason for closing:  Duplicate
Additional comments about closing:  See  bug 15881 .
Comment by Pierre Schmitz (Pierre) - Saturday, 24 October 2009, 18:52 GMT
I'd like to remove the daemon script but people complained about it.
Comment by Tom (t0mmyw) - Saturday, 24 October 2009, 20:24 GMT
I think since it's causing excessive cpu usage, people might be willing to get over what ever reasons they had for not removing the daemon. I admit I'm very new to the Arch way of doing things but I'm pretty sure the proper way of starting KDM is via inittab anyway.
Comment by Jan de Groot (JGC) - Sunday, 25 October 2009, 00:03 GMT
I think this is just a race condition. Starting kdm from DAEMONS or from inittab shouldn't make any difference, however, with recent updates to X or the kernel, it seems X doesn't always take tty7 anymore. It just takes the first tty device possible.

What happens is this:
inittab method: init starts 6 gettys from level 2, then switches to 5 and starts kdm/gdm
DAEMONS with gdm/kdm at the end: init starts all daemons from rc.conf, and while kdm/gdm is initializing, it spawns 6 gettys, which grab the lock before gdm/kdm can do this -> X is launched on tty7
DAEMONS with gdm/kdm in the middle or in between: init starts kdm/gdm, gdm/kdm takes whatever tty it wants, and init starts 6 gettys, with one that has a conflict with the running X process. This causes high CPU load or even crashes.

Loading...