Eth: 0x00cce8E2e56a543abc084920eee3f88eFD0921ea

Friday, November 27, 2015

Ethereum GPU Mining with Ubuntu 14.04 from Scratch

_________________
UPDATED 3/20/2016 - qtminer install instructions for pool mining and GPU_SINGLE_ALLOC_PERCENT=100 for 2GB GPUs
__________________

As the codebase developed, we now have a much simpler way to install and run a GPU miner for Ethereum.

Install Ubuntu
A quick note here for newbies, it'll be easier to manage your system in the long run if you install Ubuntu in headless mode. (Headless means it won't output anything to a monitor on bootup and you'll have to loginto the computer remotely via SSH). 

Install Graphics Drivers (AMD)
1) At the command line type:

 sudo apt-get -y update   
 sudo apt-get -y upgrade -f   
 sudo apt-get install fglrx-updates  
 sudo amdconfig --adapter=all --initial  

2) Reboot the machine.
3) You should now be able to see all the video cards installed on your system using the command:
 aticonfig --list-adapters   
The item with the star (*) next to it is the default graphics output of the computer. In our case we have set this to the integrated graphics card and we will use the GPUs installed in the PICe slots only for mining.

3) Trouble: If you're having trouble getting the system to display anything on the screen after boot, you are probably plugged into the wrong graphics card and you may have to change the defaults in BIOS as well as changing the default card the ubuntu uses for it's output. You can force use of the integrated graphics card by entering the following at the terminal:
 sudo aticonfig --pxl-igpu  

Install Geth
Note: If you have a different wallet software like MIST, you don't need to install geth to mine with a pool (non-solo mining).
1) Make a new directory for the latest version of geth
mkdir go-eth135
cd go-eth135

2) Download the master branch for github
git clone https://github.com/ethereum/go-ethereum
cd go-ethereum

3) Enable OPENCL and Build

  export GO_OPENCL=true   
  export GPU_MAX_ALLOC_PERCENT=100   
  export GPU_SINGLE_ALLOC_PERCENT=100  
  make geth   

4) Make a new coinbase account (where your Ether will be deposited)
 build/bin/geth account new  

(enter in a password 2x)


Install QT Miner

We use qt miner as are pool mining software. Several mining pools use qt miner.
1) Download the qtminer software for 14.04 or 15.04 from EthPool.org.

 tar zxvf qtminer.tgz  
 cd ./qtminer  
 chmod +x qtminer.sh  

Start Mining (Solo)
1) To start GPU Mining, go back to your go-eth directory

build/bin/geth -maxpeers '100' -mine -minergpus '0' -autodag console

2) Mine with Multiple GPUs
build/bin/geth -maxpeers '100' -mine -minergpus '0,1,2' -autodag console

Where '0,1,2' means mine with GPUs zero, one and two. You should change this to list however many GPUs you have. Thus if you have only 2 GPUs and they are devices 2 and 4 you would type : '2,4' instead of '0,1,2'. To see which devices your GPUs are listed as use the command:

aticonfig --list-adapters  

NOTE: All the rest of the commands are typed inside the go-ethereum console:

3) Ensure your rig is mining to your address
web3.eth.coinbase
 (This should be set to the same address that you just created when you made your coinbase account)
If this returns '0x0' that means you're mining rewards will get sent into a big black hole. Fix this by typing the following inside the geth java scrypt console:
 web3.miner.setEtherbase(web3.eth.accounts[0])

4) Check Profits
web3.fromWei(eth.getBalance(eth.coinbase), "ether")
 This will return how much ether you have in your account

5) Check Hash Rate
miner.hashrate


Start Mining (Pool)
1) Mining with ethermine.org, they have several servers throughout the world:
US East : us1.ethermine.org:4444
US West: us2.ethermine.org:4444
Asia       : asia1.ethermine.org:4444
Europe  : eu1.ethermine.org:4444

They use a PPLNS 1% fee system. I have used their companion service ethpool.org successfully for months.

Below, you should replace the address with your own wallet address given to you by geth when you made your account. I mine with US East so to start mining I type the following:

./qtminer.sh -s us1.ethermine.org:4444 -u 0x8e61bf5a2e46d15774172781cf100ed0962cbb63.rig1 -G

The command above will attempt to start all your video cards mining. In my case, this doesn't work because I have an AMD integrated graphics card as my first device (device '0' in the image below).


2) Troubleshooting: If you have a an issue like me where you have an integrated graphics card, that you can't mine on, or you just want to specify the cards to mine on, modify the above qtminer command as follows:

./qtminer.sh -s us1.ethermine.org:4444 -u 0x8e61bf5a2e46d15774172781cf100ed0962cbb63.rig1 -G --opencl-device '1'

This will start my first device. To start the rest of the non-integrated graphics mining I would then enter the following in separate terminals:

./qtminer.sh -s us1.ethermine.org:4444 -u 0x8e61bf5a2e46d15774172781cf100ed0962cbb63.rig2 -G --opencl-device '2'

./qtminer.sh -s us1.ethermine.org:4444 -u 0x8e61bf5a2e46d15774172781cf100ed0962cbb63.rig3 -G --opencl-device '3'


The End & Other Problems
If you have enjoyed this post, please consider sending me a beer!

Having problems with PCIe Extenders? Check Here for common solutions.

Problems with 2GB GPU? Make sure that the following is set before starting qtminer:

  export GPU_MAX_ALLOC_PERCENT=100   
  export GPU_SINGLE_ALLOC_PERCENT=100  

60 comments:

Unknown said...

Hi guys,

I have a slight problem when I get to the mining, all seems to be working but when I check the hashrate it comes back with 0. I've had it running for about 20 minutes now and still nothing. Any ideas?

"> I1204 00:48:33.482831 21510 blockchain.go:1230] imported 1 block(s) (0 queued 0 ignored) including 0 txs in 6.701283ms. #637507 [6755d548 / 6755d548]
I1204 00:48:33.495611 21510 worker.go:570] commit new work on block 637508 with 5 txs & 0 uncles. Took 12.62265ms
> miner.hashrate
0"

Thanks in advance

Unknown said...

Fixed my problem, didn't have CUDA installed, I'm running a Nvidia 760 now getting 14060784 as my hashrate.

Followed this guide to install CUDA for Nvidia cards:

https://forum.ethereum.org/discussion/comment/8889/#Comment_8889

Unknown said...

When I get to "make geth" it returns

build/flags.sh: 13: build/flags.sh: go: not found
build/env.sh go install -v -ldflags '-X main.gitCommitc541b38fb36587d23c60f5e2f2b9b3c8700ec489' -tags opencl ./cmd/geth
build/env.sh: 32: exec: go: not found
make: *** [geth] Error 127

What do I need to do to fix this?

Unknown said...

Hi - great tutorial.

I will gladly buy you a BetBeer if I can get all of my GPU's mining !!!

First question. I WAS mining with one card for several days (using ethminer)...

Using what you wrote, I got the following...

> web3.eth.coinbase
"0x157cef734bebef185455b25c684423c2e787416e"
> I0215 14:02:01.784395 eth/downloader/downloader.go:295] Block synchronisation started
> web3.fromWei(eth.getBalance(eth.coinbase), "ether")
5.0209968

But when I check the blockchain for my account, I show only the 0.001 that I sent myself after creating the Ether account.

So, where is the 5.02xxxx profit that web3 is telling me I have?

Thanks

Unknown said...

Never mind... I had mined a block before killing to miner in order to try your tutorial.

Either way.... I got a block.

Second question
The command...

build/bin/geth -maxpeers '100' -mine -minergpus '0,1,2' -autodag console

...does not mine - but rather, returns several a mass amount of "goroutine xxx [select]"
the last part of which is...

goroutine 139 [select]:
github.com/ethereum/go-ethereum/p2p.(*Peer).run(0x95981ce0, 0x80ac08d0)
/home/tommy/Downloads/go-eth132/go-ethereum/build/_workspace/src/github.com/ethereum/go-ethereum/p2p/peer.go:152 +0xb18
github.com/ethereum/go-ethereum/p2p.(*Server).runPeer(0x92f4c1a0, 0x95981ce0)
/home/tommy/Downloads/go-eth132/go-ethereum/build/_workspace/src/github.com/ethereum/go-ethereum/p2p/server.go:681 +0x2bd
created by github.com/ethereum/go-ethereum/p2p.(*Server).run
/home/tommy/Downloads/go-eth132/go-ethereum/build/_workspace/src/github.com/ethereum/go-ethereum/p2p/server.go:489 +0x14ca

goroutine 141 [chan receive]:
github.com/ethereum/go-ethereum/p2p/discover.(*udp).findnode(0x92fa8480, 0xd032f591, 0x43483c9d, 0x52b04d00, 0xd9939a90, 0xbc956c64, 0x315d7862, 0xcbb555e7, 0xccb17d30, 0x7e3af4f0, ...)
/home/tommy/Downloads/go-eth132/go-ethereum/build/_workspace/src/github.com/ethereum/go-ethereum/p2p/discover/udp.go:276 +0x393
github.com/ethereum/go-ethereum/p2p/discover.(*Table).Lookup.func1(0x92f52000, 0x94faa300, 0x9629ef80, 0x9629efc0)
/home/tommy/Downloads/go-eth132/go-ethereum/build/_workspace/src/github.com/ethereum/go-ethereum/p2p/discover/table.go:237 +0x143
created by github.com/ethereum/go-ethereum/p2p/discover.(*Table).Lookup
/home/tommy/Downloads/go-eth132/go-ethereum/build/_workspace/src/github.com/ethereum/go-ethereum/p2p/discover/table.go:250 +0x441

---

Then the terminal window froze and does nothing. That output doesn't look like it was even trying to mine. Your thoughts?

Also, still working on trying to get multi-GPU's mining. Right now only one of three is working

Louis

Unknown said...

SkithUno,

Thanks very much for doing this.

One bit that's lacking, though ...

¿¿ What is the definitive test that my GPU is in fact mining for real Ether ??

I am seeing the same logs that I have seen previously before discovering an error message somewhere. If it can take hours or days before I see a success message, I could waste those hours or days unaware that I'm still misconfigured.

How can I know for sure that it's working?

Thanks,
Martin

Unknown said...

I have this same issue

build/flags.sh: 13: build/flags.sh: go: not found
build/env.sh go install -v -ldflags '-X main.gitCommit34b622a24853e1cf550238e8c8be6dfa4178cd35' -tags opencl ./cmd/geth
build/env.sh: 32: exec: go: not found
make: *** [geth] Error 127


Any help?
Thanks!

HowlingMad said...

run sudo apt-get install golang

HowlingMad said...

Kasper, Donny,
You need to install the GO package by:
sudo apt-get install golang

Then start where it crashed.

Eliot said...

Thanks for the update /u/HowlingMad. I didn't have to do this step when I installed which is why I didn't previously listed. I thought golang was included in the current version of go-eth?

Unknown said...

2nd post here. I didn't see the XLNTE.com post


1 of 6x Radeon Sapphire R9 390 found AS Rock H81 pro btc Ubuntu 14.04

Virgin install of Ubuntu - works fine finding ONE of the SIX different Radeon Sapphire R9-390 GPUs.

It'd be great if you 'd comment on your solution to configuring them. I'm in China ... and getting any assistance is ridiculously difficult.

Ubuntu 14.04
AS Rock H81 pro btc
6x Radeon Sapphire R9 390

I've tried about everything....

I'm keeping a log trying to hunt down the settings.
https://gist.github.com/rawsushi/46711041d146b936e5ad0233c57b5d82

Me: www.Linkedin.com/in/parkerfairfield

WeChat: PAFwork
Gitter: Rawsushi

Unknown said...

Hi. Tyvm for your tutorial. Its was very helpfull for my builds on 15.04 and 14.04.4 LTS Ubuntu versions. Both are work fine. Really not sure what is a better because im getting the same hashrates on both versions. My rig getting around +20Mhs on Ubuntu build ethminer with using eth-proxy 0.0.5 vs Windows ethminer. And its work stable without any issues. Im have not so much but 4 AMD R9 Radeon cards on board = 2x280x DC2T 3GDD5 + 380 4Gb + 380x 4Gb all cards made by Asus.Motherboard Gygabyte GA970 DS3P rev.1. Ty again for your work.GL.

Unknown said...

Parker if you need else some help you can send me mail.

Unknown said...

Thanks for a damn good tutorial!!

everything has gone well beside the connection to the server ... this is what i get out

23:24:33|qtminer Push: New work package received
ℹ 23:24:37|qtminer Loading full DAG of seedhash: #290decd9…
ℹ 23:24:37|qtminer Connection to stratum server lost. Trying to reconnect!
ℹ 23:24:41|qtminer Full DAG loaded
ℹ 23:24:42|qtminer Connection to stratum server established!
ℹ 23:24:42|qtminer Waiting for work package...
ℹ 23:24:42|qtminer Push: New work package received
ℹ 23:24:42|qtminer Connection to stratum server lost. Trying to reconnect!
ℹ 23:24:47|qtminer Connection to stratum server established!
ℹ 23:24:47|qtminer Waiting for work package...
ℹ 23:24:47|qtminer Push: New work package received
ℹ 23:24:47|qtminer Connection to stratum server lost. Trying to reconnect!

i want to mine at nanopool.
./qtminer.sh -s eu1.nanopool.org:8888 -u ADDRESS.worker2 -G

does anybody have a clue why i keep losing connection??

Thanks

Unknown said...

HI Ale. Try to change port to 9999 and run miner. How I'm understand you are not use eth-proxy right?

Unknown said...

HI!
thanks for your answer, that made it work. but it sems like its not generating hashes to my account. i will let its work for the night and will see tomorow.

I am not on a proxy.

Thanks a lot

Unknown said...

You are wellcome Ale. Better use proxy it's increase your hashes ussually around 20% up, if your are have any questions you are free to ask me about via gmail first. Good luck

Unknown said...
This comment has been removed by the author.
Unknown said...

Ale are you are slved your issues? My gmail address shpopell@gmail.com

Unknown said...

How do we overclock the video cards?

I keep getting this error for all video cards after the primary one.

ERROR - Set clocks failed for Default Adapter - ATI Radeon 390 Series
Please check that input values were valid

JDC said...

Does it matter which version of Ubuntu 14.04 you install. Desktop or Server?

nich said...

Hi, great tutorial. Now wondering, what if you have a farm, about 15 rigs, and you want to combine your MH/s to mine in a pool?

Unknown said...

Hi,

Great guide. I have one quick question for you. Do you happen to have a guide for Nvidia?

Thanks

Matt

Unknown said...

hello
i have a problem when i use the sudo apt-get install fglrx
i get this

Reading package lists... Done
Building dependency tree
Reading state information... Done
Package fglrx is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'fglrx' has no installation candidate

can any one help me

budi susanto said...
This comment has been removed by the author.
budi susanto said...

bitcofee

budi susanto said...
This comment has been removed by the author.
budi susanto said...

Mantap gan nitip link http://bitcoin-spot.blogspot.com
Download mp3 disini >> http://bitcofee.tk

Unknown said...

I am earning 0.00003BTC on my each referral, you can too. Join #XRDICO with my referral id - https://ripplebyte.io/r?ref=XRD839UAOUGNRR #XRDICO #Ripplebyte #Tokensale #BTC #XRD

Ethan said...

@chales

Just registered with RippleByte and earned 05tokens. and when I refer to one one of my friend, Go 0.00003BTC.

thank you

Unknown said...

Very good written article. It will be supportive to anyone who utilizes it, including me. Keep doing what you are doing – can’r wait to read more posts. ripple

syair togelpelangi said...

I really like this article and very nice thanks.
togel singapore

Vishalkumar said...

You probably saw how Bitcoin increased over 900% over the course of last year.

It was wild but not totally unprecedented if you’d been watching cryptocurrency over the last several years.

And here’s the crazy thing:

There are many other coins that still have tons of room to grow.

You may have heard of Ethereum, Litecoin, Ripple, and others but there are more coins and many more opportunities -

Follow the link below to get the full story.

https://cryptocrusher.net?46df4gsd4f

Rashmi said...

I have updated my post, please take a look!
Ethereum

arnoldvu9 said...

https://www.ethereumpro.net/exchange-ethereum-to-paypal.php
The Ethereum has denominated currency ether, are convertible in the form of real currency like the euro or any other local currency. Exchange of Ethereum to paypal euro account there is a need for an exchanger. Many websites are testing this service, but Ethereumpro.net is the easiest way to convert ether into euros and get payments from the PayPal account. Paypal is an online financial service that works in the transfer of money from one place to another. This is an international service that secures transactions and money as well.

Jack Roy said...

Best website with 5 star feedback and 100% trust flow for exchanging ethereum for USD with paypal account. Easiest way to exchange with this site. Just visit now. You will be happy to see this site.
Ethereum for USD with Paypal

vin.bit.786 said...

Blockchain info is trusted by millions of users, here you can withdraw bitcoin from blockchain wallet to paypal account instant US dollars globally euro fiat.
Withdraw bitcoin form blockchain

wajid said...

Codeninja.pk is web development company in lahore,We offer an entire bouquet of web application development services

markvu09 said...

Adult traffic is bound to make an impact in your business. You can boost your organic traffic through adult traffic. We are here to make your business or website successful. Visit our website for more detials. Adult Traffic
Thank You

Recharge Mobile Phone with Bitcoins said...

Use cryptocurrency btc to buy top up phone with bitcoin mobile recharge credits to international prepaid sim card number instant transfer online worldwide.

Unknown said...

This is Very very nice article. Everyone should read. Thanks for sharing. Don't miss WORLD'S BEST Wall Coverings In Mumbai

Advin said...

Trusted Bitcoin Exchanger Trusted Crypto Currency Conversion website all type of coins like Ethereum Bitcoins Ripple Litecoin Dogecoin Monero xrp xmr

bitcoin to bank account said...

Bitcoin to bank account is direct exchange website where you do not need to find customer and no need to negotiate for price as you are being offered highest possible rate in the market.

Swimming Pool Contractors said...


Our Expert Swimming pool contractors team build and repair pools and other larger water equipment.
They are responsible not only for the pool itself and the equipment necessary to maintain it, but also for installing safety devices to protect the pools' users.

Ray Hager said...

Bitcoin to paypal is one of the best and fastest way to exchange or transfer digital currency everywhere in the world. So, if you are looking for the best website for bitcoin or any other currency visit our website now because we are number 1 in the world. Visit now for more details.

Ray Hager said...

Bitcoin to paypal is one of the best and fastest way to exchange or transfer digital currency everywhere in the world. So, if you are looking for the best website for bitcoin or any other currency visit our website now because we are number 1 in the world. Visit now for more details.

Swimming Pool Contractors said...


Our Expert Swimming pool contractors works with a client to design a pool and then arranges for the installation of the pool.
This contractor orders the materials and hires and supervises the subcontractors that actually install the pool.

Unknown said...

Hire codeninja web development company for your business

Web development is very important if you want your business to flourish in this age. People are using their laptops and phones to shop for everything these days so if you do not have a website, you will be losing a lot of money and potential customers. A lot of people do not know how to do all this so they hire web development company or experts. codeninja is offering its services for web development for new and old businesses.

Unknown said...

We will show work and give you solution to, How to sell bitcoin for USD? and will provide you exchanging facility from bitcoin to paper money.

eMexo Technologies said...

You are Submit a great content and sharing your knowledge to others! it was one of the likely post to read and useful to improve the knowledge as updated one, keep doing the great job. Big Data Analytic Training in Electronic City my knowledge as updated one, keep blogging.

Ahmed Khan said...

Very informative thank your for sharing here this kind of information.
Web Development Company In Lahore

Muhammd Sheraz said...

Appreciate your work.
SEO Company In Lahore

Web Design Company Pak Web Idea said...

Nice Article by: Pak Web Idea

Archna said...

Really Great Post & Thanks for sharing.

Oflox Is The Best Website Design Company In Dehradun or Digital Marketing Company In Dehradun

Ateeq Mughal said...

Good work.
SEO Company In Lahore

Mas Jim said...

Mastodons is one of the best online smart contract platform in bangladesh
Mastodons

Wlliams said...

Hello there, as a newbie to crypto currency trading, I lost a lot of money trying to navigate the market on my own. In my search for a genuine and trusted trader, i came across Anderson Johnny who guided and helped me make so much profit up to the tune of $40,000. I made my first investment with $1,000 and got a ROI of $9,400 in less than 8 days. You can contact this expert trader via email: tdameritrade077@gmail.com or on WhatsApp: +447883246472 and be ready to share your own testimony

Anila Watson said...

This is a great post that you have shared with us. I appreciate you sharing such valuable information with us. If you want to do crypto mining, you should know about the Best Crypto Mining Hardware. You can also get the complete help from our crypto customer care team.

sheikh said...
This comment has been removed by the author.
Hira Kishwar said...

In today's digital world, content is more critical than ever, and I'm here to help you harness the power of cutting-edge AI technology.



With expertise in Jasper AI and ChatGPT 4, I'm your go-to content creator. Whether you need SEO-friendly blog posts, articles, or website content, I've got you covered. I craft high-quality, well-researched, and entirely unique content that captivates your audience.



But it doesn't stop there! I'll supercharge your content with Surfer SEO. Expect impressive SEO scores, optimized URLs, meta descriptions, and the perfect blend of keywords.



I also ensure top quality using Grammarly for plagiarism checks, maintaining content originality. For peace of mind, I offer AI removal using ZeroGPT or CopyLeaks.



Services include AI-Powered Content Writing, SEO-Friendly Articles, 100% Unique Content, Keyword Research, Meta Description Optimization, Copyright-Free Images, In-depth Research, and Structured Writing.