Offloading an application to the intel GPU with the main display driven by nvidia

Hi everyone,

So there’s a whole bunch of information on the topic of rendering things with the nvidia GPU in a hybrid setup. However, what I’d like to do is the opposite – I’m running a setup where nvidia is rendering everything, and the intel GPU is only used to push the pixels to the eDP panel connected to it. As far as I understand, since I also want to use the HDMI output that’s wired up to the nvidia GPU, this is the setup I need to use, since the nvidia driver doesn’t implement source sink.

Here’s my list of providers:

$  xrandr --listproviders  
Providers: number : 2
Provider 0: id: 0x1b8 cap: 0x1, Source Output crtcs: 4 outputs: 1 associated providers: 1 name:NVIDIA-0
Provider 1: id: 0x203 cap: 0xf, Source Output, Sink Output, Source Offload, Sink Offload crtcs: 3 outputs: 7 associated providers: 1 name:modesetting

and in order to be able to use the eDP panel, I need to run

xrandr --setprovideroutputsource modesetting NVIDIA-0

Now, what I’d like to do is offload the rendering of certain applications to the intel GPU. Is this possible in some way? The NVIDIA-0 provider doesn’t seem to implement sink offload, so I’m unable to set

xrandr --setprovideroffloadsink modesetting NVIDIA-0

Are there any plans to implement this functionality at some point?

Alternatively, is there a way to use render offloading for this? As far as I understand, since the modesetting provider is already required to provide the sink output functionality, it cannot act as a GPU screen (which is explicitly forbidden by commit 555e0a42d138ac8d83af62638752a1bebad602d6 in xorg-server). Is it still possible to use it as a render offload provider? Using __NV_PRIME_RENDER_OFFLOAD=1 __NV_PRIME_RENDER_OFFLOAD_PROVIDER=modesetting or either of them individually doesn’t seem to have any effect, and as soon as I try to set __GLX_VENDOR_LIBRARY_NAME=mesa, I get the following error:

name of display: :0
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
X Error of failed request:  GLXBadContext
  Major opcode of failed request:  151 (GLX)
  Minor opcode of failed request:  6 (X_GLXIsDirect)
  Serial number of failed request:  62
  Current serial number in output stream:  61

Is there any other configuration necessary in order to make this work? Or am I simply out of luck at this time?

I’m running nvidia-drivers 440.82, xorg-server 1.20.7, and kernel 5.4.38, for what it’s worth.


No, that’s not possible.