kdm fails to start/restart (but gdm does properly) in kubuntu karmic 64 bits and nvidia driver 185 -- Solved!

Bug #477066 reported by avlas
34
This bug affects 5 people
Affects Status Importance Assigned to Milestone
nvidia-graphics-drivers-180 (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: kdm

Most of the times kdm crashes when starting and always when trying to restart. I found a 'workaround' using gdm instead, which does not have the problem at all (that is the reason why I know it is an issue with kdm, at least with nvidia driver 185 and kubuntu karmic 64 bits), but I would prefer not to have to install that many gnome packages to get kde working.

Revision history for this message
avlas (avlas) wrote :

I forgot to mention that startx also works.

Revision history for this message
avlas (avlas) wrote :
Revision history for this message
avlas (avlas) wrote :
Revision history for this message
avlas (avlas) wrote :
Revision history for this message
Jonathan Thomas (echidnaman) wrote :

X is crashing here, making this a driver issue.

affects: kdebase-workspace (Ubuntu) → nvidia-graphics-drivers-180 (Ubuntu)
Revision history for this message
avlas (avlas) wrote :

Hi Jonathan,
what I cannot understand if it is an issue with the nvidia driver is why then it is only crashing under kdm and never under gdm, isn't it weird? Anyway, if I can do something more to help fixing this bug I will be happy to do it, please let me now.
on the other hand, as I have nvidia driver 185 in my computer, shouldn't it be more appropriate to put nvidia driver 185 than 180?
Thanks for your feedback!

Revision history for this message
ChaosEagle (chaosspawn23) wrote :

I have the same problem, it seems happen with nvidia driver 180 and even the latest self-compiled driver. I suspected that it might be upgrade-related, though, as I had kubuntu 9.04 installed earlier (where KDM worked flawlessly with any nvidia driver) and upgraded it through update-manager when karmic was released.
Is there anything I can contribute to help locate the cause of this problem?

Revision history for this message
Jonathan Thomas (echidnaman) wrote :

X crashes can only be triggered either by bugs in the driver or X Server itself. KDM just happens to do things differently enough to cause the driver to go down a buggy codepath it contains. There's really nothing we can do from the KDM-side of things.

Unfortunately since the nvidia drivers are closed-source, there's not much we as K/Ubuntu developers can do to help things there. You must throw yourselves to the mercies of the nvidia developers.

Revision history for this message
Andreas Jellinghaus (tolonuga) wrote :

same problem here: kubuntu karmic with 2.6.31-15 and nvidia 185 (current packages).
going back to 2.6.31-14 kernel solved the problem for me.

I debugged the issue with strace: kdm doesn't crash, nor does the xserver. the problem
is that X does open("/dev/nvidia0") and that takes about 15 seconds for some reason.
kdm then thinks "starting X server takes too long, something must be wrong" and terminates
the X server (and tries to start a failsafe one).

when you look at the laptop screen (my case: lenovo T61 with nvs 140 quadro chip), the
screen goes black when X is started, and it takes maybe 10 seconds till the nvidia logo
appears. normaly the nvidia logo appears within a few seconds.

in syslog you can see these messages:
Nov 30 15:32:12 yomigaeri kdm[6476]: X server startup timeout, terminating
Nov 30 15:32:15 yomigaeri kdm[6476]: X server died during startup
Nov 30 15:32:15 yomigaeri kdm[6476]: Failed to start X server. Starting failsafe X server.

so you know kdm stopped X server because it took too long to start. in my case X was started
15:31:56, and in strace there was a gap from :57 to :10 or so when open("/dev/nvidia0") was done.

the kernel/dmesg doesn't have any error message from nvidia driver or similar.

Revision history for this message
jth (jth) wrote :

Hi
I got the same thing, slow start of X with nvidia causing kdm to abort the start of X.
Blinked screen many times and failed to start X and sometimes I had to try up to ten or more times to get into grapic mode.

I tried different kernels .28 .31-14 .31-15 and nvidia drivers 180 185 and 190 until I found this.

Making the timeout a bit longer in kdm make it work fine.
I found this from Daniel here: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=524751

To resolve the problem change or add in the X-*-Core section in /etc/kde4/kdm/kdmrc
    [X-*-Core]
    ServerTimeout=120

Hope it helps.
--
Johan T
Falun Sweden

Revision history for this message
avlas (avlas) wrote :

It worked like a charm!

Thanks a lot, I habe been suffering this annoying behavior for very long time...

Changed in nvidia-graphics-drivers-180 (Ubuntu):
status: New → Fix Committed
Revision history for this message
Bruno Bigras (brunoqc) wrote :

Why is it "Fix Committed" for nvidia-graphics-drivers-180 is the change seems to be needed in the kdm package?

Is there an updated package?

Revision history for this message
avlas (avlas) wrote :

Sorry, there is not any updated package to fix this issue but the way to solve it by editing /etc/kde4/kdm/kdmrc as jth indicated.

I've changed the bug to new again but I've included solved in the title, I guess it's more appropriate...

summary: kdm fails to start/restart (but gdm does properly) in kubuntu karmic 64
- bits and nvidia driver 185
+ bits and nvidia driver 185 -- Solved!
Changed in nvidia-graphics-drivers-180 (Ubuntu):
status: Fix Committed → New
Revision history for this message
cyril (ivi610) wrote :

it worked for me but for a timeout of 500
By the way, what is the unit of this number?
Moreover, I confirm this affects only kdm but not gdm

Revision history for this message
JungleEditor (subscriptions-ruadesign) wrote :

Hi - Thanks for all the info above. Unfortunately jth's fix #10 didn't work for me.

I have the same symptms - KDE starts sucessfully with gdm as the window manager, but not with kdm :

- 'kdm[5107] X server died during startup' 'Failed to start X server. Starting failsafe X server.'
- I can only start the system by a combination of : killall Xorg / killall kdm
  - kdm then respawns and starts correctly
  - Sometimes I have to log-in remotely to issue these commands as my screens are totally blank on ctrl-alt-F1
- I have dual screen monitor and I sometimes I get the message on the bootup monitor 'wrong screen resolution' (think that is in 'safe mode graphics')
- Also in /etc/kde4/kdm/kdmrc I have three similar sections: [X-*-Core] [X-:0-Core] [X-:*-Core], and I adjusted the first one.
- I also tried timeout of 500, but I still cannot start my system normally
- I have a dual-monitor setup, nvidia graphics card GEforce 9300 GE), nvidia driver: 185.18.36

Any help/guideance/ suggestions to try would be most welcome!.

Revision history for this message
jth (jth) wrote :

Hi JungleEditor
I would first think that you got another problem since you did not get a timeout problem in the kdm log (syslog in most cases) instead you got "died during startup". Maybe it need a second try or something to initialize or something else differs in the startup.

You could try to use a new 190 driver but I am not sure if this would help if not someone else have fond the cause of your particular problem.
sudo add-apt-repository ppa:nvidia-vdpau/ppa
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys CEC06767
sudo apt-get update
sudo apt-get install nvidia-190-modaliases nvidia-glx-190 nvidia-settings

Also I think it is OK to try even a tenfold longer timeout just to test. I would suggest to find a even more similar or create a new bug report on your issue that include the "died during startup" from kdm . Adding all you relevant syslog, kdm and Xorg logs.
I hope this get you further.

Revision history for this message
JungleEditor (subscriptions-ruadesign) wrote :

Hi jth,

Many thanks for your suggestions. I did some further searching and the following Ubuntu forum thread provided a work-around:

http://ubuntuforums.org/showthread.php?t=1343261&page=5
Specificaly doctordruidphd post #47 to disable safe-mode graphics.

Similar discussion here:
https://bugs.launchpad.net/ubuntu/+source/xorg/+bug/491483

Apparently it is a timing/conflict issue and related to gdm/kdm and safe-mode graphics. (so perhaps it is in someway related to this thread too - I'm not sure)

P.S. I have 32bit Ubuntu installed (this thread is for 64 bit) and I have both Gnome and KDE installed

Mark Schmidt (schmidtm)
Changed in nvidia-graphics-drivers-180 (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.