PRIME Render Offload (On Demand) with multi monitor/displays

Hi.
First of all, after many years I have finally been able to run intel iGPU as a primary display while I can use CUDA or OpenGL on nvidia card. So thanks for that to the developers.

My system:
Intel i7 3770 with intel HD 4000 iGPU.
nvidia GTX 960 - 440.59 driver from PPA
Kubuntu Linux 20.04 (beta)

As I had said, I was finally able to use intel iGPU by default and nvidia on demand by following these steps and this xorg.conf configuration:
https://forums.linuxmint.com/viewtopic.php?p=1683387
I have a monitor connected to iGPU via DVI cable. I have another monitor connected to nvidia card via HDMI cable.

Only one consideration before posing the problem. I have GPU Multi Monitor=Enabled configured from the BIOS. But if from “Primary GPU” option I have chosen “PCIe”, then nvidia settings GUI does not show the options related to PRIME. I have to choose from the BIOS as Primary GPU to iGPU so that then nvidia settings GUI shows options related to PRIME. After selecting On Demand from PRIME settings, and having configured xorg.conf as shown in the previous link guide, I can then configure PCIe as primary GPU from the BIOS. That said, surely many users will have PCIe configured as a primary display in the BIOS and will not be able to see PRIME options, which could be problematic for users who do not know how to configure the BIOS.

Now the problem related to multiple monitors.
As I had said. I have connected to iGPU a monitor through DVI cable. I have another monitor connected to nvidia card via HDMI cable. Only the monitor connected to the iGPU via DVI cable is detected and working. Nvidia settings shows something related to the HDMI screen connected to nvidia, but this does not allow you to configure the screens:
External Media

This is the output of xrandr:

$ xrandr
Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 16384 x 16384
VGA-1 disconnected (normal left inverted right x axis y axis)
HDMI-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 475mm x 267mm
   1920x1080     60.00*+
   1280x1024     75.02    60.02  
   1152x864      75.00  
   1024x768      75.03    60.00  
   800x600       75.00    60.32  
   640x480       75.00    59.94  
   720x400       70.08  
HDMI-2 disconnected (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
DP-2 disconnected (normal left inverted right x axis y axis)

It is strange that information related to HDMI monitor is displayed, but only DVI monitor is working.

How can I make HDMI monitor connected to nvidia card work?

Ok, luckily my motherboard has an HDMI connector for iGPU. I have connected HDMI monitor to the motherboard and with iGPU as the main display from the BIOS, I can use both monitors.

$ lspci | grep -iE 'vga|3D'
00:02.0 VGA compatible controller: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller (rev 09)
01:00.0 VGA compatible controller: NVIDIA Corporation GM206 [GeForce GTX 960] (rev a1)

So, is it that nvidia card cannot handle displays connected to it in Nvidia On Demand and Intel (power saving) modes?

If I remember correctly, a couple of years ago when I tried nvidia PRIME with Intel (Power saving mode) in the same machine, I could have a monitor connected to nvidia card while the other one was connected to iGPU (motherboard).

I am also interested in that topic!

My setup is an XMG Neo 15 notebook with dedicated RTX 2070 Max-Q and on-board Intel UHD 630 Mobile. Kubuntu 20.04, Kernel 5.4.0-40
PRIME On-Demand runs nicely, I can easily choose which gfx card should be used for rendering, which is awesome, but I was not able to make my second screen (connected to DP-2 working). It’s working flawlessly in NVIDIA/Performance mode.

Is there any way to use On-Demand and my external monitor? I read somehow about Reverse PRIME, but I think it’s only working with nouveau?

You second display out is probably physically wired to nvidia GPU, so, you need reverse prime to run it, just like you mentioned.

Reverse Prime is supported by nvidia binary drivers with latest beta drivers (450). But it is only days since those drivers are available, so not everything has to work flawlessly yet.

Thank you @zylx for the confirmation. Sorry for coming back late to the topic. Yes, it’s wired to the nvidia GPU. Great that it will be supported soon!

Hi.
I have tested Reverse Prime with 450.57 diver on Kubuntu 20.04 and it works correctly (drivers from PPA). I get image on monitor connected to iGPU (i7-3770) via VGA cable and on monitor connected to GTX 960 via HDMI cable. I am able to configure screens via KDE systemsettings5 preferences.
Although I have realized that this configuration will not be useful for me. The main reason to use PRIME on my pc is to be able to continue using the system while CUDA is working hard with Blender. With Reverse Prime I keep getting lag or system freezes while doing heavy computing work on nvidia card. So in my case it is convenient to have both monitors connected to iGPU.

BTW, the monitor connected to GTX 960 contains built in speakers and I don’t get HDMI audio output on pulseaudio. I haven’t done much research on the problem though.

1 Like