Thursday, July 16, 2009

Multiseat with nVidia card

A new configuration of the dual seat system has been tested with a different hardware.

Computer: HP dc7700 ultra-slim 1GB RAM, 250GB HD

The computer comes with an integrated Intel graphics card:
$ lspci | grep VGA
00:02.0 VGA compatible controller: Intel Corporation 82Q963/Q965 Integrated Graphics Controller (rev 02)


Unfortunately, this card has only one output, so we had to replace the original card. We added another one, in particular one suggested by HP (we are limited since this is a small form factor PC with important limitations in the physical size of PCI cards).

We added a PCIe nVidia card with dual output:
$ lspci | grep VGA
01:00.0 VGA compatible controller: nVidia Corporation Quadro NVS 290 (rev a1)


First of all, we encountered some problems:
Once installed the new card, we were unable to boot the live version of Ubuntu 9.04. We had to revert back to the intel card, install the Ubuntu distribution, then plug the nVidia card and finally boot the computer with the system already installed. Doing the installation in this way everything worked properly and we were able to continue with the setup of the dual seat system.

In order to setup the nVidia cards, we choose to use the proprietary drivers (nvidia-glx-180 and two dependent packages: nvidia-180-libvdpau, nvidia-180-modaliases) and we also installed the package nvidia-settings

The tool nvidia-settings is useful to generate the proper xorg.conf. We need this file to tell the system that we are going to have a multihead setup.



In our particular case, this is the xorg.conf generated file

# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings: version 1.0 (buildd@palmer) Sun Feb 1 20:21:04 UTC 2009

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

Section "Files"
EndSection

Section "Module"
Load "dbe"
Load "extmod"
Load "type1"
Load "freetype"
Load "glx"
EndSection

Section "ServerFlags"
Option "Xinerama" "0"
EndSection

Section "InputDevice"
# generated from default
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/psaux"
Option "Emulate3Buttons" "no"
Option "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
# generated from default
Identifier "Keyboard0"
Driver "kbd"
EndSection

Section "Monitor"
# HorizSync source: edid, VertRefresh source: edid
Identifier "Monitor0"
VendorName "Unknown"
ModelName "LG L1953HM"
HorizSync 30.0 - 83.0
VertRefresh 56.0 - 75.0
Option "DPMS"
EndSection

Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "Quadro NVS 290"
EndSection

Section "Screen"
Identifier "Screen0"
Device "Device0"
Monitor "Monitor0"
DefaultDepth 24
Option "TwinView" "1"
Option "TwinViewXineramaInfoOrder" "CRT-0"
Option "metamodes" "CRT-0: 1280x1024 +0+0, CRT-1: 1280x1024_60 +0+1024"
SubSection "Display"
Depth 24
EndSection

Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "Quadro NVS 290"
EndSection

Section "Screen"
Identifier "Screen0"
Device "Device0"
Monitor "Monitor0"
DefaultDepth 24
Option "TwinView" "1"
Option "TwinViewXineramaInfoOrder" "CRT-0"
Option "metamodes" "CRT-0: 1280x1024 +0+0, CRT-1: 1280x1024_60 +0+1024"
SubSection "Display"
Depth 24
EndSubSection
EndSection


Having done these changes, the rest of the setup is just the same as with the ATI graphics card.
The seats now do support glx functions (glxgears, screensavers, and so)

16 comments:

z12 said...

There's a "Free for personal use" multi-seat commercial product that achieves the same end goal with a stable end result with dramatically less effort (albeit at slightly higher cost).

Though the software is commercial http://userful.com (though an opensource project http://openuserful.sourceforge.net/ is in the works). it saves you money on hardware, allowing you to use $20/head video cards, and $5 USB keyboards and setup and configure it in 5 minutes.

How is Userful's product different from or better than other multi-seat approaches?

Userful's approach virtualizes a single instance of X to support multiple users. Other multi-seat approaches start separate instances of X (one for each user). The separate instance approach has the following limitations:

1. They don't support using both heads on consumer dual head cards. 2. They are very finicky about the graphics cards and chipsets supported. 3. They are less resource efficient (each instance of X imposes a RAM and CPU overhead).

Userful has been deploying multi-station Linux since early 2002 and developed some GPL'd kernel and X patches back in 2002 to help make multi-station work. Eventually they switched to this new approach because of the difficulties listed above.

Userful Multiplier package also includes some graphical install and configuration tools, cross distro testing and quality assurance, and builds RPM/DEB packages to make installation and removal on supported distros comparatively effortless.

the free version is available here: http://userful.com/products/free-2-user

josean said...

Did you read this tutorial?

This approach has multiple differences compared to others.

1. They don't support using both heads on consumer dual head cards

As you can see, we are using both heads in very basic (even discontinued) consumer level dual head cards.

2. They are very finicky about the graphics cards and chipsets supported

Definitely you did not test our system. It works with almost any ATI card, also on nVidia cards, and pending to confirm but seems to work also on integrated intel cards.

3. They are less resource efficient (each instance of X imposes a RAM and CPU overhead).

Please, count how many X instances are running on our system (a clue: it is a number between zero and two).

I'm afraid that you are just copy-pasting the same message on any web page dealing with multiseat solutions just to promote your solution.

You should better share your knowledge and give some positive feedback proposing improvements and helping to achieve a more robust and stable multiseat system.

Unknown said...

Thanks for the excellent tips on your blog!

I'm trying to get multiseat working w/GLX (and vdpau) working on an nvidia ion box running Ubuntu Jaunty and the rev 190 nvidia drivers.

I can't seem to get GLX working no matter how I try.

Is there an issue w/dbus / policykit?

josean said...

May be this is an issue with the nVidia ion card. As you know, this is a very recent model and I do not know if it is fully supported.

My experience with nVidia cards is very limited, since I have installed the multiterminal using just one model of these cards.

Unknown said...

Hello All,

I've faced a problem with hot-pluggable devices (for example flash drives). I couldn't open it in Gnome via clicking on drive icon on the desktop. It's possible to mount it only via shell, by mount command.

Could anybody help me with it? It's very annoying problem for me.

Thanks in advance!

/Regards,
Alexander

Anonymous said...

Hi Josean,

First of all, thanks for your multi-seat posts.
I just have a question, I can't seem to get GLX going on the Xephyr sessions...
I have an nvidia card (GeForce 8500 GT - configured in the way you explained - I get the nVidia splash, so that should be ok). I expect that I don't have to add any arguments the the Xypher-server or am I wrong here...

Info: I'm running Ubuntu 8.04 (32-bit) --> I switched from Fedora 11-KDE to Ubuntu-GDM 8.04 after reading your posts.


Greetings and Happy new Year,
Wilfried

josean said...

3D acceleration support is very limited. The goal of the article is to tell how to achieve multiseat having a nVidia card, but sadly the usage of Xephyr limits a lot the possibilities of having 3D acceleration.

Anonymous said...

Hi,
the comment of z12 is definetly an advertising.
Why don't you (the website-admin) remove this ad?

josean said...

Yes. It is an advertising, but I understand that it is a product closely related to the topic covered here. I have removed several others advertisements not related at all with the article contents.

I also understand that people reading my blog is interested in open source software and solutions, in DIY stuff and may be they are less interested in commercial solutions.

I do not mind that people know alternatives so they can choose the most appropriate for their own particular scenario. Anyway, thanks for your interest in helping to keep clean the blog!

Unknown said...

I'm not so concerned about GLX, but am very interested in working mplayer and full screen flash video.

Those work on a single head, if I use either Xephyr or Userful to split it into two stations will either of them be able to handle video?

Also, why is it that I can get two Xservers running for multiple simultaneous sessions so easily, get my single card with multiple outputs giving me a :0.1 display, but it seems impossible to have that second display running the second session? Where is the limitation and if it's software, what makes it so complex that it hasn't happened yet?

All this one X session with others nested in it stuff just seems unnecessarily hacky and kind of an interim solution? Is there some kind of hardware limitation? Or the card vendors don't give the right info? Or was it mainly the lack of a VGA arbiter and this will all get much more straightforward soon?

aneolf said...

Hola Josean
Este verano me gustaría instalar el multipuesto en un Lucid Lynx. ¿Has probado a hacerlo tu? ¿Ha sido muy distinto de Karmic?
Enhorabuena por tu trabajo. Lástima que nos tengas olvidados a los que utilizamos la lengua de Cervantes.

Unknown said...

@Cy6erBr4in

In order to automount a flash drive, you must add a line in /etc/fstab.
/dev/ vfat users,exec,auto 0 0

Generally, and assuming you have only one hard drive, the flash drives have the block device /dev/sdb1. I have 5 multiseats in production, with 6 heads each.

My fstab line is
/dev/sdb1 /media/usb vfat users,exec,auto 0 0

Remember to create the /media/usb folder.

If you create the mount point in /media, the device will automatically show in the desktop and open a window showing its contents to all users.

aneolf said...

Hello Josean

Can you explain me why do you repeat the Section "Device", and why you put only one Section "Monitor", in the xorg.conf file?
I'm having troubles with the position of the monitors :-(

speedoSTAR said...

Hye there. I was wondering if is it possible to use ATI graphics series 4000? i tried million times but seems failed to me...

Arie Skliarouk said...

Just found an post on multiseat setup for ubuntu 10.10:
http://www.amxl.com/c/single-graphics-card-multi-seat-ubuntu-linux

As the ubuntu's GDM does not support running from inside of Xephyr, automatic login with predefined users had to be used, which is not acceptable for everybody...

josean said...

Great news Arie.
I will have a look to test the proposed method in some of our computers. I will inform about the results.