Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
HOWTO:Multi-Seat with current xorg / udev /systemd
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
dambacher
Apprentice
Apprentice


Joined: 11 Feb 2003
Posts: 276
Location: Germany

PostPosted: Tue Nov 05, 2013 5:56 pm    Post subject: HOWTO:Multi-Seat with current xorg / udev /systemd Reply with quote

Hi everybody
It took me some hours to figure out how to correctly set up the udev rules to tag my docking station inputs to have a multiseat setup with the current xorg servers 1.14.3

So for your convenient use:
/etc/udev/rules/99-seat-rules
Code:

# rules out different input devices for multiseat

# find docking station and tag it
ATTR{idVendor}=="17ef", ATTRS{idProduct}=="100a", TAG+="docking"

#find nvidia graphics card and tag it
DEVPATH=="/devices/pci0000:00/0000:00:01.0/0000:01:00.0", TAG+="graphics2"

# set ID_SEAT accordingly for all but seat0

SUBSYSTEM=="input", TAG=="seat", TAGS=="docking",  ENV{ID_SEAT}="seat1"

SUBSYSTEM=="graphics", TAG=="master-of-seat", TAGS=="graphics2" , ENV{ID_SEAT}="seat1"
SUBSYSTEM=="drm", TAGS=="graphics2" , ENV{ID_SEAT}="seat1"

# What is not special seat gets seat0
SUBSYSTEM=="input", TAG=="seat", ENV{ID_SEAT}=="" , ENV{ID_SEAT}="seat0"

# set all tags accordingly
ENV{ID_SEAT}!="", ENV{ID_INPUT.tags}+="$env{ID_SEAT}" TAG+="$env{ID_SEAT}"


/etc/x11/xorg.conf.d/ files combined
Code:

Section "ServerFlags"
        Option "AutoAddDevices"     "false"
        Option "AutoEnableDevices"  "false"
        Option "DRI2" "on"
        Option "Xinerama" "off"
EndSection# 20-intel.conf

Section "Device"
    Identifier     "Device0"
    Driver         "intel"
    VendorName     "intel onboard graphics"
    BusId      "PCI:0:2:0"
EndSection

Section "Device"
    Identifier     "Device1"
    Driver         "nouveau"
    VendorName     "free NVIDIA driver"
    BusID      "PCI:1:0:0"
EndSection

# -------------------

Section "InputClass"
        Identifier      "keyboard-default"

   MatchIsKeyboard "on"

        Driver       "evdev"
        Option "xkb_rules" "evdev"
        Option "xkb_model" "evdev"
   Option "XkbLayout" "de,us"
        Option "GrabDevice" "on" # prevent send event to other X-servers
EndSection


Section "InputClass"
        Identifier "mouse-default"

   MatchIsPointer "on"
   MatchIsTouchpad "on"

        Driver "evdev"
        Option "GrabDevice" "on"
EndSection

# -------------------

Section "InputClass"
   Identifier   "Default"
   Option "Ignore" "on" #default is to ignore devices
EndSection

Section   "InputClass"
   Identifier   "SingleIntern"

   MatchLayout "SingleIntern"
   MatchTag "seat0"

   Option "Ignore" "off"
EndSection

Section   "InputClass"
   Identifier   "SingleIntern"

   MatchLayout "SingleIntern"
   MatchTag ""

   Option "Ignore" "off"
EndSection

Section   "InputClass"
   Identifier   "SingleExtern"

   MatchLayout "SingleExtern"
   MatchTag "seat1"

   Option "Ignore" "off"
EndSection
#30-monitor.conf

Section "Monitor"
   Identifier   "Monitor0"
   DisplaySize    344 194
EndSection

Section "Monitor"
   Identifier   "Monitor1"
   DisplaySize   378 301
EndSection


Section "Screen"
   Identifier   "Screen0"
   Device      "Device0"
   Monitor      "Monitor0"
EndSection

Section "Screen"
   Identifier   "Screen1"
   Device      "Device1"
   Monitor      "Monitor1"
EndSection
#

Section "ServerLayout"
   Identifier      "SingleIntern"
   Screen      0   "Screen0"

        Option "Clone" "off"
EndSection

Section "ServerLayout"
   Identifier      "SingleExtern"
   Screen      0   "Screen1"

        Option "Clone" "off"
EndSection

Section "ServerFlags"
   Option      "DefaultServerLayout"   "SingleIntern"
EndSection



Then you can start the second seat from a console with
Code:

startx  /usr/bin/gnome-session -- :1 -layout SingleExtern -seat 1  -novtswitch -sharevts&


I did not modify gdm to show up on both seats, but this is possible and documented elsewhere.


Last edited by dambacher on Wed Nov 06, 2013 7:15 am; edited 1 time in total
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 7664
Location: Somewhere over Atlanta, Georgia

PostPosted: Tue Nov 05, 2013 7:09 pm    Post subject: Reply with quote

Moved from Desktop Environments to Documentation, Tips & Tricks.

- John
_________________
This space intentionally left blank.
Back to top
View user's profile Send private message
steveL
Advocate
Advocate


Joined: 13 Sep 2006
Posts: 2402
Location: The Peanut Gallery

PostPosted: Wed Nov 06, 2013 5:24 am    Post subject: Reply with quote

Lovely post dambacher.

You might want to split the files in xorg.conf.d so you have a small code section for each; and perhaps add a note that we should of course adjust parameters to our particular devices (especially identifiers.)

Also, I don't see anything specific to systemd: it appears only to need udev tags applied to devices, which xorg picks up on (does that require evdev?) If it's non-specific, then you might want to edit the post title, so openrc users don't get put off reading it.

Again, nice post, thanks,
steveL.
Back to top
View user's profile Send private message
dambacher
Apprentice
Apprentice


Joined: 11 Feb 2003
Posts: 276
Location: Germany

PostPosted: Wed Nov 06, 2013 7:08 am    Post subject: Reply with quote

Hi steveL

My xorg.conf.d is modular, but for ease of reading I merged it here.

The TAG and ID_SEAT flags will be evaluated by systemd / logind to set up the seat.
TAG and ID_SEAT are queried by xf86-input-evdev if you use the -seat option to set udev matches.
And if I read the code correctly ID_INPUT.tags is also queried by xf86-input-evdev with and without -seat option.

The xorg support for multiseat is claimed to be not completely ready because graphics card selection is not implemented .
therefore I use the --serverlayout to change card and monitor accordingly (no need for wrapper functions like in fedora) and InputClass with Matches and Option "Ignore"
This way it works without the -seat option and in non systemd setups, too (I had that before).

bye
dambacher

More reading:
http://wiki.gentoo.org/wiki/Multiseat
http://www.freedesktop.org/wiki/Software/systemd/multiseat/
http://www.x.org/wiki/Development/Documentation/Multiseat/
http://cgit.freedesktop.org/xorg/xserver/tree/config/udev.c?h=server-1.14-branch
Back to top
View user's profile Send private message
dambacher
Apprentice
Apprentice


Joined: 11 Feb 2003
Posts: 276
Location: Germany

PostPosted: Thu Nov 07, 2013 9:36 am    Post subject: Reply with quote

I just found out that multi-seat handling with sytemd/logind , x and gnome3/gdm3 is not fully elaborated yet. I will update on this.

lightdm, kdm and gdm users (gdm up to version 2.20) can find a solution, e.g. https://help.ubuntu.com/community/MultiseatX
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum