PDA

View Full Version : Two X-Servers?


Zhick
06-13-2008, 12:45 PM
I'm surprised there's not already a thread about this in the forum...

When I'm using fglrx two X-Servers are started which both consume the same amount of memory, though one of them seems to be doing nothing. Killing the second one (higher Pid) does'nt cause any problems, so I wonder why it's started? I've only got one Display, so I have no use for the second X Server. Googling only brought up this (http://lists.opensuse.org/opensuse/2007-05/msg00741.html).
So is this normal behaviour (and is this going to be fixed?) or is there something wrong with my xorg.conf (http://pastebin.com/m571a94a7)?

enzobelmont
06-13-2008, 01:31 PM
same behavior here!! WTF!

bridgman
06-13-2008, 03:20 PM
I didn't think we supported multiple X servers today. We do support multiple screens with a single X server -- I think one of our guys called it "Big Desktop".

Zhick
06-13-2008, 04:12 PM
Well, what ever that second X Server is started for, I don't want/need it and it should'nt be started in the first place. I dunno how common this is, but I'm obviously not the only one who's experiencing this.
Edit: Btw, when I'm using the radeon-driver there's only one X server running.

Dandel
06-13-2008, 04:15 PM
I didn't think we supported multiple X servers today. We do support multiple screens with a single X server -- I think one of our guys called it "Big Desktop".

this actually seems to be the default behavior of ati's driver since back at 8.40.x series if i recall properly... i always wound up having 2 xservers running after i installed the ati driver.

Vighy
06-13-2008, 04:40 PM
I didn't think we supported multiple X servers today. We do support multiple screens with a single X server -- I think one of our guys called it "Big Desktop".

Hey! bridgman! :-P please, don't make fun of us! we have this issue, it ain't funny! :-P :-D

well it's a bit funny... but i'd like it to be solved :-P i don't think it's more than trivial. ain't it?

bridgman
06-13-2008, 09:45 PM
OK, I get it. Sorry, I thought you were deliberately starting multiple X servers (some drivers like that kind of thing).

Can someone pls post an x.conf file so I know how this is happening ?

Zhick
06-13-2008, 09:55 PM
There's a a link to my xorg.conf in my first post.
Anyway, here it,s again. (http://pastebin.com/m571a94a7) :)

oblivious_maximus
06-14-2008, 01:00 AM
Is fglrx a driver for the X Window System? If so then why doesn't it support multiple X Servers like the X Window System does?

Dandel
06-14-2008, 05:52 AM
Is fglrx a driver for the X Window System? If so then why doesn't it support multiple X Servers like the X Window System does?


The issue is that it does support multiple servers, however the problem is that just by virtue of installing and running the driver you wind up with 2 X Servers all the time, even when you didn't intend to.

adamk
06-14-2008, 07:59 AM
This is very odd. Are you guys sure it's not something your distribution is doing?

I've used fglrx 8.40 and higher on both Ubuntu Gutsy, Hardy, and opensuse 10.2 and have never seen this.

Adam

Zhick
06-14-2008, 08:45 AM
Since when I'm replacing Driver "fglrx" with "radeon" there's only one X Server beeing started I'm pretty sure it's got something to do with fglrx.

adamk
06-14-2008, 09:01 AM
What's the output of 'ps ax | grep Xorg' when you have both x servers running?

Adam

Zhick
06-14-2008, 09:12 AM
What's the output of 'ps ax | grep Xorg' when you have both x servers running?

Adam

7182 pts/1 S+ 0:00 grep --colour=auto Xorg
I guess this is quite meaningless as the grep only finds itself.

maybe a ps ax | grep /usr/bin/X would be more useful?
5405 tty7 Ss+ 7:50 /usr/bin/X -br -novtswitch -nolisten tcp :0 vt7 -auth /var/run/xauth/A:0-NziwZT
5472 tty7 S+ 0:00 /usr/bin/X -br -novtswitch -nolisten tcp :0 vt7 -auth /var/run/xauth/A:0-NziwZT
7208 pts/1 S+ 0:00 grep --colour=auto /usr/bin/X

biasquez
06-14-2008, 09:25 AM
i have some bug using fglrx instead of radeon driver. i'm using ubuntu hardy.

Porter
06-14-2008, 11:12 AM
maybe a ps ax | grep /usr/bin/X would be more useful?
I don't have two X servers running... I'm using Ubuntu 8.04 and Catalyst 8.5.

Odd, maybe it's a distribution-specific thing?

Results from mine:
5779 tty7 Ss+ 8:02 /usr/bin/X :0 -br -audit 0 -auth /var/lib/gdm/:0.Xauth -nolisten tcp vt7
28336 pts/0 R+ 0:00 grep /usr/bin/X




[edit] I'M COMPLETELY WRONG. DISREGARD THE ABOVE. I DO HAVE TWO INSTANCES OF X RUNNING. ID-10-T ERROR ON THE ABOVE POST.

NeoBrain
06-14-2008, 12:02 PM
Just wanted to confirm that I have the same problem using Gentoo and Fedora 8.
Very nasty indeed, especially when I see the memory consumption of both servers (70 MB!).

hoho
06-14-2008, 12:18 PM
Archlinux here, also 2 identical X processes running.

Vighy
06-14-2008, 12:49 PM
what surprises me, is that this issue surprises!

it's much that this is a known issue... and what surprises me even more, is that at ATi, they didn't know it!!! :D

but look, what top says using 'M':

top - 18:48:32 up 2:33, 0 users, load average: 0.19, 0.12, 0.07
Tasks: 98 total, 2 running, 96 sleeping, 0 stopped, 0 zombie
Cpu(s): 8.3%us, 1.9%sy, 0.0%ni, 89.2%id, 0.0%wa, 0.3%hi, 0.2%si, 0.0%st
Mem: 2058348k total, 770484k used, 1287864k free, 70444k buffers
Swap: 4192924k total, 0k used, 4192924k free, 318472k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
3150 ben 20 0 139m 51m 5604 R 1 2.6 1:51.83 wish
2098 root 20 0 201m 48m 16m S 11 2.4 3:50.39 X
2269 root 20 0 201m 48m 16m S 0 2.4 0:00.00 X
16145 ben 20 0 138m 44m 15m S 0 2.2 0:07.78 firefox-bin
2282 ben 20 0 355m 37m 16m S 9 1.8 7:14.88 enlightenment
12980 ben 20 0 110m 36m 5288 S 1 1.8 0:45.42 wish

nice, ain't it? :-)

bridgman
06-14-2008, 01:06 PM
Interesting. I think there is a bugzilla ticket open on this already bug didn't realize how many people are seeing it.

OK, looks like #702 - would you folks be able to add your system specifics to the ticket ?

http://ati.cchtml.com/show_bug.cgi?id=702

NeoBrain
06-14-2008, 01:06 PM
what surprises me, is that this issue surprises!

it's much that this is a known issue... and what surprises me even more, is that at ATi, they didn't know it!!! :D

(...)

nice, ain't it? :-)

That's how we love it - Eating up memory and doing nothing :D
However, how do you know that ATI doesn't know about it?

EDIT: #22 says it all ;-)

bridgman
06-14-2008, 01:07 PM
Hold on Vighy, there's a big difference between "ATI didn't know" and "bridgman didn't know". The second one happens all the time :D

This seems like one of those things which happens on some systems and doesn't happen on others. If we can get more info about the systems where it *does* happen then we can start to see patterns and have a better chance of reproducing it on one of *our* systems so we can do something about it.

d2kx
06-14-2008, 01:27 PM
I had this issue ever since I ran fglrx, for 2 years...

AMD Radeon X1900XT 512

I don't think more information is required as I had plenty of different configuration since those two years and it happened with all of them.

NeoBrain
06-14-2008, 01:29 PM
This seems like one of those things which happens on some systems and doesn't happen on others. If we can get more info about the systems where it *does* happen then we can start to see patterns and have a better chance of reproducing it on one of *our* systems so we can do something about it.

Okay, let's see then...
Using
an AMD Athlon XP 2400+
512 MB RAM
an Sapphire ATI Radeon X1600 Pro 512 MB (AGP)
an ASRock Motherboard (don't know model number)
256 MB AGPGART size
Fedora 8: kernel 2.6.24, Xorg 7.2/XServer 1.3, KDE 4.0.4
AIGLX & Composite enabled
Catalyst 8.4 (8.5 has too much troubles recognizing my monitor and can't start a 3D enabled X server on another VT)

Silent Storm
06-14-2008, 03:27 PM
For the guys thinking that it's distribution specific, I'm the guy who reported that bug 1 year ago. I'm currently using the same installation (debian testing) with a "green company" card and the second X has gone away.

Also, suse guys like to patch their things, so they can be ironed this bug by patching X. Suse was one of the rare distros that cannot be run with a stock kernel...

domi
06-16-2008, 04:24 AM
Interesting. I think there is a bugzilla ticket open on this already bug didn't realize how many people are seeing it.

OK, looks like #702 - would you folks be able to add your system specifics to the ticket ?

http://ati.cchtml.com/show_bug.cgi?id=702

It may be interesting to mention also how you did install fglrx. With ATI installer, packages produced by ATI installer or your distribution's packages ?

HTH

hehe2
06-16-2008, 06:32 AM
Hey,

I wondered the hell why I was "topping" two X servers ... I tought that may be usefull for ATI drivers to work like this, something related to crossfire to come ...

Anyway, if it's useless, I'll kill the idling X server to get memory back :)

Here's my config :
------------------

Slackware 10.2 (32 bit ARCH)
Kernel 2.6.24.7
Ati drivers 8.4 (using ATI INSTALLER)
X org 7.3

I hope ATI will improve their linux support quickly ...

Zhick
06-16-2008, 09:07 AM
Well I installed the Drivers via Portage / a Gentoo-Ebuild, which is probably almost the same as using the ATi Installer (not sure about that though).

hvbakel
06-20-2008, 03:14 PM
Tried the ubuntu stock driver and also the catalyst 8.6 installer, both have the same effect. Never had any problems with the ubuntu feisty install, the two processes only showed up after an update to Hardy.

Ubuntu Hardy 8.04
Kernel 2.6.24
Xorg 7.3
ATI mobility Radeon X600
BIOS version: BK-ATI VER008.017M.192.052
Memory Type: DDR SGRAM/SDRAM
Memory Size: 128 Mb
Memory Clock: 263 MHz
Core Clock: 398 MHz
Bus type: PCI Express
Bus setting: x16
Driver version: 8.50.3
OpenGL version: 2.1.7659

Vighy
06-20-2008, 03:27 PM
Tried the ubuntu stock driver and also the catalyst 8.6 installer, both have the same effect. Never had any problems with the ubuntu feisty install, the two processes only showed up after an update to Hardy.


They were already there, maybe you didn't notice.

By the way it's impossible to hope ati will solve a bug just discovered in the subsequent driver for it's model of delivering drivers.
We may expect the fix in the next release or in the one after the next.

Porter
06-23-2008, 08:58 AM
I don't have two X servers running... I'm using Ubuntu 8.04 and Catalyst 8.5.

Odd, maybe it's a distribution-specific thing?

SCRATCH THAT, I'M COMPLETELY WRONG!

Disregard the above post, I do have two instances of X running. I had completely forgotten I had switched to the open source driver to do some testing. ID-10-T error!

Confirmed duplicate X servers running, on Ubuntu 8.04 and Catalyst 8.6. I installed the ATI driver using the traditional buildpkg method.

mtippett
06-23-2008, 11:28 AM
The multiple "X Servers" is really just a thread within the driver. A key indicator of this is memory information being exactly the same.

See the man page for "pthreads" for a confirmation.

higuita
06-25-2008, 09:07 PM
first, i not a specialist in X and fglrx, but i think i know what is this...

if you run a ps xuaf, you will see that the 2º X is started by the first one, the same way as a multi-thread java app starts several javas, but in reality its only one...

i see this 2 X servers as a thread or a shared X. they share the RAM and video ram (by the way, top is very bad to check the X memory usage, it accounts cache, video ram memory, shared libs and other this as X memory, but the reality is not that number, its alot lower)

why do it start 2 X and radeon and vesa only 1 X? easy, vesa and radeon manage the card as one, but fglrx manage the card (at least with video dual output or a laptop) like 2 shared cards. fglrx can setup "both cards" in xorg.conf (:0.0 and :0.1), while radeon only via special modes can control both monitors (but just one :0.0) and vesa cant do it independently. but in the end, doesnt matter much, almost all X memory is the card video ram and having both screens controled independently or integrated always use about the same memory, but the dual/shared X is more flexible

for those thinking that they only have one cards, check your lspci and count how much cards yiy really have... out many output connects? (dont forget the external connector in latopt's)

even if you dont have 2 monitors/LCD connected, you still need the 2 X, the 2º is waiting for you to plug something, but is must be ready to detect that, so it must be running (again, it shares almost all code with the first X server)

so dont worry, the X isnt eating that much ram, isnt wasting things, its just shareing resources and using your card

higuita

Vighy
06-26-2008, 10:50 AM
The multiple "X Servers" is really just a thread within the driver. A key indicator of this is memory information being exactly the same.

See the man page for "pthreads" for a confirmation.

mhh so pthreads don't share the same PID?

mtippett
06-26-2008, 12:03 PM
mhh so pthreads don't share the same PID?

I believe that to be the case for both LinuxThreads and NPTL. The key indicator that we are looking at threads is the parent/child relationship as well as 100% matching resource usage.

If the resource usage differs, it is most likely a fork (and consequently a different process).

Regards,

Matthew

Vighy
06-26-2008, 01:07 PM
I believe that to be the case for both LinuxThreads and NPTL. The key indicator that we are looking at threads is the parent/child relationship as well as 100% matching resource usage.

If the resource usage differs, it is most likely a fork (and consequently a different process).

Regards,

Matthew

Well I agree with you that if they have the same amount of memory/resources it's a good sign it's the same process, just splat into two threads.

But if they have 2 different PID it confuses me! since in "top" you can show threads and hide threads... and I see the two X even when I tell him to hide threads (and it does hide them)!

so I can't understand if it's just a different thread implementation or the second X it's not a thread!

as I read there's no clearance in documentation if pthreads use same PID or not!

obviously being threads or not changes the situation dramatically

have you got more info on pthreads behaviour?

Bye :)

DoDoENT
01-01-2009, 12:54 PM
I believe that to be the case for both LinuxThreads and NPTL. The key indicator that we are looking at threads is the parent/child relationship as well as 100% matching resource usage.

If the resource usage differs, it is most likely a fork (and consequently a different process).

Regards,

Matthew

It has to be a fork. Pthreads share the same PID (because pthreads are just threads of one process). I think that these processes use /dev/shm shared memory. If I run 'ipcs -m -p' command in terminal, it prints out a lot of shared memory segments, and if I filter the output by xorg's PID, in my case, 60% of the segments were allocated by the xorg process.

spikethehobbitmage
01-02-2009, 05:54 PM
It has to be a fork. Pthreads share the same PID (because pthreads are just threads of one process). I think that these processes use /dev/shm shared memory. If I run 'ipcs -m -p' command in terminal, it prints out a lot of shared memory segments, and if I filter the output by xorg's PID, in my case, 60% of the segments were allocated by the xorg process.

If it only occurred on kernel 2.4 it would be a thread, because 2.4 gives each thread its own PID. That it happens under 2.6 proves it is a fork.