From: Helge H. <hel...@hi...> - 2004-08-17 08:05:32
|
dave giffin wrote: >I've used backstreet ruby before with 2 regular >XFree86 servers. > > This is possible with linux-2.6+ruby too. >Now, I would like to be able to use an XDirectFB (an X >server using the DirectFB framebuffer library) >instance on one card while simultaneously using a >regular XFree86. > > Why do you want to use the framebuffers? X is usually faster using the regular accelerated servers. Or is that impossible for some reason? >I want to be able to use a regular (non-framebuffer) >XFree86 server on one graphics card and a framebuffer >app on another graphics card. > > > This is possible. >If that is not possible, I would settle for using two >independent framebuffer apps, one on each card (I'd >just use two XDirectFBs) > > > Also possible. >How do I use ruby (linux-2.6) to setup multi-user >framebuffers? > > First, install the hardware, i.e. your graphichs cards, monitors mice, and keyboards. Then compile a linux 2.5+ruby kernel, with framebuffer support for the card you want to use. You may want to use framebuffer console support if you want to run regular logins on the framebuffer when not using X. If you use fbcon, you probably need framebuffer support for your regular card too, so ruby will understand that there is two consoles. IF you don't use fbcon, use the "dumbcon=1" parameter on the kernel command line. "dumbcon" create a input-only console for the second keyboard. A keyboard must hook up with _some_ console, or it goes unused. Install your regular xserver in the regular way, i.e. the way it is usually installed with your distribution. You may have to use the prefbusid/isolatedevice/singlecard option in XF86config so the other card doesn't get disabled. (Read mailing list archives or search google for details on that.) If your xserver doesn't support this, compile your own which is a lot of work. The xserver in debian testing should be fine though. If you get trouble, also look for the "hackvideo" solution which achieve the same in a different way. You may also want to verify that the framebuffer for the other display works. Do that by catting a file into the framebuffer device, and verify that garbage indeed appear on the other screen. cat file > /dev/fb0 or cat file > /dev/fb1 depending on which framebuffer device that card is. (If you don't know, look at dmesg output or just try the commands.) Any non-empty file will do. Now set up the second xserver, by creating an alternate XF86Config-4 file. Call it something different from XF86Config-4, because that filename is used for your regular xserver. The "device" section should contain Driver "fbdev" in order to use the X framebuffer driver, and Option "fbdev" "/dev/fb0" or Option "fbdev" "/dev/fb1" depending on what framebuffer the second screen is on. Framebuffer X does not need to know what card or what kind of card it uses - it does everything through the kernel framebuffer interface. This is unaccelerated but usually fast enough for 2D apps. You can even use software 3D if you like - but it'll be way too slow for anything but very simple effects. (It is fine for playing the frozen-bubble game :-) When starting the second xserver, use the -xf86config parameter to specify your alternate X config file. Also specify what VT the server should use. With ruby, the second keyboard is usually on VT17. (It might be higher up if you're using fbcon and runs a getty on vt17. But console switching on secondary framebuffers doesn't work too well yet, so you probably don't do that.) I use xdm to manage two xservers, one regular accelearated and one framebuffer. My /etc/X11/xdm/Xservers look like this: #regular, using /etc/X11/XF86Config-4, running on vt7 :0 local /usr/X11R6/bin/X :0 vt7 -deferglyphs 16 -nolisten tcp #framebuffer, using /etc/X11/xf86config-4 running on vt17 :1 local /usr/X11R6/bin/X :1 vt17 -deferglyphs 16 -nolisten tcp -xf86config xf86config-4 If you want to start stuff from a script instead of xdm, use something like this (untested): /usr/X11R6/bin/X :0 vt7 -deferglyphs 16 -nolisten tcp & /usr/X11R6/bin/X :1 vt17 -deferglyphs 16 -nolisten tcp -xf86config xf86config-4 & You might want to run a font server when using two xservers, for efficieny reasons. If you don't then both xservers will run their own internal font server, but running two font servers probably waste memory. Using one xfs, and specifying FontPath "unix/:7100" in the X config files is probably better. Helge Hafting |