Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
HEADLESS LINUX NVIDIA MINING GUIDE
Never used LINUX to mine? This is your guide!!
LINUX is an AWESOME & STABLE alternative to Windows mining!!
From start to finish, how to set up & overclock a headless NVIDIA mining rig
Ubuntu 16.04.4 w/ 390.48 NVIDIA drivers & CUDA 9.1 Toolkit & x16r CCMiner install example from source compile
DID THIS WORK FOR YOU? I HOPE IT HELPED!
I ♥ DONATIONS
• BTC: 3G2HxmryGwmFG8jTDUmqweXHKzM7k9BacV
• ETH: 0x66De2ACaFcCD24A140da1221f55cdE772c5534E6
• ZEC: t1JbvKbrmtry5CMbKQuqqXspiy9zUiQqhqA
• RVN: RUZJ8kwvxWw7E7cRVMHpwUWRryugnZtFnu
#ON YOUR NON-MINING COMPUTER:
#DOWNLOAD & Intall RUFUS (bootable usbthumb maker)
https://rufus.akeo.ie/downloads/rufus-2.18.exe
#DOWNLOAD Ubuntu 16.04.4 Desktop ISO
http://releases.ubuntu.com/16.04.4/ubuntu-16.04.4-desktop-amd64.iso
#USE RUFUS to make your bootable thumb drive from the iso
#Now to your mining rig
#Plug a HDMI monitor in to the main GPU (GPU0) (do not use motherboard plugs)
#Install Ubuntu 16.04 Desktop from your thumbdrive
#ONCE INSTALLED AND YOU SEE DESKTOP, APPLY OS UPDATES:
#Left side bar look for the orange "A" symbol, then click updates tab and apply OS updates
#INSTALL OPEN SSH SERVER
CTRL-ALT-F1
sudo apt-get install openssh-server
sudo reboot now
#NOW YOU CAN LOG IN REMOTELY!
#Be sure to keep a monitor or HDMI dummy plugged in to your GPU0 (not the motherboard) so that it keeps signal for now
#USE PUTTY, etc to connect to your rig, I use the outside ip address w/ port forward to 22 on the router, 192.168.1.XXX may work too.
#For further security private keys can be used to make SSH connections but for now it's password protection only.
#No need to log in to your desktop on the rig, just leave it be and log in to command line using Putty/SSH and continue...
#PURGE ALL OLD DRIVERS (if there were any)
sudo apt-get purge nvidia*
sudo apt-get autoremove
sudo dpkg -P cuda-repo-ubuntu1604
#INSTALL DEPEDENCIES
sudo apt-get install build-essential gcc-multilib dkms
#BLACKLIST NOUVEAU
sudo nano /etc/modprobe.d/blacklist-nouveau.conf
#ADD THE FOLLOWING TO THE FILE (right mouse click to paste)
blacklist nouveau
options nouveau modeset=0
#NOW SAVE THE FILE
CTRL-X
Y
Enter
#UPDATE BOOT INITIALIZATION
sudo update-initramfs -u
sudo reboot now
#STOP DESKTOP MANAGER
sudo service lightdm stop
#DOWNLOAD NVIDIA DRIVERS CURRENT OF 03/17/18
cd ~
wget http://us.download.nvidia.com/XFree86/Linux-x86_64/390.48/NVIDIA-Linux-x86_64-390.48.run
#GIVE PERMISSION & EXECUTE RUNFILES
chmod +x NVIDIA-Linux-x86_64-390.48.run
sudo ./NVIDIA-Linux-x86_64-390.48.run --dkms --no-opengl-files
CONTINUE
INSTALL
YES
OK
#VERIFY SUCCESS w/ GPU STATUS CHECK
nvidia-smi
#DOWNLOAD & INSTALL CUDA 9.1
cd ~
wget https://developer.nvidia.com/compute/cuda/9.1/Prod/local_installers/cuda_9.1.85_387.26_linux
chmod +x cuda_9.1.85_387.26_linux
./cuda_9.1.85_387.26_linux --extract=$HOME
sudo ./cuda-linux.9.1.85-23083092.run
Press Enter Button (entil end of page, it's very long)
Accept
#CONFIGURE RUNTIME
sudo bash -c "echo /usr/local/cuda-9.1/lib64/ > /etc/ld.so.conf.d/cuda.conf"
sudo ldconfig
sudo reboot now
#UNLOCK OVERCLOCKING & FANS
sudo nvidia-xconfig -a --allow-empty-initial-configuration --cool-bits=28 --use-display-device="DFP-0" --connected-monitor="DFP-0"
sudo reboot now
#UNPLUG HDMI MONITOR FROM GPU0. WE'RE HEADLESS NOW!
#ADD GPU COMMANDS TO STARTUP
sudo nano /etc/rc.local
#ADD THESE TO THE FILE
#USE your own GPU's and power limit settings. Example: "-i 2 -pl 100" (means GPU2 gets limited to 100 watts of power)
# IN THIS EXAMPLE I HAVE 3 TOTAL GPU
#-----------------------------
sudo nvidia-smi -pm 1
sudo nvidia-smi -i 2 -pl 100
sudo nvidia-smi -i 0,1 -pl 170
#SHUT OFF LED LIGHTS FOR EACH GPU
sudo DISPLAY=:0 XAUTHORITY=/var/run/lightdm/root/:0 nvidia-settings -a '[gpu:0]/GPULogoBrightness=0' -a '[gpu:1]/GPULogoBrightness=0' -a '[gpu:2]/GPULogoBrightness=0'
#SET FAN CONTROL STATE & 80% SPEED FOR EACH GPU FAN
sudo DISPLAY=:0 XAUTHORITY=/var/run/lightdm/root/:0 nvidia-settings -a '[gpu:0]/GPUFanControlState=1' -a '[fan:0]/GPUTargetFanSpeed=80' -a '[gpu:1]/GPUFanControlState=1' -a '[fan:1]/GPUTargetFanSpeed=80' -a '[gpu:2]/GPUFanControlState=1' -a '[fan:2]/GPUTargetFanSpeed=80'
#SET OVERCLOCK CORE & MEMORY OFFSET FOR EACH GPU
sudo DISPLAY=:0 XAUTHORITY=/var/run/lightdm/root/:0 nvidia-settings -a '[gpu:0]/GPUGraphicsClockOffset[3]=0' -a '[gpu:0]/GPUMemoryTransferRateOffset[3]=0'
sudo DISPLAY=:0 XAUTHORITY=/var/run/lightdm/root/:0 nvidia-settings -a '[gpu:1]/GPUGraphicsClockOffset[3]=0' -a '[gpu:1]/GPUMemoryTransferRateOffset[3]=0'
sudo DISPLAY=:0 XAUTHORITY=/var/run/lightdm/root/:0 nvidia-settings -a '[gpu:2]/GPUGraphicsClockOffset[3]=0' -a '[gpu:2]/GPUMemoryTransferRateOffset[3]=0'
exit 0
#-----------------------------
#NOW SAVE THE FILE
CTRL-X
Y
Enter
#REBOOT THE SYSTEM FOR CHANGES TO GO IN TO EFFECT (must reboot anytime you change something in rc.local)
sudo reboot now
#ON BOOT ALL CARDS SHOULD BE LIGHTS OFF, FANS UP, OC APPLIED & READY TO RUN
#INSTALL RVN MINING SOFTWARE (or software of your choice)
#LETS COMPILE IT FROM SOURCE
#THIS VERSION IS CURRENT, OPTIMIZED & FEE-LESS RVN MINING
cd ~
sudo mkdir mine
cd mine
sudo mkdir rvn
cd rvn
wget https://github.com/nemosminer/ccminernevermorex16r/archive/nevermorex16rv0.3.zip
unzip nevermorex16rv0.3.zip
sudo chmod +x autogen.sh && chmod +x build.sh && chmod +x configure.sh
sudo sh build.sh
#WATCH FOR ANY ERRORS TO FLASH
#WHEN FINISHED COMPILING...
sudo nano start.sh
#ADD THESE LINES TO THE NEW FILE. CHANGE WALLET & WORKERNAME TO YOUR OWN. API BIND IS FOR ETHMONITORING.COM
#----------------------------------
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/cuda-9.1/lib64"
./ccminer -a x16r -o stratum+tcp://stratum.threeeyed.info:3333 -u WALLET.WORKERNAME -p x -i 19 -N 300 --api-bind=0.0.0.0:4068
#./ccminer -a x16r -o stratum+tcp://rvn.suprnova.cc:6667 -u USERNAME.WORKERNAME -p x -i 19 -N 300 --api-bind=0.0.0.0:4068
#./ccminer -a x16r -o stratum+tcp://x16r.pickaxe.pro:3636 -u WALLET.WORKERNAME -p x -i 19 -N 300 --api-bind=0.0.0.0:4068
#./ccminer -a x16r -o stratum+tcp://ravenminer.com:3366 -u WALLET -p x -i 19 -N 300 --api-bind=0.0.0.0:4068
#./ccminer -a x16r -o stratum+tcp://ravenminer.com:3636 -u WALLET -p x -i 19 -N 300 --api-bind=0.0.0.0:4068
#./ccminer -a x16r -o stratum+tcp://ravenminer.com:3636 -u WALLET -p x -i 19 -N 300 --api-bind=0.0.0.0:4068
#./ccminer -a x16r -o stratum+tcp://raven.f2pool.com:3636 -u WALLET -p x -i 19 -N 300 --api-bind=0.0.0.0:4068
#----------------------------------
#NOW SAVE THE FILE
CTRL-X
Y
Enter
#GIVE PERMISSIONS TO OPERATE
sudo chmod +x ccminer
sudo chmod +x start.sh
#RUN THE MINER!
sudo sh start.sh
#TO RUN FROM FRESH BOOT:
cd ~
cd mine/rvn && sudo sh start.sh
# DID THIS WORK FOR YOU? I HOPE IT HELPED!
# DONATIONS:
# BTC: 3G2HxmryGwmFG8jTDUmqweXHKzM7k9BacV
# ETH: 0x66De2ACaFcCD24A140da1221f55cdE772c5534E6
# ZEC: t1JbvKbrmtry5CMbKQuqqXspiy9zUiQqhqA
# RVN: RUZJ8kwvxWw7E7cRVMHpwUWRryugnZtFnu
@synergyethos

This comment has been minimized.

Copy link
Owner Author

synergyethos commented Apr 4, 2018

HEADLESS LINUX NVIDIA MINING GUIDE
Never used LINUX to mine? This is your guide!!
LINUX is an AWESOME & STABLE alternative to Windows mining!!
From start to finish, how to set up & overclock a headless NVIDIA mining rig
Ubuntu 16.04.4 w/ 390.48 NVIDIA drivers & CUDA 9.1 Toolkit & x16r CCMiner install example from source compile
DID THIS WORK FOR YOU? I HOPE IT HELPED!
I <3 DONATIONS:
• BTC: 3G2HxmryGwmFG8jTDUmqweXHKzM7k9BacV
• ETH: 0x66De2ACaFcCD24A140da1221f55cdE772c5534E6
• ZEC: t1JbvKbrmtry5CMbKQuqqXspiy9zUiQqhqA
• RVN: RUZJ8kwvxWw7E7cRVMHpwUWRryugnZtFnu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.