Nvidia Prime is here, But cuda not found!

I installed nvidia prime with driver 440 in kubuntu 20.04 and connecting my display with my intel iGP. But when I open blender, no such cuda compatible gpu found in settings.

Note:- I am able change nvidia X server setting & I am following this doc, so display is working. I am using blender 2.82a

My terminal has no prime-run command! So I am unable to understand where is the error! I read this doc, but DRI_PRIME=1 blender is also not working. What I suppose to do now?

Hi, I never got it to work with xserver settings but i do with Bumblebee/Optimus.
Simply installed and you can switch cards with one click.
Opensuse Tumbleweed
Intel iGPU 4400 (Display)
GTX 760

Cheers, mib

I have a Manjaro KDE that runs Blender with prime-run… if you’re willing to distro-hop I can confirm I’ve gotten it to work in Manjaro.

You share here what you get from the terminal with this:

lspci | grep -iE 'vga|3D'


cat /etc/X11/xorg.conf


sudo lshw -c video

What does the NVIDIA X Server Settings GUI look like when you launch it from the KDE launcher?

I tested manjaro 4 September onwards. Installing driver via setting failed for me. I have iso, ready to try again.

If you want use Nvidia GPU, all monitor must be connected to Nvidia card, switching from iGPU to Nvidia card with monitor connect to iGPU will not work

That’s not the solution. It’s somehow worked in windows. But linux is diffrent.

It same as in Windows, Blender stall and not open if you set Blender to use Nvidia card and use iGPU with connect monitor, try have cost ZERO

Hi. What you say is not correct, with nvidia PRIME and with iGPU as primary display configured from BIOS (monitor connected to motherboard/iGPU), you can use CUDA in Blender.

Stable PRIME on Linux is relatively new. What you mention about being able to connect monitor to nvidia GPU is Reverse PRIME, and it is only supported in latest drivers. However this will slow down the system/graphics while CUDA is hard working in Blender, so this is surely not what the user is looking for. So monitor must be connected to motherboard and iGPU selected as primary display in BIOS if you want to take advantage of using your machine while Bleneder works with CUDA.

AFAIK Linux not load CUDA libs until one CUDA compatible GPU is not linked to one monitor in hardware or in software disabling iGPU. Blender support only X11 under Linux, Wayland is in experimental stage on 2.91ALPHA

Believe me, I have been trying this for many years and this is as I have told you:

After posting this topic I reinstall the nvidia driver 440.100 in kubuntu, and select prime profile nvidia on demand. By default my iGPU display not worked, So I add a xorg config file on /etc/X11/xorg.conf

Section "Device"
	Identifier "iGPU"
	Driver	"modesetting"
	BusID	"PCI:00:2:0"
Section "Screen"
	Identifier "iGPU"
	Device	"iGPU"
Section "Device"
	Identifier "dGPU"
	Driver	"nvidia"
	BusID	"PCI:01:0:0"

Note, I copy and paste the whole file and I need BusID to work.
After It my iGPU display come, but somehow dGPU not in work.

I found that I need to set env-vars in /etc/environment.
According to this docs. I set


After That I notice my dGPU is working for my iGPU and able to show 200+ fps in game. But I also notice that all transition(animation) on my desktop is not working. I found

is some error in my desktop. Also notice some screen tearing (v-sync issue) in my whole desktop specially in Firefox. Currently I am sucked here. And guess what, Cuda still not support in blender.

Here I dump same helpful info

result of lspci | grep -iE 'vga|3D'

00:02.0 VGA compatible controller: Intel Corporation HD Graphics 610 (rev 04)
01:00.0 VGA compatible controller: NVIDIA Corporation GP108 [GeForce GT 1030] (rev a1)

result of sudo lshw -c video

       description: VGA compatible controller
       product: GP108 [GeForce GT 1030]
       vendor: NVIDIA Corporation
       physical id: 0
       bus info: pci@0000:01:00.0
       version: a1
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress vga_controller bus_master cap_list rom
       configuration: driver=nvidia latency=0
       resources: irq:131 memory:de000000-deffffff memory:c0000000-cfffffff memory:d0000000-d1ffffff ioport:e000(size=128) memory:df000000-df07ffff
       description: VGA compatible controller
       product: HD Graphics 610
       vendor: Intel Corporation
       physical id: 2
       bus info: pci@0000:00:02.0
       version: 04
       width: 64 bits
       clock: 33MHz
       capabilities: pciexpress msi pm vga_controller bus_master cap_list rom
       configuration: driver=i915 latency=0
       resources: irq:128 memory:dd000000-ddffffff memory:b0000000-bfffffff ioport:f000(size=64) memory:c0000-dffff

Result of xrandr --listproviders

Providers: number : 2
Provider 0: id: 0x43 cap: 0x9, Source Output, Sink Offload crtcs: 2 outputs: 2 associated providers: 0 name:modesetting
Provider 1: id: 0x1d5 cap: 0x0 crtcs: 0 outputs: 0 associated providers: 0 name:NVIDIA-G0

For that you have to setup windows setting app -> graphics. I don’t remember the exact path, But I give the hint.

I also have Kubuntu. I don’t need to configure any xorg.conf files unless I want to use render offload for OpenGL, which I recommend you do not do until you can get the basic PRIME configuration and CUDA working.

So in summary these would be the steps:
Delete /etc/X11/xorg.conf or clear its content.
You must have installed nvidia prime package in Ubuntu: nvidia-prime
From BIOS configuration iGPU must be selected as primary display, and multi monitor/multi GPU option enabled.
Enter the system with the monitor connected to iGPU/motherboard, and from nvidia settings in PRIME Profiles select the option “NVIDIA On-Demand”.
Restart the machine.

Then if you want to try Render Offload for OpenGL, you can try to configure with the example of this xorg.conf from this guide:

for the latter I recommend installing the latest drivers from PPA:

Very important: You use official Blender downloaded from Blender site. You don’t do the tests with Blender installed from repositories.
Extract the contents of tar.xz package to a folder. Enter the folder and execute (double click) “blender” file there.

You know what? I have retested to make sure the mini tutorial steps I had written above were correct and I was wrong about something. Since On Demand mode has been implemented, you will not be able to work with CUDA in: intel (Power Saving Mode). So you always have to choose: NVIDIA On-Demand.
I will edit the above post to correct that.
BTW, CUDA is running here in On-Demand mode without any cables or monitor connected to my nvidia GPU, and empty xorg.conf.
And you remember what I have indicated above about using official Blender. Apparently you are using 2.82a from repositories.

Regarding tearing when scrolling in Firefox, the problem also occurs here. Perhaps it is due to an intel drivers problem (You remember that Intel is who is handling the display here). I don’t have time right now to keep testing by changing xorg.conf to be able to run render offload applications to test Firefox that way.
To avoid that kind of tearing problems when the monitor is handled by the nvidia driver without using PRIME, if I remember correctly that is why I had enabled the option nvidia settings > Xserver Display Configuration > Advanced > Force full composition pipeline. So I then Save to X Configuration file with that option.

Maybe if you have more time later you can report this in:

prime-select query is resulting


Well Thank you for helping,
nvidia settings > Xserver Display Configuration > Advanced, I don’t have those options. Am I missing some packages or setting? Is it possible via rc file, if yes provide me doc? I am also searching it.

Just a little off-topic.
https://answers.launchpad.net/ubuntu/+source/nvidia-prime/+question/692775 see the 3 & 5. Is there any way to add env vars directly on blender ( like .blenderrc file or something )?

No, that’s why I clarified: “when the monitor is handled by the nvidia driver without using PRIME”, because I also had the tearing problem without using PRIME, and that configuration reduces the problem. That setting is not available when you use PRIME. You should ask in the nvidia forum link I shared above if it is possible to add that in xorg.conf when you use PRIME, but in theory the intel driver is the one that handles the display in that case.