Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
xorg.conf.d setup for multiseat review
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5910

PostPosted: Fri Jan 28, 2011 5:26 pm    Post subject: xorg.conf.d setup for multiseat review Reply with quote

hello, as kde 4.6 is coming and I'm switching to hal-less config, I want to setup xorg for my future multiseat conf, there will be two terminals and one tv, here are the confs, am I missing something?

10-displays.conf:
Code:
Section "Monitor"
        Identifier   "Monitor0"
        VendorName   "LG"
        ModelName    "FLATRON L1960TR"
EndSection

Section "Device"
        Identifier  "Card0"
        Driver      "radeon"
        VendorName  "ATI Technologies Inc"
        BoardName   "Radeon HD 3600 Series"
        BusID       "PCI:1:0:0"
        Option "AccelMethod" "EAX"
        Option "XAANoOffscreenPixmaps" "true"
EndSection

Section "Screen"
        Identifier "Screen0"
        Device     "Card0"
        Monitor    "Monitor0"
        DefaultDepth 24
        SubSection "Display"
                Viewport   0 0
                Depth     24
                Modes "1920x1080" "1600x1200" "1400x1050" "1280x1024" "1152x864" "1024x768" "1280x768" "1280x720" "1440x1080"
        EndSubSection
EndSection

Section "Monitor"
        Identifier   "Monitor1"
        VendorName   "Unknown"
        ModelName    "Unnwkown"
EndSection

Section "Device"
        Identifier  "Card0"
        Driver      "radeon"
        VendorName  "ATI Technologies Inc"
        BoardName   "Unknown"
#        BusID       "PCI:1:0:0"
#        Option "AccelMethod" "EAX"
#        Option "XAANoOffscreenPixmaps" "true"
EndSection

Section "Screen"
        Identifier "Screen1"
        Device     "Card1"
        Monitor    "Monitor1"
        DefaultDepth 24
        SubSection "Display"
                Viewport   0 0
                Depth     24
                Modes "1920x1080" "1600x1200" "1400x1050" "1280x1024" "1152x864" "1024x768" "1280x768" "1280x720" "1440x1080"
        EndSubSection
EndSection

Section "Monitor"
        Identifier   "Tv2"
        VendorName   "LG"
        ModelName    "37LD450"
EndSection

Section "Device"
        Identifier  "Card2"
        Driver      "radeon"
        VendorName  "ATI Technologies Inc"
        BoardName   "Unknown"
#        BusID       "PCI:1:0:0"
#        Option "AccelMethod" "EAX"
#        Option "XAANoOffscreenPixmaps" "true"
EndSection

Section "Screen"
        Identifier "HDTV2"
        Device     "Card2"
        Monitor    "Tv2"
        DefaultDepth 24
        SubSection "Display"
                Viewport   0 0
                Depth     24
                Modes "1920x1080"
        EndSubSection
EndSection


11-inputs.conf:
Code:
Section "InputClass"
        Identifier "Keyboard0"
        MatchDevicePath "/dev/input/event3"
        Driver "evdev"
        Option "XkbLayout" "us,he,es"
        Option "XkbVariant" ",qwerty"
        Option "XkbOptions" "grp:alt_shift_toggle,grp:switch,compose:rwin,terminate:ctrl_alt_bksp"
        MatchIsKeyboard "on"
EndSection

Section "InputClass"
        Identifier "Mouse0"
        MatchIsPointer "on"
        MatchDevicePath "/dev/input/event2"
        Driver "evdev"
EndSection

Section "InputClass" 
        Identifier "Keyboard1"
        MatchDevicePath "/dev/input/event6"
        Driver "evdev"
        Option "XkbLayout" "us,he,es"
        Option "XkbVariant" ",qwerty"
        Option "XkbOptions" "grp:alt_shift_toggle,grp:switch,compose:rwin,terminate:ctrl_alt_bksp"
        MatchIsKeyboard "on"
EndSection

Section "InputClass"
        Identifier "Tablet1"
        MatchIsPointer "on"
        MatchDevicePath "/dev/input/event5"
        Driver "evdev"
EndSection

Section "InputClass"
        Identifier "Keyboard2"
        MatchDevicePath "/dev/input/event10"
        Driver "evdev"
        Option "XkbLayout" "us,he,es"
        Option "XkbVariant" ",qwerty"
        Option "XkbOptions" "grp:alt_shift_toggle,grp:switch,compose:rwin,terminate:ctrl_alt_bksp"
        MatchIsKeyboard "on"
EndSection

Section "InputClass"
        Identifier "Mouse2"
        MatchIsPointer "on"
        MatchDevicePath "/dev/input/event9"
        Driver "evdev"
EndSection

_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Back to top
View user's profile Send private message
VoidMage
Watchman
Watchman


Joined: 14 Oct 2006
Posts: 6196

PostPosted: Fri Jan 28, 2011 7:27 pm    Post subject: Reply with quote

I don't know about your particular setup, but generally it's unsafe to rely on any particular order of event* nodes
- if possible, it's better to implement matching by tags.
Back to top
View user's profile Send private message
pingufunkybeat
l33t
l33t


Joined: 01 Dec 2004
Posts: 610

PostPosted: Fri Jan 28, 2011 7:28 pm    Post subject: Reply with quote

Have you actually tried this?

Where are you attaching the keyboard and the mouse to a particular screen? Without this, they will all be active on all screens, making multi-seat impossible. You will need a ServerLayout section for each seat, tying one of your screens to a card, monitor, keyboard and a mouse.

AFAIK, after all my research, it is not possible to have a multi-seat setup with InputClass at this time, because ServerLayout does not accept InputClass, but only InputDevice identifiers.

This is the relevant part of my xorg.conf, for seat0:

Code:

Section "ServerFlags"
    Option      "DefaultServerLayout" "seat0"
    Option      "AllowMouseOpenFail"  "true"
    Option      "DontVTSwitch" "true"
    Option      "DontZap" "false"
    Option      "AutoEnableDevices" "true"
    Option      "AutoAddDevices" "true"
    Option      "ColorTiling" "true"
EndSection

Section "ServerLayout"                                                                                                     
        Identifier     "seat0"                                                                                             
        Screen      0  "Screen0" 0 0                                                                                       
        InputDevice    "Mouse0" "CorePointer"                                                                               
        InputDevice    "Keyboard0" "CoreKeyboard"                                                                           
EndSection                                                                                                                 
             


Section "InputDevice"
    Identifier     "Keyboard0"
    Driver         "evdev"
    Option         "Device" "/dev/input/by-id/usb-LITEON_Technology_USB_Multimedia_Keyboard-event-kbd"
    Option         "XkbModel" "pc105"
    Option         "XkbLayout" "us"
    Option         "XkbRules"   "xorg"
EndSection

Section "InputDevice"
    Identifier     "Mouse0"
    Driver         "evdev"
        Option         "Protocol" "ExplorerPS/2"
    Option         "Device" "/dev/input/by-id/usb-15d9_USB_OPTICAL_MOUSE-event-mouse"
EndSection


You will need one for seat1 too. The rest of your config should be ok. Keep in mind that using InputDevice like this will break hotplugging, and your mouse or keyboard might stop working from time to time, requiring a new login. Yes, it sucks, but I don't know the solution either.

VERY important: turn off virtual terminals -- otherwise they will continue receiving all keyboard input, and you'll accidentally log in as root in one of them and do nonsense. It happened to me, and you don't want to have to debug this sort of stuff! That is what DontVTSwitch does.

Also important, in your kdmrc, you want something like this:

[X-:0-Core]
ServerArgsLocal=-nolisten tcp -layout seat0 -sharevts -novtswitch -keeptty -isolateDevice PCI:3:0:0

....

[X-:1-Core]
ServerArgsLocal=-nolisten tcp -layout seat1 -novtswitch -keeptty -isolateDevice PCI:2:0:0


Notice that they are different, the second one does not have -sharevts. Both have -keeptty.

Most multi-seat tutorials on the net will tell you to not use -keeptty and to use -sharevts for both. This resulted in very mysterious breakage here. Try both, see how it works.

Right now, my multiseat setup is working like a Swiss watch, with the exception of the hotplugging issue.
Back to top
View user's profile Send private message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5910

PostPosted: Fri Jan 28, 2011 8:05 pm    Post subject: Reply with quote

VoidMage wrote:
I don't know about your particular setup, but generally it's unsafe to rely on any particular order of event* nodes
- if possible, it's better to implement matching by tags.


so how I can attach specific mouse+keyboard+screen?

pingufunkybeat wrote:
Have you actually tried this?

Where are you attaching the keyboard and the mouse to a particular screen? Without this, they will all be active on all screens, making multi-seat impossible. You will need a ServerLayout section for each seat, tying one of your screens to a card, monitor, keyboard and a mouse.

AFAIK, after all my research, it is not possible to have a multi-seat setup with InputClass at this time, because ServerLayout does not accept InputClass, but only InputDevice identifiers.

This is the relevant part of my xorg.conf, for seat0:

Code:

Section "ServerFlags"
    Option      "DefaultServerLayout" "seat0"
    Option      "AllowMouseOpenFail"  "true"
    Option      "DontVTSwitch" "true"
    Option      "DontZap" "false"
    Option      "AutoEnableDevices" "true"
    Option      "AutoAddDevices" "true"
    Option      "ColorTiling" "true"
EndSection

Section "ServerLayout"                                                                                                     
        Identifier     "seat0"                                                                                             
        Screen      0  "Screen0" 0 0                                                                                       
        InputDevice    "Mouse0" "CorePointer"                                                                               
        InputDevice    "Keyboard0" "CoreKeyboard"                                                                           
EndSection                                                                                                                 
             


Section "InputDevice"
    Identifier     "Keyboard0"
    Driver         "evdev"
    Option         "Device" "/dev/input/by-id/usb-LITEON_Technology_USB_Multimedia_Keyboard-event-kbd"
    Option         "XkbModel" "pc105"
    Option         "XkbLayout" "us"
    Option         "XkbRules"   "xorg"
EndSection

Section "InputDevice"
    Identifier     "Mouse0"
    Driver         "evdev"
        Option         "Protocol" "ExplorerPS/2"
    Option         "Device" "/dev/input/by-id/usb-15d9_USB_OPTICAL_MOUSE-event-mouse"
EndSection


You will need one for seat1 too. The rest of your config should be ok. Keep in mind that using InputDevice like this will break hotplugging, and your mouse or keyboard might stop working from time to time, requiring a new login. Yes, it sucks, but I don't know the solution either.

VERY important: turn off virtual terminals -- otherwise they will continue receiving all keyboard input, and you'll accidentally log in as root in one of them and do nonsense. It happened to me, and you don't want to have to debug this sort of stuff! That is what DontVTSwitch does.

Also important, in your kdmrc, you want something like this:

[X-:0-Core]
ServerArgsLocal=-nolisten tcp -layout seat0 -sharevts -novtswitch -keeptty -isolateDevice PCI:3:0:0

....

[X-:1-Core]
ServerArgsLocal=-nolisten tcp -layout seat1 -novtswitch -keeptty -isolateDevice PCI:2:0:0


Notice that they are different, the second one does not have -sharevts. Both have -keeptty.

Most multi-seat tutorials on the net will tell you to not use -keeptty and to use -sharevts for both. This resulted in very mysterious breakage here. Try both, see how it works.

Right now, my multiseat setup is working like a Swiss watch, with the exception of the hotplugging issue.

as I said before, it id for a future multiseat, I just want to make sure I got the config right.
thanks for the help, btw, how do you differentiate between sounds of each seat?
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Back to top
View user's profile Send private message
pingufunkybeat
l33t
l33t


Joined: 01 Dec 2004
Posts: 610

PostPosted: Sat Jan 29, 2011 1:08 am    Post subject: Reply with quote

You can use /dev/input/by-id/..... to identify a particular mouse and particular keyboard. That's what I did, you can get the ids by checking the /dev/input/by-id directories.

Quote:
thanks for the help, btw, how do you differentiate between sounds of each seat?

You don't. At least I don't know how, and since I only have one sound card, it doesn't make a difference anyway. dmix mixes them all automatically (even with different users using the soundcard at the same time), and since both my seats are next to each other, that's the only solution which makes sense.

It's not an X issue since X does not deal with sound. You have to find another way to tell all your applications to use a particular sound card if this is really what you need.
Back to top
View user's profile Send private message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5910

PostPosted: Sat Jan 29, 2011 6:25 am    Post subject: Reply with quote

pingufunkybeat wrote:
You can use /dev/input/by-id/..... to identify a particular mouse and particular keyboard. That's what I did, you can get the ids by checking the /dev/input/by-id directories.

Quote:
thanks for the help, btw, how do you differentiate between sounds of each seat?

You don't. At least I don't know how, and since I only have one sound card, it doesn't make a difference anyway. dmix mixes them all automatically (even with different users using the soundcard at the same time), and since both my seats are next to each other, that's the only solution which makes sense.

It's not an X issue since X does not deal with sound. You have to find another way to tell all your applications to use a particular sound card if this is really what you need.

never said that it is a x issue, justed asked.
ok. will do, thanks.
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Back to top
View user's profile Send private message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5910

PostPosted: Sun Jan 30, 2011 4:35 pm    Post subject: Reply with quote

do I even need udev enabled in xserver?
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments 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