Commit 757f7acd authored by tobijk's avatar tobijk Committed by nouveau
Browse files

Add a DRI3 section

parent f105a0fb
......@@ -29,10 +29,15 @@ In all other cases, you are stuck with what happens to work by default. No switc
'PRIME GPU offloading' and 'Reverse PRIME' is an attempt to support muxless hybrid graphics in the Linux kernel. It requires:
* An updated graphic stack (Kernel, xserver and mesa);
* KMS drivers for both GPUs loaded;
### DRI2
#### Setup
* An updated graphic stack (Kernel, xserver and mesa).
* KMS drivers for both GPUs loaded.
* DDX drivers for both GPUs loaded.
If everything went well, *xrandr --listproviders* should list two providers. In my case, this gives:
$ xrandr --listproviders
......@@ -40,7 +45,7 @@ If everything went well, *xrandr --listproviders* should list two providers. In
Provider 0: id: 0x8a cap: 0xb, Source Output, Sink Output, Sink Offload crtcs: 2 outputs: 2 associated providers: 1 name:Intel
Provider 1: id: 0x66 cap: 0x7, Source Output, Sink Output, Source Offload crtcs: 2 outputs: 5 associated providers: 1 name:nouveau
### Offloading 3D
#### Offloading 3D
It is then important to tell Prime what card should be used for offloading. In my case, I would like to use Nouveau for offloading the Intel card:
......@@ -54,7 +59,7 @@ the "regular" GPU, set DRI_PRIME to 0 or omit it. The behaviour can be seen in t
$ DRI_PRIME=1 glxinfo | grep "OpenGL vendor string"
OpenGL vendor string: nouveau
### Using outputs on discrete GPU
#### Using outputs on discrete GPU
If the second GPU has outputs that aren't accessible by the primary GPU, you can use "Reverse PRIME" to make use of them. This will involve using the primary GPU to render the images, and then pass them off to the secondary GPU. In the scenario above, you would do
......@@ -66,6 +71,29 @@ When this is done, the nvidia card's outputs should be available in xrandr, and
in order to add a second screen that is hosted by the nvidia card.
### DRI3
#### Setup
The implementation of DRI3 aims for a more convenient way to use a PRIME setup. It requires some additional setup steps:
* A Kernel version 3.17 or newer with Render-Nodes - 3.16 only works when booting with *drm.rnodes=1*.
* XServer 1.16 with DRI3 support.
* Mesa 10.3 with DRI3 support.
* KMS drivers for both GPUs loaded.
* DDX drivers for the primary GPU loaded.
*Attention: Render-Nodes requires the user to be in the "video" group*
If everything went well, offloading to the secondary GPU is done with DRI_PRIME=1:
$ DRI_PRIME=0 glxinfo | grep "OpenGL vendor string"
OpenGL vendor string: Intel Open Source Technology Center
$ DRI_PRIME=1 glxinfo | grep "OpenGL vendor string"
OpenGL vendor string: nouveau
### Power management
When an application is using 'PRIME GPU offloading', both the discrete and the integrated GPUs are active and aside from optimizations at the driver level, nothing else can be done. However, when no application is making use of the discrete GPU, the default behaviour should be for the card to automatically power down entirely after 5 seconds. Note that using an output on the discrete GPU will force it to stay on.
......@@ -127,6 +155,7 @@ Prepare a switch to the discrete GPU to occur when the X server gets restarted:
### Known issues
#### Everything seems to work but the output is black
*This is only a problem with DRI2*
Try using a re-parenting compositor. Those compositors usually provide 3D effects.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment