Bug 1183654 - X doesn't assign drm devices according to seat
Summary: X doesn't assign drm devices according to seat
Alias: None
Product: Fedora
Classification: Fedora
Component: xorg-x11-server
Version: 21
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: X/OpenGL Maintenance List
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2015-01-19 11:57 UTC by Jonathan Dieter
Modified: 2015-02-02 17:20 UTC (History)
2 users (show)

Fixed In Version: xorg-x11-server-1.16.3-2.fc21
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2015-02-02 17:20:52 UTC
Type: Bug

Attachments (Terms of Use)
Use seat information for GPU assignment (2.57 KB, message/rfc822)
2015-01-19 11:57 UTC, Jonathan Dieter
no flags Details
Updated spec file (42.54 KB, text/plain)
2015-01-19 11:58 UTC, Jonathan Dieter
no flags Details
Use seat information for GPU assignment (2.57 KB, patch)
2015-01-19 11:59 UTC, Jonathan Dieter
no flags Details | Diff

Description Jonathan Dieter 2015-01-19 11:57:31 UTC
Created attachment 981502 [details]
Use seat information for GPU assignment

Description of problem:
Currently xorg ignores the seat assignments for drm devices because the devices are initialized earlier in the code.  Depending on race conditions, the first X server will get more than one of the drm devices, which breaks multiseat systems.

This patch fixes that by rejecting drm devices that haven't been assigned to our seat.  The code has been mostly taken from config/udev.c and modified.  I think I'm cleaning up after myself properly, but another pair of eyes would be appreciated.

Version-Release number of selected component (if applicable):
(I ran into this in F20 as well, but the other X servers would generally win the race, while on F21, the first X server normally wins the race)

How reproducible:
Pretty much always

Steps to Reproduce:
1. Setup multiseat system with multiple video cards
2. Assign cards to different seats using udev
3. Start display manager

Actual results:
Display manager only shows on one screen

Expected results:
Display manager shows on all screens

Comment 1 Jonathan Dieter 2015-01-19 11:58:14 UTC
Created attachment 981503 [details]
Updated spec file

Comment 2 Jonathan Dieter 2015-01-19 11:59:04 UTC
Created attachment 981504 [details]
Use seat information for GPU assignment

Set correct content type

Comment 3 Hans de Goede 2015-01-19 13:01:18 UTC
Hi Jonathan,

Thanks for the patch. Can you please submit this upstream through the xorg-devel list ?   :

Then we can get it reviewed there, and once accepted upstream we can see if it is ok to cherry-pick this into the Fedora Xorg packages.



Comment 4 Jonathan Dieter 2015-01-19 16:14:21 UTC

I've rebased the patch against HEAD.

Comment 5 Fedora Update System 2015-01-31 23:43:44 UTC
xorg-x11-server-1.16.3-2.fc21 has been submitted as an update for Fedora 21.

Comment 6 Fedora Update System 2015-02-01 11:55:57 UTC
Package xorg-x11-server-1.16.3-2.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing xorg-x11-server-1.16.3-2.fc21'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).

Comment 7 Jonathan Dieter 2015-02-02 09:46:06 UTC
Hans, thanks so much for pushing this fix out so quickly after it got upstreamed.

Comment 8 Hans de Goede 2015-02-02 09:48:29 UTC
(In reply to Jonathan Dieter from comment #7)
> Hans, thanks so much for pushing this fix out so quickly after it got
> upstreamed.

Actually Dave Airlie did that, so you need to thank him :)

Comment 9 Jonathan Dieter 2015-02-02 09:53:36 UTC
Thanks for the heads up.  I just sent him an email. :)

Comment 10 Fedora Update System 2015-02-02 17:20:52 UTC
xorg-x11-server-1.16.3-2.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.