How to use 2 different GPUs simultaneously under Linux?
I have this problem for quite a long time, asking about it in the forums of my actual distros, but nobody could answer. Maybe the good people here can...
I have two monitors, and a TV. Monitors on the discrete graph card (NVIDIA GeForce GTX460), TV is on the CPU's integrated GPU (Intel HD3000 in a Core-i7 2600K).
On Windows I can use all three displays in a big expanded desktop
How can I achieve something similar under Linux?
I use nouveau driver for the GeForce, as I can load the i915 Intel driver with it simultaneously, this cannot be done with the proprietary NVIDIA driver.
lspci sees both GPUs, but nothing else does, I can't expand the desktop to the TV. Fedora's bootscreen appears there, but after boot I can't use it anymore.
Previously I used Arch Linux, and there, with Xorg.conf I managed to activate all of the displays, but there was a slight problem: The two monitors appeared as one 2560x1024 desktop in KDE, the TV was a separate desktop. If the mouse was on monitor1, and I draged it to right, it reached monitor2, and after that it should appear in the left side of the TV, but instead it appeared in the 2/3 of it (probably at 1281st pixelcoloumn). After that, the mouse could use the full area of the TV. If I dragged it back to the left, it fully skipped monitor2 and appears at the right side of monitor1. From that I suspect that somehow the area of monitor2 overlaps the top left 1280 by 1024 pixels of the TV.
This was the Xorg.conf, but as you can read, this wasn't really a solution, and as far as I know, xorg.conf is deprecated
Do anyone have any idea? Thank you for your answers
This is a non-trivial problem (as you seem to have found).
One thing that makes this difficult is that you are using 2 diffrent vendors for GPUs, this means that there are no vendor tools that will play nice with both cards. Some of the standard tools may allow you to do this (which one you use depends on your DE).
However I would fall back to using Xorg.conf, I'm not sure why you think Xorg.conf is depreciated in my experiance most tools use the file to save settings. As a rule end users should not have to interact with xorg.conf. Xorg.conf is overly complex, you are beyond standard usage here so its the hard way.
I would attempt to re-implement your Xorg file and see if you get the same incorrect behaviour as before. Then try to work out why you are getting the behaviour you are, you should be able to edit the file to make it correct once you have all 3 screens working.
There are some lmitations about what can be achieved with x due to how it works, the monitors on seprate cards will be regarded compleatley sepratley and you may find situations where the you have to treat the TV as seperate from the the other 2.
Thanks for the reply
Yes, I realized that this is a non-trivial problem, as it seems that nobody have it before :)
For DE I use KDE, but it helps me nothing in this matter, as in the Display Settings it only sees the 4 ports of the graph.card and the two monitors attached to it.
Before anyone ask it: the GF104 GPU handles only two monitors at any time, so even I have 2 DVI, a D-Sub and an HDMI port, I can only use two of them at the same time
I experienced that less and less programs care of what I write in xorg.conf, that's why I thought it's deprecated, but try it that way :)
The previously linked xorg.conf was based on these two documents published by Intel:
Inside Linux Graphics
Hybrid Multi-Monitor Support
I read them and rewrote my config many times from scratch, to avoid errors, but the overlapping problem remained then.
But today I reached a breakthrough!
Thanks for your advices I run through that old xorg.conf and merged it into the current one, and it works!
It's basically the same as before, but it works. I don't know how or why, but it does :)
It creates a totally separate desktop, I can't directly launch any application there, only with the DISPLAY=":0.1" appname command, but it isn't a problem, as I only want to use it for XBMC, and I can easily modify it's launch command to this.
One new problem occurs though...
The virtual desktop is a little bit bigger than the actual size of the TV, so the edges of it are out of the visible space.
I modified xorg.conf a bit more, added a few data of the TV, according to /var/log/Xorg.0.log
So this is where I am now, farer than any other point in the past 17 months, since I have the TV, but not at the finish line.
It worthed to registrate here :)
Well I am glad you found my reply helpful, I'm not entirley sure how - maybe I just got you to revisit a path that you had previously discarded.
Anyway the next issue. I am not sure what is causing this. Maybe if you could answer some questions it could help.
1) When you say the desktop is to big for the monitor what do you mean, Can you pan around or does it just cut off a section?
2) Have you tried without the mode line? - X should be able to work out the correct setting (although I'm guessing this leads to the earlier described problem.
3) More of a comment - DisplaySize is used as well as Option "DPI", as DisplaySized is used to calculate DPI I think it is a bad idea to define both what happens if you remove each (leaving other inplace)?
4) In the mode line -Hsync and +Vsync appear after a hash suggesting there commented out, was this intentional?
5) Once in your x enviroment can you use xrandr to give correct operation?
I should have a solution for you. When I get home I'll post a codeblock of how I set up my twinview. You should be able to specify where one monitor ends and the other begins using modelines and identifiers.
xorg.conf definitely isn't deprecated either. If the file is missing X runs through autodetection, but if it's there X is set up explicitly through the conf file.
So here's snippet of my xorg.conf.
The main difference between your setup and mine is that I have the twinview flag enabled. I'm only using the one GPU, so I could use the detected outputs and define my screen positions using those as identifiers under a single screen section.
You may, however, be able to use MetaModes to explicitly define how you want your screens to align (ie: 1280x1024 +0+0 for your left monitor, 1280x1024 +1280+0 for the right monitor, and 1920x1080 +2560+0 for the TV). It may be possible to define these outright under each individual screen section that you have defined.
You may have to define the positioning in the modelines as opposed to metamodes...
I haven't attempted this, it's really only guesswork.
Have you tried xrandr?
I am not very experienced using it. I did it just once when I had a VGA adapter which did not came with a utility like NVidia Desktop settings. I was amazed how I was able to play with dissimilar displays in separate and united desktops. Obviously I have not studied xrandr in relation with your challange, but maybe the pointer is useful and you have more time on your hands that I do.
|All times are GMT -5. The time now is 09:24 PM.|