Installing NVIDIA and AMD GPU Headless Drivers For Crypto Mining on Linux server

sudo lshw -c display
# Upgrade Ubuntu 18.04 OS packages before installing sudo apt update && sudo apt upgrade -y# Download Driverswget https://www2.ati.com/drivers/linux/ubuntu/18.04/amdgpu-pro-18.30-641594.tar.xz --referer https://support.amd.com/en-us/kb-articles/Pages/Radeon-Software-for-Linux-Release-Notes.aspx# Unarchive tar -Jxvf amdgpu-pro-18.30-641594.tar.xz
cd amdgpu-pro-18.30-641594/
# Install Drivers./amdgpu-pro-install -y --opencl=legacy,rocm --headless
sudo usermod -a -G video $LOGNAME && sudo reboot
# Upgrade Ubuntu 20.04 OS packages before installing
sudo apt update && sudo apt upgrade -y
# Download drivers
wget https://drivers.amd.com/drivers/linux/amdgpu-pro-20.45-1188099-ubuntu-20.04.tar.xz --referer https://www.amd.com
# Unarchive
tar -Jxvf amdgpu-pro-20.45-1188099-ubuntu-20.04.tar.xz
# Install drivers
cd amdgpu-pro-20.45-1188099-ubuntu-20.04/
./amdgpu-pro-install -y --opencl=legacy,rocr --headless
sudo usermod -a -G render $LOGNAME && sudo reboot
# Optionally, Remove old software [3]
sudo rm /etc/apt/sources.list.d/cuda*
sudo apt remove nvidia-*
# add PGP keys
sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub
# Add Nvidia repo
sudo bash -c 'echo "deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64 /" > /etc/apt/sources.list.d/cuda.list'
# First install nvidia drivers then cuda
sudo apt update && sudo apt install nvidia-headless-440 -y
sudo apt install cuda-10-2 -y
# set PATH for cuda 10.2 installation
if [ -d "/usr/local/cuda-10.2/bin/" ]; then
export PATH=/usr/local/cuda-10.2/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-10.2/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
fi

ROC SMI

sudo apt install -y pythongit clone https://github.com/RadeonOpenCompute/ROC-smi.git
cd ROC-smi/
./rocm-smi --setsclk 3 # Reducing core clock speed
source [5]
  • Turn out the latest kernel version 5.4.0–56-generic on Ubuntu 20.04 has issues with GPU drivers. You can follow this artical to downgrade the Linux kernel [6]

Reference

#1 https://medium.com/@tomas_savenas/all-great-things-start-from-installing-ubuntu-9500873fec82 
#2 https://amdgpu-install.readthedocs.io/en/latest/
#3 https://www.nvidia.com/download/driverResults.aspx/126185/en-us
#4 https://github.com/RadeonOpenCompute/ROCm
#5 https://avesta.io/en/cryptocurrency-mining-pros-cons-and-benefits/
#6 https://tomas-savenas.medium.com/fixing-issue-amdgpu-kernel-module-failed-to-build-40caa5017a50

--

--

--

Kibernetinio saugumo entuziastas; Aktyviausias Lietuvis TryHackMe platformoje; Inovacijų valdymo ir Antreprenerystės Magistrantas @ KTU

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

PREVIEW OF APESWAP FINANCE

Data and Machine Learning for DeFi — KeyFi Pro Development Blog

JurassicNFT Project Mechanism and Minting Tutorial

Pi — Protocol

Real-World Applications Of Ethereum

Crypto Deal Flow: July 14

A Beginner’s Guide: How to Trade Futures on CoinEx?

Crypto Chart Setup (Altcoin Gem) Urgent

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Tomas Savenas

Tomas Savenas

Kibernetinio saugumo entuziastas; Aktyviausias Lietuvis TryHackMe platformoje; Inovacijų valdymo ir Antreprenerystės Magistrantas @ KTU

More from Medium

Automatic Plant Watering System Using Arduino UNO

Continue ROS2 Params Study with Previous Package

Using Jupyter to Explore the OCI CIS Landing Zone — Part 1

Install Miniconda (Conda) and Python