Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How would I use two separate display adapters concurrently?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Crackerjackthe4th
n00b
n00b


Joined: 20 Jun 2014
Posts: 28

PostPosted: Sat Aug 23, 2014 8:35 am    Post subject: How would I use two separate display adapters concurrently? Reply with quote

I've been trying to figure this out for a week or so now without any success, and while I hate asking for help, I think it's about time to hit the forums. I've seen a few posts *sort of* relating to my problem, but nothing quite hitting the mark:

Okay, basically, I have an Intel iGPU and a discrete Radeon board, right? (HD 7870, if it matters)
I'm trying to set up *both* of them to handle two different monitors (in other words, one adapter for each monitor) so I can pass through the discrete card to a virtual machine and keep the processor's onboard graphics as the primary display for Linux. Long story short, I wanna have a "WIndows-in-a-cage" setup. I love Linux to death, but I can't really just give up games, so I'm giving Xen and VGA passthrough a go.

I've googled this enough and seen enough evidence of people pulling this off to know it IS possible, but the "how" is just beyond me, because every example I've seen so far is using one driver and one brand with multiple discrete cards for all their monitors/screens/displays. Unfortunately, my box is an ITX and doesn't have room for a second discrete card, so I'm trying to use the intel iGPU as a primary display, as I've mentioned.
What I'm *envisioning* is this: I have two monitors, right? The iGPU handles one, the discrete card, the other. Any time I can play a game that's available on Linux, or if I'm using Blender, or doing ANYTHING considered "Heavy Lifting," it'll be devoted to the monitor handled by the discrete Radeon board. If I happen to need something that I can't use in Linux, (such as Fruity Loops, Photoshop, most games, etc) I can just run
Code:
# xl create win7.cfg
and WIndows shows up on the second screen due to PCI assignment of a dedicated Video Card.

I know better than to ask whether or not this *is* possible, but I can't for the life of me figure out how to do it. I know it has something to do with tweaking xorg.conf a little bit, but following the directions on either Gentoo's or Arch's wikis have only gotten me a frozen, black screen where I can't even alt + ctrl + f1 back to the console and read the xorg logs, and then I have to enter rescue mode or use a systemrescuecd to get rid of /etc/X11/xorg.conf. >: /
Here's my config, btw:

Code:

Section "ServerLayout"
   Identifier     "ToasterLayout"
   Screen      0  "screen-0" 0 0
   Screen         "screen-1" LeftOf "screen-0"
EndSection

Section "Monitor"
   Identifier  "monitor-0"
   Option       "DPMS" "true"
EndSection

Section "Monitor"
   Identifier  "monitor-1"
   Option       "DPMS" "true"
EndSection

Section "Device"
   Identifier  "device-0"
   Driver      "intel"
   BusID       "PCI:00:02:0"
EndSection

Section "Device"
   Identifier  "device-1"
   Driver      "fglrx"
   BusID       "PCI:01:00:0"
   Screen      1
EndSection

Section "Screen"
   Identifier "screen-0"
   Device     "device-0"
   Monitor    "monitor-0"
   DefaultDepth     24
   SubSection "Display"
      Viewport   0 0
      Depth     24
   EndSubSection
EndSection

Section "Screen"
   Identifier "screen-1"
   Device     "device-1"
   Monitor    "monitor-1"
   DefaultDepth     24
   SubSection "Display"
      Viewport   0 0
      Depth     24
   EndSubSection
EndSection



Side note: I tested this in the "newbie" distros such as *buntu and Mint, and they have NO problem detecting all display adapters right "out-of-the-box." Why can they do it and Gentoo can't? (disclaimer: I know Gentoo is more "user-centric" than user-friendly, but what I'm asking is whether or not, and how, I can get that same ease of use in Gentoo, because it doesn't seem to want to use the GPU as long as the onboard graphics are enabled.)

Another Side Note: I don't actually NEED to use two monitors; I have an old KVM switch here (2-way USB and HDMI) that I can use on one monitor. Would I be able to do that with a dual-monitor xorg.conf?

So wtf do I do here? I'm at a complete loss.
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3806
Location: Austro Bavaria

PostPosted: Sat Aug 23, 2014 9:28 am    Post subject: Reply with quote

Easy way is to fire up those distros and check which driver is installed and how the setup files are. copy it and it works for you here too.

mint uses teh open source drivers for my nvidia based hardware. as you have amd i have no idea on mint.

you may check lsmod and lshw and the config files in your mint quite easily. also check your package manager to see what is installed respectively regarding drivers / xorg-server and such ... check the system components manually and than compare it here.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sat Aug 23, 2014 9:48 am    Post subject: Reply with quote

Crackerjackthe4th,

If you are doing PCI pass through, the Radeon card will not be visible to the host.

On the host, set up the Intel card only. Do not install the radeon driver, since the host won't be driving it.
No xorg should be required but it won't do any harm.

You do need the host kernel to support PCI passthrough, Xen needs to support PCI passthrough and your Radeon card also needs to support PCI passthrough.
I know you can set up the kernel but I have no knowledge of Xen and your Radeon card.
_________________
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
Anon-E-moose
Advocate
Advocate


Joined: 23 May 2008
Posts: 4343
Location: Dallas area

PostPosted: Sat Aug 23, 2014 10:23 am    Post subject: Reply with quote

NeddySeagoon wrote:
You do need the host kernel to support PCI passthrough, Xen needs to support PCI passthrough and your Radeon card also needs to support PCI passthrough.


The motherboard needs to support IOMMU for passthrough to work (not all do)

I do have a radeon 6670 that I use for passthrough on vm's (qemu) so I know it works, but I don't do xen.
_________________
Asus m5a99fx, FX 8320 - nouveau, oss4, rx550 for qemu passthrough
Acer laptop E5-575, i3-7100u - i965, alsa
---both---
5.0.13 zen kernel, profile 17.1 (no-pie & modified) amd64-no-multilib
gcc 8.2.0, eudev, openrc, openbox, palemoon
Back to top
View user's profile Send private message
Crackerjackthe4th
n00b
n00b


Joined: 20 Jun 2014
Posts: 28

PostPosted: Sat Aug 23, 2014 9:32 pm    Post subject: Reply with quote

NeddySeagoon wrote:
Crackerjackthe4th,

If you are doing PCI pass through, the Radeon card will not be visible to the host.

On the host, set up the Intel card only. Do not install the radeon driver, since the host won't be driving it.
No xorg should be required but it won't do any harm.

You do need the host kernel to support PCI passthrough, Xen needs to support PCI passthrough and your Radeon card also needs to support PCI passthrough.
I know you can set up the kernel but I have no knowledge of Xen and your Radeon card.

Thanks, but as I've been made aware, the card does, in fact, support passthrough, but apparently only with the closed-source driver. Is that true? I'd like some confirmation on that.
I'm aware that the GPU won't be visible as long as it's passed through, but what about when the VM is shut off? This is part of what I'm trying to do, since this isn't the *only* use I had in mind for the card. (I want to be able to mess around with Blender as well. Windows is really only a gaming necessity.)
EDIT: Also, the kernel is set up appropriately, as far as I'm aware. I followed the wiki for Xen and fglrx.

Anon-E-Moose wrote:

The motherboard needs to support IOMMU for passthrough to work (not all do)

I'm aware of this as well. All BIOS settings are where they need to be. Thanks for the input.

tw04l124 wrote:

Easy way is to fire up those distros and check which driver is installed and how the setup files are. copy it and it works for you here too.

mint uses teh open source drivers for my nvidia based hardware. as you have amd i have no idea on mint.

you may check lsmod and lshw and the config files in your mint quite easily. also check your package manager to see what is installed respectively regarding drivers / xorg-server and such ... check the system components manually and than compare it here

Where exactly would I look for those configs?
Code:
ati-config --initial --whatever-whatever
just creates an xorg.conf that uses ATI specifically. The file I pasted in the first post is modified from that. Otherwise, those other distros don't seem to have any config files; they just work "automagically." So how would I set up Gentoo to detect my devices like they do?
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3806
Location: Austro Bavaria

PostPosted: Sun Aug 24, 2014 7:38 am    Post subject: Reply with quote

Config files should be in the folder /etc usually.
But I learnt some distros always do their own ways, even the bigger ones.
Just dig around with a file explorer and look for it. Especially /etc and /home are interesting. Be careful to check those hidden files too, they start with a dot as the file-name
Back to top
View user's profile Send private message
Crackerjackthe4th
n00b
n00b


Joined: 20 Jun 2014
Posts: 28

PostPosted: Mon Aug 25, 2014 6:24 am    Post subject: Reply with quote

I'm just gonna go ahead and mark this off as solved.

It isn't gonna mess with my proposed setup a whole lot, but it would be nice to know of any convenient / elegant way to set up multimonitor with separate adapters.

Til then, I guess I'm gonna just follow two's advice.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware 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