Xorg fails to start with more than one display adapter

Bug #267241 reported by ijavid
192
This bug affects 14 people
Affects Status Importance Assigned to Milestone
X.Org X server
Fix Released
Medium
Ubuntu
Invalid
Undecided
Unassigned
Intrepid
Invalid
Undecided
Unassigned
Jaunty
Invalid
Undecided
Unassigned
xorg-server (Fedora)
Invalid
Undecided
Unassigned
xorg-server (Ubuntu)
Fix Released
High
Bryce Harrington
Intrepid
Invalid
Undecided
Unassigned
Jaunty
Fix Released
High
Bryce Harrington
xorg-server (openSUSE)
Invalid
Undecided
Unassigned

Bug Description

I wanted to test the new test release of ubuntu on my notebook:

1) I booted with alpha5 LiveCD (amd64)
2) start the LiveCD normaly - stopped somewhere,
so my acpi probelm isn`t solved with new kernel... (the curent ubuntu 8.04 starts up only with acpi=off param)
3) after that i tried to boot with acpi=off param, everything looked OK... but the X server dont load up!
4) tried startx - outputed:

...
Primary device is not PCI
(EE) No device detected.

Fatat server error:
no screens found
-- stopped for few seconds --
giving up.
xinit: Connection refused (errno 111): unable to connect to X server
xinit: No such process (errno 3): server error.

any solution?

my system: ASUS notebook M51Tseries, Turion RM70, ATI Mobility Radeon HD3470
Linux ubuntu 2.6.27-2 x86_64

Related branches

Revision history for this message
ijavid (ijavid) wrote : Re: [intrepid] X11: no device detected

/var/log/Xorg.0.log

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

Thanks for your report.

The relevant part of your log file is:
(!!) More than one possible primary device found
(--) PCI: (0@1:5:0) ATI Technologies Inc RS780M/RS780MN [Radeon HD 3200 Graphics] rev 0, Mem @ 0xc0000000/268435456, 0xfdcf0000/65536, 0xfdb00000/1048576, I/O @ 0x0000b000/256
(--) PCI: (0@2:0:0) ATI Technologies Inc Mobilitiy Radeon HD 3400 Series rev 0, Mem @ 0xd0000000/268435456, 0xfddf0000/65536, I/O @ 0x0000c000/256, BIOS @ 0x????????/131072

You have 2 graphic cards and xorg doesn't know which one to choose as primary adapter. You need to define it in section "Device" of your xorg.conf config file with a line like:
BusID "PCI:02:00:00"

run lspci to find the right pciid.

Changed in xorg:
status: New → Incomplete
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

closing ubuntu task.

Timo Aaltonen (tjaalton)
Changed in xorg:
status: Incomplete → Triaged
Changed in xorg-server:
importance: Undecided → High
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

Please try with the latest updates (or a daily livecd) if it works now.

Changed in xorg-server:
status: Triaged → Incomplete
Revision history for this message
Pierre-Yves Landuré (pierre-yves) wrote :

Using the Intrepid Ibex CD Rom, with last updates, the problem is still present. Attached is the xorg.conf file used (which was working well on Ubuntu 8.04 Hardy Heron), and the Xorg.0.log.

My config is 2 8800 GTX with nvidia-glx-173.

My lspci give me these results:

01:00.0 VGA compatible controller: nVidia Corporation G80 [GeForce 8800 GTX] (rev a2)
0c:00.0 VGA compatible controller: nVidia Corporation G80 [GeForce 8800 GTX] (rev a2)

Changed in xorg-server:
status: Incomplete → Confirmed
Revision history for this message
Pierre-Yves Landuré (pierre-yves) wrote :

To add more precisions to my previous post.

I've installed Intrepid Ibex using the alternate install beta for x86.

My xorg.conf is for 3 screen: 2 21" crt and 1 17" crt. The Driver sections contains BusID values. The xorg.conf was working in Ubuntu 8.04 Hardy Heron.

For X to work, Driver section must contain a BusID section.

Revision history for this message
idamlaj (idamlaj) wrote :

I'm having the same problem using the Kubuntu Intrepid RC1 Installation CD. The (k)ubuntu installer fails to launch (even when vesa safe graphics mode is selected), and I am presented with a black screen (with a blinking cursor).

Switching to a terminal and executing startx yields:
(EE) No device detected.
Fatal server error:
No screens found.

--
System specs:
AMD Phenom X4 9550
AMD 780G Northbridge (Radeon 3200 IGP)
Radeon 3650 Graphics Card
--

Looking at the Xorg log file (attached), the problem seems to be similar to that described by Jean-Baptiste Lallement.

Because this behavior severely affects ubuntu's installation process, it should (IMO) be fixed before release.

Revision history for this message
Pierre-Yves Landuré (pierre-yves) wrote :

For me, bug corrected.

I've used nvidia-settings to create my xorg.conf file, and it is now working. I think that when you have 2 vga devices, you only need to give BusID for the primary one. The BusID of the second one is guessed.

So, i you are encountering problems, Use nvidia-settings to create a valid xorg.conf file and make sure you have a BusID line iin your "device" section.

Revision history for this message
idamlaj (idamlaj) wrote :

For me, this bug occurs during the ubuntu intrepid _installation_. Hence, I cannot use nvidia-settings to correct the problem. This bug should be fixed before release, or some ubuntu users will be unable to go through the installation process.

Revision history for this message
Wilfredo Martínez Parrilla (wmartinez) wrote :

Same problem with Ibex rc live cd. Acer AM5640-U5403A, NVIDIA GeForce 7100/NVIDIA nforce 630i on board graphics card.
Only one graphics card.

Revision history for this message
idamlaj (idamlaj) wrote :

The problem seems to be related to Xorg not deciding correctly between the northbridge's IGP and a dedicated Graphics Card.

Revision history for this message
Wilfredo Martínez Parrilla (wmartinez) wrote :

Are they going to fix it before they release Ibex? If they do not fix the bug...Can I still install in low res and then fix it somehow?

Revision history for this message
Wilfredo Martínez Parrilla (wmartinez) wrote :

Machine: Aspire M5640-U5403A
NVIDIA GeForce 7100/NVIDIA nforce 630i
Ubuntu 8.10 rc livecd
The X server do not start
Here is the Xorg.0.log file

Revision history for this message
Cioccolato (r-e-mi-deactivatedaccount) wrote :

The same...

Mobo: A8N-SLI
NVIDIA GeForce 6600 (2x in SLI)
Ubuntu 8.10 rc livecd
The X server do not start...
:-(

Revision history for this message
idamlaj (idamlaj) wrote :

Looks like this bug won't be fixed for intrepid final. I have a hunch that most users upgraded their existing ubuntu installation instead of doing a clean installation, which is why this bug wasn't spotted earlier.

In any case, I'll test my system with Intrepid-Beta to see if this was a recent regression.

@Wilfredo: You have to use the text based install (ubuntu alternate cd). Even then, there's a chance that Xorg after the system is installed. In that case, you have to go into the Xorg configuration file and specify the PCI-id for your card.

Revision history for this message
In , Timo Aaltonen (tjaalton) wrote :

Forwarded from launchpad:

https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/267241

Basically what happens is that the server fails with:

(EE) No device detected.

when there are more than one display device on the system. Some logfiles:

http://launchpadlibrarian.net/17352098/xorg.log
http://launchpadlibrarian.net/19085483/Xorg.log.fail
http://launchpadlibrarian.net/18024794/Xorg.0.log

Setting the BusID allows it to work. I've requested the people to try without an xorg.conf to see if the different autoconfig-paths have something to do with this..

Revision history for this message
In , Timo Aaltonen (tjaalton) wrote :

I've noticed that on x86 things seem to work just fine:

http://launchpadlibrarian.net/18858927/XorgLog.txt

and all the non-working logs are from x86_64-systems.

So, is this another example of 64bit-unsafeness?

Revision history for this message
In , Timo Aaltonen (tjaalton) wrote :

bah, no.. this is a log from a normal i686 installation:

http://launchpadlibrarian.net/18813910/Xorg.0.log

Revision history for this message
Timo Aaltonen (tjaalton) wrote : Re: [intrepid] X11: no device detected

You can work around the issue by setting BusID in the Driver section. This is a bug in the xserver, and if a patch is found, it could be fixed on an update.

Changed in xorg-server:
status: Confirmed → Triaged
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

just to be sure, please try to start without an xorg.conf.. ie. move it aside and restart gdm/kdm. Does it work then?

Changed in xorg-server:
status: Unknown → Confirmed
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

looks like this is another 64bit-unsafeness issue, since on x86 it should work. Can you verify that by trying out the 32bit livecd of 8.10?

Changed in xorg-server:
assignee: nobody → tjaalton
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

bah, duplicate bug 287994 is on i686, so the theory about affecting only 64bit is not true...

Revision history for this message
sigsfried (mdh502) wrote :

This may be the same thing but since upggrading my brother has not got any GUI.

Revision history for this message
Patrick Schueller (pschuel) wrote :

Tested it again with Kubuntu Intrepid final live CD (64 bit).

Still no graphics, only text console. Adding a BusID parameter in xorg.conf doesn't help. log file and output of lspci and lsmod attached.

System: Asus X56Rseries
Graphics: ATI Mobility Radeon HD 3470

Patrick

Revision history for this message
Patrick Schueller (pschuel) wrote :

Correction: Asus 56T series

Here comes lspci output:

Revision history for this message
Patrick Schueller (pschuel) wrote :

lsmod output:

Revision history for this message
xian (mchugh19) wrote :

I have a simular problem only it seems to be the ati driver that is hosed.

Revision history for this message
xian (mchugh19) wrote :

I have a similar problem only it seems to be the ati driver that is hosed.

Revision history for this message
Roy Kimbrell (roy-kimbrell) wrote :

I have what appears to be the same problem with a Sony Vaio VGN-A270P. It has an ATI Mobility Radeon 9700 chipset. I had upgraded 8.04 (Hardy) to 8.10 (Intrepid) and rebooted. On the reboot, X would not load. Xorg.0.log has toward the end...

drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is -1, (No such device or address)
drmOpenDevice: open result is -1, (No such device or address)
drmOpenDevice: Open failed

Then it gives a backtrace. There is nothing in /dev/dri

Booted the same machine (the Sony Vaio) with the "live CD" 8.10 (Intrepid) alpha disk. It worked. The radeon module was loaded (I used lsmod to check) and /dev/dri/card0 did exist. There seemed to be a few problems with X when trying to switch users, but I didn't play with it enough to determine exactly what the problems were. Perhaps in fixing these problems, something else got broken.

So the point of this is that the radeon modules and the kernel were working in the alpha version but not in the production version.

Revision history for this message
Roy Kimbrell (roy-kimbrell) wrote :

On the Sony Vaiio, the vesa driver does work. In the console (all that works at the moment) I copied /etc/X11/xorg.conf.failsafe over the current xorg.conf file and entered "startx." That brought up Gnome in low resolution mode.

Revision history for this message
Patrick Schueller (pschuel) wrote :

Tested now with live DVD with two other distros...

openSuse 11.1 beta --> same problem (Radeon Mobility HD 3470)
Fedora 10 beta --> live DVD has 1024x768 graphics, installation on harddisk has the problem again

Patrick

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

xian: that's not related, the driver is just crashing for some reason.

Patrick: thanks for testing!

It seems that the BIOS should have some setting for this.. apparently there's some "Vista mode" switch or similar, so you could try changing that.

Revision history for this message
Tom Wick (bigwickster) wrote :

I had this same problem on an Thinkpad T42 (x86) that ran Hardy perfectly. When I did the upgrade to 8.10 my screen resolution was 800x600 and I received a "(EE) No device detected" error.

Since then I have reinstalled (NOT upgraded) from the alternate install CD, and all the hardware was correctly detected this time.
The Thinkpad has a ATI Mobility Radeon 9600 in it.

Hope this helps!

Revision history for this message
Patrick Schueller (pschuel) wrote :

Timo: I just looked at the BIOS settings, but this Asus laptop (X56T) has relatively few BIOS settings, most of which are very basic (boot sequence, time/date, etc.), and none of them seems related to the graphics card.

Patrick

Revision history for this message
Patrick Schueller (pschuel) wrote :

Tom: This is probably not the same problem, as you were able to get 800x600. I just get no X at all, just console login, with all variants: upgrade from Hardy, live CD and fresh hard disk install. Hardy BTW can do something like 800x600 on my machine, but the output looks awful (blurred letters, changing colors etc.)

Patrick

Revision history for this message
Jeremy LaCroix (jlacroix82-deactivatedaccount) wrote : Re: [Bug 267241] Re: [intrepid] X11: no device detected

I can confirm that this is not a bios problem. Previous Ubuntu releases
did not have this problem with the same computers. The problem is that
the PCI:XX:YY:Z line is required in xorg.conf, which it was never
required before. Previously, Xorg would just use whatever video card was
set as default in the BIOS, instead now it doesn't.

Patrick Schueller wrote:
> Tom: This is probably not the same problem, as you were able to get
> 800x600. I just get no X at all, just console login, with all variants:
> upgrade from Hardy, live CD and fresh hard disk install. Hardy BTW can
> do something like 800x600 on my machine, but the output looks awful
> (blurred letters, changing colors etc.)
>
> Patrick
>
>

Revision history for this message
Patrick Schueller (pschuel) wrote : Re: [intrepid] X11: no device detected

Another strange thing: I did one last test now: I installed gOS, which appears to be a Google variant of Ubuntu. This one obviously corresponds to Hardy.

This Hardy variant booted to 1024x768, which is higher than I could get with the original Hardy and much better than the no video with Intrepid. It then offered to install the fglrx driver, and guess what? Now the laptop runs at its native resolution of 1280x800 for the first time :-)

But this is no solution to the bug in Intrepid of course. I will refrain from upgrading for the time being ;-)

Patrick

Revision history for this message
eckerj (joe-jenixstudios) wrote :

Hello,

Just a quick note that I had the same problem with a Hardy to Intrepid upgrade. The X server failed to
start for a number of reasons. The ultimate fix for me was to include "radeon" in the /etc/modules file
and reboot. After that, the video card started showing up in /dev/dri properly and gdm is working now.

-Joe

Revision history for this message
Roy Kimbrell (roy-kimbrell) wrote :

Joe,

This worked like a champ. Wish I'd thought of doing that. Added "radeon" to /etc/modules, took the 'Driver "vesa"' out of /etc/X11/xorg.conf, rebooted, and the high rez Gnome came right up.

This is on a Sony Vaio VGN-A270P with an ATI Mobility Radeon 9700 chipset.

Roy

Revision history for this message
M.Letcher (m-letcher) wrote :

I've been having problems with Intrepid initializing my NVidia-8800-GT. System has a single graphics card with 2 monitors. I realized I had problems after initial clean install last weekend, so I re-installed from liveCD. Used Sys/Admin/HW_Drivers to install 177. No errors reported, but driver doesn't activate on re-boot. The drivers appear to get loaded OK, but then the device which is at PCI:1:0:0 doesn't get initialized. I had similar problems with 173 though didn't collect the log files. Following this my monitors are no longer recognized even after asking 'Monitor Resolution Settings' to re-detect the monitors. Sysinfo also recognizes the card by name but doesn't report a GPU freq or RAM.

NVIDIA UNIX x86 Kernel Module 177.80 Wed Oct 1 14:38:10 PDT 2008
Intrepid Kernel is 2.6.27-7-generic
Xorg Version: unknown (24 October 2008 08:00:16AM) - basic install of Intrepid

lspci
01:00.0 VGA compatible controller: nVidia Corporation GeForce 8800 GT (rev a2)

Here's where it dies from the attached error file.
(**) NVIDIA(0): Enabling RENDER acceleration
(II) NVIDIA(0): Support for GLX with the Damage and Composite X extensions is
(II) NVIDIA(0): enabled.
(EE) NVIDIA(0): Failed to initialize the NVIDIA graphics device PCI:1:0:0.
(EE) NVIDIA(0): Please see the COMMON PROBLEMS section in the README for
(EE) NVIDIA(0): additional information.
(EE) NVIDIA(0): Failed to initialize the NVIDIA graphics device!
(II) UnloadModule: "nvidia"
(II) UnloadModule: "wfb"
(II) UnloadModule: "fb"

Any suggestions appreciated. I'll fool with it for a week removing all the nv-177 stuff. I'm still looking about for the README above.

Revision history for this message
Michael Losonsky (michl) wrote :

Upgraded from Heron to Intrepid via Update Manager and
Intrepid did not recognize graphics card:
ATI Radeon Mobility M6 LY.

So not r300 chip set and also no proprietary drivers in use.
I've run feisty, gibbon, Heron Alpha, Beta, LTS, without
problems.

Had to reinstall Heron, and will not try Intrepid again.

Changed in xorg-server:
status: New → Confirmed
Revision history for this message
djhash (hisham-albeik) wrote :

Hey,

   I've had the same problem on two of my PCs.. one of which had two cards (Radeon X1950XTX and Radeon X1950 Crossfire series) and the other is only a single card (Radeon HD2600).. In both situations I had to revert to tty1 (ctrl+alt+f1) then install xorg-driver-flgrx and run "aticonfig --adapter=all --initialize", then restart gdm. This worked greatly. I even was able to use compiz and it went smoothly.

   If you need any information i'll be glad to provide them.

Thank you
djhash

Revision history for this message
vann (vann) wrote :

All right so along the same lines, I have two Nvidia 7800 graphics cards on a SLI Bridge. I booted up and installed the Intrepid Ibex AMD64 live cd perfectly, it recognized, installed and rebooted using the Nvidia drivers. I started doing the Intrepid system updates and now it boots to a CL. when I login, I try to start x and it says the same as the OP:
...
Primary device is not PCI
(EE) No device detected.

Fatat server error:
no screens found
-- stopped for few seconds --
giving up.
xinit: Connection refused (errno 111): unable to connect to X server
xinit: No such process (errno 3): server error.

It says that verbatim, so I started trying what ya'll suggested (except using the i386 version, I can't). This is concerning because it worked off the live cd but an update prompted it to do this. I don't know what else to try. I know that:

You have 2 graphic cards and xorg doesn't know which one to choose as primary adapter. You need to define it in section "Device" of your xorg.conf config file with a line like:
BusID "PCI:02:00:00"

didnt't work for me so what's next?

Revision history for this message
Ben Alex (ben-alex) wrote :

In addition to the aforementioned BusID directive, I needed to add:

   Driver "ati"

This overcame the "more than one possible primary device found" issue when loading X under the Intrepid Ibex installer.

Bryce Harrington (bryce)
Changed in xorg-server:
status: New → Invalid
status: New → Invalid
Revision history for this message
DeathStrikeVirus (deathstrikevirus) wrote : Re: [intrepid] Xorg fails to start with more than one display adapter

These instructions solved my problem entirely.
I have a similar bug: https://bugs.launchpad.net/ubuntu/+source/xorg/+bug/307073
Though I think mine is SLI related, since Xorg didn't know what to do with two GPUs.

http://ubuntuforums.org/newreply.php?do=newreply&p=6082619
[QUOTE=Cambo;6082619]I was having the same problem of X not starting up after installing Intrepid. (We won't go into the mess that was created trying to upgrade Hardy :/ )

The answer I ended up working out was to add a Busid entry in the Device section of my /etc/X11/xorg.conf file.

To find the correct Busid, I used;

    sudo lspci | grep VGA

The output I got from this was;

    01:00.0 VGA compatible controller: nVidia Corporation G70 [GeForce 7600 GT] (rev a1)
    04:00.0 VGA compatible controller: nVidia Corporation G70 [GeForce 7600 GT] (rev a1)

(Yes, SLI :D )

So, I then edited the Device section of my /etc/X11/xorg.conf to read as follows;

    Section "Device"
 Identifier "Configured Video Device"
 Busid "PCI:1:0:0"
 Driver "nvidia"
    EndSection

A quick;

    sudo service gdm restart

and I was greeted by X running at the maximum resolution of my LCD monitor.

Hope that helps one or two of you.

Cambo[/QUOTE]

Revision history for this message
DeathStrikeVirus (deathstrikevirus) wrote :
Revision history for this message
In , Timo Aaltonen (tjaalton) wrote :

*** Bug 18839 has been marked as a duplicate of this bug. ***

Revision history for this message
dmsuperman (dmsuperman) wrote : Re: [intrepid] Xorg fails to start with more than one display adapter

Just to add, I posted this bug: https://bugs.launchpad.net/ubuntu/+source/xorg/+bug/313938

It was suggested I try my working xorg.conf from my hardy install, and also to specify the BusID of the card.

My working configuration specifies the BusID of the card, and it still won't start, with the same error.

Revision history for this message
In , Pgnet-trash+x11 (pgnet-trash+x11) wrote :

I'm seeing the same "(EE) No device detected" error on an x86_64 with 2 NVIDIA cards -- one on mobo, one on pci.

I'm using a source-built 'nvidia' driver (v180.22).

In my case, setting the BusID, apparently, DOES NOT work.

I've previously posted the details, including logs, on nvnews (nvidia) forum @

 http://www.nvnews.net/vbulletin/showpost.php?p=1900659&postcount=1

Revision history for this message
attikon (attikon) wrote : Re: [intrepid] Xorg fails to start with more than one display adapter

DeathStrikeVirus' solution (2-3 posts above) worked for me (Interpid).

Installed Ubuntu 8.10 on desktop pc with two nvidia 7900gs in sli mode.

System was running ok until I installed the close source nvidia's driver version 177. Upon rebooting gdm was not working. startx was returning error "no screens found". I managed to edit my xorg.conf with vim, saved the file and then restarted gdm and now it's working alright.

Apparently it's an issue when you have more than one gfx cards because the system doesn't know which one to use.

Revision history for this message
In , Bryce Harrington (bryce) wrote :

*** Bug 20225 has been marked as a duplicate of this bug. ***

Revision history for this message
Michael Doube (michael-doube) wrote : Re: [intrepid] Xorg fails to start with more than one display adapter

Jaunty alpha 5 has the same bug: installed today on a Dell Precision T7400 workstation with dual ATi FireGL graphics:
]$ lspci | grep VGA
01:00.0 VGA compatible controller: ATI Technologies Inc R600 [FireGL V7600]
02:00.0 VGA compatible controller: ATI Technologies Inc R600 [FireGL V7600]

Adding
BusID "PCI:01:00:00"
 to the Devices section of xorg.conf and

]$ startx

got me to a graphical installer

Revision history for this message
Bryce Harrington (bryce) wrote :

I've done some analysis into this bug (as well as a number of other related dual-card bugs) this week. This patch changes the behavior such that when it gets into this error condition, rather than giving up and erroring out, it should make X select the card with the highest busid.

The use case I'm imagining here is where a user is having problems with their on-board video and have purchased a second card to override it. Don't know whether that use case is a good match to folks' issues here, so am open to discussion on that.

To make clear, this will *not* make dual-card systems display output on both cards. It will make X pick one card and display output to that, rather than exit with an error message.

I'd hoped to get some testing done myself with this patch this week before posting it, but first I need a system to reproduce the problem, and so far haven't gotten there. I'm going to keep trying next week but figured I ought to post this patch here so folks know where we're at. If anyone else gets a chance to try this patch out on an affected system, I'd love to hear the results if any. In addition to seeing whether it fixes the issue, we need to know if it causes any other regressions.

Revision history for this message
Mark Shuttleworth (sabdfl) wrote : Re: [Fwd: [Bug 267241] Re: [intrepid] Xorg fails to start with more than one display adapter]

Thanks for this work Bryce, I think the two-card scenario is
increasingly common and additional robustness in the face of that will
be appreciated by many users.

Is the choice of the card with the "highest busid" the best we can do?
Can X tell if a display is connected to the card, and if one card has a
display, select that? That would handle the case where someone has dual
cards with some sort of bridge, but only one display connected to one of
the cards.

Another common case is laptops that have a high power and a low power
video chipset, both connected to the same screen. I don't know how X
sees that today, or how it handles it.

Mark

Revision history for this message
Bryce Harrington (bryce) wrote :

On Sat, Mar 07, 2009 at 05:35:25AM +0000, Mark Shuttleworth wrote:
> Thanks for this work Bryce, I think the two-card scenario is
> increasingly common and additional robustness in the face of that will
> be appreciated by many users.

I definitely agree. As an aside, getting X working on multiple video
cards back in Xinerama days was how I got into X.org in the first
place. So this is an area I've a lot of personal interest in seeing
work.

> Is the choice of the card with the "highest busid" the best we can do?
> Can X tell if a display is connected to the card, and if one card has a
> display, select that? That would handle the case where someone has dual
> cards with some sort of bridge, but only one display connected to one of
> the cards.

X by itself isn't able to detect monitor connections; this probing is
done by the video driver. The video driver is selected based on which
video card is identified as the primary, so it's sort of a chicken and
egg problem.

I can think of a few workarounds, such as when multiple cards are
present, to load up vesa on each and see what's connected, then make the
determination of which card to use, pick the appropriate driver and load
it, etc. This could make for a slow boot process though, so doesn't
feel elegant, and it could take a fair bit of plumbing work, and it'd
definitely need to be done in conjunction with upstream.

I looked through all of upstream's multi-card bugs (there's a couple
dozen or so). I didn't find one with a clear plan of action, but the
problem is definitely well known.

I've a feeling the landscape here is going to change considerably once
we are on kernel mode-setting, since a lot of the decision making about
what displays to bring up moves to the kernel. It is possible that the
driver upstreams want to wait until this architecture's in place before
putting work into multi-card setups.

> Another common case is laptops that have a high power and a low power
> video chipset, both connected to the same screen. I don't know how X
> sees that today, or how it handles it.

Right, we have a bug on this one, and it also is known upstream:

https://bugs.edge.launchpad.net/ubuntu/+source/xorg-server/+bug/312756

Bryce

Bryce Harrington (bryce)
Changed in xorg-server:
assignee: tjaalton → bryceharrington
Revision history for this message
Parag Warudkar (parag-warudkar) wrote : Re: [Bug 267241] Re: Xorg fails to start with more than one display adapter

On Fri, Mar 6, 2009 at 9:34 PM, Bryce Harrington
<email address hidden> wrote:
> I've done some analysis into this bug (as well as a number of other
> related dual-card bugs) this week.  This patch changes the behavior such
> that when it gets into this error condition, rather than giving up and
> erroring out, it should make X select the card with the highest busid.
>
> The use case I'm imagining here is where a user is having problems with
> their on-board video and have purchased a second card to override it.
> Don't know whether that use case is a good match to folks' issues here,
> so am open to discussion on that.
>

Correct me if I am wrong but I *think* that would not be the most
common use case - in case of machines having built-in video and a
discrete card, the BIOS completely disables one of them depending on
what is chosen in BIOS. (At least the HP desktop I had did this - it
had Intel GMA on-board and when I put in a nv 8400 GS - I was allowed
to choose one - the other was completely 'gone' for the OS).
(I have no idea what the case is with Laptops using 2 cards which
allow for runtime switching between low-power / high-power - but since
I have heard of no problems with MacBooks which have this feature - I
suspect that only one is visible.) Your patch seems like it will pick
the last one seen - whether or not it will work obviously depends on
whether or not people have connected output to the last one seen by
Xorg.

The most common case in relation to this issue would be where people
actually have 2 discrete cards and BIOS allows one to be set to
primary - the second one is still visible to the OS. Figuring out what
the BIOS's notion of Primary/Secondary is may be easier I think to
determine where to output. I will put the 2nd card back in my
workstation and see if I can find any clues.

Parag

Revision history for this message
Mark Shuttleworth (sabdfl) wrote : Re: [Fwd: [Bug 267241] Re: [intrepid] Xorg fails to start with more than one display adapter]

OK, thanks for the analysis!

As part of the 9.10 planning process, could I ask you to coordinate with
Neil Patel and David Barth to establish if the KMS API includes a
mechanism to ask the cards if there is a display connected to them? Out
of curiosity, I'd also be interested in things like TV out.

Cheers!
Mark

Revision history for this message
Bryce Harrington (bryce) wrote :

On Sun, Mar 08, 2009 at 04:05:35PM +0000, Mark Shuttleworth wrote:
>
> OK, thanks for the analysis!
>
> As part of the 9.10 planning process, could I ask you to coordinate with
> Neil Patel and David Barth to establish if the KMS API includes a
> mechanism to ask the cards if there is a display connected to them? Out
> of curiosity, I'd also be interested in things like TV out.

Will do, those are both good questions.

Bryce

Revision history for this message
Tormod Volden (tormodvolden) wrote :

> The most common case in relation to this issue would be where people
> actually have 2 discrete cards and BIOS allows one to be set to
> primary - the second one is still visible to the OS. Figuring out what
> the BIOS's notion of Primary/Secondary is may be easier I think to
> determine where to output.

There is some progress upstream on this http://lists.x.org/archives/xorg-devel/2009-March/000400.html

Revision history for this message
Evertjan Garretsen (egarretsen) wrote :

@ bryce

Should the bug with id #311748 also be a duplicate of this one?
And the bugs that are marked as a duplicate of that bug (#312924 #330420 #343092 too?) too?

Revision history for this message
Bryce Harrington (bryce) wrote :

@Evertjan, yep and yep.

Revision history for this message
Bryce Harrington (bryce) wrote :

Thanks tormod. Looks like that is a kernel patch being proposed by the X guys for 2.6.30... Doesn't look like something we can expect to see for Jaunty.

Revision history for this message
In , Timo Aaltonen (tjaalton) wrote :

Fedora has a patch which might help here.

Revision history for this message
In , Timo Aaltonen (tjaalton) wrote :
Revision history for this message
Bryce Harrington (bryce) wrote :

Debian has a patch for this as well, sort of along the lines of the patch I drafted, only better...

http://cvs.fedoraproject.org/viewvc/rpms/xorg-x11-server/devel/xserver-1.6.0-primary.patch?revision=1.3

Revision history for this message
In , Alan Coopersmith (alan-coopersmith) wrote :

When I suggested the Fedora patch to our PCI/driver guys, they responded that
they'd tried similar things before in the kernel and found that they didn't work
on some platforms. The code they ended up with instead is:

http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/i86pc/io/gfx_private/gfxp_vgatext.c#gfxp_check_for_console

Revision history for this message
In , Julien Cristau (jcristau) wrote :

let's also mention Dave's patches:
http://lkml.org/lkml/2009/3/4/6
http://lists.x.org/pipermail/xorg-devel/2009-March/000400.html

then i suppose X can use pci_device_is_boot_vga() to look for its "primary" device?

Revision history for this message
Steve Langasek (vorlon) wrote :

the fix for this is in the jaunty unapproved queue and will be released after beta.

Changed in xorg-server:
status: Triaged → Fix Committed
Revision history for this message
In , Julien Cristau (jcristau) wrote :

*** Bug 20878 has been marked as a duplicate of this bug. ***

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package xorg-server - 2:1.6.0-0ubuntu5

---------------
xorg-server (2:1.6.0-0ubuntu5) jaunty; urgency=low

  [Tormod Volden]
  * Disable 160_log_timestamping.patch before the beta, this was only used
    for testing, and the patch also has a serious stack corruption bug.
    (LP: #328035)

  [Bryce Harrington]
  * Disable 999_default_modedebug_on.patch before the beta, this was used
    only for testing.
  * Add 169_mipointer_nullptr_checks.patch:
    - MIPOINTER() can return NULL in some circumstances, so always check
      its return value before dereferencing.
    - Fixes crash with keyrepeat on non-primary screen on -nvidia when
      using Xinerama (and probably other serious mipointer-related crashes)
      (LP: #324465)
  * Add 170_primary_pci_video_device.patch:
    - Patch from redhat
    - Fixes failure when multiple video cards are present. Xserver currently
      exits with an error "(EE) No device detected" in such cases.
      (LP: #267241)

 -- Bryce Harrington <email address hidden> Tue, 24 Mar 2009 09:57:17 -0700

Changed in xorg-server:
status: Fix Committed → Fix Released
Revision history for this message
Jerone Young (jerone) wrote :

Verified the fix now works Nvidia hybrid graphics cards.

Revision history for this message
In , Oli Wade (olithered) wrote :

This is now also fixed in Ubuntu 9.04 (using the redhat/fedora patch) and working for me on x86_64 (xserver-xorg-core: 1.6.0-0ubuntu14) with 2 x nVidia NV43 [GeForce 6600 GT].

Revision history for this message
Jens (jens.timmerman) wrote :

I still have this problem in jaunty
I just added a 2nd grapthics card and I couldn't get X to start...

(even after running sudo dpkg-reconfigure -phigh xserver-xorg)

Adding the BusID "05:00:0" line to my Xorg.conf fixed this problem for me...

Revision history for this message
Bryce Harrington (bryce) wrote :

File a new bug Jens.

Revision history for this message
In , Freedesktop-bastafidli (freedesktop-bastafidli) wrote :

I just tested in in Ubuntu 9.04 with the latest patched installed and it is still not working. I have two cards (AGP and PCI)

00:08.0 VGA compatible controller: nVidia Corporation NV11DDR [GeForce2 MX200] (rev b2)
01:00.0 VGA compatible controller: nVidia Corporation NV11DDR [GeForce2 MX200] (rev b2)

and I am using NVidia card. The system fails to start with with the output in the log that no primary card found until I went to xorg.conf and manually added to the device section

BusID "PCI:0:8:0"

Revision history for this message
In , Daniel Stone (daniels) wrote :

dave, this all got merged to master, yeah? if so, can we close it at least for 1.7?

Revision history for this message
In , Airlied-freedesktop (airlied-freedesktop) wrote :

yup should all be in master now + libpciaccess 0.10.8 for Linux.

if this keep happening with a 1.7 server please re-open.

Changed in xorg-server:
status: Confirmed → Fix Released
Revision history for this message
Alex Valavanis (valavanisalex) wrote :

Intrepid Ibex reached end-of-life on 30 April 2010 so I am closing the
report. The bug has been fixed in newer releases of Ubuntu.

Changed in xorg-server (Ubuntu Intrepid):
status: Confirmed → Invalid
Changed in xorg-server:
importance: Unknown → Medium
Changed in xorg-server:
importance: Medium → Unknown
Changed in xorg-server:
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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