Quantcast
Channel: Mining — Ethereum Community Forum
Viewing all articles
Browse latest Browse all 10806

Frontier Mining Setup Notes (Ubuntu 15.04/Geth v1.0/AMD/Ethminer)

$
0
0
So I just wanted to put down some mining notes for all those interested in mining Ethereum with AMD cards. I had some trouble at multiple points of the provided official Ethereum setup guides. These notes are mainly for those who have old alt-coin mining rigs that they want to convert to mine ether. It's not a complete hardware to software setup manual, just my notes and points in order. Please consult the official Ethereum Frontier gitbook before using any of this information. These notes should be used in conjunction with the official guides (and not as a replacement). Also, please read the disclaimer below before reading or using any of the information in this post. Note that all of these shell commands could be assembled in a single shell script, and I imagine there will be many who do that, the purpose of these notes is to assemble and clearly outline the mining setup for Ethereum on a specific kind of machine, in addition to notating some useful pointers and tips.

1. Download the latest Ubuntu 15.04 (64bit), mount to USB (I used UUI to mount the ISO), then install/run Ubuntu on that machine

Available here: http://releases.ubuntu.com/15.04/ubuntu-15.04-server-amd64.iso

2. Login, download Accelerated AMD Parallel Processing "AMD-APP-SDK-linux-v2.9-1.599.381-GA-x64.tar.bz2" and ADL Display Library "ADL_SDK8.zip", goto "Downloads" and extract both to the "Home" folder, open terminal (CNTRL + ALT + T) and run the first set of commands (i.e. config and setup AMD parallel processing) then reboot. Login/open terminal again, Install FGLRX updates, initialize your cards with "aticonfig" and check if all your GPU's are all listed
$ cd ~
$ sudo ./AMD-APP-SDK-v2.9-1.599.381-GA-linux64.sh
$ sudo ln -s /opt/AMDAPPSDK-2.9-1 /opt/AMDAPP
$ sudo ln -s /opt/AMDAPP/include/CL /usr/include
$ sudo ln -s /opt/AMDAPP/lib/x86_64/* /usr/lib/
$ sudo ldconfig
$ sudo reboot
$ sudo apt-get install fglrx-updates
$ sudo aticonfig --adapter=all --initial
$ aticonfig --list-adapters
The list should look something likes this, where the number on the farthest left is the AMD GPU device number, in the example below, devices numbered 0 and 1 are listed:
* 0. 01:00.0 AMD Radeon HD 7900 Series
1. 02:00.0 AMD Radeon HD 7900 Series

* - Default adapter
3. Install curl/git/geth/cpp-thereum/ethminer (optional, geth PPA install notated below)
$ sudo apt-get install curl
$ sudo apt-get install git
$ bash <(curl https://raw.githubusercontent.com/ethereum/frontier-release/master/bin/install-go.sh)
$ sudo add-apt-repository ppa:ethereum/ethereum-qt
$ sudo add-apt-repository ppa:ethereum/ethereum
$ sudo apt-get update
$ sudo apt-get install cpp-ethereum
3. Download/build the genesis block
$ cd ~
$ curl -O https://raw.githubusercontent.com/ethereum/genesis_block_generator/master/mk_genesis_block.py
$ curl -O https://bootstrap.pypa.io/get-pip.py
$ sudo python get-pip.py
$ sudo pip install bitcoin
$ sudo pip install --upgrade bitcoin
$ python mk_genesis_block.py --extradata 0x11bbe8db4e347b4e8c937c1c8370e4b5ed33adb3db69cbdb7a38e1e50b1b82fa > genesis_block.json
4. Create an account (note, use a strong passphrase and that this RPC cors setting is unsafe), then start geth, let it load the genesis block and sync with the network, watch for the block numbers (e.g. #24179)
$ geth account new
$ geth --rpc --rpccorsdomain "*" --genesis "~/genesis_block.json"
5. Once geth is synced (check stats.ethdev.com to see latest block #), open another terminal (CNTRL + ALT + T) and start "ethminer" w/ with a GPU, below is ethminer running w/ AMD GPU device 0
$ ethminer -G --opencl-device 0


Notes:
- Check temps of ALL cards by running aticonfig --adapter=ALL --od-gettemperature
- Constantly monitor temps by running watch -n 3 aticonfig --adapter=ALL --od-gettemperature
- Set the fan speed of each GPU by running DISPLAY=:0.X /usr/bin/aticonfig --pplib-cmd "set fanspeed 0 Y", where "X" is your AMD GPU device number (e.g 0, 1, 2 etc) and "Y" is the fan speed percentage (e.g. 85, 95, 100 etc).
- Benchmark your card to see if it's working and what its hashing at by running ethminer -G -M --opencl-device X before you mine ("-M" for benchmark setting"), where "X" is your AMD GPU device number
- I have two cards that, when benchmarked, shutdown my machine :( so check your cards first by running the benchmark CMD above
- If your cards get beyond a certain temperature you may loose display (black screen). You need "NEED" to watch your temps constantly to ensure good performance and so that your machine doesn't get damaged or set on fire.
- Do not run "--rpccorsdomain" with the asterisk ("*") as it's value, that is unsafe, instead use "localhost", I used the asterisk for setup, which is why I listed it in this guide
- Please excuse all the "sudo"'s, I understand there is a code to run every terminal CMD in sudo, I just didn't use it here
- You can run multiple ethminer instances by opening up another terminal (CNTRL + ALT + T) and running ethminer -G --opencl-device X, where "X" is your additional AMD GPU device number
- If specific GPU's are not listed when you use the "aticonfig --list-adapters" command, this could be do to so many things it hurts to think about, but here are a few that come to mind, note there are many more than this: (1) motherboard load order, sometimes you need shutdown and unplug (both power and PCI) all GPU's out of the board, then one by one introduce each card by adding the card, booting (checking to see if it's listed) and then shutting down, adding the next and so forth (this is a hardware related fix/procedure), (2) you don’t have enough power (either your supply is too small, bad quality or you need two power supplies [two supplies can be a fire hazard and very dangerous, google it]), (3) a loose cable or connection (either power or PCI), (4) a bad card (try the card individually with no other cards hooked into the board), (5) a bad PCI cable (sometimes these PCI extender cables are shoty, try each cable with one card to see if you have a bad apple), (6) a bad GPU (sometimes they just don’t work or die), (7) you have more than 6 GPUs (that setup can be very technical, you may need to change drivers and do crazy things), (8) your mother board does not support that many GPU's (google your board specs to find out, the alt-coiners could tell you).
- You can still enter JS console commands when geth is running, while it's a little crazy, it will return the result. I recommend copy/pasting your JS shell command into the live console if you want to use the console with streaming mining information.
- You should not need to run "geth" in "sudo", doing so many cause your keystore to be moved to a root permission folder
- Please consult the Frontier gitbook for any connection issues, you may need to alter your router setup or config UPnP setup.
- To get your node listed on stats.ethdev.com please refer to this Wiki guide , you will need to ask a dev for the WP_SECRET key.
- Please note that currently, stats.ethdev.com does not list mining stats for geth/ethminer, only non-ethminer mining
- If you would like to know benchmarking for mining (i.e. what people are getting for hashing), check the "Benchmarking Scores" forum post I've listed below in "Sources & Further Reading". To give you some perspective, my 280x 3gb Clubs hash at around 20 mega hashes.

Useful Shell Commands
// If you want to Install geth from PPA (and not the bash/curl method)
sudo apt-get install software-properties-common
sudo add-apt-repository -y ppa:ethereum/ethereum
sudo apt-get update
sudo apt-get install ethereum

// list all GPU's initialized
$ aticonfig --list-adapters

// check temp of a single GPU ("X" being the GPU #, e.g. 1, 2, 3 etc.)
$ aticonfig --adapter=X --od-gettemperature

// check temps for all GPU's
$ aticonfig --adapter=ALL --od-gettemperature

// moniter all temps every three seconds, open a new terminal for this :), CNTRL + C to close
$ watch -n 3 aticonfig --adapter=ALL --od-gettemperature

// change fan speed of a single card, where "X" is GPU device number, and "Y" is fan speed percentage
$ DISPLAY=:0.X /usr/bin/aticonfig --pplib-cmd "set fanspeed 0 Y"

// benchmark your card too see performance & if it's working, where "X" is the GPU device number
$ ethminer -G -M --opencl-device X

// start geth with JS console
$ geth --rpc --rpccorsdomain "*" console

// check balance of coinbase (i.e. usually your default mining address)
// copy and paste this into an geth node w/ JS console running to see coinbase ether balance
$ web3.fromWei(eth.getBalance(eth.coinbase), "ether")

// get all geth accounts, copy and paste this into an active geth JS console
$ eth.accounts

// get list of peers
admin.peers

// get number of peers
admin.peers.length

// Install "glances" to monitor CPU/Ram and system data live
$ sudo apt-get install glances
$ glances

// some basic linux commands:
// "cd" to move/navigate around folders ("cd ../" = back one dir, "cd ~" = home dir)
$ cd ~

// "ls" list files in folder
$ ls

// add the "--help" prefix to just about any tool including "geth" and "ethminer" to see what shell commands are available
geth --help
ethminer --help
aticonfig --help

// "shutdown"/"poweroff"/"reboot" commands (try to shutdown nicely with UI shutdown first)
$ sudo shutdown -h now
$ sudo poweroff
$ sudo reboot

// "mkdir" to make a directory
$ mkdir MyNewDirName

// "mv" rename/move a directory of file
$ mv MyNewDirName ANotherDirName

// "rm" remove a file/folder and all contents within it
$ sudo rm -rf A_FOLDER

// Your Ethereum block storage/key store should be in "~/.ethereum"
$ cd ~/.ethereum
$ ls

Hope this helps!
SC


image

Sources & Further Reading:
DISCLAIMER:
I am in no way responsible for what you choose to do with this information, it is provided as is and without any warranty. If any of your devices or software are damaged in any way while using any of the information I have provided here, that is your responsibility, not mine. Mining rigs can be fire hazards, if you don’t believe me, google it. Please use extreme caution when building and operating a mining rig of any scale. Monitor your temperatures frequently and be extremely careful. Also consult the Frontier gitbook for more on disclaimers/mining precaution.

Viewing all articles
Browse latest Browse all 10806

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>