Meego Wiki
Views

Enable Multiseat support in MeeGo

From MeeGo wiki
(Difference between revisions)
Jump to: navigation, search
(Setup)
 
(6 intermediate revisions not shown)
Line 1: Line 1:
-
This is a step-by-step guide to enable Multiseat[http://en.wikipedia.org/wiki/Multiseat_configuration] on '''single video card''' with Xfce[http://en.wikipedia.org/wiki/Xfce] desktop environment, based on Xephyr[http://en.wikipedia.org/wiki/Xephyr] and XRandR[http://en.wikipedia.org/wiki/RandR].
+
This is a step-by-step guide to enable '''Multiseat'''[http://en.wikipedia.org/wiki/Multiseat_configuration] on '''single video card''' with '''Xfce'''[http://en.wikipedia.org/wiki/Xfce] desktop environment, based on '''Xephyr'''[http://en.wikipedia.org/wiki/Xephyr] and '''XRandR'''[http://en.wikipedia.org/wiki/RandR].
Line 17: Line 17:
* 4) Setup Repo
* 4) Setup Repo
 +
        cd /etc/zypper/repos.d
         wget http://download.meego.com/live/MeeGo:/1.2.0:/oss:/Update:/Testing/MeeGo_1.2.0/MeeGo:1.2.0:oss:Update:Testing.repo
         wget http://download.meego.com/live/MeeGo:/1.2.0:/oss:/Update:/Testing/MeeGo_1.2.0/MeeGo:1.2.0:oss:Update:Testing.repo
         wget http://download.meego.com/live/home:/yyin2:/branches:/MeeGo:/1.2.0:/oss:/Update:/Testing/MeeGo_1.2.0/home:yyin2:branches:MeeGo:1.2.0:oss:Update:Testing.repo
         wget http://download.meego.com/live/home:/yyin2:/branches:/MeeGo:/1.2.0:/oss:/Update:/Testing/MeeGo_1.2.0/home:yyin2:branches:MeeGo:1.2.0:oss:Update:Testing.repo
Line 22: Line 23:
         zypper refresh
         zypper refresh
-
* 5) install modified xorg-xephyr, xfce4-panel, mdm from "yyin2" repo
+
* 5) Install modified xorg-xephyr, xfce4-panel, mdm from "yyin2" repo
         zypper install xorg-x11-server-Xephyr xfce-panel mdm
         zypper install xorg-x11-server-Xephyr xfce-panel mdm
-
* 6) setup kebyoard/mouse
+
* 6) Setup kebyoard/mouse
         mkdir -p /etc/mdm/devices
         mkdir -p /etc/mdm/devices
 +
        cd /etc/mdm/devices
         ln -sf /dev/input/by-id/xxxx keyboard1
         ln -sf /dev/input/by-id/xxxx keyboard1
         ln -sf /dev/input/by-id/xxxx keyboard2
         ln -sf /dev/input/by-id/xxxx keyboard2
Line 32: Line 34:
         ln -sf /dev/input/by-id/xxxx mouse2
         ln -sf /dev/input/by-id/xxxx mouse2
-
* 7) setup X
+
* 7) Setup X
         xrandr -q  # there should be at least two monitors listed out, e.g. "LVDS1", "VGA1", or else STOP here.
         xrandr -q  # there should be at least two monitors listed out, e.g. "LVDS1", "VGA1", or else STOP here.
         Xorg -configure
         Xorg -configure
Line 39: Line 41:
         nohup /usr/bin/X -config /etc/mdm/xorg.conf.mdm vt08 -logfile /etc/mdm/xorg.mdm.log -dpms -s 0 :0 >/dev/null 2>/dev/null &
         nohup /usr/bin/X -config /etc/mdm/xorg.conf.mdm vt08 -logfile /etc/mdm/xorg.mdm.log -dpms -s 0 :0 >/dev/null 2>/dev/null &
-
* 8) run Xephyr
+
* 8) Run Xephyr
         xrandr --output LVDS1 --mode 1024x600
         xrandr --output LVDS1 --mode 1024x600
         xrandr --output VGA1 --mode 1024x768   
         xrandr --output VGA1 --mode 1024x768   
Line 57: Line 59:
         export DISPLAY=:2; xterm &  #test the keyboard/mouse of 2nd seat in the terminal
         export DISPLAY=:2; xterm &  #test the keyboard/mouse of 2nd seat in the terminal
-
* 9) run xfwm4, xfce4-panel, xfce4-session
+
* 9) Run xfwm4, xfce4-panel, xfce4-session
         zypper install xfce4-settings xfce4-taskmanager xfce4-mixer xfce4-battery-plugin  xfce-utils  xfce4-appfinder  Thunar thunar-vfs thunar-volman   
         zypper install xfce4-settings xfce4-taskmanager xfce4-mixer xfce4-battery-plugin  xfce-utils  xfce4-appfinder  Thunar thunar-vfs thunar-volman   
         export DISPLAY=:1; xfwm4; xfce4-session
         export DISPLAY=:1; xfwm4; xfce4-session
         export DISPLAY=:2; xfwm4; xfce4-session
         export DISPLAY=:2; xfwm4; xfce4-session
-
* 10) now you should have two seats setup, each one has its own keyboard/mouse/monitor, and you can play different videos in two seats concurrently.
+
* 10) Now you should have two seats setup, each one has its own keyboard/mouse/monitor, and you can play different videos in two seats concurrently.
== Performance ==
== Performance ==
-
* Xehpyr for MeeGo has been enhanced for GL acceleration, you can simply compare the 3D performance by run the "glxgears" in native X, one Xephyr instance, two Xephyr instances. In my testing, the data are 70 FPS, 70 FPS, 50(x2) FPS respectively, no dramatic performance drop.
+
* Xehpyr for MeeGo has been enhanced for GL acceleration [http://lists.meego.com/pipermail/meego-sdk/2010-September/000301.html], you can simply compare the 3D performance by run the "glxgears" in native X, one Xephyr instance, two Xephyr instances. In my testing, the data are 70 FPS, 70 FPS, 50(x2) FPS respectively, no dramatic performance drop.
-
* Xvideo extension works in both Xephyr instances, in my testing to playing 2x480p ogv video (no hardware decoding) in two seats concurrently, it will cost about 85% CPU utilization.
+
* Xvideo extension works in both Xephyr instances, in my testing to playing 2x480p ogv video (no hardware decoding) in two seats concurrently, it will cost about 85% CPU utilization with Acer Aspire One (Pinetrail based netbook).
== Limitation ==
== Limitation ==
* The audio output are now mixed when playing two videos/audio streams concurrently, if you have another bluetooth headset, you can run "pacmd" and move one audio stream to the bluetooth sink, so that two audio streams are separated.
* The audio output are now mixed when playing two videos/audio streams concurrently, if you have another bluetooth headset, you can run "pacmd" and move one audio stream to the bluetooth sink, so that two audio streams are separated.
* The Chromium browser will always open a new "Tab" in the 1st seat if you launch it in the 2nd seat, probably some setting in Chromium says "Always start a new '''Tab''' instead of a new '''Window'''".
* The Chromium browser will always open a new "Tab" in the 1st seat if you launch it in the 2nd seat, probably some setting in Chromium says "Always start a new '''Tab''' instead of a new '''Window'''".

Latest revision as of 09:27, 14 December 2011

This is a step-by-step guide to enable Multiseat[1] on single video card with Xfce[2] desktop environment, based on Xephyr[3] and XRandR[4].


Contents

Note

  • 1) Xfce desktop environment is enabled, Mutter based desktop environment doesn't work per testing.
  • 2) A lot of integration work needs to be done with uxlaunch/ConsoleKit/etc.
  • 3) All below commands are assumed to run with "root", you'd better "ssh" to the netbook to copy/paste some of those commands.

Setup

  • 1) Install MeeGo 1.2.0 for Netbook, image is here [5].
  • 2) Edit /etc/inittab, change default runlevel from 5 to 3, then reboot
  • 3) Setup Proxy
       export http_proxy=http://<proxy_server>:<proxy_port>
       export no_proxy=.intel.com,10.0.0.0/8
  • 4) Setup Repo
       cd /etc/zypper/repos.d
       wget http://download.meego.com/live/MeeGo:/1.2.0:/oss:/Update:/Testing/MeeGo_1.2.0/MeeGo:1.2.0:oss:Update:Testing.repo
       wget http://download.meego.com/live/home:/yyin2:/branches:/MeeGo:/1.2.0:/oss:/Update:/Testing/MeeGo_1.2.0/home:yyin2:branches:MeeGo:1.2.0:oss:Update:Testing.repo
       wget http://download.meego.com/live/home:/yyin2:/branches:/MeeGo:/1.2.0:/oss/standard/home:yyin2:branches:MeeGo:1.2.0:oss.repo
       zypper refresh
  • 5) Install modified xorg-xephyr, xfce4-panel, mdm from "yyin2" repo
       zypper install xorg-x11-server-Xephyr xfce-panel mdm
  • 6) Setup kebyoard/mouse
       mkdir -p /etc/mdm/devices
       cd /etc/mdm/devices
       ln -sf /dev/input/by-id/xxxx keyboard1
       ln -sf /dev/input/by-id/xxxx keyboard2
       ln -sf /dev/input/by-id/xxxx mouse1
       ln -sf /dev/input/by-id/xxxx mouse2
  • 7) Setup X
       xrandr -q  # there should be at least two monitors listed out, e.g. "LVDS1", "VGA1", or else STOP here.
       Xorg -configure
       cp /root/xorg.conf.new /etc/mdm/xorg.conf.mdm
       <add lines "Virtual 2048 2048" to /etc/mdm/xorg.conf.mdm Display section, this is the key "magic" of this guide, a big Virtual Screen will be assembled by LVDS1+VGA1, the width (or the height) should be bigger than the sum of width (or height) of LVDS1+VGA1>
       nohup /usr/bin/X -config /etc/mdm/xorg.conf.mdm vt08 -logfile /etc/mdm/xorg.mdm.log -dpms -s 0 :0 >/dev/null 2>/dev/null &
  • 8) Run Xephyr
       xrandr --output LVDS1 --mode 1024x600
       xrandr --output VGA1 --mode 1024x768  
       xrandr --output VGA1 --right-of LVDS1
       export DISPLAY=:0
       seat-parent-window 1024x600+0+0 seat-parent-window0-LVDS1 & 
       seat-parent-window 1024x768+1024+0 seat-parent-window0-VGA1 &
       xwininfo -name seat-parent-window0-LVDS1 (get the window id, e.g. 0x200001)
       xwininfo -name seat-parent-window0-VGA1  (get the window id, e.g. 0x400001)
       export DISPLAY=:0; Xephyr :1  -dpms -s 0 -br :1 -parent 0x200001 -mouse evdev,,device=/etc/mdm/devices/mouse1 -keybd evdev,,device=/etc/mdm/devices/keyboard1,xkbmodel=evdev,xkblayout=us -nolisten tcp vt9 &	
       export DISPLAY=:1; xterm &  #test the keyboard/mouse of 1st seat in the terminal
       export DISPLAY=:0; Xephyr :2  -dpms -s 0 -br :2 -parent 0x400001 -mouse evdev,,device=/etc/mdm/devices/mouse2 -keybd evdev,,device=/etc/mdm/devices/keyboard2,xkbmodel=evdev,xkblayout=us -nolisten tcp vt9 &	
       export DISPLAY=:2; xterm &  #test the keyboard/mouse of 2nd seat in the terminal
  • 9) Run xfwm4, xfce4-panel, xfce4-session
       zypper install xfce4-settings xfce4-taskmanager xfce4-mixer xfce4-battery-plugin  xfce-utils  xfce4-appfinder  Thunar thunar-vfs thunar-volman  
       export DISPLAY=:1; xfwm4; xfce4-session
       export DISPLAY=:2; xfwm4; xfce4-session
  • 10) Now you should have two seats setup, each one has its own keyboard/mouse/monitor, and you can play different videos in two seats concurrently.

Performance

  • Xehpyr for MeeGo has been enhanced for GL acceleration [6], you can simply compare the 3D performance by run the "glxgears" in native X, one Xephyr instance, two Xephyr instances. In my testing, the data are 70 FPS, 70 FPS, 50(x2) FPS respectively, no dramatic performance drop.
  • Xvideo extension works in both Xephyr instances, in my testing to playing 2x480p ogv video (no hardware decoding) in two seats concurrently, it will cost about 85% CPU utilization with Acer Aspire One (Pinetrail based netbook).

Limitation

  • The audio output are now mixed when playing two videos/audio streams concurrently, if you have another bluetooth headset, you can run "pacmd" and move one audio stream to the bluetooth sink, so that two audio streams are separated.
  • The Chromium browser will always open a new "Tab" in the 1st seat if you launch it in the 2nd seat, probably some setting in Chromium says "Always start a new Tab instead of a new Window".
Personal tools