-
Check the AMD Radeon Software for Linux latest version that is available. This is because until these graphics drivers support a linux kernel version there is no use trying to install linux in your machine.
-
Check the kernel version supported and create a bootable drive of the linux distro with exactly that kernel.
-
While installation DONOT agree 'download updates while installation'. Random updates are installed which can be a problem.
-
After installing there is a high chance that the neither(internal gpu nor dedicated GPU) drivers are installed. If the linux doesnt boot under GUI, try TTY
(ctrl+alt+F[1-6])
and change the following parameter in /etc/default/grubGRUB_CMDLINE_LINUX_DEFAULT = "nomodeset"
This is a temporary change.
-
To install the AMD graphics drivers use the radeon software package as seen in step 1. (something similar to this)
-
Extract the downloaded drive pack install the drivers.DONOT use 'pro' install version of install.
-
You should see this after a reboot:
lspci -nnk | grep -i vga -A3 | grep 'in use'
Kernel driver in use: amdgpu 8. Now get the ' .deb' localfile of the correct cuda version. DONOT use the 'run file' method. (from here may be)
- After installing check nvidia-smi. you should see this: No running processes found.
Fri May 21 21:45:27 2021
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 465.19.01 Driver Version: 465.19.01 CUDA Version: 11.3 |
|-------------------------------+----------------------+----------------------+
| 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 ... On | 00000000:01:00.0 Off | N/A |
| N/A 50C P0 19W / N/A | 1MiB / 5946MiB | 0% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| No running processes found |
+-----------------------------------------------------------------------------+
-
Its now time to force amd integrated graphics card to be the display gpu. This is essential if you want CUDA to have maximum memory of the nvidia gpu.
-
Check the id of the GPU using
lspci | grep -i vga
01:00.0 VGA compatible controller: NVIDIA Corporation GA106M [GeForce RTX 3060 Mobile / Max-Q] (rev a1)
05:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Cezanne (rev c5)
id here is 5.0.0
for AMD integrated GPU.
-
Check the identifiers for your amd gpu from ls /usr/share/X11/xorg.conf.d/10-amdgpu.conf
-
create xorg.conf in /etc/X11/xorg.conf as following
Section "Device"
Identifier "AMDgpu"
Driver "amdgpu"
BusId "PCI:5:0:0"
EndSection
Section "Screen"
Identifier "AMDgpu"
Device "amdgpu"
EndSection
Pay attention to the indentation. Keep in mind that the BusID is the same as in step 11.
- Change this
GRUB_CMDLINE_LINUX_DEFAULT = "quiet splash"
Reboot. and Check this:
$ lspci -nnk | grep -i vga -A3 | grep 'in use'
Kernel driver in use: amdgpu
Kernel driver in use: nvidia
$nvidia-smi
Fri May 21 21:45:27 2021
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 465.19.01 Driver Version: 465.19.01 CUDA Version: 11.3 |
|-------------------------------+----------------------+----------------------+
| 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 ... On | 00000000:01:00.0 Off | N/A |
| N/A 50C P0 19W / N/A | 1MiB / 5946MiB | 0% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| No running processes found |
+-----------------------------------------------------------------------------+
- Congrats after a painful process you are good to enjoy your AMD powered system that has Crazy NVIDIA GPU connected to it!! 🤘 😆