Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How to configure two screens xorg.conf and amdgpu?
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
Carlosk465
Tux's lil' helper
Tux's lil' helper


Joined: 29 May 2022
Posts: 78

PostPosted: Fri Aug 18, 2023 4:22 pm    Post subject: How to configure two screens xorg.conf and amdgpu? Reply with quote

I know they say that xorg.conf is no longer used, but kscreen doesn't save the configuration of two screens and sometimes when I turn off a screen it doesn't recognize it again, so I've been trying to create a configuration for xorg.conf (actually in xorg. cong.d but for simplicity I'll put it all together) but it just ignores it.

Things like this happen, it doesn't recognize the other screen but it looks the same, I want to put the screen that looks black on the left.[/code]
https://i.postimg.cc/9fN5Kkgd/Screenshot-20230815-211504.png

Before I had an xorg.conf that I created with nvidia and now with amd this is new to me.

xorg.conf

Code:
Section "ServerLayout"
        Identifier     "X.org Configured"
        Screen      0  "Pantalla0" 0 0
        Screen      1  "Pantalla1" RightOf "Pantalla0"
#       InputDevice    "Mouse0" "CorePointer"
#       InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "Monitor"
        Identifier "Monitor0"
        VendorName "Samsung"
        ModelName "BX 2050"
EndSection

Section "Monitor"
        Identifier "Monitor1"
        VendorName "Samsung"
        ModelName "S25F350"
EndSection
                                                             
Section "Device"
        Identifier "Puerto0"
        Driver "amdgpu"
        Option "Monitor-DVI-D-0" "Monitor0"
#       BusID "PCI:2:0:0"
EndSection

Section "Device"
        Identifier "Puerto1"
        Driver "amdgpu"
        Option "Monitor-HDMI-A-1" "Monitor1"
#        BusID "PCI:2:0:1"
EndSection

Section "Screen"
        Identifier "Pantalla0"
        Device "Puerto0"
        Monitor "Monitor0"
EndSection

Section "Screen"
        Identifier "Pantalla1"
        Device "Puerto1"
        Monitor "Monitor1"
EndSection


Last edited by Carlosk465 on Mon Aug 21, 2023 3:34 pm; edited 3 times in total
Back to top
View user's profile Send private message
Carlosk465
Tux's lil' helper
Tux's lil' helper


Joined: 29 May 2022
Posts: 78

PostPosted: Fri Aug 18, 2023 4:25 pm    Post subject: Reply with quote

↓↓↓↓ log xorg ↓↓↓↓

Last edited by Carlosk465 on Fri Aug 18, 2023 6:49 pm; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54550
Location: 56N 3W

PostPosted: Fri Aug 18, 2023 4:52 pm    Post subject: Reply with quote

Carlosk465,

A few things ... The Identifiers cat be any string you like. Xorg uses them to assemble the ServerLayout.

It a good Idea to stay away from the Identifiers that Xory uses by default.
You should not need to give BusID "PCI:... asyou only have a singe GPU. The log shows it at
Code:
[     7.050] (--) PCI:*(2@0:0:0)


Code:
[     7.002] (==) Using config directory: "/etc/X11/xorg.conf.d"
[     7.002] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[     7.007] (==) ServerLayout "X.org Configured"
[     7.007] (**) |-->Screen "Pantalla0" (0)
[     7.007] (**) |   |-->Monitor "Monitor0"
[     7.007] (**) |   |-->Device "Puerto0"
[     7.007] (**) |-->Screen "Pantalla1" (1)
[     7.007] (**) |   |-->Monitor "Monitor1"
[     7.008] (**) |   |-->Device "Puerto1"

Looks like its using your configuration but the choice of Identifiers makes it difficult to tell.

Code:
[     7.821] (II) AMDGPU(0): Output DisplayPort-0 using monitor section Monitor0

Is as per your config file.

Both xorg.conf and xorg.conf.d/ work. I still use xorg.conf because I always have.
A xorg.conf is no longer required for a single display set up.

Can you put your entire Xorg.0.log onto a pastebin please?
Its easier to search and should show the entire EDID data.
wgetpaste can help there.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Carlosk465
Tux's lil' helper
Tux's lil' helper


Joined: 29 May 2022
Posts: 78

PostPosted: Fri Aug 18, 2023 5:34 pm    Post subject: Reply with quote

Here it is, I didn't know how to put it all :lol:

https://pastebin.com/Qbjknn8c
Back to top
View user's profile Send private message
Ralphred
Guru
Guru


Joined: 31 Dec 2013
Posts: 574

PostPosted: Fri Aug 18, 2023 5:34 pm    Post subject: Reply with quote

You *can* do it the way you are doing it, but it results in a quite a severe performance loss, as you effectively force X to split the card in two, then recombine it unnecessarily, and you need some extra config to go full "old school".
Quote:
Code:
[     7.821] (II) AMDGPU(0): Output DisplayPort-0 using monitor section Monitor0
...
[     7.855] (II) AMDGPU(0): Output DVI-D-0 using monitor section Monitor0

Xorg is not correctly tying monitors to their relevant sections, but you have to to do some pretty hacky stuff to make
Code:
        Screen      0  "Pantalla0" 0 0
        Screen      1  "Pantalla1" RightOf "Pantalla0"
work properly (as is uesd to?) on a single card.
You are better off leveraging X's xrandr extension and the AMD drivers hooks into that with

Code:
Section "ServerLayout"
        Identifier     "X.org Configured"
        Screen      0  "Pantalla0" 0 0
        Screen      1  "Pantalla1" RightOf "Pantalla0"
EndSection

Section "Monitor"
        Identifier "DisplayPort-0"
        VendorName "Samsung"
        ModelName "BX 2050"
        Option         "Primary"
EndSection

Section "Monitor"
        Identifier "DVI-D-0"
        VendorName "Samsung"
        ModelName "S25F350"
        Option         "RightOf" "DisplayPort-0"
EndSection
                                                             
Section "Device"
        Identifier "Puerto0"
        Driver "amdgpu"
        BusID "PCI:2:0:0:0"
EndSection

Section "Screen"
        Identifier "Pantalla0"
        Device "Puerto0"
        Monitor "DisplayPort-0"
EndSection

Section "Screen"
        Identifier "Pantalla1"
        Device "Puerto0"
        Monitor "DVI-D-0"
EndSection


To check the config run startx from a terminal with just the default environment, so you are seeing the "result of your config" and not the result of some automagic "I see two monitors, lets enable both!"
software. If kscreen2 still goes off piste let us know.

PS: Apologies if I got the monitors the wrong way round
Back to top
View user's profile Send private message
Carlosk465
Tux's lil' helper
Tux's lil' helper


Joined: 29 May 2022
Posts: 78

PostPosted: Fri Aug 18, 2023 6:22 pm    Post subject: Reply with quote

How can I use another identifier and tell it what screen it is? I want it to be called Monitor0 and Monitor1

Code:

Section "ServerLayout"
   Identifier     "Configuracion Xorg"
   Screen      0  "Pantalla0" 0 0
   Screen      1  "Pantalla1" RightOf "Pantalla0"
EndSection

Section "Monitor"
   Identifier "DVI-D-0"
   VendorName "Samsung"
   ModelName "SMBX2050"
   #Modeline "1600x900x60"  108.00  1600 1624 1704 1800  900 901 904 1000
   #Option "PreferredMode" "1600x900"
   Option "Position" "0 165" #----> It should be 180 so that it is just below but apparently the pixels of this screen are larger and with 165 the offset is hardly noticeable
EndSection

Section "Monitor"
   Identifier "HDMI-A-1"
   VendorName "Samsung"
   ModelName "S25F350"
   #Modeline "1920x1080x60"  148.50  1920 2008 2052 2200  1080 1084 1089 1125
   #Option "PreferredMode" "1920x1080"
   Option "Primary"
   Option "Position" "1600 0"
EndSection

Section "Device"
   Identifier "Grafica0"
   Driver "amdgpu"
EndSection

Section "Screen"
   Identifier "Pantalla0"
   Device "Grafica0"
   Monitor "DVI-D-0"
EndSection

Section "Screen"
   Identifier "Pantalla1"
   Device "Grafica0"
   Monitor "HDMI-A-1"
EndSection


Last edited by Carlosk465 on Sat Aug 19, 2023 2:17 am; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54550
Location: 56N 3W

PostPosted: Fri Aug 18, 2023 7:55 pm    Post subject: Reply with quote

Carlosk465,

Identifiers must be unique in Section types and are used for two things

1. by Xorg to assemble the Server Layout by following the trail of Identifiers to the various sections.
2. by the system admin to work out what is actually happing.

If you choose to use unique Identifiers within your xorg.conf tree, changing one is a matter of find/replace all in your $EDITOR

Identifiers have no meaning to Xorg.

Its a bad idea to attempt to reuse default Identifiers as if a default is defined after your Section, your section definition will not be used.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Carlosk465
Tux's lil' helper
Tux's lil' helper


Joined: 29 May 2022
Posts: 78

PostPosted: Fri Aug 18, 2023 8:27 pm    Post subject: Reply with quote

Try to change DVI-D-0 and HDMI-A-1 to something else and it doesn't work
Back to top
View user's profile Send private message
Carlosk465
Tux's lil' helper
Tux's lil' helper


Joined: 29 May 2022
Posts: 78

PostPosted: Mon Aug 21, 2023 3:39 pm    Post subject: Reply with quote

I thought that the problem of the image that I put above had been solved, now I have the screen where I wanted but when I start a game that suspends the composer, it stops recognizing the screen and it is seen with a black background, but I can still put a window with the only one detail that the floating menus appear on the edge of the other screen.

I have been testing wayland and I have some questions, how can you transfer the configuration from xorg to wayland? although it seems that it reads the xorg.conf file because it maintains the position of the screens. I also have a problem with this, only when I turn off the screen it never appears again.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum