From: Andrew Savchenko <bircoph@gentoo.org>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] how to use two graphics cards with one display
Date: Tue, 14 Jun 2016 00:15:53 +0300 [thread overview]
Message-ID: <20160614001553.6127e23570cd47e4c58219ab@gentoo.org> (raw)
In-Reply-To: <87h9d29i6i.fsf@heimdali.yagibdah.de>
[-- Attachment #1: Type: text/plain, Size: 5130 bytes --]
Hi,
On Thu, 09 Jun 2016 23:16:37 +0200 lee wrote:
> > As far as I understand your e-mail, you are trying to mux video
> > outputs of two GPU cards to a single monitor (excuse me if I'm
> > wrong, but it is hard to understand what your hardware is), this is
> > also doable if your monitor supports dual input (most modern
> > monitors do). This way separate X screens may be used to achive
> > your goal. (Xinerama setup is also possible, but GL acceleration
> > will be limited to abilities of the weakest card).
>
> Exactly, but I don't want to use the picture-in-picture feature of the
> monitor, and I don't want separate X screens, and I don't have room to
> fit another monitor on my desk.
>
> I simply want to use one of the graphics cards to handle an application
> that uses open gl and the other one to play a video.
Let's suppose that you connected video outputs of both your cards
to the same monitor. It is possible to use single X screen with
xinerama here and configure it to mirror outputs on both cards,
e.g. (output names may vary depending on hardware):
xrandr --output LVDS1 --same-as VGA1
This way you can select using monitor's hardware switch from what
input to take picture. So you'll have dual-monitor mirrored output,
where both outputs are connected to the same single monitor.
But the last time I tried similar scheme, OpenGL acceleration is
limited to the lowest card capabilities. This was several years
ago, maybe things are changed since and you'll be able to use full
power of a newer card. In order to select which card to use you can
select xinerama screen (mplayer can do that, not sure about others).
> > But honestly I don't get why you need this: if you have a powerful
> > GPU and it is not a laptop, where power consumption is critical,
> > why just don't use that card? Most cards have multiple outputs, so
> > it is not a problem to setup multihead with a single card either.
>
> The GPU isn't quite powerful enough for some of what I'm doing.
> Otherwise, it's a perfectly good card.
>
> So I need to get a better graphics card, and once I do, it would be a
> pity to have the current one laying around uselessly. I wouldn't get
> much if I tried to sell it, so I rather keep it in case I need a spare.
> Buying another one which is the same, to use SLI, won't help, either.
>
> IIUC, it takes some processing power to decode a video, so why not use
> one of the cards for just that? Multiple cards should be able to work
> together.
There is a severe problem here: how to multiplex outputs of
different cards to the same monitor? Either outputs should be
independent (as described above), or single video output should be
used and hence one card must write to the buffer of another.
It is possible to done this either via SLI (not your case
apparently) or PCI Express. The latter solution requires very
special driver support (e.g. NVidia Optimus or ATI Hybrid
Graphics). AFAIK both of them work only on IGP <-> PCI-E setup,
where one card is Integrated Graphics Processor using system
memory and another one is powerful (and energy consuming) PCI-E
graphics card. On such setup driver allows to transfer display
surface from GPU frame buffer, to system RAM mapped for IGP and
then IGP is used to display this surface.
IOW such solution will not work if you have a couple of fully
fledged PCI-E GPU cards with their own memory. In theory it should
be possible to rewrite GPU driver in a way that will allow to
transfer display surface from one video card RAM to another using
PCI-E bus, but no sane developer will do this: coding efforts will
be tremendous and benefits are unclear up to the point when PCI-E
will be a bottleneck.
I still don't understand why you need an older card for a video
decoding, since newer one can do this perfectly.
Still there is a place to use both cards: GPGPU computing, both
cards can be used to run OpenCL or CUDA applications or one card
may be used for a vdpau video decoding, while another one will mine
you bitcoins :)
Be warned however, that if you will use both card for the same
GPGPU application (e.g. OpenCL or CUDA), care should be taken to
allow asynchronous computing of such application. Since cards will
operate on different speeds, memory and number of cores,
synchronous application will be faster no more then as twice as the
same app on the slowest card, which will be likely slow than runnig
the same app only on the fastest card. Also you must remember, then
PCI-E is terribly slow compared to in-GPGPU data exchange rate, so
it will likely be a bottleneck for your tasks. Of course, most
OpenCL/CUDA apps are synchronous and will not be able to run
properly on heterogeneous GPGPU setup.
So probably your best option will be to use one card solely for
GPGPU computing, while another one for rendering and output.
Another interesting application is that some codecs (e.g.
x264) allow to use OpenCL, though from tests I saw it still gives
worse results then vdpau-based decoding.
Best regards,
Andrew Savchenko
[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2016-06-13 21:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-05 17:34 [gentoo-user] how to use two graphics cards with one display lee
2016-06-06 20:41 ` Andrew Savchenko
2016-06-09 21:16 ` lee
2016-06-13 21:15 ` Andrew Savchenko [this message]
2016-06-07 6:13 ` R0b0t1
2016-06-09 21:19 ` lee
[not found] ` <CAAD4mYhdD0_sX_uExV0xy4M6u4LH9MGxZExBNJCcTaedtxfRZg@mail.gmail.com>
2016-06-09 23:35 ` R0b0t1
2016-06-11 21:22 ` lee
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160614001553.6127e23570cd47e4c58219ab@gentoo.org \
--to=bircoph@gentoo.org \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox