# Headless 6 X Screen xorg.conf setup



## djordan (Oct 2, 2012)

Hello.

I've been trying unsucessfully to configure my xorg.conf in order to achieve a setup that ignores detecting displays so that I can run a headless box with 6 independent X screens. I have found many threads discussing the topic of a headless X screen that ignores EDID info but none of those solutions appear to work.  Here's my current configuration:


I connected 6 monitors to my box (dual nvidia 680's), and cut an xorg.conf by using nvidia-settings.  Everything works as expected.  Then I use the nvidia-settings utility to dump out an edid.bin file for each connected monitor.

In order to use the custom EDID,  I add the following to my xorg.conf setup under Section "Device" for each device.


```
Option "CustomEDID" "/etc/X11/edid-GPU0-CRT-0-DELL_1907.bin"
       Option "CustomEDID" "/etc/X11/edid-GPU0-DFP-1-DELL_2001FP.bin"
       Option "CustomEDID" "/etc/X11/edid-GPU1-DFP-0_DELL_2007FP.bin"
       Option "CustomEDID" "/etc/X11/edid-GPU1-DFP-1-DELL_2001FP.bin"
       Option "CustomEDID" "/etc/X11/edid-GPU1-DFP-3-DELL_2001FP.bin"
       Option "CustomEDID" "/etc/X11/edid-GPU0-DFP-3-DELL_2001FP.bin"
```

In order to tell X that I have a connected monitor, regardless of whether it's physically connected, I add the following under each device and screen.


```
Option "ConnectedMonitor" "CRT-0"  <-- where the CRT/DFP comes from nvidia-settings for that device
       Option "UseDisplayDevice" "CRT-0" 

       Option "ConnectedMonitor" "DFP-1"
       Option "UseDisplayDevice" "DFP-1"

       Option "ConnectedMonitor" "DFP-0"
       Option "UseDisplayDevice" "DFP-0"

       Option "ConnectedMonitor" "DFP-1"
       Option "UseDisplayDevice" "DFP-1"

       Option "ConnectedMonitor" "DFP-3"
       Option "UseDisplayDevice" "DFP-3"

       Option "ConnectedMonitor" "DFP-3"
       Option "UseDisplayDevice" "DFP-3"
```


For any non-connected monitors, I still get error messages in the log file:

```
No display devices found for this X screen.
```

Here's an example ...

```
[    17.302] (**) NVIDIA(1): Depth 24, (--) framebuffer bpp 32
    [    17.302] (==) NVIDIA(1): RGB weight 888
    [    17.302] (==) NVIDIA(1): Default visual is TrueColor
    [    17.302] (==) NVIDIA(1): Using gamma correction (1.0, 1.0, 1.0)
    [    17.302] (**) NVIDIA(1): Option "ConnectedMonitor" "DFP-1"
    [    17.302] (**) NVIDIA(1): Option "TwinView" "0"
    [    17.302] (**) NVIDIA(1): Option "TwinViewXineramaInfoOrder" "DFP-1"
    [    17.302] (**) NVIDIA(1): Option "CustomEDID" "DFP-1:/etc/X11/edid-GPU0-DFP-1-DELL_2001FP.bin"
    [    17.302] (**) NVIDIA(1): Option "UseDisplayDevice" "DFP-1"
    [    17.302] (II) NVIDIA(1): NVIDIA GPU GeForce GTX 680 (GK104) at PCI:1:0:0 (GPU-0)
    [    17.302] (--) NVIDIA(1): Memory: 2097152 kBytes
    [    17.302] (--) NVIDIA(1): VideoBIOS: 80.04.09.00.80
    [    17.302] (II) NVIDIA(1): Detected PCI Express Link width: 16X
    [    17.302] (--) NVIDIA(1): Interlaced video modes are supported on this GPU
    [    17.305] (--) NVIDIA(1): Connected display device(s) on GeForce GTX 680 at PCI:1:0:0
    [    17.305] (--) NVIDIA(1):     DELL 1907FP (CRT-0)
    [    17.305] (--) NVIDIA(1): DELL 1907FP (CRT-0): 400.0 MHz maximum pixel clock
    [    17.305] (WW) NVIDIA(1): Option "UseDisplayDevice" requested "DFP-1", but no such
    [    17.305] (WW) NVIDIA(1):     display device could be found, or all display devices by
    [    17.305] (WW) NVIDIA(1):     that name are currently unavailable.
    [    17.305] (II) NVIDIA(1): Option "UseDisplayDevice" "DFP-1" converted to "".
    [    17.305] (WW) NVIDIA(1): Unable to find any of the requested display device "" in the
    [    17.305] (WW) NVIDIA(1):     list of available display devices "".
    [    17.314] (EE) NVIDIA(1): Unable to find available Display Devices for screen 1.
    [    17.314] (EE) NVIDIA(1): No display devices found for this X screen.
```

Can anyone point me to an example of an xorg.conf that successfully creates multiple X screens without monitors attached?  After messing with this xorg.conf for two days, I'm sort of out of ideas.

I've also tried these other options, but got nowhere:


Using Option "UseEDID" False (instead of CustomEDID)
Adding custom modelines, generated from gtf
Are any of my options conflicting with others? My full xorg.conf and log is attached. Any help would be greatly appreciated.

My sources:

http://us.download.nvidia.com/XFree86/Linux-x86/173.14.09/README/appendix-b.html

https://sites.google.com/site/akohl...ite/akohlmey/random-hacks/nvidia-gpu-coolness

http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/x-config.html

http://ubuntuforums.org/showthread.php?t=1832456


----------



## SirDice (Oct 3, 2012)

A headless box with 6 screens is an oxymoron.

What exactly do you want to use it for? I have trouble thinking of any practical application.


----------



## pboehmer (Oct 3, 2012)

Sounds almost like the op is trying to configure multiple local "thin clients" to run off of this box.  If I am interpreting correctly, the op has xorg configured for 6 "clients", but if less than 6 monitors are connected, xorg errors out on him.

I think this link may help:
http://en.gentoo-wiki.com/wiki/X.Org/Dual_Monitors#Occasional_Dual-Monitors


----------



## SirDice (Oct 3, 2012)

pboehmer said:
			
		

> Sounds almost like the op is trying to configure multiple local "thin clients" to run off of this box.


It looks that way but running an X application remotely doesn't require a running Xorg on that machine. Only the "client" needs a running Xorg.


----------



## djordan (Oct 3, 2012)

In this particular implementation, I have 6 X screens, each with a graphical application that renders a 3D scene.  In addition to rendering, the application encodes the rendered frame and dumps in on the network as an h264 stream.  So the result is 6 streams are dumped on the networks, which is really the end goal.

All of this works just fine and dandy when monitors are plugged in to my graphics cards, but I want this machine to eventually sit by itself without any monitors attached.

My apologies if I'm using some of the wrong terminology.  I've used X for a few years now on various Linux machines, but this is my first attempt at creating very specific configuration.


----------



## SirDice (Oct 4, 2012)

What application do you use to render and stream? It may not require a GUI to run.


----------



## pboehmer (Oct 4, 2012)

SirDice said:
			
		

> It looks that way but running an X application remotely doesn't require a running Xorg on that machine. Only the "client" needs a running Xorg.



I was actually thinking of a host box with six monitors and six usb keyboards/mice attached.  Each acting as it's own workstation.  Irrelevant now...



			
				djordan said:
			
		

> In this particular implementation, I have 6 X screens, each with a graphical application that renders a 3D scene.  In addition to rendering, the application encodes the rendered frame and dumps in on the network as an h264 stream.  So the result is 6 streams are dumped on the networks, which is really the end goal.
> 
> All of this works just fine and dandy when monitors are plugged in to my graphics cards, but I want this machine to eventually sit by itself without any monitors attached.
> 
> My apologies if I'm using some of the wrong terminology.  I've used X for a few years now on various Linux machines, but this is my first attempt at creating very specific configuration.



I'm really at a loss.  I'm trying to wrap my head around a couple of things:

1) You have a workstation with up to 6 screens that runs an application on each of the said screens.  Each screen renders a scene.  If you define a screen and it is not plugged in, X errors out.  In that case, the link I posted above is relevant.

2) The application also sends h264 streams on the network.  If each scene has it's own h264 stream, then its just a case of having six remote clients "playing" the stream either through VLC, mplayer, or the like.  In this case, the number of monitors attached is irrelevant. Make the box headless and stream away.

As I'm typing this, I'm still fuzzy on what you are trying to accomplish.  Originally, I was thinking multiple workstations attached to a single box, but now it almost sounds like you are trying to do some kind of monitor/display wall.  Am I way off base?


----------



## SirDice (Oct 4, 2012)

pboehmer said:
			
		

> I was actually thinking of a host box with six monitors and six usb keyboards/mice attached.  Each acting as it's own workstation.  Irrelevant now...


Unfortunately that doesn't quite work as one would expect. I have a 'traditional' two screen set up and if I have, for example, firefox open on one screen I cannot open a new firefox window on the other screen. It tries to start firefox again, which will complain it's already running and refuse to do anything. Maybe it's something specific to firefox. Something I have to live with I guess. I picked this setup because I have two monitors with different resolutions. Xinerama or TwinView likes to have two identical monitors (resolution wise) and you get a viewport on one or an empty space on the other.


----------



## graudeejs (Oct 4, 2012)

Have you tried x11-servers/xorg-vfbserver

we use it at work for testing stuff.
I wrote rc.d script to start daemon
https://gist.github.com/2874755


----------



## pboehmer (Oct 5, 2012)

SirDice said:
			
		

> Unfortunately that doesn't quite work as one would expect. I have a 'traditional' two screen set up and if I have, for example, firefox open on one screen I cannot open a new firefox window on the other screen. It tries to start firefox again, which will complain it's already running and refuse to do anything. Maybe it's something specific to firefox. Something I have to live with I guess. I picked this setup because I have two monitors with different resolutions. Xinerama or TwinView likes to have two identical monitors (resolution wise) and you get a viewport on one or an empty space on the other.



I know, straying off topic.  You can run multiple instances of firefox simultaneously, the key is to run them under different profiles.


```
> firefox -ProfileManager
```
Create a new profile, then

```
> firefox -P {name of new profile}
```

I've seen this setup used anywhere from libraries to kiosks used at trade shows.  Probably not the safest configuration, but still heck of a lot cheaper and easier than setting up and maintaining multiple workstations.

Now back to our regularly scheduled program...



			
				graudeejs said:
			
		

> Have you tried x11-servers/xorg-vfbserver



That's a pretty interesting solution.  I have never used it, so I'm wondering how powerful the machine would have to be to render 6 simultaneous scenes and export them out via 6 VNC (or the like) sessions.  I would assume that the bulk of the rendering is currently handled by the GPU, so when using the vfbserver, rendering would now have to be done by the CPU, correct?


----------



## graudeejs (Oct 5, 2012)

pboehmer said:
			
		

> That's a pretty interesting solution.  I have never used it, so I'm wondering how powerful the machine would have to be to render 6 simultaneous scenes and export them out via 6 VNC (or the like) sessions.  I would assume that the bulk of the rendering is currently handled by the GPU, so when using the vfbserver, rendering would now have to be done by the CPU, correct?



Frankly I don't know. You'll have to test that.

At my work CPU power is not an issue. Anyway it was much cheaper than using headless virtualbox.


----------



## anlashok (Oct 5, 2012)

While I'm sure that there will be a config solution that would work, there are hardware solutions that would allow you to achieve the desired effect, which if I understand it correctly, appears to be to emulate the presence of a physical monitor.

For older D-sub connector, you could solder something like this PDF together for a few bucks in parts.

For the cards you describe, a DVI EDID emulator would seem appropriate, something like this perhaps.


----------

