xrandr
Using xrandr will show you which cards are available.
$ xrandr --listproviders
Providers: number : 1
Provider 0: id: 0x49 cap: 0xb, Source Output, Sink Output, Sink Offload crtcs: 2 outputs: 8 associated providers: 0 name:Intel
On this system I have 1 graphics card, an Intel, which has 2 ports (outputs). You can see the outputs with xrandr like so:
$ xrandr -q
Screen 0: minimum 320 x 200, current 3360 x 1080, maximum 8192 x 8192
LVDS1 connected primary 1440x900+0+0 (normal left inverted right x axis y axis) 303mm x 190mm
1440x900 60.0*+ 50.0
1024x768 60.0
800x600 60.3 56.2
640x480 59.9
VGA1 connected 1920x1080+1440+0 (normal left inverted right x axis y axis) 521mm x 293mm
1920x1080 60.0*+
1680x1050 60.0
1280x1024 75.0 60.0
1440x900 59.9
1280x960 60.0
1152x864 75.0
1024x768 75.1 70.1 60.0
832x624 74.6
800x600 72.2 75.0 60.3 56.2
640x480 75.0 72.8 66.7 60.0
720x400 70.1
HDMI1 disconnected (normal left inverted right x axis y axis)
DP1 disconnected (normal left inverted right x axis y axis)
HDMI2 disconnected (normal left inverted right x axis y axis)
HDMI3 disconnected (normal left inverted right x axis y axis)
DP2 disconnected (normal left inverted right x axis y axis)
DP3 disconnected (normal left inverted right x axis y axis)
The 2 outputs are VGA1 (VGA external port) and LVDS1 (LCD monitor on laptop).
lshw
Lastly you can use lshw to find out more info regarding the actual graphics cards info:
$ sudo lshw -numeric -c video
*-display
description: VGA compatible controller
product: Core Processor Integrated Graphics Controller [8086:46]
vendor: Intel Corporation [8086]
physical id: 2
bus info: pci@0000:00:02.0
version: 02
width: 64 bits
clock: 33MHz
capabilities: msi pm vga_controller bus_master cap_list rom
configuration: driver=i915 latency=0
resources: irq:41 memory:f2000000-f23fffff memory:d0000000-dfffffff ioport:1800(size=8)
How to determine which GPU is driving which monitors
To accomplish this task you'll need to take the list of providers and note their number from the xrandr --listproviders command. This number is the devices number. It's often times the same number that's assigned along with the screen in the output of xrandr -q.
So one can loosely construct which GPU "device" is driving which screen. In my example "Provider 0" is driving "Screen 0".
NOTE: The term "Screen" does not necessarily correspond to a single display. In my scenario my GPU can drive 2 outputs, LVDS1 and VGA1. But this approach does allow you to make the determination with a fairly high degree of confidence as to which display is being driven by which GPU.
The above associations is controlled through the system's setup so there are possibilities that it could mislead you. For example, the above association is driven from a setup that often looks like this:
Section "Screen"
Identifier "Screen0"
Device "Device0"
EndSection
Section "Screen"
Identifier "Screen1"
Device "Device1"
EndSection
So there is the possibility that the system was setup with Screen0 being driven something other than Device0.
References