Bug 66851

Summary: Xorg-server can't go further with "legacy" PCI bus probe for graphics devices on non-seat0 seats
Product: xorg Reporter: Laércio de Sousa <lbsousajr>
Component: Server/DDX/XorgAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium CC: alberts.muktupavels, freedesktop-a7x, oli
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
Go further with "legacy" PCI bus probe on non-seat0 seats when no platform bus devices are found none

Description Laércio de Sousa 2013-07-12 12:02:04 UTC
Created attachment 82364 [details]
Go further with "legacy" PCI bus probe on non-seat0 seats when no platform bus devices are found

I have a multiseat setup with a primary on-board Intel graphics device and a secondary Silicon Motion SM501 graphics card. My SM501 is configured via custom xorg.conf with siliconmotion ddx driver, so it exposes no framebuffer devices to e.g. systemd-logind. The same situation is seen e.g. for a NVIDIA graphics card with proprietary drivers.

Every time I configure my system to assign my SM501 card with a secondary seat, i.e. not seat0, my X server fails to start, returning a "No devices detected" error. Nevertheless, when I assign my SM501 card with seat0 and attach my Intel graphics device to secondary seat (via loginctl), both seats load successfully.

Investigating the Xorg-server sources, I've found something related to "platform bus". I don't know what is it at all, but whatever it means, my Intel graphics card with its open-source drivers implement it, but my siliconmotion driver doesn't.

In its current form, Xorg-server probes for platform bus devices as well as "legacy" PCI bus ones only for seat0. For other seats, it only probes for platform bus devices, hence it never reaches my SM501 card, returning that "No devices found" error.

I don't know if there's a good reason for probing only platform bus devices on non-seat0 seats, but this brings a problem for multiseat setups like mine.

I've wrote a small patch that solves my problem, going further with PCI bus probe, while tries to keep the current behavior if a platform bus device is found on secondary seats. Please consider applying it, or giving another solution.

Thanks in advance!

Related bug: https://bugzilla.redhat.com/show_bug.cgi?id=962907
Comment 1 sfp-a7x 2013-08-06 22:59:14 UTC
Downstream Ubuntu bug report:

https://bugs.launchpad.net/bugs/1209008
Comment 2 Timo Aaltonen 2013-09-06 06:57:15 UTC
you should send the patch to xorg-devel@ for review:

http://wiki.x.org/wiki/Development/Documentation/SubmittingPatches/
Comment 3 Alberts Muktupāvels 2013-09-12 13:54:02 UTC
I sent your patch to xorg-devel@lists.x.org.
Comment 4 Laércio de Sousa 2013-09-12 13:58:57 UTC
Oh, thank you all!

I've already sent an e-mail some days ago, with this patch rewritten against latest xserver git:

http://lists.x.org/archives/xorg-devel/2013-September/037711.html

Now waiting for someone to review it...

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.