Announcement

Collapse
No announcement yet.

SystemD/Udev Multi-Seat Support For X.Org

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Originally posted by yotambien View Post
    Hey, this really sounds very cool. I haven't followed multiseat development at all, and after reading some bits here and there I'm left with some practical questions:

    - Do I need a videocard per seat?
    That's the cleanest, easiest, and more reliable solution.

    There are options with nested X servers (Xnest or Xephyr) and the like, but you lose some stuff (3d acceleration). agdf did some work to make two X servers run on a single radeon, but those patches are out of date now.

    One card per seat is what pretty much everyone uses. I got an extra PCI HD4350 for a silly amount of money -- even that's an overkill for casual browsing.

    MAKE SURE to use similar gfx cards, preferably running the same driver. It might work with other combinations (Nvidia + AMD, Intel + AMD, etc), but this is rare, and why risk it?

    - Is it easy to get running? Like, is this already in a state where I install something through my package manager and be done?
    You don't even need to install anything, just update some config files (most notably, kdmrc). Not sure if gdm works with multiseat now, I remember reading that they broke it.

    It's not hard if you follow a tutorial, like this one: http://sadevil.org/blog/2010/04/04/multiseat-on-debian/

    - What happens to 3D acceleration in a multiseat configuration?
    With one card per user, nothing. It works as before.

    We are two at home, both adicted to the internets (so we spend a lot of time in front of our respective computers).
    This is our situation, and the solution is really good for both of us. In fact, we swap seats all the time, treat them as two computers, and everything works well.

    I have a PhenomII quad core and 4GB ram, and that's plenty. A dual core should be enough for most situations. Of course, the other seat gets a bit sluggish if I issue "emerge -udjv @world", an hog all the memory, but that can be planned around

    Comment


    • #17
      Thanks, this is awesome! Will save me good money and space and make for an interesting little thing to do!

      Comment


      • #18
        Originally posted by yotambien View Post
        Thanks, this is awesome! Will save me good money and space and make for an interesting little thing to do!
        Not to mention electricity!

        Comment


        • #19
          Originally posted by pingufunkybeat View Post
          Obviously you know X better than I do, but are you sure?

          I know that you can define an InputClass to be specific enough to match a particular input device. The problem was that I could not find an option which ties an InputClass to a particular seat.

          Specifically, ServerLayout can refer to a specific InputDevice, but not to a specific InputClass, or at least I haven't found a way to do it, which is why I gave up. I've just checked with "man xorg.conf" with xserver 1.10.3

          If you can tell me how it's supposed to work, I'd be really really happy!
          Ah, I hadn't thought of the separate-layouts-in-one-file approach. It'll work if you use one config file per seat. If you file a bug on X.Org to add support for limiting InputClasses through ServerLayout, I'm sure someone will pick it up at some stage.

          Comment


          • #20
            Originally posted by daniels View Post
            Ah, I hadn't thought of the separate-layouts-in-one-file approach. It'll work if you use one config file per seat. If you file a bug on X.Org to add support for limiting InputClasses through ServerLayout, I'm sure someone will pick it up at some stage.
            So if I split xorg.conf into two files, one per seat, the peripherals will be tied to the right seat magically?

            I'll have to try that, thanks!

            Comment


            • #21
              Originally posted by pingufunkybeat View Post
              So if I split xorg.conf into two files, one per seat, the peripherals will be tied to the right seat magically?

              I'll have to try that, thanks!
              If you get it working, could you message me with how? I want the exact same thing, but both of you seem to know a lot more about X than me.

              Comment


              • #22
                Originally posted by pingufunkybeat View Post
                So if I split xorg.conf into two files, one per seat, the peripherals will be tied to the right seat magically?

                I'll have to try that, thanks!
                Yep, as long as you're using the same settings for your InputClasses as your InputDevices (e.g. matching on a specific device path, and ignoring the rest). Good luck.

                Comment


                • #23
                  Originally posted by daniels View Post
                  Yep, as long as you're using the same settings for your InputClasses as your InputDevices (e.g. matching on a specific device path, and ignoring the rest). Good luck.
                  Just checked. It doesn't work. And I can't see why it should.
                  There is 05-evdev.conf in my xorg.conf.d which has InputClass sections for all common input devices. Since InputClass has implicit AutoServerLayout option, all input devices are attached to each xserver. Splitting configuration files doesn't make any sense. All files in xorg.conf.d are treated as parts of one big xorg.conf.
                  What we need for multiseat is input device/class section which supports hotplugging and can be tied to ServerLayout section.

                  Comment


                  • #24
                    Originally posted by chelobaka View Post
                    Just checked. It doesn't work. And I can't see why it should.
                    There is 05-evdev.conf in my xorg.conf.d which has InputClass sections for all common input devices. Since InputClass has implicit AutoServerLayout option, all input devices are attached to each xserver. Splitting configuration files doesn't make any sense. All files in xorg.conf.d are treated as parts of one big xorg.conf.
                    What we need for multiseat is input device/class section which supports hotplugging and can be tied to ServerLayout section.
                    If you use this:

                    Section "InputClass"
                    Identifier "non-HDTV"
                    Option "Ignore" "on"
                    EndSection

                    Section "InputClass"
                    Identifier "diNovo"
                    MatchProduct "diNovo"
                    Option "Ignore" "off"
                    EndSection

                    it will enable only specific device.
                    And if you have a main seat that should use all other devices just add the specific devices with Ignore on to it like:

                    Section "InputClass"
                    Identifier "diNovo"
                    MatchProduct "diNovo"
                    Option "Ignore" "on"
                    EndSection

                    without the first InputClass

                    Comment


                    • #25
                      InputClass cannot be tied to ServerLayout.

                      Comment


                      • #26
                        I know this thread is a little old but I'm wanting to set up a multi-seat desktop and am unsure where to start or how to go about it.

                        I'm running Fedora 16 / 64, 8 gig of ram, quad core 955 and a 9600GT with dual dvi.

                        Can someone please point me in the right direction to implement a multiseat on my desktop.

                        Thank you.

                        Comment


                        • #27
                          If you have only one video card you should probably use ZapthodHeads option in xorg.conf to run 2 xservers on each head. Look here for details. Though you may experience problems with 3D acceleration (only my guess, you have to check it out).
                          Also you will need display manager which can run several servers at once. GDM was "simplified" long ago by its devs, so you will need LightDM, or KDM in case you are a KDE user.
                          After that you only need to edit xorg.conf and lightdm.conf (or KDM config). There are many config examples in the web (Ubuntu wiki)
                          Sound and removable drives privileges have no generic solution, you should find a way to set them by yourself or just live with it like I do.

                          P.S. Speaking of systemd, there is nothing to test yet. Somebody has to patch Xorg to honor udev "seat" tags introduced by systemd. And it looks like biggest part of work in creating multiseat with "human face".
                          Last edited by chelobaka; 12-14-2011, 02:50 AM.

                          Comment


                          • #28
                            IS SystemmD in ubuntu 12.04 or is this something I have to patch

                            Comment


                            • #29
                              Update on udev

                              Recently I managed to reconfigure my Ubuntu 10.04 setup to use udev for input devices. I must admit I was too dump not to do it earlier.
                              Ok, here is it. Whole config should consists of three parts: custom udev rules for your input devices, several Xorg configuration files, one for each seat, and display manager config, for running xservers.

                              Part 1: udev
                              First of all, you have to disable mouse and keyboard autodetection in your xorg.conf.d directory. In Lucid Lynx there is no need for this, but I had to do it in Debian Wheezy.
                              Next, you have to make custom udev rules file, like this one:
                              Code:
                              # Apply these rules only to input devices
                              SUBSYSTEM!="input", GOTO="custom_input_end"
                              KERNEL=="input[0-9]*", GOTO="custom_input_end"
                              ACTION!="add|change", GOTO="custom_input_end"
                              
                              # Seat 0 
                              ATTRS{description}=="i8042 KBD port", ENV{ID_INPUT.tags}="seat0"
                              ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c01b", ENV{ID_INPUT.tags}="seat0"
                              ATTRS{name}=="Venus USB2.0 Camera", ENV{ID_INPUT.tags}="seat0"
                              
                              # Seat 1
                              ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c069", ENV{ID_INPUT.tags}="seat1"
                              ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c313", ENV{ID_INPUT.tags}="seat1"
                              ATTRS{product}=="Plantronics Wireless Audio", ENV{ID_INPUT.tags}="seat1"
                              
                              LABEL="custom_input_end"
                              I named it "99-multiseat.rules" and put in udev config directory. Entries are pretty self-explanatory.

                              Part 2: xorg.conf
                              Each seat will require separate config. Here is my seat0:
                              Code:
                              Section "ServerFlags"
                              	Option "DontZap" "false"
                              	Option "AllowEmptyInput" "true" 
                              EndSection
                              
                              Section "InputClass"
                                      Identifier  "Generic input device"
                                      MatchTag "seat0"
                              	Driver "evdev"
                              EndSection
                              
                              Section "Monitor"
                              	Identifier  "Samsung"
                              	Option	    "DPMS" "true"
                              EndSection
                              
                              Section "Device"
                              	Identifier  "Radeon HD 4290"
                              	Driver      "radeon"
                              	BusID       "PCI:1:5:0"
                              EndSection
                              
                              Section "Screen"
                              	Identifier "Left Screen"
                              	Device     "Radeon HD 4290"
                              	Monitor    "Samsung"
                              	DefaultDepth     24
                              	SubSection "Display"
                              		Viewport   0 0
                              		Depth     24
                              	EndSubSection
                              EndSection
                              
                              Section "ServerLayout"
                              	Identifier     "Seat0"	
                              	Screen      0  "Left Screen" 0 0
                              	Option         "SingleCard" "on"
                              EndSection
                              Adjust seat index and PCI ID for another seats. I copied these configs to /etc/X11/, but you can choose any directory.

                              Part 3: Display manager configuration
                              I have KDM, but you might have old GDM<=2.20, lightdm or something else.
                              Code:
                              [X-:0-Core]
                              AutoLoginAgain=false
                              AutoLoginDelay=0
                              AutoLoginEnable=false
                              AutoLoginLocked=false
                              AutoLoginUser=
                              ClientLogFile=.xsession-errors
                              ServerVT=7
                              ServerCmd=/usr/bin/X -config /etc/X11/seat0.conf -layout Seat0 -sharevts -keeptty
                              
                              [X-:1-Core]
                              AutoLoginAgain=false
                              AutoLoginEnable=false
                              AutoLoginLocked=false
                              ClientLogFile=.xsession-errors
                              ServerVT=9
                              ServerCmd=/usr/bin/X -config /etc/X11/seat1.conf -layout Seat1 -sharevts -keeptty -novtswitch
                              If you managed to repeat these steps on your system you should have working hotplug for input devices on each seat.

                              Comment


                              • #30
                                Hi,
                                Originally posted by chelobaka View Post
                                Part 1: udev
                                First of all, you have to disable mouse and keyboard autodetection in your xorg.conf.d directory. In Lucid Lynx there is no need for this, but I had to do it in Debian Wheezy.
                                Do you mean you added the line
                                Code:
                                Option "AutoAddDevices" "false"
                                to your Serverflags section in your xorg.conf ?

                                I use Debian Squeeze and multiseat without hotplug.

                                Thanks for your reply.

                                Comment

                                Working...
                                X