POSTS

Ubuntu 18.04, Nvidia GeForce GTX 1060 3GB OC

There are multiple options for running an Nvidia GPU mining rig to mine cryptocurrency. You can use Windows or multiple flavors of Linux. I tend to use Ubuntu for most of my Linux needs, and so I used it for my rig as well. Initially I wanted to use a completely headless install with only a CLI system. I didn’t see a need for X. That didn’t work out because the Nvidia driver and the customizations required to overclock the GPUs required X..

This got Nvidia GeForce GTX 1060 GPUs overclocked on Ubuntu. For other cards there may be some parameters that should be different. On DSTM miner I’m observing rates of approximately 290-310 Sols/s on Equihash.

Initial Setup

First we install ubuntu-desktop so that we can get X working. There is probably a less resource intensive way, but I was in a hurry. Feedback and suggestions would be appreciated.

apt-get install ubuntu-desktop

Then, install the Official Nvidia Driver v390.87. I tried with v384, and that did not work. Once installed the configuration needs to be generated which will allow overclocking1.

nvidia-xconfig -a --cool-bits=28 --allow-empty-initial-configuration

Script to set all Nvidia parameters

#!/bin/bash -x
nvidia-smi -pm 1
DISPLAY=:0 XAUTHORITY=/var/run/lightdm/root/:0 nvidia-settings -c :0 \
  -a 'GPUMemoryTransferRateOffset[3]=1300' \
  -a 'GPUGraphicsClockOffset[3]=120' \
  -a 'GPUFanControlState=1' \
  -a 'GPUTargetFanSpeed=80' \
  -a 'GPUPowerMizerMode=1'

The nvidia-smi command enables the settings to be configured in persistent mode and will survive reboots.

Some relevant sample commands

# Querying information
DISPLAY=:0 XAUTHORITY=/var/run/lightdm/root/:0 nvidia-settings -q '[gpu:0]/GPUPerfModes'
DISPLAY=:0 XAUTHORITY=/var/run/lightdm/root/:0 nvidia-settings -q '[gpu:0]/GPUCurrentPerfLevel'
DISPLAY=:0 XAUTHORITY=/var/run/lightdm/root/:0 nvidia-settings -q GPUCurrentPerfLevel

# Setting Parameters
DISPLAY=:0 XAUTHORITY=/var/run/lightdm/root/:0 nvidia-settings -c :0 -a '[gpu:0]/GPUFanControlState=1'
DISPLAY=:0 XAUTHORITY=/var/run/lightdm/root/:0 nvidia-settings -c :0 -a '[fan:0]/GPUTargetFanSpeed=80'

Watch GPU status and metrics

nvidia-smi
comments powered by Disqus