LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices

Reply
 
Search this Thread
Old 10-26-2010, 11:06 AM   #1
Skaperen
Senior Member
 
Registered: May 2009
Location: WV, USA
Distribution: Slackware, CentOS, Ubuntu, Fedora, Timesys, Linux From Scratch
Posts: 1,777
Blog Entries: 20

Rep: Reputation: 115Reputation: 115
Two video "cards"


I'm looking at buying computer that has a Matrox G200 video chip on the mainboard, and will have an NVIDIA 9500 video card (1GB) in a PCIe slot. What I want to do is set this up so the G200 just operates in text mode, and X uses only the NVIDIA 9500. From what I've read a while back, this should be doable. I presume I just leave the G200 enabled in BIOS.

What I'm more curious about is the keyboard(s)/mice. Can I have one keyboard and mouse being used on the text console (via PS/2) and another keyboard and mouse being used on X (via USB) at the same time ... so two different people can work (one in text, the other in X)? Would X occupy a virtual console position this way?
 
Old 10-26-2010, 07:52 PM   #2
GrapefruiTgirl
Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
multiple video cards, separate X/non-X sessions per card.

Sounds like you're talking about almost a multi-seat scenario (assuming both users are physically in the same location) except it's running only one X session. X would occupy a VT position, yes, and that's where the problem begins-- the linux kernel's console driver is (apparently) not capable of focusing and updating more than one VT on the physical machine at a time. This is why "multi-seat" as we usually refer to it as, virtually always refers to a "multi-seat X" setup- because X can take over the hardware and control the various screens, mice, keyboards all nicely and orderly. In console mode, you can't have two different users logged in, on separate video cards, on separate VT's in console mode, simultaneously.. So a half+half scenario is questionable.

If it wouldn't have to be a console user for one of the users you're talking about, why not consider a dual X setup? Getting each mouse/keyboard pair distinguished between the console and X, is the relatively easy part if you go that route. And for the console user, just use an Xterm instead.

Just last week I finally figured out how to get a separate X session started on my own machine in a similar fashion to what you describe: I got an X started for one video card and its connected monitor, and then I started another X on my other video card with its monitor, and it actually worked, BUT: I was just testing and was too lazy to actually connect a second keyboard+mouse, so I had some weird effects and the mouse/keyboard was inputting on both X sessions in parallel. Basically it worked though; just needed some tweaking.

Incidentally, while playing with that, I did manage also to start an X on my right monitor+card, while leaving the console active on the left card+monitor, but it didn't seem to work right (perhaps due to what I described in my first paragraph above) - when I was focused on the X, the console froze in time, and when I switched back to the console I couldn't type. However, both X and console remained on both screens the whole time, which was kinda neat. Part of the problems again may be due in part to my having only a single mouse and keyboard connected; results may have been better with two pairs, and I plan to test it again shortly (a few days..).
I should note too that, when I boot up (and possibly will be the same for you), I only have one card (the primary card) become active, until I start X. The second card+monitor remain asleep in console mode. So, in my experimenting, I made X start on the asleep monitor, and kept my VT on the primary monitor, since that was where the kernel's console driver was focused.

Off hand I cannot think of how/where one would tell the kernel console driver which keyboard to use, if more than one are connected. With any luck, the console will grab & use the PS/2 one by default for example, and then you would tell X to use the USB one. As for the mouse, tell GPM to use one, and X to use the other.

There are close to a half-dozen threads I can recall, about this and very closely related subjects, on LQ, some of them posted to within the past several months. You'll find posts by me in most of them if you go use the Search page. If you have troubles finding the threads I'll dig a couple up later.. Have a search and see if there's anything interesting/useful that you find. Meanwhile, if you're interested in hearing test results, I will test further on my machine and see if I can get X on one card+monitor while having a functional VT on the other pair, with separate keyboards, and let you know how that goes. Who knows, maybe magically it'll work.
Or, if you want to try dual separate X sessions on each card+monitor pair I'll paste the code I'm toying with for starting X. I don't use a session manager so it's just using `startx` from init 3.

By the way, which OS do you plan to do this with? You list several in your profile. That can and probably will make a difference, as far as which DM (session manager) you use, how X gets started, etc., plus if you want documentation, there are more multi-seat docs on the net for say Ubuntu for example, than there are for many other Linuxes. I'm using Slackware so any help I can give is going to have a Slackware twist to it.

Cheers for now.
 
Old 10-27-2010, 01:43 PM   #3
Skaperen
Senior Member
 
Registered: May 2009
Location: WV, USA
Distribution: Slackware, CentOS, Ubuntu, Fedora, Timesys, Linux From Scratch
Posts: 1,777
Blog Entries: 20

Original Poster
Rep: Reputation: 115Reputation: 115
I'm specifically wanting to have both text console AND X. Of course I can do that just fine by switching between them using Ctrl+Alt+Fn. But here's where it departs from the usual. The machine will have both a mainboard Matrox G200 video chip, and a PCI-e attached NVIDIA card. X will function better on the NVIDIA card because it will have 1GB of video RAM. Text will function better on the Matrox G200 because SVGATextMode, which can manage the video mode, supports G200, but not the NVIDIA. If you know of a program like SVGATextMode, but for NVIDIA, that can manage the video mode, that might move the problem back to Ctrl+Alt+Fn space.

It isn't really a 2 person scenario. I'd just hook both video outputs to a KVM that supports both PS/2 and USB keyboard/mouse. I'd switch the KVM to go between these two.

In the two X for two video cards scenario, what happens when one or the other user presses Ctrl+Alt+F1 to go to text console F1? I see four possible answers:

answer 1: if user 1 presses Ctrl+Alt+F1, it goes to text tty1 ... if user 2 presses Ctrl+Alt+F1, nothing happens

answer 2: neither user can go to text (bad idea)

answer 3: user 1 can go to text, but it freeze user 2

answer 4: if either user presses Ctrl+Alt+F1, the system freezes or crashes

IMHO, if X can truly access the video card directly, it should need to take up a virtual console number to do so. Doing so just makes for an easy way to get back to X taking over the screen. My argument to say this is that if 2 X's are running on 2 video cards, then which virtual console is in effect? The kernel can only have 1 in effect. Would BOTH X's be sharing the same virtual console?

I would most likely be using Slackware (easier to do heavy tweaking on).

Last edited by Skaperen; 10-27-2010 at 01:44 PM.
 
Old 10-27-2010, 02:24 PM   #4
GrapefruiTgirl
Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
Quote:
Originally Posted by Skaperen View Post
I'm specifically wanting to have both text console AND X.
OK. Well, it *might* be possible. To my experience so far in playing around with this sort of thing, it is not. I'd like for someone to prove me wrong, or to prove myself wrong, because I would enjoy this functionality.
Quote:
The machine will have both a mainboard Matrox G200 video chip, and a PCI-e attached NVIDIA card. X will function better on the NVIDIA card because it will have 1GB of video RAM. Text will function better on the Matrox G200 because SVGATextMode, which can manage the video mode, supports G200, but not the NVIDIA.
OK, that explains why you want to do this the way you describe.
Quote:
If you know of a program like SVGATextMode, but for NVIDIA, that can manage the video mode, that might move the problem back to Ctrl+Alt+Fn space.
I'm not familiar with the program, but have heard of it.
Quote:
It isn't really a 2 person scenario. I'd just hook both video outputs to a KVM that supports both PS/2 and USB keyboard/mouse. I'd switch the KVM to go between these two.
Hmm.. That may be a helpful detail. Just in the case that only one VT can really be interacted with at a given moment, you could leave VT switching enabled, so if you want to change seats, you hit CTRL-ALT-Fn to focus attention to the other seat.
If it ends up that each VT *can* be used simultaneously (if it matters, since it's only one person) then VT switching can be disabled (more on this VT switching in next paragraph).

Quote:
In the two X for two video cards scenario, what happens when one or the other user presses Ctrl+Alt+F1 to go to text console F1? I see four possible answers:

answer 1: if user 1 presses Ctrl+Alt+F1, it goes to text tty1 ... if user 2 presses Ctrl+Alt+F1, nothing happens

answer 2: neither user can go to text (bad idea)

answer 3: user 1 can go to text, but it freeze user 2

answer 4: if either user presses Ctrl+Alt+F1, the system freezes or crashes
Yes, VT switching becomes an interesting point. Most (or maybe all) of the multi-seat tutorials disable VT switching, to prevent weird problems such as those you describe above. Ideally (i.e. perfect world), user#1 would have the original bootup console, and X would be on the secondary head. VT switching would be disabled for the X head for sure. On the text/console head, you could leave VT switching enabled, but probably wise to NOT change to whatever VT X is on. No idea what that would do. I think your "answer #1" is closest to what happens (or should happen).
Quote:
IMHO, if X can truly access the video card directly, it should need to take up a virtual console number to do so.
Correct, it does. However if I remember right from my testing, by using (or not using) the -sharevts option when starting X, I have had both my heads running on shared VT (both on VT7) and on separate VT's (one VT6 and the other VT7). Don't quote me yet, I'll test this again later.
Quote:
Doing so just makes for an easy way to get back to X taking over the screen. My argument to say this is that if 2 X's are running on 2 video cards, then which virtual console is in effect? The kernel can only have 1 in effect. Would BOTH X's be sharing the same virtual console?
Yes, again, to continue from what I wrote above, it seems both may be able to be done; either share a VT, or use separate VT's. As far as the VT goes from the kernel's perspective.. Well, the VT is "taken over" by X, so does it really matter to the kernel, how many VT's X takes over? I don't know, but if so, use the -sharevts option is the workaround from what I can see.

Quote:
I would most likely be using Slackware (easier to do heavy tweaking on).
Sounds good. At least, if you or I do some testing, it'll be easier to replicate & test the scenario on the other's machine, without first adapting the instructions to another Linux.

Here's some links meanwhile, for you to look at. They're all more or less related to this situation.. Be forewarned, some of them are dated! It's hard to tell what's current or old, with some of this:

http://disjunkt.com/dualhead/bruby-dualhead.html

http://linuxgazette.net/124/smith.html

https://cs.senecac.on.ca/~ctyler/ruby/

http://en.wikibooks.org/wiki/Multiterminal_with_Xephyr

http://sourceforge.net/projects/multiseat-gk/files/

http://netpatia.blogspot.com/2009/06...buntu-904.html

https://help.ubuntu.com/community/MultiseatX
 
Old 10-28-2010, 04:45 PM   #5
Skaperen
Senior Member
 
Registered: May 2009
Location: WV, USA
Distribution: Slackware, CentOS, Ubuntu, Fedora, Timesys, Linux From Scratch
Posts: 1,777
Blog Entries: 20

Original Poster
Rep: Reputation: 115Reputation: 115
Ideally, it would be nice if X could be told to run in such a way that it takes over a video card that is NOT in use for VTs at all, and somehow tell the kernel to quit using USB for keyboard/mouse input (and let X use it). Right now I am on a laptop with its own keyboard and mousepad, with a PS/2 keyboard and mouse plugged in via PS/2 ports on the docking station, and another keyboard and mouse plugged in via USB (mouse into keyboard, keyboard into docking station USB, but it works directly into the laptop, too). I'm typing on the PS/2 keyboard at this moment. I can type on any of the 3 keyboards and the input goes in and works. I can move either mouse or doodle the pad, and all inputs work. So I'd need for X to take the USB away from the kernel and use it only for itself (but this would be on the new tower, not this laptop).

If X can be told to "just use" a video card and NOT open a VT device at all, I don't see why that couldn't work, from the kernel perspective. I don't know if X has this capability. Daemons run w/o VT (no controlling TTY) all the time. Why not X. Then Ctrl+Alt+Fn on the USB keyboard X controls would mean nothing at all, because X would know it isn't on a VT ... it could even let apps see this keyboard input. And then I could use all 63 VTs in text mode (no intention to run X on that video chip). And if X freezes, I could just kit the KVM box switch and go to text and see if the kernel is alive.

Oh, and if I can make this work, I might do TWO of those video cards, with TWO sets of USB keyboard/mouse ... and actually do a 2 seat arrangement (or a 3rd button on the KVM switch) :-)

Last edited by Skaperen; 10-28-2010 at 04:46 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
X: video drivers "ati" and "fglrx" show same fonts differently simopal6 Linux - Software 7 07-30-2008 02:36 AM
libSDL problems "Could not initialize libSDL" & "No available video device" DarkPlexus Linux - Newbie 1 11-02-2007 07:55 PM
Video Card Nvidia Driver Xlib: extension "GLX" missing on display ":0.0". HELP! badgerbox76 Linux - Newbie 35 03-08-2007 02:27 AM
Video Card Nvidia Driver Xlib: extension "GLX" missing on display ":0.0". badgerbox76 Linux - Games 13 01-11-2006 04:47 PM


All times are GMT -5. The time now is 04:09 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration