[SOLVED] How to don't use nvidia for desktop environment (only just for rendering/training AI)


I have a laptop with 2 GPUs (Intel UHD and nvidia MX150)

I have installed nvidia-driver-520 with this way :
sudo apt-get install cuda-11-4

It was installed successfully, but now, if I run
nvidia-smi, Zorin OS Xorg and gnome shell consume too much VRAM (300-400 MB) and it consumes so much battery power.

Yes... I can turn off the nvidia-driver with sudo prime-select intel. The computer must be restarted for applying that effect.

What I want, I only use nvidia-GPU for heavy workload such as rendering, using 3D apps, and training AI. I use intel GPU for desktop environment.

How to do that?

Computer :
Intel i5-8250U
GPU 1 = Intel UHD 620
GPU 2 = MX150 2 GB VRAM
Zorin 15.3 Core


Thanks for replying my question

  1. Is it different with sudo prime-selector intel? I have difficulty for installing GPU prime selector (for gnome shell) and gpu-profile-selector (your recommendation) because the menu doesn't appear in my gnome shell and I have difficulty installing envycontrol (dependencies for gnome-profile-selector).

  2. How to use hybrid mode? since with sudo prime-selector query, it doesn't have hybrid mode.

Did you logout afterwards?

  1. I don't know as I don't use this extension on my laptop.
  1. Yes, I have to restart my computer after sudo prime-selector intel for applying that effect

  2. Thanks for your information

After struggling installing envycontrol (dependencies of gpu-profile-selector), I got it. Envycontrol's github page gives wrong way to install it.

The right way for installing envycontrol

sudo apt-get install git

sudo apt-get install python3-pip

git clone https://github.com/geminis3/envycontrol.git

cd envycontrol

sudo pip3 install .

Then, I run

sudo prime-select on-demand

sudo envycontrol -s hybrid

Then restart it for applying that effect >> desktop environment uses intel GPU which only use ~10 MB of nvidia VRAM, but nvidia will be utilized when I train AI dataset or when I render with blender 3D.

sudo prime-select nvidia
sudo envycontrol -s nvidia

this is the result

Another scenario...

sudo prime-select on-demand
sudo envycontrol -s hybrid