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 --referer 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 --referer
# 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
# Add Nvidia repo
sudo bash -c 'echo "deb /" > /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}}


I found a great tool to reduce electricity consumption by changing core speed settings. It called Radeon Open Compute System Management Interface, ROC-smi in short.This software enables the high-performance operation of AMD GPUs for computationally oriented tasks in the Linux operating system.[4]. By the way for this application an old python 2.7 is needed. Please aware of it.

sudo apt install -y pythongit clone
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]





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