By default you use the Intel driver. These Intel+AMD combinations have all displays wired to the Intel card and none to AMD. The AMD card functions as a processing backend meaning you either use Intel and AMD or Intel only. Everything goes through the Intel card.
To use the default open source drivers, you need the following: kernel drivers, mesa, libdrm, x drivers and non-free firmware. On Debian everything but the firmware package is installed by default if you have a graphical environment installed.
The x driver is named xserver-xorg-video-radeon OR (newer hardware) xserver-xorg-video-amdgpu and -intel respectively. Make sure all 3 are installed. The kernel drivers are named i915 for Intel and radeon OR amdgpu (depending on generation) for AMD. make sure you have the radeon AND amdgpu kernel module (modinfo radeon and modinfo amdgpu).
Make sure you dont have anything that blocks the radeon/amdgpu module OR anythng that DISABLES KMS.
Testing:
1. Check the output of the 'dmesg' command and /var/log/Xorg.0.log file. You should have there the initialization sequence for intel and radeon cards if you have the drivers installed.
2. To actually test the cards install the mesa-utils package then check the following:
Code:
xrandr --listproviders
Which should return something
Code:
$xrandr --listproviders
Providers: number : 2
Provider 0: id: 0x7e cap: 0xb, Source Output, Sink Output, Sink Offload crtcs: 4 outputs: 8 associated providers: 0 name:Intel
Provider 1: id: 0x52 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 2 outputs: 1 associated providers: 0 name:OLAND @ pci:0000:01:00.0
Then do (replace the relevant info)
Code:
xrandr --setprovideroffloadsink "OLAND @ pci:0000:01:00.0" Intel
Now if you want to run something on card index 0, you dont need to do anything, but for index 1 you need to set the "DRI_PRIME=1" variable
For example to identify the used opengl driver:
Code:
DRI_PRIME=1 glxinfo | grep -i open
ATTENTION: default value of option vblank_mode overridden by environment.
OpenGL vendor string: X.Org
OpenGL renderer string: Gallium 0.4 on AMD OLAND (DRM 2.43.0, LLVM 3.7.1)
OpenGL core profile version string: 4.1 (Core Profile) Mesa 11.2.0
OpenGL core profile shading language version string: 4.10
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 11.2.0
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.0 Mesa 11.2.0
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00
OpenGL ES profile extensions:
and
Code:
glxinfo | grep -i open
ATTENTION: default value of option vblank_mode overridden by environment.
ATTENTION: default value of option vblank_mode overridden by environment.
ATTENTION: option value of option vblank_mode ignored.
Vendor: Intel Open Source Technology Center (0x8086)
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) Haswell Mobile
OpenGL core profile version string: 3.3 (Core Profile) Mesa 11.2.0
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
ATTENTION: option value of option vblank_mode ignored.
OpenGL version string: 3.0 Mesa 11.2.0
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
ATTENTION: option value of option vblank_mode ignored.
OpenGL ES profile version string: OpenGL ES 3.0 Mesa 11.2.0
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00
OpenGL ES profile extensions:
The lshw output (note that the radeon card doesnt even show up usually since its off by default, here i ran a glxinfo on it and quickly the lshw before it deactivated)
Code:
$ lshw -C video
WARNING: you should run this program as super-user.
*-display
description: VGA compatible controller
product: Mars XTX [Radeon HD 8790M]
vendor: Advanced Micro Devices, Inc. [AMD/ATI]
physical id: 0
bus info: pci@0000:01:00.0
version: 00
width: 64 bits
clock: 33MHz
capabilities: vga_controller bus_master cap_list rom
configuration: driver=radeon latency=0
resources: irq:35 memory:e0000000-efffffff memory:f7c00000-f7c3ffff ioport:e000(size=256) memory:f7c40000-f7c5ffff
*-display
description: VGA compatible controller
product: 4th Gen Core Processor Integrated Graphics Controller
vendor: Intel Corporation
physical id: 2
bus info: pci@0000:00:02.0
version: 06
width: 64 bits
clock: 33MHz
capabilities: vga_controller bus_master cap_list rom
configuration: driver=i915 latency=0
resources: irq:33 memory:f5800000-f5bfffff memory:d0000000-dfffffff ioport:f000(size=64)
WARNING: output may be incomplete or inaccurate, you should run this program as super-user.
The above are on a Dell Latitude E6540 with Intel(R) Core(TM) i7-4800MQ CPU @ 2.70GHz and Radeon HD 8790M AMD GPU. Depending on the DE used you might actually have the setup done already, only you need the DRI_PRIME variable prepended to the command you need.
Important Note: for actually displaying stuff from the dedicated gpu (instead of a black window) you need either run the x drivers in DRI3 mode (not totally stable at least on Debian testing) or use a compositing manager (gnome, kde, cinammon DE has them by default, but xfce, mate etc do not - you can use compton for example).
If you need info about proprietary drivers maybe others migh help but for new generations of AMD cards at the moment there is a reorganization going on (they move to a new hybrid open source/pluggable proprietary module driver architecture) and the proprietary driver might not have support for some for a time. I dont know if your card falls into this category.