Bug 252509

Summary: There already appears to be an X server running on display :0
Product: [openSUSE] openSUSE 10.3 Reporter: Casual J. Programmer <casualprogrammer>
Component: XglAssignee: David Reveman <dreveman>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: captain.magnus, eich, sndirsch
Version: Alpha 1plus   
Target Milestone: ---   
Hardware: i686   
OS: SUSE Other   
Whiteboard:
Found By: Beta-Customer Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: output of ps aux before answering "No"
Output from cat /var/log/messages | grep gdm
As requested
Previous xorg.0.log
/var/log/Xorg.0.log
/var/log/Xorg.0.log

Description Casual J. Programmer 2007-03-08 09:44:48 UTC
On the FSC Amilo Si1520 Notebook running openSUSE 10.3 alpha recently on every other boot the boot sequence just stops with a login prompt.

When pressing CTL+ALT+F8 there is a somewhat distorted message box stating:

There already appears to be an X server running on display :0, etc, etc

Answering "No" then starts the X-Server without further problemns
Comment 1 Stefan Dirsch 2007-03-08 09:54:32 UTC
Could you attach the output of "ps aux" right after reboot before answering "No"?
Comment 2 Casual J. Programmer 2007-03-08 10:39:57 UTC
Created attachment 123131 [details]
output of ps aux before answering "No"
Comment 3 Stefan Dirsch 2007-03-08 10:50:40 UTC
This looks like a gdm bug to me. Could you verify this by setting DISPLAYMANAGER to "xdm" in /etc/sysconfig/displaymanager and reboot afterwards? Thanks.
Comment 4 Casual J. Programmer 2007-03-08 11:47:40 UTC
Done. Seems to work nicely, only the login screen looks somewhat weird.
Comment 5 Stefan Dirsch 2007-03-08 13:41:22 UTC
What do you mean with somewhat weird Graphics distortion?
Comment 6 Stefan Dirsch 2007-03-08 13:48:48 UTC
What do you mean with "somewhat weird"? Graphics distortion? Could you attach
a screenshot?

  XAUTHORITY=/var/lib/xdm/authdir/authfiles/<press_tab> -window root xdm.png

Install package ImageMagick before.
Comment 7 Casual J. Programmer 2007-03-08 14:39:16 UTC
sorry, nothing serious, just the screen is all grey and there is a status window in the bottom left corner. After logging in everything appears as usual.
Comment 8 Stefan Dirsch 2007-03-08 14:53:21 UTC
Well, that's xdm. It's different to kdm/gdm. :-) Reassigning since it's a gdm bug.
Comment 9 JP Rosevear 2007-03-20 21:45:05 UTC
HPJ, wasn't there a bug like this released as a maintenance update for SLED 10?
Comment 10 Hans Petter Jansson 2007-03-20 22:11:43 UTC
That was bug #206804, for which the fix is in SP1. It was not shipped as a maintenance update. The patch does not apply to 10.3 because the code has since been rewritten upstream.

I'll see if this is the same bug, and if porting the patch would help.
Comment 11 Hans Petter Jansson 2007-03-21 03:01:14 UTC
Based on code forensics, the GDM in OpenSUSE 10.3 seems to have the same problem. I've ported the patch from SLE10-SP1, but I'd love a couple of test runs before I submit it. You'll find test packages at:

http://hp.cl.no/dist/gdm-252509/

Please choose the correct package for your platform, install it (you may have to use --force), and try to trigger the bug a couple of times.
Comment 12 Casual J. Programmer 2007-03-21 08:13:22 UTC
OK, it needed --force to install.

After installation the error occurred on the 1st and 2nd boot, this time it just stays in TTY1, you need to ALT+CTL+F8 to get to see the message.

Attempt 3 to 9 booted straight to GDM, attempt 10 failed again, which led me to add another 10 cycles. They all went through to GDM.

The average cycle time was 2':45", 0:35" for shutting down, 2':10" for coming up.

I used gdm-2.17.7-2.i586.rpm on an FSC Amilo Si1520 running openSuSE 10.3 alpha2plus.

Comment 13 Hans Petter Jansson 2007-03-21 22:32:36 UTC
This bug is probably different from bug 206804, then. I'll submit the ported patch to 10.3 anyway.

When it fails, do you get any interesting messages from gdm in /var/log/messages?
Comment 14 Hans Petter Jansson 2007-03-21 22:57:07 UTC
Also, can you attach the /var/log/Xorg.0.log resulting from a failed gdm init?
Comment 15 Casual J. Programmer 2007-03-21 23:14:49 UTC
Created attachment 125843 [details]
Output from cat /var/log/messages | grep gdm
Comment 16 Casual J. Programmer 2007-03-21 23:17:24 UTC
Created attachment 125844 [details]
As requested
Comment 17 Casual J. Programmer 2007-03-21 23:18:11 UTC
Created attachment 125845 [details]
Previous xorg.0.log
Comment 18 Casual J. Programmer 2007-04-09 22:58:05 UTC
This happens more frequently again after yesterdays update, dmesg doesn't show anything about gdm. I'll attach an actual xorg.0.log
Comment 19 Casual J. Programmer 2007-04-09 22:59:08 UTC
Created attachment 129911 [details]
/var/log/Xorg.0.log
Comment 20 Hans Petter Jansson 2007-04-10 01:21:20 UTC
I don't see anything suspicious in the X log, but maybe a trained eye will. What say you, Mr. Dirsch?
Comment 21 Stefan Dirsch 2007-04-10 04:15:32 UTC
X.Org logfile looks fine to me.
Comment 22 Hans Petter Jansson 2007-04-13 19:49:53 UTC
I'm going back to the code to see exactly where it fails, or put in some debug output to pin it down if necessary.
Comment 23 Casual J. Programmer 2007-05-08 07:35:15 UTC
This is now worse, since yesterdays update ( tty1 greets me with Welcome to openSUSE 10.3 (alpha4) Kernel 2.6.21-3-default ), gdm is 2.18.1-9, xorg-x11 is 7.2-68

After booting tty1 is displayed with login prompt.

CTL+ALT+F7 / CTL+ALT+F8 both show blank screen.

Logging in and issuing 

ps -A | grep gdm

shows two instances each of gdm and gdmopen.

issuing init 3 then init 5 doesn't change that.

Killing the gdm with the lowest pid ( oldest ) makes all disappear, starting gdm afterwards results in "there appears ..."

Booting afresh and killing first the gdm with the highest pid ( youngest ) then the remaining one, then running gdm will finally start the x-server.



Comment 24 Casual J. Programmer 2007-05-08 07:36:42 UTC
Created attachment 138044 [details]
/var/log/Xorg.0.log
Comment 25 Casual J. Programmer 2007-05-08 16:06:53 UTC
When turning off Xgl ( Desktop effects ) it's back to normal.

I.e. yast2 sysconfig setting /etc/sysconfig/displaymanager 

DISPLAYMANAGER_XSERVER to Xorg from Xgl

Probably the same as disabling Desktop Effects from "Control Center/Desktop Effects" where it states:

"Your graphics card is not known to be supported by Xgl. However, it does appear to support 3D acceleration.

To enable Xgl, press "Enable Desktop Effects" below. This will log you out and return you to the login screen.

If the login screen does not come back up, you will need to disable Xgl from the command line by logging in as root and running:

gnome-xgl-switch --disable-xgl

If you are having problems configuring Desktop Effects, you can click the "Help" button below to visit the troubleshooting page on the openSUSE wiki for advice."

While the Desktop Effects seem to work, the start behaviour is as comment #23 when enabled.
Comment 26 Stefan Dirsch 2007-05-09 12:39:07 UTC
*** Bug 263147 has been marked as a duplicate of this bug. ***
Comment 27 Casual J. Programmer 2007-05-10 15:12:04 UTC
Since trying several features in KDE, I find that the behaviour from Bug 263147 ( system freezes on logout ) is occuring here too.
Comment 28 Casual J. Programmer 2007-05-10 15:14:36 UTC
OK, KDE seems to use GDM as well:
cjp@workstation6l:~> ps -A | grep gdm
 4162 ?        00:00:00 gdm
 4337 ?        00:00:00 gdm

Comment 29 Stefan Dirsch 2007-05-12 10:28:13 UTC
Egbert, JFYI. Since Matthias or me is in Cc of this bugreport or the reported itself, it might be interesting for you as well.
Comment 30 Stefan Dirsch 2007-05-12 10:42:28 UTC
JFYI, Matthias. This is a bugreport, which is assigned to Egbert/me or with Egbert/me in CC or reported by Egbert/me.
Comment 31 Casual J. Programmer 2007-05-13 15:37:47 UTC
You might want to check out https://bugs.freedesktop.org/show_bug.cgi?id=10768 ( debian ) and  https://bugs.freedesktop.org/show_bug.cgi?id=10124 ( gentoo ) as well.
Comment 32 Matthias Hopf 2007-05-14 17:26:47 UTC
Could you please check kdm, whether it has the same behavior? (Edit /etc/sysconfig/displaymanager for that, also kdm has to be installed, of course).

It could well be, that gdm uses a different technique for checking whether X startup is completed than the official one (waiting for SIGUSR1). In that case, Xgl probably doesn't support this technique, and this should be fixed in gdm. I know that Xgl *does* support the SIGUSR1 method.
Comment 34 Matthias Hopf 2007-05-15 12:22:52 UTC
I just remembered there was something in kdm - which is fixed now AFAIK.

As this only happens with Xgl, it is either startup detection, or shutdown doesn't work correctly. It could well be that Xgl doesn't wait for Xorg finishing during shutdown. Adding David to CC.
Comment 35 Matthias Hopf 2007-05-15 12:24:33 UTC
Instead of waiting for Xorg to shut down, Xgl could also loop/wait for Xorg to come up during startup. That might be more stable, as Xgl simply cannot react (and wait) if it is killed e.g. with SIGKILL.

Just an idea.
Comment 37 Magnus Boman 2008-03-22 09:08:32 UTC
Moving to Xgl component and reassigning.
Comment 38 Stefan Dirsch 2008-04-22 07:48:29 UTC
Is this still an issue with openSUSE 11.0 >= Beta1?
Comment 39 Casual J. Programmer 2008-04-28 09:36:38 UTC
Not sure about this one. It happened only occasionally in the past, I haven't seen it since Beta1 & upgrade from factory. Might as well close, I will reopen if it shows up again.
Comment 40 Stefan Dirsch 2008-04-28 09:42:04 UTC
Ok.