[SRU] X doesn't work for video cards with non-KMS drivers on non-seat0 seats

Bug #1209008 reported by Richard Hansen
30
This bug affects 5 people
Affects Status Importance Assigned to Milestone
X.Org X server
Fix Released
Medium
xorg-server (Ubuntu)
Fix Released
Undecided
XxEarthxX
Trusty
Fix Released
Undecided
Laércio de Sousa

Bug Description

[Impact]

* In Xorg-server versions older than 1.16, if Xorg is started as a non-seat0 X server (i.e. if it was started with "-seat XXXX" option where "XXXX" != "seat0"), it only probes platform bus for graphics devices, leaving devices with non-KMS drivers (like NVIDIA proprietary drivers and old ones like xf86-video-siliconmotion) unreachable.

Patch "xfree86_allow_fallback_to_pci_bus_probe_for_non_seat0.patch" from lp:~ubuntu-multiseat/xorg-server/trusty-matchseat fixes this.

* systemd-logind has no intrinsic mechanism to assign non-KMS graphics devices to seats. In this case, one should tag another seat device (keyboard, USB hub, etc.) in udev as "master-of-seat", and provide a suitable xorg.conf for that seat. In order to avoid that a given xorg.conf affects other seats, it should be passed to Xorg via "-config xorg.conf.custom" option, which requires X server command line customization support in DM in use (GDM, for example, has no such support).

Patch "xfree86_add_matchseat_key_to_xorg_conf.patch" from lp:~ubuntu-multiseat/xorg-server/trusty-matchseat introduces a new MatchSeat key for xorg.conf sections "Device", "Screen", and "ServerLayout", which will target a given seat only. Example file /etc/X11/xorg.conf.d/90-seat-1.conf:

Section "Device"
    Identifier "card0"
    Driver "nvidia"
    Option "NoLogo" "True"
    # This section will only apply for seat-1
    MatchSeat "seat-1"
EndSection

* systemd-logind can't handle any VT switching for non-seat0 seats, but Xorg-server older than 1.16 still opens VT even if it's started as a non-seat0 X server. This may lead to a race condition between X servers: if a non-seat0 one is started before a seat0 one, the former "steals" VTs from the later. If a seat0 X server can't open VTs, systemd-logind can't activate sessions for seat0, leaving user without sound or usb input support, for example.

Patch "xfree86_keep_non_seat0_from_touching_vts.patch" from lp:~ubuntu-multiseat/xorg-server/trusty-matchseat fixes this.

[Test Case]

* Set up a multiseat system where your non-seat0 seats use non-KMS video drivers (you may need to tag another device in udev as "master-of-seat" in order to achieve it).

* When LightDM/GDM tries to start a Xorg server for your non-seat0 seats, it will end up with the following error: "(EE) No devices found".

* After applying xfree86_allow_fallback_to_pci_bus_probe_for_non_seat0.patch, you can configure your seats in LightDM by setting appropriate "xserver-config" properties for each seat. However, you can't configure them in GDM.

* After applying xfree86_add_matchseat_key_to_xorg_conf.patch, configure your seats properly and restart LightDM/GDM services (or reboot your computer) repeatedly. In some iterations, it may happen that logind can't activate graphical sessions for seat0. If it occurs, check output of command "ps -FC Xorg" and you'll see that a non-seat0 Xorg server has a lower PID than seat0 one. Moreover, the non-seat0 has opened a TTY, while the seat0 hasn't.

[Regression Potential]

* Very low. All these patches were well tested in xorg-server "trusty" package available in ppa:ubuntu-multiseat/ppa.

Related branches

Revision history for this message
In , Laércio de Sousa (lbssousa) wrote :

Created attachment 82364
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

Richard Hansen (rhansen)
tags: added: multiseat
tags: added: saucy
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in xorg-server (Ubuntu):
status: New → Confirmed
Revision history for this message
Richard Hansen (rhansen) wrote :

(continuing the conversation from bug #976124 here since this bug report seems more relevant)

> but there were problems - huge memory leaks. In attached zip are log
> files for xorg and lightdm. My .xsession-errors was full of error
> lines:
>
> dconf-CRITICAL **: unable to create file
> '/home/alberts/.cache/dconf/user': Permission denied. dconf will not
> work properly.
>
> And at least one line of this:
> WARNING: Could not get session id for session. Check that logind is
> properly installed and pam_systemd is getting used at login.

These did not go away when you added the 'master-of-seat' udev tag?

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

Downstream Ubuntu bug report:

https://bugs.launchpad.net/bugs/1209008

Changed in xorg-server:
importance: Unknown → Medium
status: Unknown → Confirmed
Revision history for this message
Alberts Muktupāvels (muktupavels) wrote : Re: X fails to detect certain video cards on non-seat0 seats

> These did not go away when you added the 'master-of-seat' udev tag?

I did not test it...

But memory leaks is not releated to this bug. I think it caused because o permission denied error. Memory leaks was for gnome-settings-daemon, indicator-applet-complete if I remember correctly.

Xorg itself worked ok. So patch from upstream fixes problem failing to detect video card for seats other than seat0.

Revision history for this message
Richard Hansen (rhansen) wrote :

Raring and saucy packages containing the patch have been uploaded to the multiseat PPA: https://launchpad.net/~ubuntu-multiseat/+archive/ppa

Revision history for this message
Laércio de Sousa (lbssousa) wrote :

Hi guys!

Glad to see that my patch works for you. I left Ubuntu some time ago to try some other systemd-enabled distros (Fedora and openSUSE) for better multiseat support. Thanks to your collaboration, I will be back to Ubuntu soon.

BTW, the following patch is a little bit more appropriate for Xorg 1.13, used in raring.

https://build.opensuse.org/package/rawsourcefile/home:lbssousa:branches:openSUSE:12.3:Update/xorg-x11-server/9999-xorg-server-1.13.2-support-legacy-pci-bus-probe-not-seat0.patch?srcmd5=688fc60a359b923f83ae948f2b58c71f

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

you should send the patch to xorg-devel@ for review:

http://wiki.x.org/wiki/Development/Documentation/SubmittingPatches/

Revision history for this message
In , Alberts Muktupāvels (muktupavels) wrote :

I sent your patch to <email address hidden>.

Revision history for this message
In , Laércio de Sousa (lbssousa) wrote :

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...

Revision history for this message
Laércio de Sousa (lbssousa) wrote : Re: X fails to detect certain video cards on non-seat0 seats

Hi there!

Oleg Samarin, who introduced the "master-of-seat" concept in systemd-logind, has recently submitted a patch for xorg-server that introduces a new capability: MatchSeat. The concept is explained here:

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

and the patch is available here:

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

As you can see, it includes my small patch for fixing that "no devices detected" error. In fact, I've shared privately this patch with him before opening bug freedesktop#66851, and I believe it makes more sense to include my patch in a more comprehensive work like his.

I strongly recommend that you try this new patch. I'll finally begin my switch back to Ubuntu tomorrow, so I can upload to Multiseat PPA soon.

Revision history for this message
In , Laércio de Sousa (lbssousa) wrote :
Revision history for this message
Laércio de Sousa (lbssousa) wrote :
Changed in xorg-server:
status: Confirmed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote : Re: X fails to detect certain video cards on non-seat0 seats

This bug was fixed in the package xorg-server - 2:1.15.1-0ubuntu8

---------------
xorg-server (2:1.15.1-0ubuntu8) utopic; urgency=medium

  * debian/patches/xfree86-pci-bus-probe-non-seat0.patch
    - Upstream patch to fix "No devices detected" error for seats
      other than seat0. (LP: #1209008)
 -- Alberts Muktupavels <email address hidden> Tue, 01 Jul 2014 17:12:51 +0300

Changed in xorg-server (Ubuntu):
status: Confirmed → Fix Released
Changed in xorg-server (Ubuntu Trusty):
status: New → In Progress
assignee: nobody → Laércio de Sousa (lbssousa)
description: updated
summary: - X fails to detect certain video cards on non-seat0 seats
+ [SRU] X doesn't work for video cards with non-KMS drivers on non-seat0
+ seats
Mathew Hodson (mhodson)
affects: fedora → hwe-next
Changed in hwe-next:
importance: Unknown → Undecided
status: Unknown → New
Revision history for this message
Maarten Lankhorst (mlankhorst) wrote :

A package has been uploaded to trusty-proposed, can you do a SRU verification?

tags: added: verification-needed
Revision history for this message
Mathew Hodson (mhodson) wrote :
Changed in xorg-server (Ubuntu Trusty):
status: In Progress → Fix Committed
Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

Could someone please test the package currently in trusty-proposed?

Revision history for this message
Mathew Hodson (mhodson) wrote :

xorg-server is available in the trusty-proposed repository and at https://launchpad.net/ubuntu/+source/xorg-server/2:1.15.1-0ubuntu2.2 .

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Revision history for this message
Richard Hansen (rhansen) wrote :

I do not have a non-KMS card in a non-seat0 seat, but I can at least say that I have not seen any regressions.

Revision history for this message
Mathew Hodson (mhodson) wrote :

A new version of xorg-server is available in the trusty-proposed repository and at https://launchpad.net/ubuntu/+source/xorg-server/2:1.15.1-0ubuntu2.3 .

Revision history for this message
Mathew Hodson (mhodson) wrote :

The xorg-server SRU for trusty has been shadowed by a security update and needs to be re-merged.

Changed in xorg-server (Ubuntu Trusty):
status: Fix Committed → In Progress
Mathew Hodson (mhodson)
tags: added: trusty
removed: saucy verification-needed
Robert Hooker (sarvatt)
no longer affects: hwe-next
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Richard, or anyone else affected,

Accepted xorg-server into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/xorg-server/2:1.15.1-0ubuntu2.6 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in xorg-server (Ubuntu Trusty):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Andrzej Pietrasiewicz (andrzejtp2010) wrote :
Download full text (9.5 KiB)

Does NOT work for me :-(

I'm still getting the "no screens found" error, which, if I understand correctly, is supposed to be fixed with:
http://bazaar.launchpad.net/~ubuntu-multiseat/xorg-server/trusty-matchseat/revision/287/debian/patches/xfree86_allow_fallback_to_pci_bus_probe_for_non_seat0.patch

$ cat /etc/apt/sources.list
deb http://archive.ubuntu.com/ubuntu/ trusty-proposed restricted main multiverse universe
deb http://pl.archive.ubuntu.com/ubuntu trusty-updates restricted universe main multiverse
deb http://security.ubuntu.com/ubuntu/ trusty-security restricted universe main multiverse
deb http://pl.archive.ubuntu.com/ubuntu trusty main restricted universe multiverse

$ dpkg -l xserver-xorg-core
...
ii xserver-xorg-core 2:1.15.1-0ubuntu2.6

$ lspci | grep VGA
01:00.0 VGA compatible controller: NVIDIA Corporation G98 [GeForce 8400 GS Rev. 2] (rev a1)
03:00.0 VGA compatible controller: NVIDIA Corporation G86 [Quadro NVS 290] (rev a1)

$ cat /etc/udev/rules.d/99-multiseat.rules
SUBSYSTEM=="drm", KERNEL=="card[0-9]*", ATTRS{vendor}=="0x10de", TAG+="master-of-seat"

TAG=="seat", DEVPATH=="/devices/pci0000:00/0000:00:01.0/0000:01:00.0/*", ENV{ID_SEAT}="seat0", TAG+="seat0"
TAG=="seat", DEVPATH=="/devices/pci0000:00/0000:00:1c.2/0000:03:00.0/*", ENV{ID_SEAT}="seat-1", TAG+="seat-1"

TAG=="seat", SUBSYSTEM=="usb", ATTR{name}=="DELL Dell USB Entry Keyboard", ENV{ID_SEAT}="seat0", TAG+="seat0"
TAG=="seat", SUBSYSTEM=="usb", ATTR{name}=="Logitech USB-PS/2 Optical Mouse", ENV{ID_SEAT}="seat0", TAG+="seat0"

TAG=="seat", SUBSYSTEM=="input", ATTR{name}=="AT Translated Set 2 keyboard", ENV{ID_SEAT}="seat-1", TAG+="seat-1"
TAG=="seat", SUBSYSTEM=="input", ATTR{name}=="ImPS/2 Generic Wheel Mouse", ENV{ID_SEAT}="seat-1", TAG+="seat-1"

$ loginctl list-seats
SEAT
seat0
seat-1

2 seats listed.

$ loginctl show-seat seat0
Id=seat0
ActiveSession=c2
CanMultiSession=yes
CanTTY=yes
CanGraphical=yes
Sessions=c2
IdleHint=no
IdleSinceHint=0
IdleSinceHintMonotonic=0

$ loginctl show-seat seat-1
Id=seat-1
CanMultiSession=no
CanTTY=no
CanGraphical=yes
IdleHint=yes
IdleSinceHint=0
IdleSinceHintMonotonic=0

$ loginctl list-sessions
   SESSION UID USER SEAT
        c2 1000 andrzejtp seat0

1 sessions listed.

$ loginctl seat-status seat0
seat0
        Sessions: *c2
         Devices:
                  /sys/devices/LNXSYSTM:00/LNXPWRBN:00/input/input1
                   input:input1 "Power Button"
                  /sys/devices/LNXSYSTM:00/device:00/PNP0C0C:00/input/input0
                   input:input0 "Power Button"
                  /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card0
                   [MASTER] drm:card0
                  /sys/devices/pci0000:00/0000:00:1a.0/usb3
                   usb:usb3
                  /sys/devices/pci0000:00/0000:00:1a.1/usb4
                   usb:usb4
                  /sys/devices/pci0000:00/0000:00:1a.2/usb5
                   usb:usb5
                  /sys/devices/pci0000:00/0000:00:1a.7/usb1
                   usb:usb1
                  /sys/devices/pci0000:00/0000:00:1b.0/sound/card0
          ...

Read more...

tags: added: verification-failed
Revision history for this message
Laércio de Sousa (lbssousa) wrote : Re: [Bug 1209008] Re: [SRU] X doesn't work for video cards with non-KMS drivers on non-seat0 seats
Download full text (4.1 KiB)

Andrzej, please paste here the xorg.conf you've written for your NVIDIA
card, as well as your /var/log/Xorg.1.log, when you use the proprietary
driver.

Em sáb, 13 de dez de 2014 19:20, Andrzej Pietrasiewicz <
<email address hidden>> escreveu:

> ** Tags added: verification-failed
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1209008
>
> Title:
> [SRU] X doesn't work for video cards with non-KMS drivers on non-seat0
> seats
>
> Status in X.Org X server:
> Fix Released
> Status in xorg-server package in Ubuntu:
> Fix Released
> Status in xorg-server source package in Trusty:
> Fix Committed
>
> Bug description:
> [Impact]
>
> * In Xorg-server versions older than 1.16, if Xorg is started as a
> non-seat0 X server (i.e. if it was started with "-seat XXXX" option
> where "XXXX" != "seat0"), it only probes platform bus for graphics
> devices, leaving devices with non-KMS drivers (like NVIDIA proprietary
> drivers and old ones like xf86-video-siliconmotion) unreachable.
>
> Patch "xfree86_allow_fallback_to_pci_bus_probe_for_non_seat0.patch"
> from lp:~ubuntu-multiseat/xorg-server/trusty-matchseat fixes this.
>
> * systemd-logind has no intrinsic mechanism to assign non-KMS graphics
> devices to seats. In this case, one should tag another seat device
> (keyboard, USB hub, etc.) in udev as "master-of-seat", and provide a
> suitable xorg.conf for that seat. In order to avoid that a given
> xorg.conf affects other seats, it should be passed to Xorg via
> "-config xorg.conf.custom" option, which requires X server command
> line customization support in DM in use (GDM, for example, has no such
> support).
>
> Patch "xfree86_add_matchseat_key_to_xorg_conf.patch" from lp:~ubuntu-
> multiseat/xorg-server/trusty-matchseat introduces a new MatchSeat key
> for xorg.conf sections "Device", "Screen", and "ServerLayout", which
> will target a given seat only. Example file
> /etc/X11/xorg.conf.d/90-seat-1.conf:
>
> Section "Device"
> Identifier "card0"
> Driver "nvidia"
> Option "NoLogo" "True"
> # This section will only apply for seat-1
> MatchSeat "seat-1"
> EndSection
>
> * systemd-logind can't handle any VT switching for non-seat0 seats,
> but Xorg-server older than 1.16 still opens VT even if it's started as
> a non-seat0 X server. This may lead to a race condition between X
> servers: if a non-seat0 one is started before a seat0 one, the former
> "steals" VTs from the later. If a seat0 X server can't open VTs,
> systemd-logind can't activate sessions for seat0, leaving user without
> sound or usb input support, for example.
>
> Patch "xfree86_keep_non_seat0_from_touching_vts.patch" from lp
> :~ubuntu-multiseat/xorg-server/trusty-matchseat fixes this.
>
> [Test Case]
>
> * Set up a multiseat system where your non-seat0 seats use non-KMS
> video drivers (you may need to tag another device in udev as "master-
> of-seat" in order to achieve it).
>
> * When LightDM/GDM tries to start a Xorg server for your non-seat0
> seats, it will end up with the following error: "(EE...

Read more...

Revision history for this message
Andrzej Pietrasiewicz (andrzejtp2010) wrote :

Hi Laércio,

SHAME ON ME!!!!

When I started looking for files to paste here, I had a closer look at my xorg.conf:

Section "ServerLayout"
    Identifier "Layout0"
    Screen 0 "Screen0" 0 0
    MatchSeat "seat0"
EndSection

Section "ServerLayout"
    Identifier "Layout1"
    Screen 0 "Screen1" 0 0
    MatchSeat "seat1"
EndSection

Section "Files"
EndSection

Section "Monitor"
    # HorizSync source: edid, VertRefresh source: edid
    Identifier "Monitor0"
    VendorName "Unknown"
    ModelName "Samsung SMEX2220"
    HorizSync 30.0 - 81.0
    VertRefresh 56.0 - 75.0
    Option "DPMS"
EndSection

Section "Monitor"
    # HorizSync source: edid, VertRefresh source: edid
    Identifier "Monitor1"
    VendorName "Unknown"
    ModelName "Philips 170B4"
    HorizSync 30.0 - 82.0
    VertRefresh 56.0 - 76.0
    Option "DPMS"
EndSection

Section "Device"
    Identifier "Device0"
    Driver "nvidia"
    VendorName "NVIDIA Corporation"
    BoardName "GeForce 8400 GS"
    BusID "PCI:1:0:0"
    MatchSeat "seat0"
EndSection

Section "Device"
    Identifier "Device1"
    Driver "nvidia"
    VendorName "NVIDIA Corporation"
    BoardName "Quadro NVS 290"
    BusID "PCI:3:0:0"
    MatchSeat "seat1"
EndSection

Section "Screen"
    Identifier "Screen0"
    Device "Device0"
    Monitor "Monitor0"
    DefaultDepth 24
    Option "Stereo" "0"
    Option "SLI" "Off"
    Option "MultiGPU" "Off"
    Option "BaseMosaic" "off"
    SubSection "Display"
        Depth 24
    EndSubSection
    MatchSeat "seat0"
EndSection

Section "Screen"
    Identifier "Screen1"
    Device "Device1"
    Monitor "Monitor1"
    DefaultDepth 24
    Option "Stereo" "0"
    Option "SLI" "Off"
    Option "MultiGPU" "Off"
    Option "BaseMosaic" "off"
    SubSection "Display"
        Depth 24
    EndSubSection
    MatchSeat "seat1"
EndSection

The problem is in naming. I dutifully named seat 0 "seat0", but I also dutifully followed the convention of naming
seat 1 "seat-1", with a dash between the "t" and the "1" - _EXCEPT_ in my xorg.conf...

When I did s/seat1/seat-1/g in my xorg.conf, the two seats appear correctly.
I did not stress test it too much, but will do now. If I have a problem I will let you know immediately.

I've been using multiseat setups for over a decade now and it has always been at least a bit "hakish"; each and every dist-upgrade (I've been using Debian testing, where dist-upgrades happen frequently) has been a threat that thigs would stop working. What is proposed here looks like a proper solution to multiseat setups. Thanks for your work!

Revision history for this message
Laércio de Sousa (lbssousa) wrote :

I've just updated xorg packages in my computer lab to 2:1.15.1-0ubuntu2.6. Multiseat is working pretty well (even with non-KMS video devices on non-seat0 seats). No regressions observed at the moment.

tags: added: verification-done
removed: verification-failed verification-needed
Revision history for this message
Andrzej Pietrasiewicz (andrzejtp2010) wrote :

It works for me, too. That said, I experience problems with coming back from machine's suspend: the screen at seat-1 in my setup (please see above) remains blank. I don't know if this is related to multiseat setup in any way, but it is really annoying. I'm using a dirty workaround: at waking up I do "service lightdm restart" which is surely an overkill and definitely not a solution. Any better ideas?

Revision history for this message
Laércio de Sousa (lbssousa) wrote :

A possible workaround is preventing your seat-1 X server from suspending. Include the following config to your lightdm.conf:

[Seat:seat-1]
xserver-command=/usr/bin/X -core -dpms -s 0

Anyway, if you swap your video cards bewteen seats (i.e. swap "seat0" and "seat-1" occurences in your xorg.conf), do you see the same behaviour?

Revision history for this message
Andrzej Pietrasiewicz (andrzejtp2010) wrote :

The xserver-command with dpms does not work.

If I swap the cards in xorg.conf I can see symmetric behaviour: the card which is assigned to seat0 wakes up correctly,
but the other one does not, it's just this time that the cards are swapped.

Revision history for this message
Laércio de Sousa (lbssousa) wrote :

Unfortunately, I can't reproduce your error in my hardware. Both seats wake up correctly here.

My hardware consists of an integrated Intel graphics device and a Silicon Motion SM501 PCI graphics card. I'm also using Xubuntu with lightdm 1.10.3 from trust-updates repo.

BTW, did you upgrade your lightdm to 1.10.3? Dou you know this version has backported automatic multiseat feature introduced in 1.12 series? Although this is the default behaviour in 1.12 series, it must be enabled manually in 1.10.3. Just drop all your previous manual seat configurations ([Seat:0], [Seat:1], etc.) in lightdm.conf and put the following:

[LightDM]
logind-load-seats=true

If you want to seat e.g. autologin user for each seat, just append the following sections:

[Seat:seat0]
autologin-user=<USER FOR seat0>

[Seat:seat-1]
autologin-user=<USER FOR seat-1>

Now you can test again that setting above for disabling DPMS for your seat-1 X server:

[Seat:seat-1]
xserver-command=/usr/bin/X -core -dpms -s 0

Revision history for this message
Andrzej Pietrasiewicz (andrzejtp2010) wrote :

I have two discrete cards. So the difference is that your integrated card is probably on the "platform bus", while both of my discrete cards are PCI-E devices.

I started testing multiseat setup described in this thread only last Saturday and since then have always been using the lightdm version which supports automatic multiseat; in one of my posts above (where I thought that the multiseat setup didn't work) I enclosed my full lightdm.conf; it only consisted of logind-load-seats and logind-check-graphical.

# apt-cache policy lightdm
lightdm:
  Zainstalowana: 1.10.4-0ubuntu2 # means: Installed
  Kandydująca: 1.10.4-0ubuntu2 # means: Candidate
  Tabela wersji:
 *** 1.10.4-0ubuntu2 0
        500 http://archive.ubuntu.com/ubuntu/ trusty-proposed/main i386 Packages
        100 /var/lib/dpkg/status
     1.10.3-0ubuntu2 0
        500 http://pl.archive.ubuntu.com/ubuntu/ trusty-updates/main i386 Packages
     1.10.0-0ubuntu3 0
        500 http://pl.archive.ubuntu.com/ubuntu/ trusty/main i386 Packages

The full lightdm.conf I'm using now:

[LightDM]
logind-load-seats=true
logind-check-graphical=true

[SeatDefaults]
allow-guest=false

[Seat:seat-1]
xserver-command=/usr/bin/X -core -dpms -s 0

And with this setup the card assigned to seat0 in xorg.conf wakes up correctly, but the other does not. I'm wandering which step of restarting lightdm does the trick of waking it up fully? Because, as I said before, the seat-1 is not completely lost after wakeup; if I brutally restart lightdm it comes back, of course all graphical sessions terminated and lightdm login screen displayed again at both seats.

My random guess is that the problem is in the X server. Perhaps for waking up there is some code path which works in a similar way to what probing used to work, that is, it only searches for platform display devices?

Revision history for this message
Laércio de Sousa (lbssousa) wrote :
Download full text (6.2 KiB)

Oh sorry! I didn't catch your lightdm.conf above.

When you restart lightdm service, all Xorg processes are killed and then
restarted. That's why your seat-1 goes back to normal when you do that.

I suspect your seat-1 Xorg may be killed when suspending. You can confirm
it by running "ps -FC Xorg | less". Also take a look at lightdm and Xorg
log files when your seat-1 fails to wake up.

Em qua, 17 de dez de 2014 17:05, Andrzej Pietrasiewicz <
<email address hidden>> escreveu:

> I have two discrete cards. So the difference is that your integrated
> card is probably on the "platform bus", while both of my discrete cards
> are PCI-E devices.
>
> I started testing multiseat setup described in this thread only last
> Saturday and since then have always been using the lightdm version which
> supports automatic multiseat; in one of my posts above (where I thought
> that the multiseat setup didn't work) I enclosed my full lightdm.conf;
> it only consisted of logind-load-seats and logind-check-graphical.
>
> # apt-cache policy lightdm
> lightdm:
> Zainstalowana: 1.10.4-0ubuntu2 # means: Installed
> Kandydująca: 1.10.4-0ubuntu2 # means: Candidate
> Tabela wersji:
> *** 1.10.4-0ubuntu2 0
> 500 http://archive.ubuntu.com/ubuntu/ trusty-proposed/main i386
> Packages
> 100 /var/lib/dpkg/status
> 1.10.3-0ubuntu2 0
> 500 http://pl.archive.ubuntu.com/ubuntu/ trusty-updates/main i386
> Packages
> 1.10.0-0ubuntu3 0
> 500 http://pl.archive.ubuntu.com/ubuntu/ trusty/main i386 Packages
>
> The full lightdm.conf I'm using now:
>
> [LightDM]
> logind-load-seats=true
> logind-check-graphical=true
>
> [SeatDefaults]
> allow-guest=false
>
> [Seat:seat-1]
> xserver-command=/usr/bin/X -core -dpms -s 0
>
> And with this setup the card assigned to seat0 in xorg.conf wakes up
> correctly, but the other does not. I'm wandering which step of
> restarting lightdm does the trick of waking it up fully? Because, as I
> said before, the seat-1 is not completely lost after wakeup; if I
> brutally restart lightdm it comes back, of course all graphical sessions
> terminated and lightdm login screen displayed again at both seats.
>
> My random guess is that the problem is in the X server. Perhaps for
> waking up there is some code path which works in a similar way to what
> probing used to work, that is, it only searches for platform display
> devices?
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1209008
>
> Title:
> [SRU] X doesn't work for video cards with non-KMS drivers on non-seat0
> seats
>
> Status in X.Org X server:
> Fix Released
> Status in xorg-server package in Ubuntu:
> Fix Released
> Status in xorg-server source package in Trusty:
> Fix Committed
>
> Bug description:
> [Impact]
>
> * In Xorg-server versions older than 1.16, if Xorg is started as a
> non-seat0 X server (i.e. if it was started with "-seat XXXX" option
> where "XXXX" != "seat0"), it only probes platform bus for graphics
> devices, leaving devices with non-KMS drivers (like NVIDIA proprietary
> drivers and old ones like xf86-video-siliconmotion) unreachab...

Read more...

Revision history for this message
Andrzej Pietrasiewicz (andrzejtp2010) wrote :

Before suspend:
UID PID PPID C SZ RSS PSR STIME TTY TIME CMD
root 1236 1223 12 55708 73248 0 20:56 tty7 00:00:10 /usr/bin/X -core
:0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
root 1238 1223 2 36801 64892 0 20:56 ? 00:00:02 /usr/bin/X -core
:1 -seat seat-1 -sharevts -auth /var/run/lightdm/root/:1 -nolisten tcp

After resume:
UID PID PPID C SZ RSS PSR STIME TTY TIME CMD
root 1236 1223 10 93676 173432 1 20:56 tty7 00:00:13 /usr/bin/X -core
:0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
root 1238 1223 1 37185 65092 1 20:56 ? 00:00:02 /usr/bin/X -core
:1 -seat seat-1 -sharevts -auth /var/run/lightdm/root/:1 -nolisten tcp

A big difference today is that the monitor assigned to seat-1 comes back alive BUT it extends the display of session at seat0!
In other words, today, after resume, both monitors provide a big desktop for session @ seat0.
I can't understand how it changed since yesterday. Yesterday the behaviour was as described above: seat-1 card wouldn't come back.
I'm also noticing a changed behaviour after boot and when greeters first appear: until yesterday, they appeared almost at the same time, with mouse pointers exactly in the middle of both. Today, they tend to blink a couple of times, and seat0 mouse pointers appears offset to the right.

In /etc/lightdm/x-1-greeter.log I can see at the end:

[+61,04s] DEBUG: user-list.vala:1030: Adding/updating user hajaszek (....)
[+398,50s] DEBUG: settings-daemon.vala:209: Screensaver activated

Please compare the times. The screensaver activates after about 5 minutes after the greeter is first displayed at system start.
I can't tell at this moment if this corresponds to the time when I suspended/resumed or to the time where screensaver kicked-in on an otherwise unavailable display.

SInce yesterday evening I played with printer drivers from http://www.bchemnet.com/suldr/; I installed/removed some of them back and forth. Then today I did apt-get install apt-show-version, and then did apt-get autoremove as suggested by apt.

I would say this situation is even more annoying compared to the one when seat-1 consistently refuses to show up after resume.

Revision history for this message
Andrzej Pietrasiewicz (andrzejtp2010) wrote :

Regarding the doubt whether not coming back of seat-1 greeter is caused by the screenscaver kicking-in: that is not the case. I checked again and did a quick suspend and then resume and then looked up the x-1-greeter.log and there was no line about the screensaver. It does activate but far later than the failed suspend/resume.

Revision history for this message
Laércio de Sousa (lbssousa) wrote :
Download full text (4.4 KiB)

What about your lightdm.log file? And your Xorg.1.log? Any suspect message?

Em qua, 17 de dez de 2014 18:41, Andrzej Pietrasiewicz <
<email address hidden>> escreveu:

> Regarding the doubt whether not coming back of seat-1 greeter is caused
> by the screenscaver kicking-in: that is not the case. I checked again
> and did a quick suspend and then resume and then looked up the
> x-1-greeter.log and there was no line about the screensaver. It does
> activate but far later than the failed suspend/resume.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1209008
>
> Title:
> [SRU] X doesn't work for video cards with non-KMS drivers on non-seat0
> seats
>
> Status in X.Org X server:
> Fix Released
> Status in xorg-server package in Ubuntu:
> Fix Released
> Status in xorg-server source package in Trusty:
> Fix Committed
>
> Bug description:
> [Impact]
>
> * In Xorg-server versions older than 1.16, if Xorg is started as a
> non-seat0 X server (i.e. if it was started with "-seat XXXX" option
> where "XXXX" != "seat0"), it only probes platform bus for graphics
> devices, leaving devices with non-KMS drivers (like NVIDIA proprietary
> drivers and old ones like xf86-video-siliconmotion) unreachable.
>
> Patch "xfree86_allow_fallback_to_pci_bus_probe_for_non_seat0.patch"
> from lp:~ubuntu-multiseat/xorg-server/trusty-matchseat fixes this.
>
> * systemd-logind has no intrinsic mechanism to assign non-KMS graphics
> devices to seats. In this case, one should tag another seat device
> (keyboard, USB hub, etc.) in udev as "master-of-seat", and provide a
> suitable xorg.conf for that seat. In order to avoid that a given
> xorg.conf affects other seats, it should be passed to Xorg via
> "-config xorg.conf.custom" option, which requires X server command
> line customization support in DM in use (GDM, for example, has no such
> support).
>
> Patch "xfree86_add_matchseat_key_to_xorg_conf.patch" from lp:~ubuntu-
> multiseat/xorg-server/trusty-matchseat introduces a new MatchSeat key
> for xorg.conf sections "Device", "Screen", and "ServerLayout", which
> will target a given seat only. Example file
> /etc/X11/xorg.conf.d/90-seat-1.conf:
>
> Section "Device"
> Identifier "card0"
> Driver "nvidia"
> Option "NoLogo" "True"
> # This section will only apply for seat-1
> MatchSeat "seat-1"
> EndSection
>
> * systemd-logind can't handle any VT switching for non-seat0 seats,
> but Xorg-server older than 1.16 still opens VT even if it's started as
> a non-seat0 X server. This may lead to a race condition between X
> servers: if a non-seat0 one is started before a seat0 one, the former
> "steals" VTs from the later. If a seat0 X server can't open VTs,
> systemd-logind can't activate sessions for seat0, leaving user without
> sound or usb input support, for example.
>
> Patch "xfree86_keep_non_seat0_from_touching_vts.patch" from lp
> :~ubuntu-multiseat/xorg-server/trusty-matchseat fixes this.
>
> [Test Case]
>
> * Set up a multiseat system where your non-seat0 seats use non-KMS
> video drive...

Read more...

Revision history for this message
Laércio de Sousa (lbssousa) wrote :
Download full text (4.6 KiB)

You could also disable light-locker for user logged in seat-1 and see if
problem persists.

Em qua, 17 de dez de 2014 18:44, Laércio de Sousa <email address hidden>
escreveu:

> What about your lightdm.log file? And your Xorg.1.log? Any suspect
> message?
>
> Em qua, 17 de dez de 2014 18:41, Andrzej Pietrasiewicz <
> <email address hidden>> escreveu:
>
> Regarding the doubt whether not coming back of seat-1 greeter is caused
>> by the screenscaver kicking-in: that is not the case. I checked again
>> and did a quick suspend and then resume and then looked up the
>> x-1-greeter.log and there was no line about the screensaver. It does
>> activate but far later than the failed suspend/resume.
>>
>> --
>> You received this bug notification because you are subscribed to the bug
>> report.
>> https://bugs.launchpad.net/bugs/1209008
>>
>> Title:
>> [SRU] X doesn't work for video cards with non-KMS drivers on non-seat0
>> seats
>>
>> Status in X.Org X server:
>> Fix Released
>> Status in xorg-server package in Ubuntu:
>> Fix Released
>> Status in xorg-server source package in Trusty:
>> Fix Committed
>>
>> Bug description:
>> [Impact]
>>
>> * In Xorg-server versions older than 1.16, if Xorg is started as a
>> non-seat0 X server (i.e. if it was started with "-seat XXXX" option
>> where "XXXX" != "seat0"), it only probes platform bus for graphics
>> devices, leaving devices with non-KMS drivers (like NVIDIA proprietary
>> drivers and old ones like xf86-video-siliconmotion) unreachable.
>>
>> Patch "xfree86_allow_fallback_to_pci_bus_probe_for_non_seat0.patch"
>> from lp:~ubuntu-multiseat/xorg-server/trusty-matchseat fixes this.
>>
>> * systemd-logind has no intrinsic mechanism to assign non-KMS graphics
>> devices to seats. In this case, one should tag another seat device
>> (keyboard, USB hub, etc.) in udev as "master-of-seat", and provide a
>> suitable xorg.conf for that seat. In order to avoid that a given
>> xorg.conf affects other seats, it should be passed to Xorg via
>> "-config xorg.conf.custom" option, which requires X server command
>> line customization support in DM in use (GDM, for example, has no such
>> support).
>>
>> Patch "xfree86_add_matchseat_key_to_xorg_conf.patch" from lp:~ubuntu-
>> multiseat/xorg-server/trusty-matchseat introduces a new MatchSeat key
>> for xorg.conf sections "Device", "Screen", and "ServerLayout", which
>> will target a given seat only. Example file
>> /etc/X11/xorg.conf.d/90-seat-1.conf:
>>
>> Section "Device"
>> Identifier "card0"
>> Driver "nvidia"
>> Option "NoLogo" "True"
>> # This section will only apply for seat-1
>> MatchSeat "seat-1"
>> EndSection
>>
>> * systemd-logind can't handle any VT switching for non-seat0 seats,
>> but Xorg-server older than 1.16 still opens VT even if it's started as
>> a non-seat0 X server. This may lead to a race condition between X
>> servers: if a non-seat0 one is started before a seat0 one, the former
>> "steals" VTs from the later. If a seat0 X server can't open VTs,
>> systemd-logind can't activate sessions for seat0, leaving user without
>> sound or usb input support, for ...

Read more...

Revision history for this message
Andrzej Pietrasiewicz (andrzejtp2010) wrote :

More details on todays behaviour:

After boot both screens come up, but sometimes seat-1 does appear, sometimes not and instead seat0 display extends to both monitors. Regardless of whether seat-1 appears or not, the initial position of mouse pointer of seat0 is offset BUT related to seat0's monitor. I think it is exactly in the middle of a big screen composed of BOTH monitors.

If, after boot, seat-1 does not appear, when I do ctrl-alt-f1 ctrl-alt-f7 at seat0 (which CanTTY=yes) then greeter at seat1 appears. BUT only until a screensaver kicks-in: then when I move a mouse at seat-1 (or even without it), instead of seat-1's greeter (no one is logged in at seat-1) a missing part of seat0's display appears - I have same folders at the desktop and they tend to appear in a part of the screen "covered" by seat-1's greeter. And then if I ctrl-alt-f1 ctrl-alt-f7 again, seat-1's greeter appears again.

The difference to yesterday and the day before is that I played with installing/uninstalling some packages.
The versions of packages of interest as of now are:
lightdm: 1.10.4-0ubuntu2
xserver-xorg-core: 2:1.15.1-0ubuntu2.6

I'm using Unity. I have no light-locker installed.

I must say that until yesterday I had rock-solid behaviour and fully functioning system except waking up from suspend. Then I perhaps messed something up with the installed packages. What packages other than lightdm and xserver-xorg-core should I check? Is it possible that lightdm 1.10.__4__ is causing problems?

Revision history for this message
Andrzej Pietrasiewicz (andrzejtp2010) wrote :

I GOT ENLIGHTENED.

I know what changed since yesterday. I don't have my printer installed in the multisesat ubuntu, so I'm ocassionally booting into my Debian install where I have my multiseat setup based on a Xephyr approach, where both monitors are connected to the two heads of JUST ONE of the graphics cards. So today the monitor of seat-1 was connected to TWO cards. Hence seat0 saw two monitors and extended its desktop to both, and seat-1 also saw one monitor. When I unplugged the reduntant cable, it all behaves like yesterday: seat-1 wouldn't come back after resume. That's good and bad news: the good news it that the world still works as it is supposed, the bad news is that the seat-1 resume problem remains. I need a break...

Revision history for this message
Laércio de Sousa (lbssousa) wrote :

Anyway, have you tried to simplify your config files? For example, in your
udev rules, you don't need to tag anything as "seat0" explicitly, and in
your xorg.conf file, are you sure you need all that "Screen" and
"ServerLayout" sections? In principle just the "Device" sections would be
enough.

Revision history for this message
Andrzej Pietrasiewicz (andrzejtp2010) wrote :

I followed your advice and multiseat setup still works. And still seat-1 resume problem remains.

I noticed that if I do (as root) a number of commands like:

# DISPLAY=:1 XAUTHORITY=/var/run/lightdm/root/:1 xrandr --output DVI-I-2 --off
# DISPLAY=:1 XAUTHORITY=/var/run/lightdm/root/:1 xrandr --output DVI-I-2 --auto

Then seat-1 comes back after suspend.

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

This bug was fixed in the package xorg-server - 2:1.15.1-0ubuntu2.6

---------------
xorg-server (2:1.15.1-0ubuntu2.6) trusty-proposed; urgency=medium

  [ Laércio de Sousa ]
  * Backport support for logind-based multiseat back to trusty. (LP: #1209008)

  [ Maarten Lankhorst ]
  * Re-enable support for rotation and transforms on gpu-screens with support.
    - Allows re-enabling intel SNA rotation after fixing it. (LP: #1386620)
  * Fix black screen when using qemu with cirrus vga.
    - fb-24-depth.patch (LP: #1318119)
 -- Maarten Lankhorst <email address hidden> Mon, 03 Nov 2014 12:36:32 +0100

Changed in xorg-server (Ubuntu Trusty):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for xorg-server has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

XxEarthxX (budwiser)
Changed in xorg-server (Ubuntu):
assignee: nobody → XxEarthxX (budwiser)
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.