Possible to use Nvidia GPU for compute only and iGPU for Ubuntu?

I’ve been using Nvidia GPUs since forever, and I’ve never really had any issues with it. However, since Ubuntu 24.04 I’ve had a bunch of problems with weird bugs.

I need CUDA for ML, so I can’t swap to AMD for the GPU.

Can I get a CPU like the 9950x3d with an integrated (slow) GPU, and just use the Nvidia GPU for compute while Ubuntu desktop runs off the 9950x3d? Is that something that is easy to do?

I don’t really play games, and if I do I’ll switch to Windows on the same machine.

The plan:

  • iGPU for Ubuntu, while using the Nvidia GPU for compute.
  • Cables from MB and GPU to the monitors, so I can switch to Windows and use the Nvidia GPU if I want, and just change the input on the monitors.

Is this possible/easy to do? If so, how?

1 Like

I’m not the right guy to definitively tell you yes, but I’m pretty sure the answer is yes.

One example is I expose my docker containers to my dedicated GPU by giving them access to /dev/dri on my linux box, although that box only has a dedicated GPU. If there were multiple, there would be several entries in there from what I understand, one per card.

example:
/dev/dri/card0
/dev/dri/card1

I know on my Bazzite Linux install it lets me pick which GPU i’m using at any given time. I’m almost 100% positive it would be trivial to have your GPU run ML tasks while you are using the iGPU for your desktop etc. so long as whatever ML thing you’re using can be configured to use your dGPU specifically. If it were docker based, I’d give it access to /dev/dri/card0 or card1, following the instructions for exposing the GPU to docker, etc. But the process could vary depending on the application. Not too sure.

Yes, it’s possible, I do this on an AMD system with a 7950X + RTX 3060 on Fedora. My setup is very similar to this:

Not all the steps are necessary if you just want compute.

The trickiest part has been to make sure the DE or WM grabs the dGPU, since then you can’t unbind so easily any more.

Thaks for the info guys! I think I’ll give it a shot then. :slight_smile:

dont the motherboards that support iGPU’s always include a HDMI or similar port on the board? And hasn’t it been the case that plugging your monitor into that, by default, gives you the iGPU? So it seems like you should be able to simply plug the monitor to the motherboard’s embedded display output port and that should “just work”. Though I dont have any systems to test it with.

I had trouble getting my dGPU initialized without a monitor cable plugged in on Ubuntu. Is there a simple trick to that, or is it gonna be an issue for him?

Buy an HDMI dummy display adapter for the headless card.