The xdm stop script returns a failure unless it actually kills the X process itself. This means that if X fails on its own, ie, through the nvidia drivers not having been refreshed after a kernel upgrade, or you stuff up the config file, then you cannot restart the xdm service without first hacking the script or restarting the computer. If you try xdm start, you get "xdm already started" If you try xdm stop, you get "failed to stop service" If you try xdm restart, you get "failed to stop service" - and it doesn't try to start again. This can be worked around by hacking the script so that retval is always set to 0. Is there a better fix for this? It occurs to me that after running the stop script, provided X actually is stopped, then it was successful, regardless of whether the script actually killed it or not. Or maybe the xdm-start needs to work out whether it's already started in some other way. Reproducible: Always Steps to Reproduce: 1.Stop xdm 2.Stuff up the XF86Config file by giving the wrong driver name for your video card 3.Start xdm - it should fail 4.Fix the XF86Config file, check it works with startx, then make sure you exit X. 5.Try to start xdm again, it will fail nomatter which command you try. Actual Results: Could not start xdm due to it already thinking it was started. Could not stop xdm due to it already being stopped. Expected Results: xdm should have restarted correctly.
Try /etc/init.d/xdm zap, to fix failed starts.