2018-02-11

Python Scripts

If I don't clean these tabs off my phone, they'll be there forever!  Two more:
  1. noethfee.py, a hack to redirect the mining devfee via IP tables, specifically for Claymore
  2. watchdog.py, a script to drive the USB hardware watchdog dongle available on Amazon
I had to run with the latter because the one featured in a YT video, the SSR, is out of stock, and I got sick of the crummy system locking up.  The USB dongle is nice because it has power and reset buttons on it: it avoids the need for a separate cable, and it's nicer, too.  The one I got has a heartbeat LED, although Kid#1 commented it'd be more like a heartbeat if it were red instead of blue.

As one might expect, there's a gotcha.  If the GPUs lock up but the script can still run, then the system doesn't reboot, so there's a window between the software watchdog in Claymore and the hardware watchdog where the rig stays in zombie mode.  Perhaps an IoT power outlet is required to address that case, as well as to log power usage.

Maybe I'll have to learn Python after all; these useful scripts are after all in that language.

Nvidia GPUs & Linux

A couple more non-link-dump link dumps:
  1. Ubuntu Nvidia binary driver howto, which has some troubleshooting info
  2. Using integrated graphics for display, albeit with a laptop; I ran into the login loop, and found elsewhere driver installation via PPA
This is tricky stuff.  Lots of compatibility problems, disinformation, and apathy, and money hangs in the balance.  Mining definitely isn't for everyone.  I'm not sure I'd do it again if I could go back--but I'm kind of committed now, at least until I recoup the hardware costs.

Mining Disinformation

One page on how to build a mining rig claims that WhatToMine shows stock numbers.  No...for GeForce GTX 1060s they list 22.5 MH/s on Ethereum, which is an average overclock.  I have some cards that start out at 15 stock, and only make it to 20 OC'ed.  Some go up to 23.5.  It seems to be the hardware lottery.  I've read that Hynix memory is the stuff that sucks, but I can't run the hardware check because they're all for Windows.

Speaking of, the aforementioned page links to another site that has activation keys for cheap.  I'm thinking it must be pirated somehow, but at $43.49 for Windows 10 Professional and Office 2016, it's tempting....

Mining Rig Power

One amusing thing is that all the GPU risers I see for sale include a SATA-to-6-pin adapter cable.  According to this hugely useful page on "PlayTool", the SATA port can only handle 54W through the 12V pins, whereas the PCIe spec shows the 6-pin connector as required to supply 75W.

In other words, the card could try to draw 75W through a connector only designed for 54W.  Sounds like a fire waiting to happen.  It's unclear how a 120W card would draw power, i.e. if a standard 6-pin is used for the riser and the adapter cable is used for the auxiliary connector, would most of the power come through the riser first?

Well, since I run close to the minimum, 60-75W for 120W cards and 90W for 150W cards, it shouldn't be a problem if 50-50, but if power is pulled through the SATA connector primarily, that wouldn't be good.  I think I'll spend a few extra bucks and get the right kind of cables.

Gigabyte & Mining

Well, I had a hell of a time debugging stability problems with an AX370 Gaming 5.  (Purchased because I didn't want to support Intel after their hardware bug fiasco, so I bought an AMD, and that mobo had a rebate....)  The thing would run for anywhere from 30 minutes to 8 hours, and then lock up.  I had no idea it was the PCIe version, until I saw on an Amazon page for a riser card that you need to use something lower than version 3.  Version 2 didn't help with the Leboo expander card I was using, but version 1 is solid.

The other problem I ran into was that the mobo gets stuck in a boot loop when trying to plug in more than 6 GPUs.  (Note that all 7 are Gigabyte branded!)  This is particularly nasty, because not only do I have to reset the CMOS (push the button), I have to unplug all video cards to get it to work: doing just one or the other is insufficient.  Having one card in the slot, the BIOS a message saying to plug in the auxiliary power connector, and that breaks the boot loop.

Now, I had the F5 BIOS on there, so I flashed F20, which gave a couple more options, like enabling memory above 4GB.  Well...that didn't help either.

Gigabyte has a page on mining using their "Ultra Durable" motherboard line.  The suggestions are:
  1. Update BIOS to the latest one, and enable mining mode
  2. Disable the CSM option for UEFI mode OS
  3. Change Max Link Speed setting from Auto to Gen2
  4. Change Initial Display Output setting from PCIe 1 slot to IGFX
  5. Change Above 4G Decoding setting from Disabled to Enabled
  6. Change Internal Graphics setting from Auto to Enabled
  7. Use UEFI mode to install the OS
Amusingly, elsewhere Gigabyte says to not update the BIOS unless necessary.  I changed Max Link Speed and Above 4G Decoding; there's no option for this board for internal graphics when a PCIe card is plugged in.  Besides, on an Intel system with Nvidia graphics and Linux for an OS, trying to use the internal video causes annoying problems.

The only thing I haven't done is change the CSM option.  Based on my luck so far, I doubt that'll make a difference; then again, one page claims that CSM is a boot support option that is necessary for some video cards.  Even so, that the mobo somehow corrupts the CMOS--as the boot loop persists after switching the PSU off, unplugging it, plugging it back in, and turning it back on--seems like either a hardware compatibility problem or a firmware bug.

Anyway, this screwed me because I wanted to put 12 or 13 cards in this one frame I built.  Now I can only have six.  Perhaps I should try putting more than 6 in the ASRock board I added to my collection....