11

The system is setup with one of those hybrid Intel/ATI offerings (muxless). After a bit of fiddling with kernel settings and drivers I got both cards working, I think (adding radeon.dpm=1 in kernel settings and using only the opensource drivers).

However I can't figure out which card the system is using. From my understanding with the newer kernel (3.12) amd dynamic power management will power down/ power up the card when needed, so in theory it should be using the integrated hd4000 for most of the time, however I can't find an easy way to check which one is in use.

lspci | grep VGA only lists all the cards, it doesn't specify which one is currently in use.

Some steering in the right direction much appreciated.

System

Debian 7 stable, 3.12 amd64 Kernel 7670M AMD + Intel HD4000

Jeff Schaller
  • 66,199
  • 35
  • 114
  • 250
Jonathan
  • 111
  • 1
  • 1
  • 3

2 Answers2

6

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

slm
  • 363,520
  • 117
  • 767
  • 871
  • I don't have a multi-GPU machine to test with, but as far as I can tell, none of the commands you've proposed indicate which GPU drives which monitor. – Gilles 'SO- stop being evil' May 10 '14 at 11:05
  • @Gilles - true they don't come out and actually state it but they do show how a device is associated to a given screen (i.e. displays). – slm May 10 '14 at 22:11
  • You still aren't explaining how to relate a GPU with a monitor (at least in the common case of not having an `Xorg.conf`). The information is probably in the Xorg log if nowhere else (and probably elsewhere but I have no experience with that). – Gilles 'SO- stop being evil' May 11 '14 at 11:37
  • @Gilles - hmm. The provider "Provider 0" is GPU #0. That GPU drives displays that are associated as "Screen 0". Did I not explain that clearly? – slm May 11 '14 at 12:29
  • But how do you know which provider drives which screen? – Gilles 'SO- stop being evil' May 11 '14 at 12:36
  • The answer doesn't state this very clearly but the information is clearly there: $ xrandr --listproviders ... name:Intel $ sudo lshw -numeric -c video ... product: Core Processor Integrated Graphics Controller [8086:46] ... vendor: Intel Corporation [8086] -- I like the other answer better but it's a valid method to look at the xorg configuration and look at the Screen -> Device mapping. – Vasiliy Sharapov May 18 '16 at 19:20
3

The glxinfo, which is available in mesa-utils can be used to display which video adapter is used for OpenGL graphics.

For example:

➜  ~  glxinfo | grep "OpenGL renderer string"
OpenGL renderer string: Mesa DRI Intel(R) Ivybridge Mobile
Don Manley
  • 291
  • 2
  • 9