Hi there,
I have a laptop with hybrid GPU: an iGPU by Intel and a dGPU (1050 Ti) by NVIDIA.
Less than a year ago I needed to use CUDA for classes and, after using Manjaro with the iGPU since it was first installed, I followed a guide to install the proprietary NVIDIA drivers, as CUDA only works with them installed, and successfully managed to get CUDA up and running after some hiccups.
One thing that I could never fix however, was the fact that now my dGPU is always on, because of Xorg
:
$ nvidia-smi
Sat Jul 31 18:40:08 2021
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 470.57.02 Driver Version: 470.57.02 CUDA Version: 11.4 |
|-------------------------------+----------------------+----------------------+
| 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 ... Off | 00000000:01:00.0 Off | N/A |
| N/A 40C P8 N/A / N/A | 4MiB / 4042MiB | 0% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| 0 N/A N/A 672 G /usr/lib/Xorg 4MiB |
+-----------------------------------------------------------------------------+
Now I’ve had issues with many things so far but the only that really generated a major headache was NVIDIA related business.
My goal is quite simple: to have a setup where the dGPU only activates when requested (which is the default on Windows).
Although this seems simple at first I’ve seen multiple people doing it in multiple ways, and never succeeded, at least when I tried, one year ago. Now it seems that Manjaro does things differently from Arch, which means that I can’t use the Arch Wiki, and the Manjaro Wiki has a warning that says it’s outdated - link.
Now that I finally have some time to work on this issue, it seems that I’m left more or less alone with trial and error until I eventually succeed, or find a post somewhere that states that this is impossible.
My question is, in order to avoid wasting my time, where should I start looking to properly configure my hybrid GPU laptop?
And if it’s impossible to only activate my dGPU to run CUDA, without having it running in the background, what’s the recommended way of using the iGPU exclusively? (without disabling it on the BIOS, I’m on a dual boot with Windows)
Thanks in advance.
P.S.: I know that there’s a whole load of threads in several different forums about the matter at hand and providing solutions that range from installing FOSS drivers, which won’t work since CUDA doesn’t run on them, installing additional programs, which can be outdated and confusing, or targeted to Arch Linux or Ubuntu, and from what I find out, Manjaro does it differently.