Created
October 15, 2021 08:48
-
-
Save Nitesh8998/a337c29a41e23e4c5d0e421852e62db3 to your computer and use it in GitHub Desktop.
Revisions
-
Nitesh8998 created this gist
Oct 15, 2021 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,117 @@ 1. 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. 2. Check the kernel version supported and create a bootable drive of the linux distro with exactly that kernel. 3. While installation DONOT agree 'download updates while installation'. Random updates are installed which can be a problem. 4. 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/grub ```GRUB_CMDLINE_LINUX_DEFAULT = "nomodeset"``` This is a temporary change. 5. To install the AMD graphics drivers use the radeon software package as seen in step 1. [(something similar to this)](https://www.amd.com/en/support/kb/release-notes/rn-amdgpu-unified-linux-20-50) 6. Extract the downloaded drive pack install the drivers.**DONOT** use 'pro' install version of install. 7. 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)](https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&Distribution=Ubuntu&target_version=20.04) 9. 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 | +-----------------------------------------------------------------------------+ ``` 10. 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. 11. 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. 12. Check the identifiers for your amd gpu from ls /usr/share/X11/xorg.conf.d/10-amdgpu.conf 13. 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. 14. 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 | +-----------------------------------------------------------------------------+ ``` 15. Congrats after a painful process you are good to enjoy your AMD powered system that has Crazy NVIDIA GPU connected to it!! :metal: :satisfied: