You are not logged in.

#1 2016-03-17 14:36:47

sycc90
Member
Registered: 2016-01-10
Posts: 7

Xorg configuration for dual monitors with AMD/intel drivers.

Hello everyone!
I know this has been asked plenty of times already but I've been reading forum posts since yesterday to no avail.
I have two monitors connected to my PC, both trough VGA (one doesn't have another port and the other needs the HDMI port for something else) and given that the graphics card only has one vga port I decided to use the onboard intel one as well.  Just in case, it's an HD6450 and an i5-4690.

For identification purposes lets call them:
-) monitor 0, connected to the intel adapter with a resolution of 1366x768 (this one is IntelVGA in the xorg.conf file).
-) monitor 1, connected to the HD6450 with a resolution of 1080p (this one is RadeonVGA in the xorg.conf file).

Now, first of all, trying to get Xorg to auto-configure with Xorg -configure flat out breaks with a segmentation fault.  I'm not too concerned about this because, since my system doesn't recognize monitor 0's resolution, I need a custom xorg.conf file, this is it:

Section "ServerLayout"
    Identifier     "Layout0"
    Screen         1 "Screen1"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
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"
    Identifier     "RadeonVGA"
    VendorName     "LG"
    ModelName      "23MP55"
    Option         "DPMS"
    Option         "PreferredMode" "1920x1080"
    Option         "Primary" "true"
EndSection

Section "Monitor"
    Identifier     "IntelVGA"
    VendorName     "LG"
    ModelName      "W1943SE"
    Option         "DPMS" "true"
    Modeline       "1366x768" 85.500 1366 1494 1624 1798 768 770 776 795 +hsync -vsync
    Option         "PreferredMode" "1366x768"
    Option         "TargetRefresh" "60"
EndSection

Section "Device"
    Identifier     "IntelOnboard"
    Driver         "intel"
    BusID          "PCI:0:2:0"
    Option         "Monitor-VGA1"  "IntelVGA"
EndSection

Section "Device"
    Identifier     "RadeonDev"
    Driver         "radeon"
    VendorName     "AMD"
    BusID          "PCI:6:0:0"
    Option         "Monitor-VGA1"  "RadeonVGA"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "IntelOnboard"
    Monitor        "IntelVGA"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24
        Modes      "1366x768"
    EndSubSection
EndSection

Section "Screen"
    Identifier     "Screen1"
    Device         "RadeonDev"
    Monitor        "RadeonVGA"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24
        Modes      "1920x1080" "1366x768"
    EndSubSection
EndSection

If I start without an xorg.conf file, the system defaults to monitor 0 with the incorrect resolution.

Now, I know both devices are recognized:

$ lspci | grep VGA
00:02.0 VGA compatible controller: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller (rev 06)
06:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Caicos [Radeon HD 6450/7450/8450 / R5 230 OEM]

Both drivers seem to be loaded correctly as well:

$ lsmod | grep 'radeon\|i915'
i915                 1081344  3
radeon               1474560  3
ttm                    77824  1 radeon
drm_kms_helper        102400  2 i915,radeon
drm                   286720  9 ttm,i915,drm_kms_helper,radeon
video                  32768  1 i915
button                 16384  1 i915
intel_gtt              20480  1 i915
i2c_algo_bit           16384  2 i915,radeon

And I can actually get each monitor to run on its own.  The xorg.conf file I included above is configured for monitor 1, if I change the layout to "Screen0" then monitor 0 will start working.  I can also get both to run on separate screens with the layout:

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

I want both of them to run together so I can drag and drop windows and such.  For this I usually just use xrandr, however, it doesn't seem to recognize that two monitors (or even adapters) are connected together.  When I configure both screens 0 and 1 simultaneously I can run

DISPLAY=:0.N xrandr

and I will get the correct configuration for each screen, with the corresponding modes of each monitor.  But when I only have one screen active it only shows that active monitor, this doesn't allow me to configure the second one via the usual commands of --left-of and such.
The same happens with --listproviders.


I'd really appreciate it if someone could help me out with this.

Thank you!
-- Sycc

Offline

#2 2016-03-18 13:40:48

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,922

Re: Xorg configuration for dual monitors with AMD/intel drivers.

trying to get Xorg to auto-configure with Xorg -configure flat out breaks with a segmentation fault

xorg -configure has been deprecated for years now, there are very few cases where it is useful.

If I start without an xorg.conf file, the system defaults to monitor 0 with the incorrect resolution.

How about solving that problem first then ?

Your system uses a hybrid setup, the PRIME page in wiki shows how to configure such a setup.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#3 2016-03-18 14:17:52

sycc90
Member
Registered: 2016-01-10
Posts: 7

Re: Xorg configuration for dual monitors with AMD/intel drivers.

xorg -configure has been deprecated for years now, there are very few cases where it is useful.

Oh, I wasn't aware of that.  Thankfully I wasn't really counting on it anyway.

How about solving that problem first then ?

Well, the only way I found to solve that problem is by adding the Modeline to the xorg.conf file, that's why I need a custom one.  I wasn't able to solve this any other way... but if you have any suggestion, I'll welcome them.

Your system uses a hybrid setup, the PRIME page in wiki shows how to configure such a setup.

I was under the impression that it didn't allow both adapters to work as one big desktop... but I guess I was wrong then, I'll take a look smile
It's a little surprising though, I used to have an Nvidia card and this wasn't a problem.

Thank you for your help!
-- Sycc

Offline

#4 2016-03-19 13:38:11

sycc90
Member
Registered: 2016-01-10
Posts: 7

Re: Xorg configuration for dual monitors with AMD/intel drivers.

Ok, I read that wiki article but it doesn't really help me.  My main problem, which I mentioned above, is that xrandr only displays *one* provider and no amount of deleting the config file or anything changes that.
lsmod shows me both drivers are installed and running as far as I can tell, is that right?

Offline

#5 2016-03-19 21:58:41

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,922

Re: Xorg configuration for dual monitors with AMD/intel drivers.

lsmod shows me both drivers are installed and running as far as I can tell, is that right?

that's as it should be.

I overlooked something in your first post : both your monitors are connected through vga atm.
Intel uses a special technique called 'vga arbiter" to deal with such a setup.
It seems to fail often  and only work with specific card/monitor combos.

Try connecting the monitor on the amd card through any non-vga connector.
The start X without any conf files, and run xrandr .
if it sees both providers in that case ,we'll have confirmation that PRIME can handle your system.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#6 2016-03-19 23:55:30

sycc90
Member
Registered: 2016-01-10
Posts: 7

Re: Xorg configuration for dual monitors with AMD/intel drivers.

Try connecting the monitor on the amd card through any non-vga connector.
The start X without any conf files, and run xrandr .
if it sees both providers in that case ,we'll have confirmation that PRIME can handle your system.

Unfortunately, this doesn't seem to work either.
I connected monitor 1 through the card's HDMI port, removed the xorg.conf file and started X, same behavior as before:  system defaults to monitor 0 on the incorrect resolution and xrandr only reports that adapter/provider.  Note, in case it's not clear, that when I say incorrect resolution I mean it doesn't detect the monitor's actual real resolution, this is why I needed the modeline in the first place.

I'm getting this warning in the Xorg log

(WW) VGA arbiter: cannot open kernel arbiter, no multi-card support

does it mean something?  I wasn't able to gather much information about it by googling it, except that many people seem to have it and doesn't really affect anything... but well, just in case I thought I'd mention it, since it "looks" relevant.

Offline

#7 2016-03-20 15:15:04

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,922

Re: Xorg configuration for dual monitors with AMD/intel drivers.

(WW) VGA arbiter: cannot open kernel arbiter, no multi-card support

One thing it seems to affect is the ability to use more then 1 vga connection.

Atm it looks like your mobo / intel igp and amd discrete card don't work well together.

I'm assuming you are running latest firmware and have enabled intel early microcode loading?

Some things that are worth trying :

A.
Connect the hdmi monitor to the intelcard hdmi,  and the vga monitor to the vga connector on the amd card.
Does xrandr see both providers ?

B.
Maybe having the amdcard managing things will work better.
Does your bios/uefi firmware allow you to set the amd card as primary card ?
if so,try that.

If either A or B works,we willhave PRIME support working and may be able to tweak the setup into a workable setup for your system.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#8 2016-03-25 23:15:59

sycc90
Member
Registered: 2016-01-10
Posts: 7

Re: Xorg configuration for dual monitors with AMD/intel drivers.

I'm sorry for the late reply, I was a bit busy this week.

I'm assuming you are running latest firmware and have enabled intel early microcode loading?

Yes and yes.

Ok, so after trying both of those cases there's been some improvement.  A didn't work, I mean, same as before.  B, however, got me a little closer, let me explain.
After setting the radeon card as primary in the bios and logging in *without* a xorg.conf file xrandr started being able to list both providers with --listproviders.  There's still some issues though:
1) xrandr would only show one output... so, following the PRIME wiki about reverse-PRIME I used the command

xrandr --setprovideroutputsource Intel radeon

and, after that, xrandr was able to list all outputs (both VGAs plus a virtual one).
2) Whichever monitor is connected to the IGP won't list the proper resolution.  I could solve this with xrandr --newmode followed by xrandr --addmode, writing any kind of xorg.conf file would result in xrandr no longer listing both providers.
3) After all that, the secondary monitor (IGP) still doesn't seem to work very well.  It's quite laggy and windows cannot be maximized in it, they would go back to the other monitor (this isn't a problem with both monitors on the same adapter).  Are these limitations of using reverse-PRIME with the hybrid setup?
4) There's also the ghosting (at least I think this is it) problem the wiki page addresses since I don't use a compositor.  But I want to tackle one problem at a time so I'm leaving this one for later.

Offline

#9 2016-04-02 13:56:25

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,922

Re: Xorg configuration for dual monitors with AMD/intel drivers.

3) After all that, the secondary monitor (IGP) still doesn't seem to work very well.  It's quite laggy and windows cannot be maximized in it, they would go back to the other monitor (this isn't a problem with both monitors on the same adapter).  Are these limitations of using reverse-PRIME with the hybrid setup?

Hard to tell, using the cards this way is unusual.

I think it's time to let X do the hard work instead of the motherboard/chipset and try "Discrete Card as Primary GPU" .

create "10-radeon-primary.conf" file,with this exact content :

# Radeon Card as Primary GPU

Section "ServerLayout"
    Identifier "layout"
    Screen 0 "radeon"
    Inactive "intel"
EndSection

Section "Device"
    Identifier  "radeon"
    Driver      "radeon"
    BusID       "PCI:6:0:0" # Sample: "PCI:1:0:0"
EndSection

Section "Screen"
    Identifier "radeon"
    Device "radeon"
EndSection

Section "Device"
    Identifier  "intel"
    Driver      "intel"
    BusID       "PCI:0:2:0"  # Sample: "PCI:0:2:0"
EndSection

Section "Screen"
    Identifier "intel"
    Device "intel"
EndSection

copy that file to /etc/X11/xorg.conf.d/ , reboot and change primary card in bios/uefi back to intel.

Last edited by Lone_Wolf (2016-04-02 13:56:41)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

Board footer

Powered by FluxBB