PDA

View Full Version : [ubuntu] How to Create Separate X11 Screens in Ubuntu



skyline220
August 27th, 2018, 11:43 PM
Hi,

I need to create 2 separate X11 Screens to render two separate G-Streamer Windows.
When I type echo $DISPLAY I want to see: The first screen is :0.0, the second is :0.1 as suggested in:
https://wiki.archlinux.org/index.php/multihead
All that is currently returned from echo $DISPLAY is :0.
I have tried editing xorg.conf to achieve this, first by disabling Xinerama in xorg.conf but that seems to have just caused a whole host of other issues not allowing me to boot into the desktop and now I will likely have to re-install Ubuntu. Does anyone have any suggestions on how to configure multiple screens in Ubuntu 16.04?
Thanks

SagaciousKJB
August 30th, 2018, 07:05 PM
Well I use to run dual x screens, but it stopped being supported by recent drivers so I switched to TwinView. I can post up my old xorg.conf file and try to explain how it's configured if you'd like. The important part of configuration multiple x-screens is that you must have a Monitor, Device and Screen directive defined for both screens, as well as a ServerLayout section. This is an example generated by nvidia-settings.


# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings: version 331.20 (buildd@allspice) Wed Dec 18 09:07:35 UTC 2013


Section "ServerLayout"
Identifier "Layout0"
Screen 0 "Screen0" 0 0
Screen 1 "Screen1" RightOf "Screen0"
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Mouse0" "CorePointer"
Option "Xinerama" "0"
EndSection

Section "Files"
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 "DELL 2001FP"
HorizSync 31.0 - 80.0
VertRefresh 56.0 - 76.0
Option "DPMS"
EndSection

Section "Monitor"

# HorizSync source: builtin, VertRefresh source: builtin
Identifier "Monitor1"
VendorName "Unknown"
ModelName "TV-0"
HorizSync 48.3
VertRefresh 60
Option "DPMS"
EndSection

Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "GeForce 7950 GT"
BusID "PCI:1:0:0"
Screen 0
EndSection

Section "Device"
Identifier "Device1"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "GeForce 7950 GT"
BusID "PCI:1:0:0"
Screen 1
EndSection

Section "Screen"

# Removed Option "metamodes" "DVI-I-2: nvidia-auto-select +0+0"
Identifier "Screen0"
Device "Device0"
Monitor "Monitor0"
DefaultDepth 24
Option "Stereo" "0"
Option "metamodes" "DVI-I-3: nvidia-auto-select +0+0"
Option "SLI" "Off"
Option "MultiGPU" "Off"
Option "BaseMosaic" "off"
SubSection "Display"
Depth 24
EndSubSection
EndSection

Section "Screen"

# Removed Option "metamodes" "TV-0: 720x480 +0+0"
Identifier "Screen1"
Device "Device1"
Monitor "Monitor1"
DefaultDepth 24
Option "Stereo" "0"
Option "metamodes" "TV-0: 1024x768 +0+0; TV-0: 720x480 +0+0"
Option "SLI" "Off"
Option "MultiGPU" "Off"
Option "BaseMosaic" "off"
SubSection "Display"
Depth 24
EndSubSection
EndSection


The ServerLayout directive tells xorg how to position the screens, and what behavior they will have. Disabling xinerama here just means that they will be individual screens. If you don't have the rest of the directives defined in your xorg.conf then Xorg will error out.

If you want to go back to a fresh start, just move /etc/X11/Xorg.conf to /etc/X11/Xorg.conf.backup and restart. Xorg will automatically generate a working configuration ( though it will be one display ) and allow you to boot a graphical environment. From there maybe post your Xorg.conf as well as the results from /var/log/Xorg.0.log