LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Using Xorg.conf how to setup non duplicate Monitors? (https://www.linuxquestions.org/questions/linux-newbie-8/using-xorg-conf-how-to-setup-non-duplicate-monitors-4175704897/)

unxcellent 12-13-2021 05:16 PM

Using Xorg.conf how to setup non duplicate Monitors?
 
Hi, I'm having issues setting up 4 monitors. They are all the same brand/model monitors. For some reason, I can only manage to show chrome in the top left monitor and when you maximize it. It will snap on that monitor only. Or I can see a duplicate in all four monitors. For example, if I open a window, it will show 4 times, once in each monitor. I would like to span a window full screen in all four monitors using Xorg.conf.

Here's my current xorg.conf

Code:

Section "Monitor"
        Identifier  "DisplayPort-0"
        Option      "Position" "0 0"
EndSection

Section "Monitor"
        Identifier  "DisplayPort-1"
        Option      "RightOf" "DisplayPort-0"
EndSection

Section "Monitor"
        Identifier  "DisplayPort-2"
        Option      "Below" "DisplayPort-0"
EndSection

Section "Monitor"
        Identifier  "DisplayPort-3"
        Option      "Below" "DisplayPort-1"
EndSection

# END OF MONITOR SECTION

# MAP Monitors to the outputs
Section "Device"
        Identifier  "Device0"
        Driver      "amdgpu"
        Option      "Monitor-DisplayPort-0" "DisplayPort-0"
        Screen      0
EndSection

Section "Device"
        Identifier  "Device1"
        Driver      "amdgpu"
        Option      "Monitor-DisplayPort-1" "DisplayPort-1"
        Screen      1
EndSection

Section "Device"
        Identifier  "Device2"
        Driver      "amdgpu"
        Option      "Monitor-DisplayPort-2" "DisplayPort-2"
        Screen      2
EndSection

Section "Device"
        Identifier  "Device3"
        Driver      "amdgpu"
        Option      "Monitor-DisplayPort-3" "DisplayPort-3"
        Screen      3
EndSection

# END of Monitor outputs


#Screen Sections
Section "Screen"
        Identifier  "Screen0"
        Device      "Device0"
        Monitor      "DisplayPort-0"
        Option  "ModeDebug" "true"
        DefaultDepth 24
SubSection  "Display"
        Depth 24
        Virtual 7180 4320
EndSubSection
EndSection

Here's my xrandr -q output

Code:

Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 16384 x 16384
DisplayPort-0 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 527mm x 296mm
  1920x1080    60.00*+  50.00    59.94 
  1680x1050    59.88 
  1400x1050    59.95 
  1600x900      60.00 
  1280x1024    75.02    60.02 
  1440x900      59.90 
  1280x960      60.00 
  1280x800      59.91 
  1152x864      75.00 
  1280x720      60.00    50.00    59.94 
  1024x768      75.03    70.07    60.00 
  832x624      74.55 
  800x600      72.19    75.00    60.32    56.25 
  720x576      50.00 
  720x480      60.00    59.94 
  640x480      75.00    72.81    66.67    60.00    59.94 
  720x400      70.08 
DisplayPort-1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 527mm x 296mm
  1920x1080    60.00*+  50.00    59.94 
  1680x1050    59.88 
  1400x1050    59.95 
  1600x900      60.00 
  1280x1024    75.02    60.02 
  1440x900      59.90 
  1280x960      60.00 
  1280x800      59.91 
  1152x864      75.00 
  1280x720      60.00    50.00    59.94 
  1024x768      75.03    70.07    60.00 
  832x624      74.55 
  800x600      72.19    75.00    60.32    56.25 
  720x576      50.00 
  720x480      60.00    59.94 
  640x480      75.00    72.81    66.67    60.00    59.94 
  720x400      70.08 
DisplayPort-2 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 527mm x 296mm
  1920x1080    60.00*+  50.00    59.94 
  1680x1050    59.88 
  1400x1050    59.95 
  1600x900      60.00 
  1280x1024    75.02    60.02 
  1440x900      59.90 
  1280x960      60.00 
  1280x800      59.91 
  1152x864      75.00 
  1280x720      60.00    50.00    59.94 
  1024x768      75.03    70.07    60.00 
  832x624      74.55 
  800x600      72.19    75.00    60.32    56.25 
  720x576      50.00 
  720x480      60.00    59.94 
  640x480      75.00    72.81    66.67    60.00    59.94 
  720x400      70.08 
DisplayPort-3 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 527mm x 296mm
  1920x1080    60.00*+  50.00    59.94 
  1680x1050    59.88 
  1400x1050    59.95 
  1600x900      60.00 
  1280x1024    75.02    60.02 
  1440x900      59.90 
  1280x960      60.00 
  1280x800      59.91 
  1152x864      75.00 
  1280x720      60.00    50.00    59.94 
  1024x768      75.03    70.07    60.00 
  832x624      74.55 
  800x600      72.19    75.00    60.32    56.25 
  720x576      50.00 
  720x480      60.00    59.94 
  640x480      75.00    72.81    66.67    60.00    59.94 
  720x400      70.08

Here's my lspci -v

Code:

03:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Raven Ridge [Radeon Vega Series / Radeon Vega Mobile Series] (rev 83) (prog-if 00 [VGA controller])
    Subsystem: Advanced Micro Devices, Inc. [AMD/ATI] Raven Ridge [Radeon Vega Series / Radeon Vega Mobile Series]
--
03:00.7 Non-VGA unclassified device: Advanced Micro Devices, Inc. [AMD] Raven/Raven2/Renoir Non-Sensor Fusion Hub KMDF driver


mrmazda 12-13-2021 06:31 PM

Have you tried xrandr instead of xorg.conf? It's usually simpler to figure out:
Code:

xrandr --output DisplayPort-0 --primary --output DisplayPort-1 --above DisplayPort-0 --output DisplayPort-2 --right-of DisplayPort-2 --output DisplayPort-3 --right-of DisplayPort-0
in a startup script might be all you need if there's nothing to interfere with it in /etc/X11/ or from your DE.

unxcellent 12-13-2021 06:44 PM

Hi, My goal is to do it with xorg.conf instead of creating a script for this. Can it be possible to do this with xorg.conf?

mrmazda 12-13-2021 07:24 PM

It's possible most likely, if there's no Xorg bug to stop you, but I've never that I can recall had good luck doing it that way with more than two displays.

A script can be placed in the /etc/X11/ tree, making it function globally, as would xorg.conf if you could build it right.

IME, in an extended desktop, most apps will maximize only to the display on which started, or to the display on which a window uses the most space. To get it to cover the whole extended desktop has required dragging the borders.

allend 12-14-2021 02:24 AM

Quote:

I would like to span a window full screen in all four monitors using Xorg.conf.
This is known as "Xinerama " mode.

What follows is a skeletal guide. YMMV.

Your xorg.conf will need a ServerLayout section.
Code:

Section "ServerFlags"
    Option        "DefaultServerLayout" "Layout0"
EndSection

Section "ServerLayout"
  Identifier  "Layout0"
  Screen      0 "Screen0" 0 0
  Screen      1 "Screen1" RightOf "Screen0"
  Screen      2 "Screen2" Below "Screen0"
  Screen      3 "Screen3" Below "Screen1"
  Option        "Xinerama" "1"  # enable XINERAMA extension.  Default is disabled.
EndSection

You will need a separate Screen section for each monitor.
Code:

Section "Screen"
    Identifier    "Screen0"
    Device        "Device0"
    Monitor        "DisplayPort-0"
    DefaultDepth    24
    SubSection    "Display"
        Depth      24
    EndSubSection
EndSection

Section "Screen"
    Identifier    "Screen1"
    Device        "Device1"
    Monitor        "DisplayPort-1"
    DefaultDepth    24
    SubSection    "Display"
        Depth      24
    EndSubSection
EndSection

Section "Screen"
    Identifier    "Screen2"
    Device        "Device2"
    Monitor        "DisplayPort-2"
    DefaultDepth    24
    SubSection    "Display"
        Depth      24
    EndSubSection
EndSection

Section "Screen"
    Identifier    "Screen3"
    Device        "Device3"
    Monitor        "DisplayPort-3"
    DefaultDepth    24
    SubSection    "Display"
        Depth      24
    EndSubSection
EndSection

You will need separate Device sections to link to the screens
Code:

Section "Device"
    Identifier    "Device0"
    Driver        "amdgpu"
    BusID          "PCI:3:0:0"
    Screen          0
EndSection

Section "Device"
    Identifier    "Device1"
    Driver        "amdgpu"
    BusID          "PCI:3:0:0"
    Screen          1
EndSection

Section "Device"
    Identifier    "Device2"
    Driver        "amdgpu"
    BusID          "PCI:3:0:0"
    Screen          2
EndSection

Section "Device"
    Identifier    "Device3"
    Driver        "amdgpu"
    BusID          "PCI:3:0:0"
    Screen          3
EndSection

For the Monitor sections, remove the "Option ..." lines.

This ArchWiki page has useful background.

unxcellent 12-14-2021 09:43 AM

Hey Allend, thanks for your help. I already checked that Wiki page a bunch of time and this configure i have tried it already. The screen only appears on the top left monitor and the other 3 monitors are black. The window when maximize only snaps to the top left monitor.

Here's the xorg.conf that I have,

Code:

Section "ServerFlags"
    Option        "DefaultServerLayout" "Layout0"
EndSection

Section "ServerLayout"
  Identifier  "Layout0"
  Screen      0 "Screen0" 0 0
  Screen      1 "Screen1" RightOf "Screen0"
  Screen      2 "Screen2" Below "Screen0"
  Screen      3 "Screen3" Below "Screen1"
  Option        "Xinerama" "1"  # enable XINERAMA extension.  Default is disabled.
EndSection


Section "Monitor"
        Identifier  "DisplayPort-0"
EndSection

Section "Monitor"
        Identifier  "DisplayPort-1"
EndSection

Section "Monitor"
        Identifier  "DisplayPort-2"
EndSection

Section "Monitor"
        Identifier  "DisplayPort-3"
EndSection

# END OF MONITOR SECTION

# MAP Monitors to the outputs
Section "Device"
    Identifier    "Device0"
    Driver        "amdgpu"
    BusID          "PCI:3:0:0"
    Screen          0
EndSection

Section "Device"
    Identifier    "Device1"
    Driver        "amdgpu"
    BusID          "PCI:3:0:0"
    Screen          1
EndSection

Section "Device"
    Identifier    "Device2"
    Driver        "amdgpu"
    BusID          "PCI:3:0:0"
    Screen          2
EndSection

Section "Device"
    Identifier    "Device3"
    Driver        "amdgpu"
    BusID          "PCI:3:0:0"
    Screen          3
EndSection
# END of Monitor outputs


#Screen Sections
Section "Screen"
    Identifier    "Screen0"
    Device        "Device0"
    Monitor        "DisplayPort-0"
    DefaultDepth    24
    SubSection    "Display"
        Depth      24
    EndSubSection
EndSection

Section "Screen"
    Identifier    "Screen1"
    Device        "Device1"
    Monitor        "DisplayPort-1"
    DefaultDepth    24
    SubSection    "Display"
        Depth      24
    EndSubSection
EndSection

Section "Screen"
    Identifier    "Screen2"
    Device        "Device2"
    Monitor        "DisplayPort-2"
    DefaultDepth    24
    SubSection    "Display"
        Depth      24
    EndSubSection
EndSection

Section "Screen"
    Identifier    "Screen3"
    Device        "Device3"
    Monitor        "DisplayPort-3"
    DefaultDepth    24
    SubSection    "Display"
        Depth      24
    EndSubSection
EndSection

Here's Xorg Logs
https://pastebin.com/7YTEvW2i

edit: removed quotes and replace it with CODE. Added the xorg logs in pastebin.

mrmazda 12-14-2021 11:38 AM

unxcellent, please use code tags, not quote tags, when pasting text files or command output. Code tags preserve formatting, and can be quoted. Also, pastebin large files, such as Xorg.0.log, e.g.:
Code:

cat /var/log/Xorg.0.log | pastebinit
Pastebins generally don't have size limits that cut off the end of large files. Your log seems to have been truncated.

teckk 12-14-2021 11:56 AM

Better than pastebin. No adds or scripts.

Code:

curl -F'file=@/home/<user>/.local/share/xorg/Xorg.0.log' https://0x0.st

cat /home/<user>/.local/share/xorg/Xorg.0.log | curl -F 'sprunge=<-' http://sprunge.us

https://github.com/rupa/sprunge
https://git.0x0.st/mia/0x0

unxcellent 12-14-2021 12:48 PM

hey guys. Sorry about that, I should have review it. Here's the Xorg logs in pastebinit

https://pastebin.com/7YTEvW2i

allend 12-14-2021 05:41 PM

Thanks for the Xorg.0.log. It shows that the displays are all being recognised, but are all sending output to "1920x1080 +0+0".

My suggestion is to try setting the size of the display canvas and positioning each display on that canvas.
Code:

Section "Screen"
    Identifier    "Screen0"
    Device        "Device0"
    Monitor        "DisplayPort-0"
    DefaultDepth    24
    SubSection    "Display"
        Depth      24
        ViewPort  0 0
        Virtual  3840 2160
    EndSubSection
EndSection

Section "Screen"
    Identifier    "Screen1"
    Device        "Device1"
    Monitor        "DisplayPort-1"
    DefaultDepth    24
    SubSection    "Display"
        Depth      24
        ViewPort  1920 0
        Virtual  3840 2160
    EndSubSection
EndSection

Section "Screen"
    Identifier    "Screen2"
    Device        "Device2"
    Monitor        "DisplayPort-2"
    DefaultDepth    24
    SubSection    "Display"
        Depth      24
        ViewPort  0 1080
        Virtual  3840 2160
    EndSubSection
EndSection

Section "Screen"
    Identifier    "Screen3"
    Device        "Device3"
    Monitor        "DisplayPort-3"
    DefaultDepth    24
    SubSection    "Display"
        Depth      24
        ViewPort  1920 1080
        Virtual  3840 2160
    EndSubSection
EndSection


unxcellent 12-14-2021 06:58 PM

Okay, I have done the above before as well. Still show on the top left monitor only. But now that I'm looking at the logs I noticed there's no mention of `Virtual` or its resolution on the Xorg logs. For example, I set the configuration

Code:

Section "Screen"
    Identifier    "Screen0"
    Device        "Device0"
    Monitor        "DisplayPort-0"
    DefaultDepth    24
    SubSection    "Display"
        Depth      24
        ViewPort  0 0
        Virtual  3840 2160
    EndSubSection
EndSection

but in the Xorg logs there is no error or mention of the resolution 3840x2160. The logs keep showing what you saw which is "1920x1080 +0+0".

something else I just noticed is that, if Xinerama is enable and you tried to run xrandr -q it will display this error. If you disable Xinerama the error will go away.

"RandR extension missing"

Here's the latest xorg.conf and xorg.logs

Code:

Section "ServerFlags"
    Option        "DefaultServerLayout" "Layout0"
EndSection

Section "ServerLayout"
  Identifier  "Layout0"
  Screen      0 "Screen0" 0 0
  Screen      1 "Screen1" RightOf "Screen0"
  Screen      2 "Screen2" Below "Screen0"
  Screen      3 "Screen3" Below "Screen1"
  Option        "Xinerama" "1"  # enable XINERAMA extension.  Default is disabled.
EndSection


Section "Monitor"
        Identifier  "DisplayPort-0"
EndSection

Section "Monitor"
        Identifier  "DisplayPort-1"
EndSection

Section "Monitor"
        Identifier  "DisplayPort-2"
EndSection

Section "Monitor"
        Identifier  "DisplayPort-3"
EndSection

# END OF MONITOR SECTION

# MAP Monitors to the outputs
Section "Device"
    Identifier    "Device0"
    Driver        "amdgpu"
    BusID          "PCI:3:0:0"
    Screen          0
EndSection

Section "Device"
    Identifier    "Device1"
    Driver        "amdgpu"
    BusID          "PCI:3:0:0"
    Screen          1
EndSection

Section "Device"
    Identifier    "Device2"
    Driver        "amdgpu"
    BusID          "PCI:3:0:0"
    Screen          2
EndSection

Section "Device"
    Identifier    "Device3"
    Driver        "amdgpu"
    BusID          "PCI:3:0:0"
    Screen          3
EndSection
# END of Monitor outputs


#Screen Sections
Section "Screen"
    Identifier    "Screen0"
    Device        "Device0"
    Monitor        "DisplayPort-0"
    DefaultDepth    24
    SubSection    "Display"
        Depth      24
        ViewPort    0 0
        Virtual    3840 2160
    EndSubSection
EndSection

Section "Screen"
    Identifier    "Screen1"
    Device        "Device1"
    Monitor        "DisplayPort-1"
    DefaultDepth    24
    SubSection    "Display"
        Depth      24
        ViewPort    1920 0
        Virtual    3840 2160
    EndSubSection
EndSection

Section "Screen"
    Identifier    "Screen2"
    Device        "Device2"
    Monitor        "DisplayPort-2"
    DefaultDepth    24
    SubSection    "Display"
        Depth      24
        ViewPort    0 1080
        Virtual    3840 2160
    EndSubSection
EndSection

Section "Screen"
    Identifier    "Screen3"
    Device        "Device3"
    Monitor        "DisplayPort-3"
    DefaultDepth    24
    SubSection    "Display"
        Depth      24
        ViewPort    1920 1080
        Virtual    3840 2160
    EndSubSection
EndSection

I also tried with couple of Virtual resolution with no avail. Such as 7680x4320, etc.

Xorg logs https://pastebin.com/C0JiMiTv

allend 12-14-2021 07:06 PM

Try commenting out the "Monitor ..." lines in the Screen sections.

unxcellent 12-14-2021 07:34 PM

I commented the Monitor option on the screen section. Window still maximize on the top left monitor. The logs now display the following,

Code:

[  3252.386] (==) Log file: "/var/log/Xorg.0.log", Time: Tue Dec 14 20:31:15 2021
[  3252.386] (==) Using config file: "/etc/X11/xorg.conf"
[  3252.386] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[  3252.386] (**) Option "defaultserverlayout" "Layout0"
[  3252.386] (**) ServerLayout "Layout0"
[  3252.386] (**) |-->Screen "Screen0" (0)
[  3252.386] (**) |  |-->Monitor "<default monitor>"
[  3252.387] (**) |  |-->Device "Device0"
[  3252.387] (==) No monitor specified for screen "Screen0".
        Using a default monitor configuration.
[  3252.387] (**) |-->Screen "Screen1" (1)
[  3252.387] (**) |  |-->Monitor "<default monitor>"
[  3252.387] (**) |  |-->Device "Device1"
[  3252.387] (==) No monitor specified for screen "Screen1".
        Using a default monitor configuration.
[  3252.387] (**) |-->Screen "Screen2" (2)
[  3252.387] (**) |  |-->Monitor "<default monitor>"
[  3252.387] (**) |  |-->Device "Device2"
[  3252.387] (==) No monitor specified for screen "Screen2".
        Using a default monitor configuration.
[  3252.387] (**) |-->Screen "Screen3" (3)
[  3252.387] (**) |  |-->Monitor "<default monitor>"
[  3252.388] (**) |  |-->Device "Device3"
[  3252.388] (==) No monitor specified for screen "Screen3".
        Using a default monitor configuration.
[  3252.388] (**) Option "Xinerama" "1"
[  3252.388] (==) Automatically adding devices
[  3252.388] (==) Automatically enabling devices
[  3252.388] (==) Automatically adding GPU devices
[  3252.388] (==) Automatically binding GPU devices
[  3252.388] (**) Xinerama: enabled

Also still shows,

[ 3252.484] (II) AMDGPU(0): Output DisplayPort-0 using initial mode 1920x1080 +0+0

allend 12-14-2021 08:01 PM

Another try at getting positioning to work.
Code:

Section "ServerLayout"
  Identifier  "Layout0"
  Screen      0 "Screen0" 0 0
  Screen      1 "Screen1" 1920 0
  Screen      2 "Screen2" 0 1080
  Screen      3 "Screen3" 1920 1080
  Option        "Xinerama" "1"  # enable XINERAMA extension.  Default is disabled.
EndSection


unxcellent 12-20-2021 10:02 AM

Hi, sorry for the late reply (busy holiday and stuff). Thanks Allend, this did the trick. and now it works fine!


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