When Windows Defender says you’re mining viruses

This was a rather frustrating development. I have two computers dedicated to mining Ethereum, and I also mine it on Mira. All three machines had Windows 10 and were using Claymore’s mining software v10.0. Recently, however, I discovered that Windows Defender had “found” the mining software to be infected with a Trojan. Redownloading it didn’t change that.

So if Windows isn’t going to play nice, I don’t have to either.

Overclocking was the only reason they were on Windows 10. I was under the presumption it’s easier to overclock on Windows. And for NVIDIA cards, it is. Did you know overclocking an AMD card on Linux requires modifying just one or two files?

So upon learning that, I went to the RX 580 machine first, cleaning Windows 10 off and installing Fedora 27 Server using the net install. Minimal installation with Standard add-ons. Same thing I always do when setting up a Linux box. Then I downloaded and installed the latest AMDGPU driver for Linux (version for RHEL 7.4) and installed it with these options: “–opencl=legacy –headless”.

Then came the overclock. This is where things get a little tricky, as the overclock isn’t a specific value, but a percentage offset. I knew I could overclock the memory to 2050MHz without a problem, but typically kept it at 2000 MHz. Base frequency is 1750MHz – it’s a 4GB card, not an 8GB card. A 15% memory overclock puts it at 2012.5MHz. This alone gave me the >25MH/s I could get on Windows.

Then I set up the fan to always run at 60% to keep the core temp under 70°C.

Now for the equivalent of “apply overclock at startup”. I created a script with the necessary commands to apply it, then set it to be run at reboot into the crontab for root.

echo "15" > /sys/class/drm/card0/device/pp_mclk_od
echo "1" > /sys/class/drm/card0/device/hwmon/hwmon0/pwm1_enable
echo "160" > /sys/class/drm/card0/device/hwmon/hwmon0/pwm1

Again this applies a 15% overclock to the memory – not worrying about core speed (pp_sclk_od file). And the “160” value for the fan speed is about 60% between 0 and 255, keeping the core temperature down near 60°C. Look at the pwm1_min (should be 0) and pwm1_max files to see the range of allowable values for your card, then set pwm1 to a value within that range. Just keep bumping up the value until you hit the desired percentage.

If only overclocking NVIDIA cards on Linux was just as easy. Instead they only allow it if you’re running a desktop system, not a headless server. I migrated the GTX 1060 box over to Fedora 27 Server as well, but left that running at stock speeds with no overclocking enabled. Pretty sure the BIOS on the faster card got modded, hence why its “stock” speed is higher despite them being the exact same model.

But, hang on a sec, how are those cards running at under 60°C and maintaining that hashrate? I dropped the power limit on both cards down to 65W. Neither card was hitting 100W according to nvidia-smi, combined wattage was about 180W, so nowhere near their peak power draw. But dropping the power limit did allow the card to drop in temperature, down by over 15°C on each card, while drawing a combined short of 130W. Your mileage may vary.

Basically just steadily reduce the power limit until you start noticing a dip in in the reported hashrate for the card, taking it as low as possible to drop the temperatures while maintaining performance.

nvidia-smi -i [device_index] -pl [power_limit]

where device_index is is the device (0 to …) and power_limit is the value to try. Again, I was able to take the GTX 1060s down to 65W, and the temperatures dropped with it. So it’s a simple way to control heat and power on the cards.

No more mining…

But I also decided to move away from mining, now that the time to payout on the pool is getting longer and longer, and I’m getting so few shares anymore as to not really make it all that worthwhile. It’s been a good run over the last few months. But time to put all this processing power to better use.

Namely Folding@Home. Maybe a BOINC project or two.

Imagine if all the GPU power that currently goes to mining, or even just a significant percentage of it, went toward distributed computing projects like Folding@Home, how much good that could do in the world.

Share