Running Headless Nvidia Mining Rig Without HDMI Plugs

To run a headless Ubuntu server that you can remote into and will mine your crypto you need to do one of the following:

  • The easy: Buy a dummy HDMI plug for each rig and move on with your life.
  • The hard (but adventuresome):
      1. From the terminal run this command to update /etc/X11/xorg.conf to fake your system out into thinking you have a monitor connected:
        $ sudo nvidia-xconfig --use-display-device="DFP-0" --connected-monitor="DFP-0"

        Note: this command assumes that you previously booted the system into the GUI and installed the “NVIDIA X Server Settings” client (needed to populate xorg.conf). See my overclocking post if you don’t have “NVIDIA X Server Settings” running yet.

      2. Now if you want to VNC into (a.k.a. “remote into”) your rig, you need to install a VNC server on the destination machine (see my post on steps for that).Assuming you did step one above, and installed a VNC server you will discover that when you remote in the resolution defaults to 800 x 600 and is not helpful. In order to have a sensible resolution default when you remote in, modify (or create) a file sudo nano /etc/lightdm/lightdm.conf to resemble the following:
        [Seat:*]
        autologin-guest=false
        autologin-user=YOURLOGIN
        autologin-user-timeout=0
        display-setup-script=/home/YOURLOGIN/Desktop/vnc_monitor_resolution.sh
        session-setup-script=/home/YOURLOGIN/Desktop/vnc_monitor_resolution.sh

        Note: Update YOURLOGIN with the account you use to SSH into with.

        Now, we have to create and configure the vc_monitor_resolution.sh file.

        $ cd ~/Desktop
        $ nano vnc_monitor_resolution.sh

        Then within the file, add:

        xrandr --fb 1360x768

        Note: The resolution can be whatever works for you.

        After that we have to make the file executable.

        chmod a+x vnc_monitor_resolution.sh

        Next time you VNC in, magic should happen and it will be in the resolution specified above!

        (References: 1 2 3)

Overclocking GTX 1060s with Coolbits with Persistence Through Reboots

A path for overclocking GTX 1060’s on Ubuntu 16.04 LTS:

  1. Install NVIDIA drivers via the GUI: Start Menu -> Software -> Software & Updates -> Additional Drivers Tab -> “Using NVIDIA binary driver…” radio button -> Apply -> Restart
  2. Know that there is a graphical interface for managing your NVIDIA GPUs: Start Menu -> NVIDIA X Server Settings
  3. See that you cannot manually adjust clock settings via the “NVIDIA X Server Settings” application under the PowerMizer settings for each GPU
  4. Understand that there are two important configuration files that govern configurations for your NVIDIA GPUs: /etc/X11/xorg.conf and ~/.nvidia-settings-rc. The latter, I believe, is populated once “NVIDIA X Server Settings” is run.
  5. To “unlock” the fields to adjust clock speed in “NVIDIA X Server Settings” open up a terminal window and run:
    $ sudo nvidia-xconfig --enable-all-gpus
    $ sudo nvidia-xconfig --cool-bits=8

    This will update the xorg.conf file for each of your GPUs and set cool-bits flags. (More information on cool-bits)

  6. Now reboot:
    $ sudo shutdown -r now
  7. Once rebooted, “NVIDIA X Server Settings” will show you the unlocked graphics clock and memory transfer fields under PowerMizer.
  8. Like many things with Ubuntu, there is a potential for drama now. Sometimes you can update the field by hitting enter. Other times, you can hit enter and the field will not update. In either case a better approach that persists through reboots is to edit the ~/.nvidia-settings-rc file.At the end of the file, I added the following to overclock my two GPUs:
    [gpu:0]/GPUPowerMizerMode=1
    [gpu:0]/GPUGraphicsClockOffset[3]=150
    [gpu:0]/GPUMemoryTransferRateOffset[3]=1000
    [gpu:1]/GPUPowerMizerMode=1
    [gpu:1]/GPUGraphicsClockOffset[3]=150
    [gpu:1]/GPUMemoryTransferRateOffset[3]=1000
  9. There are many different ways to do things, and the above steps came about to work around existing command line issues that exist that prevent overclocking via the nvidia-settings command from taking hold. The above also required the X server be running, and there may be ways around that – but I take it as a given that I will be running some sort of GUI as a convenience. Much of the flow of the above came from this discussion. Lastly, here’s a good discussion that may work in the future when existing driver issues are resolved.