I have Ubuntu 22.04 on MSI laptop with two video card: rtx 4070 and intel. I am a data scientist, and I want to make so that all processes use intel video card by default, and only my deep learning stuff to use nvidia. Below is the output of commands that show my real configuration. In short: prime-select is set to on-demand, but nvtop shows that processes like firefox, slack and others are using nvidia card.
Question: how to make so that they DO NOT use it by default?
ihor@jedi:~$ inxi -G
Graphics:
Device-1: Intel driver: i915 v: kernel
Device-2: NVIDIA driver: nvidia v: 565.57.01
Device-3: Logitech Webcam C270 type: USB driver: snd-usb-audio,uvcvideo
Device-4: Acer FHD Camera type: USB driver: uvcvideo
Display: x11 server: X.Org v: 1.21.1.4 driver: X:
loaded: modesetting,nvidia unloaded: fbdev,nouveau,vesa gpu: i915,nvidia
resolution: 1: 2560x1600~60Hz 2: 1920x1200~60Hz
OpenGL: renderer: NVIDIA GeForce RTX 4070 Laptop GPU/PCIe/SSE2
v: 4.6.0 NVIDIA 565.57.01
ihor@jedi:~$ prime-select query
on-demand
ihor@jedi:~$ nvidia-smi
Fri Nov 8 22:02:06 2024
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 565.57.01 Driver Version: 565.57.01 CUDA Version: 12.7 |
|-----------------------------------------+------------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+========================+======================|
| 0 NVIDIA GeForce RTX 4070 ... On | 00000000:01:00.0 On | N/A |
| N/A 54C P8 4W / 55W | 671MiB / 8188MiB | 4% Default |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+
+-----------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=========================================================================================|
| 0 N/A N/A 1714 G /usr/lib/xorg/Xorg 217MiB |
| 0 N/A N/A 1994 G /usr/bin/gnome-shell 94MiB |
| 0 N/A N/A 2535 G ...ures=SpareRendererForSitePerProcess 17MiB |
| 0 N/A N/A 3377 G firefox 172MiB |
| 0 N/A N/A 4316 G gnome-control-center 2MiB |
| 0 N/A N/A 5431 G ...yOnDemand --variations-seed-version 93MiB |
+-----------------------------------------------------------------------------------------+