View RSS Feed


How I Built My Miner Host:

Rate this Entry
I recently built a mining host and have assisted several forum members with the same setup. I thought more people would benefit if this was documented somewhere. The setup assumes GPU mining but provides a mining platform that is both FPGA and ASIC ready.

How I Built My Miner Host
(after having fried a motherboard and CPU with brand new power supply)

End of March, I purchased a Corsair HX-1050 to replace an old 355W PSU. Upon powering up I heard a click and smelled magic smoke - the PSU fan stopped spinning and absolutely nothing would happen. As it turns out, both the CPU and motherboard joined the recently departed. As for the PSU, a quick paperclip test and then RMA - never to consider Corsair products again.

Beginning of April, I gathered all my replacement parts and began assembly. Replacing the motherboard meant also buying new RAM. A kind soul donated an old CPU to the cause. A twin set of GPU's joined the party. And I went shopping for a better PSU:

MoBo: 1 x GIGABYTE AM3+ AMD 990FX (GA-990FXA-UD3)
RAM: 1 x KINGSTON 16GB 1600MHz DDR3 (KVR16N11K2/16)
CPU: 1 x AMD Phenom II X4 955 Black Edition (HDZ955FBGIBOX)
PSU: 1 x OCZ ZX 1000W 80PLUS Gold (OCZ-ZX1000W)
GPU: 2 x GIGABYTE Radeon HD 7950 3GB (GV-R795WF3-3GD)
HD: 1 x SanDisk 64GB SATA III SSD (SDSSDP-064G-G25)

Where the Corsair HX-1050 turned my world upside down, the OCZ ZX-1000 flipped it back right-side up - everything powered up and gloriously hummed in unison. Time to install an Operating System. Where I have previously come to rely on Xubuntu 12.04 for all my miner hosts, I ran into 2 main issues this time, the second being more critical than the first:

1) Onboard Ethernet interface driver was missing - used an old USB dongle
2) Unable to fully recognize both GPU's with any of the available AMD drivers

Searching the net, I found a reference to the issue and the suggestion was to go all bleeding edge beta. I didn't see a problem with the ideology, since it is just a miner host. And so I embarked on a journey I don't normally take (at that time Xubuntu 13.04 was still in beta, which is no longer the case as of 3 days ago). Well, presto chango, the onboard Ethernet interface came right up, but you can't trust the provided AMD drivers. Instead, I had to install the AMD Catalyst driver manually (FYI: 13.4 driver is out as of just a few days ago):

AMD Catalyst™ 13.3 LINUX Beta Driver

Driver installation is trivial:

1) unzip it (unzip amd-driver*.zip)
2) make it executable (chmod a+x amd-driver*.run)
3) run it with permission and follow the prompts (sudo ./amd-driver*.run)

At this point, after a reboot, your system should come up recognizing both GPU's. However, you will have a nasty AMD watermark on the lower right-hand side of your display(s) that looks something like this: . In order to remove this, I used the following script also found searching the net:

#begin script
#Remove AMD watermark
DRIVER=`find /usr/lib -name`
for token in $DRIVER;do
echo "Removing AMD logo from "$token

for x in $(objdump -d $DRIVER|awk '/call/&&/EnableLogo/{print "\\x"$2"\\x"$3"\\x"$4"\\x"$5"\\x"$6}'); do
sed -i "s/$x/\x90\x90\x90\x90\x90/g" $DRIVER
echo "Reboot computer to finsudo aticonfig --lsaish"
#end script

TIP: you may want to disable Xubuntu auto-updates as they will break your video card drivers every time - I have yet to come up with a perfect solution to this problem, but the fix is to remove the drivers (sudo apt-get remove fglrx*) and re-install them manually.

Again, a nice reboot should now present you with system ready for use. If you have multiple GPU's, try hooking up monitors to them to ensure they display output. For reference, I am not using any GPU DVI Dummy Plugs or anything - I simply have one monitor plugged into the primary GPU for quick display. Otherwise, this miner host sits in the basement uncased with a simple fan blowing over it - I access it remotely via SSH, run mining software via Byobu, while also leveraging the mining software API and miner.php.

Check that all your cards are identified:
sudo aticonfig --lsa

If not, then enable all your cards and reboot:
sudo aticonfig --adapter=all --initial
sudo reboot

As for mining software, I am using BFGMiner 3.0.1 (FYI: 3.0.2 was just released in the past 24 hours) - though I believe CGMiner would be no different to setup. Follow the README and README.scrypt as applicable for your mining needs.

First, make sure you install all the listed dependencies for your mining requirements - the following should get you there, or close:

sudo apt-get install autoconf automake libtool pkg-config libcurl4-gnutls-dev
libjansson-dev libncurses5-dev libudev-dev libusb-1.0-0-dev

Installing BFGMiner itself is as easy as:

1) decompress: tar xvjf bfgminer-3.0.2.tbz2 or unzip
2)./configure (optionally: --enable-scrypt and/or --enable-avalon)
3) make
4) sudo make install

To test BFGMiner and ensure all your GPU's are recognized:

./bfgminer -n

You can use aticonfig to check GPU temps and clock thresholds:

aticonfig --adapter=all --odgt (for temps)
aticonfig --adatper=all --odgc (for clocks)

To overclock your cards, you have to enable overclocking:

sudo aticonfig --adapter=all --od-enable

Now I'll spare everyone the mining details - it is up to you to learn how mining works, to learn about your hardware's capabilities and to venture into overclocking if you so desire. But I will share my 2 mining scripts which simplify everything while achieving better than 1.2GH/s SHA256 and 1.3MH/s Scrypt. I take no responsibility for incompatibilities or otherwise rendering your GPU's useless!

Again, my scripts are based on my hardware - 2 x GIGABYTE 7950's which are seemingly voltage locked. You accept all risks associated with overclocking. Copy these into two separate script files, make them executable (chmod a+x) and now you can run them from the command line, ssh, byobu, automate via init or cron:

#BITCOIN begin script
export DISPLAY=:0
bfgminer -o -O worker.nameassword -o -O worker.nameassword -o -O worker.nameassword --api-listen --api-network --auto-fan --auto-gpu --gpu-powertune 0 --gpu-engine 1150 --gpu-memclock 1000 -I 9
#BITCOIN end script

#LITECOIN begin script
export DISPLAY=:0
bfgminer --scrypt --failover-only -o -O worker.nameassword -o -O worker.nameassword --api-listen --api-network --auto-fan --auto-gpu --gpu-powertune 0 --gpu-engine 1120 --gpu-memclock 1500 -I 19 --shaders 1792 --thread-concurrency 21712 -g 1 -w 256
#LITECOIN end script

TIP: to host your miner.php elsewhere, change --api-network to --api-allow W: <-- or the IP address of web server hosting your miner.php

That's it.. hash away my friends! This mining host is ready for most FPGA's and BFL ASIC's - just plug them in or use a USB hub. You can also host Avalon ASIC's plugged directly via USB, if you compiled Avalon support into BFGMiner. Just please remember that Scrypt mining is currently limited to GPU's (and CPU's.. which were purposely ignored in this setup). Enjoy!

BFGMiner in Scrypt action

Miner.php output

Donations accepted
BTC: 1PoLrPXHmd3UZ2b8duU6k19pujA9cpEpSt
LTC: LPoLrPCrwUF1vxRjx4yHLZ2MQErnqGt99X

Submit "How I Built My Miner Host:" to Google Submit "How I Built My Miner Host:" to Digg Submit "How I Built My Miner Host:" to Submit "How I Built My Miner Host:" to StumbleUpon

Updated 04-30-2013 at 04:20 PM by polrpaul



  1. Flashman's Avatar
    Nice writeup on the linux setup, thanks!
  2. me0nx's Avatar
    is this run on kernel 3.7.2 - amd64 x86_64?
    my problem is xorg.conf
  3. kingbevda's Avatar
    Most of the new Corsair PSU's have the fan not spinning unless it gets hot Blog - The Corsair HX Series Power Supply Refresh: Going for the Gold! but that's not the problem. It seems that faulty PSU's sometimes get into the supply chain.
  4. Ivan Frimmel's Avatar
    I bet we will still have HOURS of conversation about this process .. but at least we have a reference .. nice!
  5. ASIC-J's Avatar
    Nice write up. Very informative.

    Surprised about the Corsair. Very popular choice for PSU. You'd think they would test them better. No idea how you ended up with faulty one. Was not properly tested or sold a return?

    One other thing. Only makes sense using a system like that if also GPU mining else just better to get something low powered like a netbook or R-Pi.
  6. guapo's Avatar
    This is actually optional:
    sudo aticonfig --adapter=all --od-enable
    The above mentioned card will be by default on auto tuning so you can overclock from your miner app or at least that's how it went for the 7950 I have at the office.
  7. polrpaul's Avatar
    Quote Originally Posted by me0nx
    is this run on kernel 3.7.2 - amd64 x86_64?
    my problem is xorg.conf
    3.8.0-17 x86_64 (amd64)
  8. polrpaul's Avatar
    Quote Originally Posted by guapo
    This is actually optional:

    The above mentioned card will be by default on auto tuning so you can overclock from your miner app or at least that's how it went for the 7950 I have at the office.
    Yeah, for some reason not the case on my end.. I had to do this to effectively Overclock.

    I guess YMMV.

    Or perhaps messing around on Xubuntu 12.04 with an array of drivers locked it up?
  9. lumberjack's Avatar
    You didn't need to grab any SDK downloads to go with the driver? Are they including them in the 13.x series?
  10. polrpaul's Avatar
    Quote Originally Posted by lumberjack
    You didn't need to grab any SDK downloads to go with the driver? Are they including them in the 13.x series?
    That is correct - I did not have to grab any additional SDK, therefore must be bundled in with the Catalyst 13.x series driver installation.
  11. $p00ky's Avatar
    Could you compare performance with normal setup on Linux? And a normal setup on Windows?
  12. Luis_GT's Avatar
    Corsair PSUs are actually very good, I still have an old TX750 running around, though my main rig now has a OCZ Fatal1ty 1Kw
  13. dlasher's Avatar
    I don't see the source or link to miner.php..
  14. lumberjack's Avatar
    Hm. So far testing with cgminer using a process following the post results in not finding OpenCL. Maybe the headers are included in BFGMiner - I'll have to test that next.
  15. lumberjack's Avatar
    For reference, I couldn't get either bfgminer or cgminer to run properly following the steps above until I installed the APPSDK files. I tried against Xubuntu and Lubuntu, 64 bit, with the 13.4 Catalyst drivers. Once I installed the 2.7 SDK, both worked properly.

    I'm a little jealous of your card clocks (two of mine won't go anywhere near that)


Total Trackbacks 0
Trackback URL: