Go Back   nV News Forums > Linux Support Forums > NVIDIA Linux

Newegg Daily Deals

Reply
 
Thread Tools
Old 05-31-07, 09:40 PM   #1
ELC
Registered User
 
Join Date: May 2007
Location: Australia
Posts: 6
Default Query available displays without starting X

I run a number of Linux based kiosk type devices (just under a hundred of them).

They are presently all running Slackware 10 with a 2.4 kernel, 6.7.0 X and the x86-1.0-6629 NVidia drivers (old hardware, old kernel, old X ;), and one of about 6 different model video cards.

Over time, how the displays were connected to computer has changed. We used to exclusively use the CRT/VGA port on the card but as everything got better we started to use the DPF/DVI port. I could change out a computer and regardless of how the display was connected, next time the computer rebooted, it would just show the X windows on the correct display! It was great!

My xorg.conf displays USED to be just

Section "Screen"
Identifier "tv_screen"
Device "nv_tv"
Monitor "tv_monitor"
Option "TVStandard" "PAL-B"
Option "ConnectedMonitor" "TV"
EndSection
Section "Screen"
Identifier "crt_screen"
Device "nv_crt"
Monitor "crt_monitor"
Option "ConnectedMonitor" "DVI"
EndSection

No matter where on the card I connected the display, it would just work.

Ok, now with the newer version of everything - Slackware 11, 2.6.20.3 kernel, 6.9.0 X and x86-1.0-9755 with a GeForce 6200.

Now when I used the ConnectedMonitor option with "TV,DFP", it will only EVER go out to the DVI port. If I change it to CRT, it will only go out the FIRST CRT port.. I get a second one if I plug a DVI-CRT converter into the DVI port.. then I have to use CRT-0 and CRT-1 to specify which port I want to go out.

Over all, if the config doesn't match the exact layout of the monitor, everything goes bonkers and I get blank screens as X is being pumped out to one of the other ports.

Now as I said, there are some one hundred of these devices out there and I have absolutely no way to know which are configured which way. I have swapped out the computers and/or screens between all of them, updated some boxes and not others. Generally, no one has any idea where anything is. Good fun.

The problem arises now where if I want to send out a new updated computer to replace one of the old ones, it needs to be able to detect what screens are plugged in where and change the X config. The techs or civilians who are doing these replacements are not able to access anything as low level as the login prompt.

The nvidia-settings program seems to have a cryptic way of figuring out which displays are connected but not before X has started. It gives me a seemingly undocumented bitmask that doesn't always seem to change based on how many devices are connected. It also seems to be different based on the type of video card :(

My best option at this stage would be something that I could query (can I ask the video card directly?) to figure out which displays are actually connected on whatever the card is and equate them to their device name - DFP, CRT-0, CRT-1 etc. - before I start X windows.
Does anyone have any idea how I could do this? I've already had to learn how to speak USB this week.. maybe I can learn AGP next week.
ELC is offline   Reply With Quote
Old 06-01-07, 12:01 AM   #2
netllama
NVIDIA Corporation
 
Join Date: Dec 2004
Posts: 8,763
Default Re: Query available displays without starting X

I'm not entirely clear why you need to know what kind of display devices are attached prior to starting X. What is the actual problem that you're trying to solve?
netllama is offline   Reply With Quote
Old 06-01-07, 12:50 AM   #3
ELC
Registered User
 
Join Date: May 2007
Location: Australia
Posts: 6
Default Re: Query available displays without starting X

There's no one configuring these devices The don't have a keyboard and they boot straight into a touch screen driven user program. The computer can be swapped out of the "box" at any time. The "box" has a screen in it with a certain connection, either VGA, DVI, or a DVI with a VGA converter.
When the computer boots up, it has to figure out which setup it has been booted up with and just cope. Previously, it didn't need to have the X config changed at all.
I don't want to boot up X Windows, run a program to figure out the connected monitors, kill X, configure it and then start it up again. Especially on every boot up!
If I configure it one way and send it out, all I'll get back are phone calls telling me the screen doesn't work and sent it back so I can change the configuration.
ELC is offline   Reply With Quote
Old 06-01-07, 11:22 AM   #4
netllama
NVIDIA Corporation
 
Join Date: Dec 2004
Posts: 8,763
Default Re: Query available displays without starting X

You should not need to do anything special in the configuration that you've described. If the driver is not correctly detecting the display device, that may be a bug. You'll need to generate and attach an nvidia-bug-report.log while this problem is present.
netllama is offline   Reply With Quote
Old 06-04-07, 12:37 AM   #5
ELC
Registered User
 
Join Date: May 2007
Location: Australia
Posts: 6
Default Re: Query available displays without starting X

As far as I can tell, this isn't a bug as such and doesn't report an error. The card simply outputs the :0.1 screen on the specified display and turns off whatever else is connected.

If I use
UseDisplayDevice "TV"
UseDisplayDevice "CRT"
for the two separate screen sections, but have a DFP plugged in instead of the CRT, I will get a blank screen on the DFP and if I then plug into the CRT, I find the output (having not had a screen plugged into this before). It was probably a bug that this ever worked before.

The simplest solution we have come up with to handle all situations is that we're upgrading all the monitors with only VGA connectors to have DVI instead and changing the monitor cable over. Now all the devices will have the same video output environment so there's no need to detect it.
ELC is offline   Reply With Quote
Old 06-04-07, 09:44 AM   #6
netllama
NVIDIA Corporation
 
Join Date: Dec 2004
Posts: 8,763
Default Re: Query available displays without starting X

What is the maximum number of display devices that are attached to these systems at any given time?
netllama is offline   Reply With Quote
Old 06-04-07, 11:44 AM   #7
pe1chl
Registered User
 
Join Date: Aug 2003
Posts: 1,026
Default Re: Query available displays without starting X

Quote:
Originally Posted by ELC
The simplest solution we have come up with to handle all situations is that we're upgrading all the monitors with only VGA connectors to have DVI instead and changing the monitor cable over. Now all the devices will have the same video output environment so there's no need to detect it.
Be careful! When you have a monitor that supports only analog, and you connect a DVI-to-VGA cable to it, that still counts as CRT for the nvidia driver!
So, this change is only possible when all monitors have a DVI connector that supports DVI-D. (and maybe a VGA connector as well, that you have been using up to now)

What I don't quite get is why you need the "Connectedmonitor CRT". When that statement is omitted, it auto-detects between CRT and DVI, doesn't it? Why isn't that a solution?
pe1chl is offline   Reply With Quote
Old 06-15-07, 12:57 AM   #8
ELC
Registered User
 
Join Date: May 2007
Location: Australia
Posts: 6
Default Re: Query available displays without starting X

Quote:
Originally Posted by pe1chl
Be careful! When you have a monitor that supports only analog, and you connect a DVI-to-VGA cable to it, that still counts as CRT for the nvidia driver!
So, this change is only possible when all monitors have a DVI connector that supports DVI-D. (and maybe a VGA connector as well, that you have been using up to now)

What I don't quite get is why you need the "Connectedmonitor CRT". When that statement is omitted, it auto-detects between CRT and DVI, doesn't it? Why isn't that a solution?
All the monitors we're upgrading will have a full DVI-D connection. It comes as a fairly simple upgrade pack that connects & screws into place next to the VGA connector. These are all industrial monitors so they have pretty much every cool doohicky you could ever want as a pluggable module.

Regarding the connected monitor string, I need to at least have ConnectedMonitor TV as the 1st screen must always goto the TV even if it's not plugged in at the time (or turned on.. or still booting.. or dumb.. or faulty). As soon as I use that string, it no longer seems to auto-detect with the new version of X and NVidia drivers. The old version I just told it that there was a "TV,DVI" connection and it reverted to CRT if it wasn't really there.

If I remove ALL "ConnectedMonitor" lines and use "UseDisplayDevice TV" in the TV screen section and the TV isn't really plugged in or working properly then it fails every time because it is unable to detect a second display.

At present, X just dies with a message telling someone to fix the TV. Ugly as sin, but at least it will work with every configuration of displays out there, just none of the test boxes or when the TV modulator fails. This isn't really satisfactory as a failed modulator shouldn't take out the entire computer as the TV is only a minor part of it, but needs to be there at least in spirit as all the software is hard coded as to which screen it needs to display on.


OK, after much playing around.. I can now sort of detect if the DFP is connected or not. If it is connected, the EDID or something is read and X/NVIDIA manages to get a text string that describes the DFP. If there's no DFP, this comes up empty. All of this information is thrown into /var/log/Xorg.0.log which I can parse with the first program run when X loads.

With a bit of experimenting I have found 2 configurations that allow me to operate in one mode and detect if I should be operating in the other. It seems if I use the ConnectedMonitors string of "TV,DFP,CRT" then the VGA connection will work, but I can see if there's a DFP plugged in - it comes up in the log. But to get a DFP to work I need to change the line to "TV,DFP". Again, if the DFP goes missing it shows up in the log and it can change the config file to the CRT version again. Endless loop of hax. This will all be in my xinitrc by the looks.

DFP present with config set to head to VGA

(--) NVIDIA(0): Connected display device(s) on GeForce 6200 TurboCache(TM) at
(--) NVIDIA(0): PCI:1:0:0:
(--) NVIDIA(0): CRT-0
(--) NVIDIA(0): NVIDIA TV Encoder (TV-0)
(--) NVIDIA(0): Tricord Systems TRI A1700 (DFP-0)

DFP not present with config set to head to VGA

(--) NVIDIA(0): Connected display device(s) on GeForce 6200 TurboCache(TM) at
(--) NVIDIA(0): PCI:1:0:0:
(--) NVIDIA(0): CRT-0
(--) NVIDIA(0): NVIDIA TV Encoder (TV-0)
(--) NVIDIA(0): DFP-0

That subtle difference is enough for me to detect if I'm in the wrong mode and adjust the config file and restart X.

I guess this is "resolved" in a way.. there's no real question here anymore :P hax hax hax.

I don't think anyone else on the planet could possibly having these issues, so I'll be off. Thank you all for your input.
ELC is offline   Reply With Quote

Old 06-15-07, 01:05 AM   #9
ELC
Registered User
 
Join Date: May 2007
Location: Australia
Posts: 6
Default Re: Query available displays without starting X

Quote:
Originally Posted by netllama
What is the maximum number of display devices that are attached to these systems at any given time?
Only ever two devices max. I've tried 3 for a bit of fun but that went down in flames I don't think the outputs are designed for more than 2 connections at any one time.

The 3 different configuations are

TV
DVI

TV
VGA

TV
DVI w/ VGA converter

.. and of course, some of the time the TV out is not connected or the device is off, or dead, or faulty, or .. etc.

The software is hard coded to put certain things on certain screens which goes really bad if there's not a second display

As I said in the post above, I think I've got it licked. Not exactly pretty, and it will cause some issues with X having to load twice at boot time after a change in monitor, but it should work for now.
ELC is offline   Reply With Quote
Old 06-15-07, 03:23 AM   #10
pe1chl
Registered User
 
Join Date: Aug 2003
Posts: 1,026
Default Re: Query available displays without starting X

I can understand your trouble... but in fact my experience is just the other way around, so I also understand the problem that NVIDIA is in.

In my case, I want the driver to do what I tell it. So when I say there is a DVI and a TV, I don't want the driver to out-smart me and say "the TV you tell me about is not there, not connected, so I will ignore your config of a TV and come up with a single screen".
When I say there is a TV, there is a TV. period. Maybe it is now off or disconnected, but I could connect it in 5 minutes and expect a picture there.
Worse: when the driver reconfigures the screen layout and then the window manager is started, that in turn sees all kinds of changes and starts to re-arrange things, something I don't want to happen just because I reboot the box while the TV is off.

But in your case the situation is more complicated, as you want to have control over what is displayed where, while you do not have control over what is connected where...
Well, with enough tricks it can usually be made to work. Be prepared, though, that it will randomly break when you upgrade the driver. That has happened countless times here, because a new driver has new assumptions and new smartness. Getting the described config to work has required different config commands over time.
pe1chl is offline   Reply With Quote
Reply


Thread Tools

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 On
HTML code is Off
Forum Jump


Similar Threads
Thread Thread Starter Forum Replies Last Post
Running 4 independent 1080p displays under Linux? Raven-D NVIDIA Linux 6 06-20-12 05:02 PM
Full HD Autosterescopic 3D Displays are Coming Soonâ?¦ Probably News Archived News Items 0 06-15-12 12:30 AM
nvidia: The GeForce GTX 690 Live Review by PC Perspective and NVIDIA is starting in 5 News Archived News Items 0 05-15-12 05:30 PM
No Errors with X, but X not starting hschwebler NVIDIA Linux 2 09-09-02 07:09 AM
Best video card for running dual displays? nutsnbolts NVIDIA GeForce 7, 8, And 9 Series 10 09-03-02 02:02 PM

All times are GMT -5. The time now is 07:22 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright ©1998 - 2014, nV News.