Is it possible? Make USEFUL use of dual video cards & multi-monitors **WITHOUT X** ?
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Is it possible? Make USEFUL use of dual video cards & multi-monitors **WITHOUT X** ?
A search for similar threads got 5 results ranging in age from 1-5 years old, none of them useful in itself, but one which pointed me to "How to make a 6-headed Linux box" which still isn't what I want to know.
Everything Google turns up involves X in one way or another....
All the tutorials, articles and manpages I have read to date involve X in some way.
SCENARIO 1:
Back when I had only ONE video card (PCI:1:0:0 dual outputs), and both monitors were connected to it, I got two identical displays from post-LILO onwards; there were two boot logos (kinda odd but not important), and dmesg scrolled up both screens equally. If I stayed outside of X, the monitors were identical (novel but not useful). Then when X started and took over, each display became independent per my xorg.conf at the time.
SCENARIO 2:
Currently, I have TWO dual-output PCI-E cards (PCI:1:0:0 & PCI:2:0:0). My main screen is connected to the 1st card, and two more screens are connected to the 2nd card. Both cards are identified by the BIOS at power-up. When I boot, I get only one monitor displaying the boot process (albeit I *think* there are again two logos) and the other two monitors are asleep until X starts.
If I kill X or go to a VT, I get one monitor.
The Question:
Is there a way to have different stuff on each monitor OUTSIDE X-- not to mention beginning with turning the 2nd & 3rd monitors ON to start with.
Like what if I want to log in as root on VT1/screen1 as if it were the only connected display, but at the same time I want to log in as Sasha on VT2/screen2 as if IT were the only display? How would the mouse(s)/keyboard(s) work and would I need one of each for each display (I have 2 of each connected ATM)? Surely I can do this without a KVM switch, right?? And without SSH or VNC??
Am I missing something relatively simple? Or is this a "Pandoras Box" of a question?
Later (or in another post) I will inquire about running X on one or more monitors while having VT(s) on the other monitor. But I believe if I can get somewhere with this NON-X situation, I should be able to combine my knowledge and achieve "X here and NOT-X there". So for now, any info you can point me toward for the 100% NON-X method I seek, will be appreciated, and any info on having "X here and a VT there" is optional but also appreciated.
Anyone have any experience or input about either of these?
S
I read and have a xeroxed copy of an article about KGI in Dr Dobbs Journal, which is about 10 years old now. As *far* as I remember, somebody once said or I read that it has been replaced by more recent developments.
Your idea is very very fascinating. I think that I will think a bit more about it and post anything that I can.
Linux VT's that you get with Ctrl-alt were originally meant for PHYSICAL screens and keyboards in Unix which became Virtual when Linux was made for the PC. This is all I can say for the moment.
I have been perusing this subject for days now, having dozens of tabs in my browser all related in some way to the subject, but as yet I have not found a way, especially a *current, maintained, modern* way of doing this.
You are absolutely correct about the VTs initially being intended for remote consoles. But it seems to me that it wouldn't be a really difficult task (for a programmer who knows what they are doing) to POST (initialize) the other video card and have it able to display either a framebuffer console or a VGA console. After all, if it can be done (and IS done) using X, then there is no justifiable reason that it should not be possible WITHOUT X.
As the frame buffer layer is not back-ported to linux-2.4, only the primary
graphic card is initialised during the boot process. Secondary graphic cards
can only be initialised by an X server, so you will have a single VGA text
console on the primary graphic card.
--------------------------------------------------
It is out of context here, but the principle seems to apply to everything I can find: No matter which way the cake is sliced, we only get ONE local VT display. Period.
I am far from skilled enough to rewrite a C program (even a relatively simple one) but I was browsing through the kernel source code in the video-bios.c, video-vga.c, video-vesa.c, and similar files, which do the initial POSTing and scanning of the video hardware at boot to set up the booting console. They use C as well as inline assembly to do the BIOS calls (non-protected mode "INT10" and others) to query the primary video card. The files are not complex or huge, and I suspect that it would be not **that** hard to add some code to POST a second card on a machine, if one were present.
Making USE of that second card then would likely require MORE work, but just initializing it and getting the monitors awakened is a start
Anyhow, I am getting ready for work ATM, so must leave it at that for the moment, but will look forward to more investigation in two days when I am off again.
Cheers,
Sasha
PS - FYI- another one of the things I have found is called "Backstreet Ruby" which is/was a kernel patch which enabled multiple keyboard/mouse/(console?) usage on one local machine, but again, it seems outdated and *sketchy* for lack of a better word; the patch was for an old kernel too.. You can find Backstreet Ruby with Google.
Last edited by GrapefruiTgirl; 07-02-2008 at 08:22 AM.
OK, I'm just thinking aloud whatever comes to my head, ok?
1. VTs as they were originally designed are of course not outdated, Telnet/SSH are there, which are multiple input/outputs to 1 machine.
But of course no gfx.
2. X can be run on differnet VTs of course like X:2 & .
3. I think kernl tampering would be needed as each VT you need would need to be told which gfk card to go to, but I'm NOT sure. Er, since Telnetting can be done, can't you just say Card 1- VTs 1 to 3, and Card 2 - activate telnet daemon on it? (I may have gone mad or stumbled on something).
I have researched extensively.
I conclude that the functionality I want is not currently possible, so I have decided on a compromise-- another project! Just what I need on the go!
I am gathering up some older hardware from here and there, and am going to set up an old clunker box to use as a terminal/console, via serial cable.
I have enough hardware here now that I could possibly put together two clunkers, but will focus on one for now, with a 300MHz Pentium MMX on a QDI Intel 440LX mainboard. It has 3 ISA slots!!! Plus 4 PCI slots, and an AGP slot containing a 3Dfx Voodoo5 card; rather well endowed for its age. (I hope this stuff isn't dead..)
Next week a co-worker will give me a 800MHz Dell Opteron, so maybe that one will supercede this one
Ahhh, the fun in looking up old hardware, and the novelty & nostalgia not to mention looking forward to seeing how Slackware will work on these funny old machines!
AFAIR, pretty much all Pentium motherboards featured both ISA and PCI slots. I have one old Pentium motherboard which only has ISA slots.
Working with older hardware can be an interesting challenge, especially if you're working with rather limited RAM. One thing I've found out is that you can't really do multi-monitor with old Cirrus Logic cards. They don't "get it" when it comes to being on the same bus as other PCI video cards (including other Cirrus logic cards).
I'm not familiar with Slackware, but I am rather familiar with tricks to conserve RAM and strip things down in Debian.
Can you share some of what you have learned? How do you activate a virtual console?
I noticed sometime back that SuSe and Dynebolic for example, have replaced the "text mode" with a mode that puts the vid card in gfx mode, but lets you type in text - it's using something called vesafb (in Dynebolic). And of course currently they've ported Linux to non x86 PCs which don't even HAVE the text mode, so how do those computers get a console? Is the Ctrl-Alt-Function key ketsroke hardcoded, or can you change it?
I knew I'd seen someone doing this stuff before. While you might not be able to get text mode multi-head, you can sort out multi-head using framebuffers ...
Now, I've not tried this so YMMV, but with the notable exception of the howto trying to kick start X on the second screen, I'd say this is what you're looking for. This phrase, especially, caught my eye: "Thus, an example command would be "con2fb /dev/fb1 /dev/tty6" to move virtual console number six over to the second monitor."
AFAIR, pretty much all Pentium motherboards featured both ISA and PCI slots. I have one old Pentium motherboard which only has ISA slots.
Working with older hardware can be an interesting challenge, especially if you're working with rather limited RAM. One thing I've found out is that you can't really do multi-monitor with old Cirrus Logic cards. They don't "get it" when it comes to being on the same bus as other PCI video cards (including other Cirrus logic cards).
I'm not familiar with Slackware, but I am rather familiar with tricks to conserve RAM and strip things down in Debian.
Hi Isaac,
thanks for this input. I have succeeded, after going through 6 power supplies to get a working one, and about 6 hours swapping between 2 floppy drives and 3 CD-ROM/DVD drives, as well as reversing the polarity of the IDE cables many times, and now it works
I have the i440LX running EasYs (Slack-based) very nicely, and even have KDE on it (might be 'KDE-Lite'??), with a wireless keyboard, the latest BIOS (circa year 2000), a floppy and a DVD-ROM drive.
The machine has only 64M of RAM; Knoppix would boot, but without a swap space it would only run TWM. So I made a 2.7GB partition for EasYs, a 500MB swap (there's the whole 3.2 GB HDD gone) and changed out the Voodoo card for an AGP ATI Rage3 @ 16bit color depth (I hate ATI, but this card has no fans and should be faster & quieter, whereas the Voodoo had 2 fans onboard) and I am quite pleased. It seems to run faster at 300MHz than our 400MHz laptop we have here.
The main intention is to use it as a console type thing to log in 'remotely' to my main machine and monitor logs, boot messages, debug, etc, so multi-screen is not in the plans for it; I took one of the 3 monitors from the main machine to use for it, for now...
As for conserving memory, Slackware itself is very 'strip-down-able' for sure, however EasYs does not offer the same full-on selection/configuration when installing; it just installs as is, BUT it is far smaller than a full Slackware installation, being of the 'one program per function' mindset.
To finish up the main course of the project, I will be needing a null serial cable, and set up sshd.. Now, surely I have some cable ends around here somewhere!?
I knew I'd seen someone doing this stuff before. While you might not be able to get text mode multi-head, you can sort out multi-head using framebuffers ...
Now, I've not tried this so YMMV, but with the notable exception of the howto trying to kick start X on the second screen, I'd say this is what you're looking for. This phrase, especially, caught my eye: "Thus, an example command would be "con2fb /dev/fb1 /dev/tty6" to move virtual console number six over to the second monitor."
G'luck!
- Piete.
Hi Piete,
after much frigging around to get the con2fb thing to compile (bad make scripts as I recall) it did absolutely nothing.
I also tried 'vbetool' which is a little C/ASM thingy designed for softbooting video cards after suspend, and also for activating DPMS options on the fly.
It works as intended for the most part, but it will not POST my second card, nor will it activate my second monitor on the first card.
I had visited the page you suggested several dozen times aver the past few weeks, but it doesn't offer what I want, despite how convincing it sounds. Everything always comes back to multi-headed X or multi-seat X (involving multiple X instances). The various implementations revolve around only multiple users using the X environment, but there is no provision for VT consoles, nor for controlling second video cards from console mode; only controlling second/3rd/.. cards with their own attached X instance.
I think that by nature of the kernel currently, and the BIOS, console mode does not allow for a second card, or second console framebuffer, without X. Even the multi seat implementations still boot only on ONE console, as usually is the case.
Thanks again for the input, and for your interest!
Can you share some of what you have learned? How do you activate a virtual console?
I noticed sometime back that SuSe and Dynebolic for example, have replaced the "text mode" with a mode that puts the vid card in gfx mode, but lets you type in text - it's using something called vesafb (in Dynebolic). And of course currently they've ported Linux to non x86 PCs which don't even HAVE the text mode, so how do those computers get a console? Is the Ctrl-Alt-Function key ketsroke hardcoded, or can you change it?
resetreset,
You can change to or activate VT's using either the 'openvt' command or the 'chvt' commands; the VT's are normally accessed using CTRL-ALT-F{1-7}, and once you are at one, you can open more, change to them, or close dead or inactive ones using 'deallocvt'.
As for 'what I learned', a better question is 'what did I NOT learn', and that is: How to do what I want!
much of the other stuff I had already become somewhat acquainted with over the past year and a half using Linux.
The VesaFB that you refer to is one of the standard framebuffers included in the kernel, and it is what provides for the boot penguin logo and the fonts you can get on your console when booting.
Without a framebuffer console to boot with, you would get either a plain text console, or no console output at all during boot.
The VT-Switch keystroke is hardcoded, but if you really wanted to, you could either re-map the keystroke with Xmodmap or some other means, or edit the kernel sourcecode for the standard key mappings.
The CTRL key is added when in X because when you are actually in a VT, you can change VT by using ALT-Fn, so they wanted to reduce the chance of multiple processes responding to the keystrokes, as I understand.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.