Bug 135071

Summary: rhgb starting 2 X servers causes DRI to be disabled on the real X server
Product: [Fedora] Fedora Reporter: Mickey Stein <yekkim>
Component: xorg-x11Assignee: X/OpenGL Maintenance List <xgl-maint>
Status: CLOSED DUPLICATE QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 3CC: johnp, talbotscott, xgl-maint
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-02-21 19:06:13 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 130887    
Attachments:
Description Flags
diff between old version (first) and current version of xinintrc none

Description Mickey Stein 2004-10-08 13:54:05 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3)
Gecko/20041007 Firefox/0.10

Description of problem:
After updating xinitrc (yum update xinitrc) yesterday, I noticed that
all openGL applications from screensavers to games (UT2003, neverball,
etc) were now about 10% of their original speed. 

After using a combination of glxgears & ps -ef | ** & $top cmds to try
to figure out what was up, I came up with this theory which seems to
respond positively to testing: 

The latest xinitrc (4.0.13-1) appears in the script named
/etc/X11/xinit/xinitrc, to launch Xclients as "clients" of dbus:

*** excerpted from latest xinitrc script ***

        exec $SSH_AGENT $DBUS_LAUNCH $HOME/.Xclients || \
        exec $DBUS_LAUNCH $HOME/.Xclients

*** end of excerpt ***

Prior to this version (>2 days ago) , Xclients was launched with
ssh-agents but not with dbus. 

I tested by using the prior version of xinitrc script from the package
before the current one and all performance is fine without dbus in the
day. 

Dbus is still in use in the system for other purposes that aren't
quite as timeslice-needy as X , but something in the scheme of
prioritizing & message passing looks as if it needs some work if
people are to be able to use OGL apps without trouble using the latest
dbus & xinitrc packages. 

I'm not sure what information to provide, but I'm able to switch
easily from version to version so anything that's needed will be easy
to show output from if asked for. 

Occasionally , using the new scheme with dbus being bandwidth master,
I was able to get a more or less quescent state where X worked fairly
well. It would only happen if I ran the X app as the very first
application when there was >300K free memory so possibly other things
and priorities of (just a guess, kswapd?) are playing into this. But
99% of the time, dbus is a bottleneck, or so it appears. 

Mick


Version-Release number of selected component (if applicable):
dbus-0.22-9, xinitrc-4.0.13-1

How reproducible:
Always

Steps to Reproduce:
1. install latest dbus & xinitrc packages (as of 07Oct04)
2. Startx (which is kde in my case)
3. Run an OGL X11 intensive program and check the performance. 
    

Actual Results:  OGL apps like UT2003 & Pipes screensaver & glxgears
ran at ~10-20% of their original performance. 

Expected Results:  I expected OGL apps to run with good performance as
usual.

Additional info:

My system is all 100% latest development / rawhide.
Its on an nf7 abit nforce2 based mobo with a 2400+ athlon xp + 512mb
My desktop of the moment is KDE

Comment 1 John (J5) Palmieri 2004-10-08 14:17:43 UTC
DBus has been in xinitrc since August:

* Wed Aug 25 2004 Colin Walters <walters> 4.0.3-1
- Add DBus session to Xsession, xinitrc

All it does is start dbus, set an enviornment variable so apps can
find the session bus and then spawns the session.

CC'ing Mike Harris on this.  Mike, you made the latest changes in
xinitrc.  Can you think of a reason Mickey might be seeing this?

Comment 2 Scott Talbot 2004-10-08 14:27:01 UTC
*** Bug 135075 has been marked as a duplicate of this bug. ***

Comment 3 John (J5) Palmieri 2004-10-08 14:37:54 UTC
Mickey and Scott can you take the DBUS stuff out of the xinitrc and
see if things speed up?  If not then it could be other issues.

Comment 4 Mickey Stein 2004-10-08 15:25:03 UTC
John P,

I removed the DBUS references from xinitrc (new vers), and it speeds
things up to "normal". I'm sure you know best when dbus went into
xinitrc, but perhaps its something to do with how dbus itself is
working. I recall also updating dbus so its a somewhat uncontrolled
environment here. The only thing I'm sure of is that all yum installed
packages on my box are up to date insofar as rawhide (dev tree) goes. 

When I diff xinitrc (new) with xinitrc from the prior package, I only
see the DBUS parameter on the start line in the newer package,
although there's other references to DBUS in both. I'd attach them
(and will if requested) but I suppose this is something you've already
checked out and have access too as well. 

By the way: Does it make sense to have two simultaneous processes (the
DBUS + Xclients & the ssh-* + Xclients ) running? This is what happens
with the latest version and is easily seen in the latest copy of
xinitrc. I can only recall ever seeing one before this (the ssh one).

Thanks, 

Mick


Comment 5 John (J5) Palmieri 2004-10-08 15:46:19 UTC
They are needed just to set the eviornment variables for the entire
session.  Can you post the diff from your two versions.  I just want
to check them against mine.  Last changes I made to dbus were to NULL
out some variables when freed and to change the dbus activation code
to look in /usr/shared instead of /usr/lib.

Comment 6 Mickey Stein 2004-10-08 16:13:24 UTC
Created attachment 104946 [details]
diff between old version (first) and current version of xinintrc

One other note is that I needed to change the following line to include the
path:

----
# Xsession and xinitrc scripts which has been factored out to avoid duplication

. /etc/X11/xinit/xinitrc-common
---

because it failed to find the *common file. Without changing it I couldn't run
startx and have X run without an error.

Mick

Comment 7 John (J5) Palmieri 2004-10-13 19:17:39 UTC
I have tried to duplicate what you are seeing and glxgears seems to
run at the same speed with or without dbus in the session.  

Comment 8 Scott Talbot 2004-10-14 00:51:32 UTC
By closing this are you saying that it is ok for GL screensavers to be
running at 1.7 frames per second, or that you do not see them running
slowly?

Honestly, I did not try to duplicate Mick's results, 'cause I was a
bit lost in what he was saying he changed, so do I need to file
another bug? perhaps this is an xorg problem with the GL mesa libs?

Comment 9 Mike A. Harris 2004-10-14 05:42:32 UTC
Scott:  I can't speak for John, but most likely he attempted to
reproduce it and wasn't able to,  and meant to close the bug
as WORKSFORME but chose NOTABUG by accident.  That's just a
personal assumption though.

I think what you are encountering here is not an xinitrc nor
dbus bug but rather an rhgb bug.  rhgb starts up an X server
for graphical boot, and then it starts up a second X server
which is the real X server.  The problem is, in the past this
was done sequentially and things "just worked", but now in order
to eliminate the 1-5 second flicker to text mode and back between
the 2 X servers, rhgb starts the second server and waits for
it to start up before switching.  This causes 2 X servers to
both be running simultaneously.

Because of this, the first X server gets DRI support, but the
second one gets no DRI support because only one X server can
have DRI if multiple servers are running.

The result of this, is that users essentially lose 3D acceleration
in rawhide right now.  We are currently exploring how to fix this,
but for now, users can simply disable rhgb by doing:

rpm -e rhgb

or modifying their grub.conf

Hope this helps.


Comment 10 Scott Talbot 2004-10-14 07:20:03 UTC
That was it!
You know I don't have any idea why I ever use rhgb, I always select to
show details... Maybe just to see what it's breaking.

Thanks mike

Comment 11 John (J5) Palmieri 2004-10-14 12:14:36 UTC
For the record, I can't remeber closing the bug, just posting a quick
comment.  Sorry for that but it looks like it got resolved.  Thanks.

Comment 12 Mickey Stein 2004-10-14 14:30:15 UTC
Sorry, I was away for work, not paying attention here, but while I
could duplicate the bug, I used dbus-monitor (--session and --system)
to no real avail. A few errors that I know weren't related, but
nothing of interest. 

I think my initial take on the problem was incorrect, and will report
back after installing today's rawhide. It's probably right that this
version of the bug be closed. 

The closest I've come to finding an actual cause is realizing that
this only happens when another X11 app is running (like firefox), and
is intermittent, but I'm trying to cross-reference pmap -x's of both
and figure out what perhaps changed there. 

Thanks, sorry for the mis-reported bug.

Comment 13 Kristian Høgsberg 2004-10-15 18:09:41 UTC

*** This bug has been marked as a duplicate of 135209 ***

Comment 14 Scott Talbot 2004-10-16 18:55:41 UTC
rhgb-0.14.1-1 appears to have fixed the problem on my box. 

Comment 15 Red Hat Bugzilla 2006-02-21 19:06:13 UTC
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.