Community post
Ethereum AMD GPU Mining Tutorial Ubuntu 16.04 LTS
I just set up my Ethereum mining rig!
I thought I would post the code I used!
It's super easy!
=============================================================
Install 16.04 LTS (I usually use a Usb stick. A simple google search will do.)
=============================================================
Set up a wallet at https://www.myetherwallet.com/
=============================================================
Find a mining pool!
I use https://ethermine.org
Choose a stratum server closest to you!
(We will use these later, you will be able to use ethermine to monitor your hash rate etc.)
North America (East): us1.ethermine.org:4444 or us1.ethermine.org:14444
North America (West): us2.ethermine.org:4444 or us2.ethermine.org:14444
Europe (France): eu1.ethermine.org:4444 or eu1.ethermine.org:14444
Asia: asia1.ethermine.org:4444 or asia1.ethermine.org:14444
=============================================================
Setting up
Install and Enable SSH by opening terminal and typing the following:
sudo apt-get update
sudo apt-get install openssh-server
From this point you can choose to either proceed on the local machine, or remotely on a Windows machine using PUTTY (I USE TEAMVIEWER! IT IS AWESOME AND EASY TO INSTALL)
Create a new usergroup called video and append the current user to it by typing the following:
sudo usermod -a -G video $LOGNAME
sudo reboot
=============================================================
Installing AMD Drivers
If you plan to use an AMD card in your rig, you will need to install the AMD drivers
Install the AMD drivers by typing the following:
cd ~/Downloads wget --referer=http://support.amd.com https://www2.ati.com/drivers/linux/ubuntu/amdgpu-pro-17.30-458935.tar.xz
tar -Jxvf amdgpu-pro-17.30-458935.tar.xz
cd amdgpu-pro-17.30-458935
./amdgpu-pro-install -y
=============================================================
After install type this command (MUST DO THIS)
./amdgpu-pro-install --px
This issue is caused when the AMD graphics card conflicts with the inbuilt or on-motherboard graphics driver. This command will first uninstall the previous installation and then reinstall with --px parameter.
=============================================================
INSTALL CLAYMORE MINER
Installing claymore requires compiling the executable.
Download v9.5 of Claymore and unpack it by typing the following
cd ~/Downloads wget https://github.com/nanopool/Claymore-Dual-Miner/releases/download/v9.5/Claymore.s.Dual.Ethereum.Decred_Siacoin_Lbry_Pascal.AMD.NVIDIA.GPU.Miner.v9.5.-.LINUX.tar.gz
sudo mkdir /usr/local/claymore95
sudo tar xvf Claymore.s.Dual.Ethereum.Decred_Siacoin_Lbry_Pascal.AMD.NVIDIA.GPU.Miner.v9.5.-.LINUX.tar.gz -C /usr/local/claymore95
CREATE MINING SCRIPT (THIS TELLS YOUR MINER WHAT TO MINE, WHAT POOL TO USE AND WHERE TO SEND YOUR EARNINGS)
cd /usr/local/claymore95
sudo chmod u+s ethdcrminer64
sudo nano mine.sh
Nano (a text editor) will open a blank file.
you can configure it by following the next step.
Paste the following into the new text file:
#!/bin/sh
export GPU_MAX_HEAP_SIZE=100
export GPU_USE_SYNC_OBJECTS=1
export GPU_MAX_ALLOC_PERCENT=100
export GPU_SINGLE_ALLOC_PERCENT=100
./ethdcrminer64 -epool <Mining_Pool_Address> -ewal <Your_Ethereum_Wallet_Address>.<Friendly_Name_For_Computer> -epsw x -mode 1 -tt 68 -allpools 1
THE LAST LINE OF THE CODE NEEDS TO BE EDITED!
Replace <Mining_Pool_Address> with the stratum address we looked at at the top of the page.
Replace <Your_Ethereum_Wallet_Address> with your Ethereum wallet address
Replace <Friendly_Name_For_Computer> with a name for your rig (e.g.: UbuntuMiner01)
You will now need to exit out of Nano
Press CTRL+X
Type Y
Press Enter until you return to the bash promp
Add executable permissions to the file
sudo chmod +x mine.sh
===============UPDATE REQUIRED=========================
sudo apt update
sudo apt install ocl-icd-opencl-dev
=======================================================
NOW YOU CAN START YOUR MINER
cd /usr/local/claymore95
./mine.sh
=======================================================
You can always message me if you have issues I dont mind helping.
If you found this useful then you can donate to one of my wallets.
Zcash
t1VjWwuJwZaXmVGDrzG2pWeS5eUzrQcEa7B
Ethereum
0xBACbD62753C2Fb09AcB05c0aaAC040Dc1505bF31
Bitcoin
3Kxzm7HiBBJqpHBFdmPacjfQsvttydaGmp
Replies (42)
Thanks a lot for this, i had a problem with the new drivers and this command solved it with the 17.50 version "amdgpu-pro-install --opencl=legacy,rocm --headless"
Can you please help me with how to make a batch file that will run the mine.sh when the pc starts up.
I ran into an error with this:
./amdgpu-pro-install --px
And then I used the headless command as noted by dardann but then when I try to run ./mine.sh I get the following error below:
This pool (eth-us-west1.nanopool.org) does not support Ethereum addresses as login (or requires worker name in "Login.Worker" format) and cannot be used for devfee mining, therefore it is not supported.
However, you can mine on this pool if you specify "-allpools 1" option, default pools (different from this pool) will be used for devfee.
Please read "Readme" file for details.Pool eth-us-west1.nanopool.org removed from the list
ETH: 1 pool is specified
Main Ethereum pool is us2.ethermine.org:4444
AMD OpenCL platform not found
No NVIDIA CUDA GPUs detected.
No AMD OPENCL or NVIDIA CUDA GPUs found, exit
How do I fix this?
Hi Thank you for putting this neat tutorial. I followed the step on 16.04 ubuntu server (not desktop)
i have this error when i run mine.sh
./ethdcrminer64: error while loading shared libraries: libcurl.so.4: cannot open shared object file: No such file or directory
any clue??
Configure auto-mine on startup
============sudo nano /etc/rc.local
Find the line which reads exit 0 and type the following above that line (replace USERNAME with your Ubuntu username):
/home/miner-MS-7974/minestart.sh 15 &
Sorry for the delay in response guys!
Ive had an extremely busy month!
Can you post the command line you modified to point to your wallet and the pool... That is the issue... sounds lie you put something in the wrong spot...
Sorry for the delay in response guys!
Ive had an extremely busy month!
hmmm.... Thats actually a new one... Im pretty good at troubleshooting the miner. Sounds like you missed a step... Post a screenshot for me to look at so i can check out the error.
Sorry for the delay in response guys!
Ive had an extremely busy month!
I got it figured out thanks. It also got it to mine but is there a way to monitor how much has it mined like a gui dashboard, or a stats page that tells you the average hash you are mining at etc.
Thank you for posting! I'm about to try this in Ubuntu 17.10 - I have one miner up and running Windows 10 and Awesome Miner. Now I am building a Linux GPU miner with similar hardware to compare any differences.
Easier than I thought. My Ubuntu mining is running smooth! A few things were ever so slight differences in 17.1, but it's all basically the same. GPU is mining at a similar hash rate as my Windows 10 miner. This one only has one GPU set up now since I literally got it up and running this morning. Have three more on deck to add, all AMD Rx series. Again, thanks for this write up, you're the only other guy I've found who's mining on Ubuntu.
getting an error when starting the miner
./mine.sh: 11: ./mine.sh: Syntax error: "(" unexpected
not sure what this could mean have went step by step thru this an double check everything any thoughts
AWESOME! WELL DONE!!!!! That depends on the pool that you are using... if you use ethermine it gives you live stats etc. Just use your wallet address! Ill post some screenshots when i get home!
NICE! I am glad you found it useful! I was going to throw win 10 on the testing rig and see about mining some other coins in preparation for the etherum fork that will end mining lol. If you come across anything Easy, Stable and profitable give me a comment or a message!
You should delete the minestart.sh file you made with nano and re-create it. If that doesnt work take a screenshot of the error and post it in a comment and ill try to help troubleshoot it!
Indeed it is a good idea. I auto switch between Ethereum, and other equihash algorithms (Zcash, ZenCash, and Zclassic). Even mining bitcoin gold has been profitable lately. This year will see an explosion of alt coins, including Ethereum classic, so mining will still very much be a profitable thing in 2018, even after Ethereum goes to proof of stake. But mine it while you can and hang onto it!! Personally, though, I think the real one to pay attention to is EOS, which may someday overtake Ethereum (like the old tech startups in the 90s and 2000s) but I don't think it will just fade away into nothing.
YOU are the man Martico! I have all my cpu's mining xmr. They are just sitting there anyway. I also am hopeful for steam farming using my HDD's. Ive been looking around for something to mine to make use of those. They also are just sitting. I use ubuntu because I am familiar with it from the early days of bitcoin mining... The new coins however seem to only have windows miners. Which is a smart move from the developers. The main stream is more comfortable with windows. If you get time try to post some of your alt coin mining scripts!
I am using miningpoolhub and you can log into whatever coin you are mining (mine are always switching) and see the latest hash rate. This linux machine is not as customizable as Windows, but hopefully, I'll find a way to get Radeon Adrenalin loaded so I have the same GUI I'm used to in Windows. Anyway, here's my latest screen shot from the pool, and this is both of my rigs combined (10 GPUs - all Rx580 8GB and an experimental WX9100 with 16GB)
Unfortunately, I ran this miner and it creates a lot more heat than my Windows miner. I shut it down when my cards were hitting 85° C - I was researching a method to undervolt the core clocks and overclock the memory. The only ways I found were rather cumbersome. So if you figure out a way to tweak the GPU settings in Ubuntu, let me know. Granted, I was running this miner on an inferior test circuit and I did not have a fan directed at it... but the difference was noticeable just placing your hand behind the GPUs. It kept my tech room warm this morning that's for sure!
I have not had that issue at all. I have rx 580's with the hardware bios switches on the physical gpu and im running the btc gold motherboard so that offers me the ability to OC everything from the bios on the motherboard. I knew that the GUI software for OC functions weren't going to work on Linux. (they work well on windows though)I even tried to use wine to open the overclock GUI software that comes with the AMD GPU's but that didnt work. Hence the motherboard Overclock feature. I actually threw my first one out because of this issue... I am going to have to switch over to mining on windows though... Im prepping for the swap using my test rig now... Bye Bye linux! you were there for me back in the day but.... hahahaa
That's for that tip, I'll have to try that! However, with all the old Windows 7 pro licenses I have sitting around, I'm probably going to go that route with this rig too, but I'm not done with Linux yet - this machine just needs to be up and running as soon as possible!
Thanks for the article. I'm a novice and just days into using Ubuntu 16.04. After the "./amdgpu-pro-install --px" command, Terminal reports "E: Unable to locate package xserver-xorg-video-modesetting-amdgpu-pro" . . . Is that normal? Should I go forward with the remainder of your instructions. BTW I used 17.50-511655 not the 17.30 version you referenced.
UPDATE
Windows 7 is a no-go on the ASUS B250 motherboard. The only image I have, however, is the 48-in-1, Windows 7 with many versions (it's always worked well for everything else in the past). So Windows 10 it is... and I was able to get a W10 pro key for just 5 Euro ($6.38 in the US). It activated no problem and was instantly emailed to me... gotta love eBay. So we'll stick with Windows due to its versatility to easily switch algorithms as Ethereum mining is becoming less profitable by the day!
I'm running my rig on Ubuntu server with 5 Sapphire Nitro+ RX580's, trying to locate longer PCIE power cables but not easy to find in my area. As I do have one more RX580 not mining at the moment. Anyways back to my thought. So does this mean it is better to mine with Windows over Ubuntu? I am also getting roughly 19.38 Mh/s per card. Does flashing the GPU bios help with the hashrate in Ubuntu? Or is this mainly a Windows thing to do only? I could flash each card in my Windows machine but will those setting then work when I move it back to the Ubuntu rig? I'm using the AsRock H110 Pro BTC+ board. I also read somewhere where don't remember where but will look for it again that I can undervolt with a command in Claymore. Can you confirm this?
Made a video based on this write up if anyone wants to check it out:
I have found more info and it appears that I cannot use Claymore in Ubuntu to undervolt or control the GPU too much. All I can do is flash the bios and get a better hashrate. But if I was to switch over to Windows well then that is another story. I'd be able to use software to oc more and control more. I'm not sure if I want to change over since it is working now and I am not sure if using Windows will really give me a much better hashrate than I am getting now. Currently getting around 29.XX per GPU, but read can get about 30-33 in Windows. Is the extra hashrate going to make a big difference in mining?
Hey hey! you might want to ask martico... He commented above... he is using the newest version of ubuntu and he got it to work!
As per DarDann in the very first post!
I had a problem with the new drivers and this command solved it with the 17.50 version "amdgpu-pro-install --opencl=legacy,rocm --headless"
This is a fantastic video man! You did well! great setup! all the undervolting haters can kick rocks! theyre just jealous!
That depends on how man cards your running. if your running six cards its an extra 18 mhs. which is pretty good! but this is why i mine with RX 580's... the have a bios switch on the card specifically for mining. that eliminates the need for all the undervolting and overclocking messes... longevity is the name of the game here and ive found that these types of things dont do well for the cards... it can fry them over time... super stoked you found all the tutorials helpful. Post back and let us know how your rig is doing
Thanks man! Linux builds are fun - much more involved. It seemed to get better hash rates as compared to Windows running Awesome Miner. Think they might be skimming a little too much off the top as our pool never shows the rates that they miners are reporting. Not sure what's up with that, should only be 1-3% at most.
I dont mind skimming if the percentage is low... I like the dev's to make their money but gauging is a whole other thing. I haven't had a chance to test windows on the test miner. I'm moving back to seattle at the end of the month from texas... so i have my hands pretty full at the moment but as soon as i get settled in im gonna get the workshop up and going!
This is a solid tip! thanks for posting! I might switch to 17.50 so it could come in handy later! give us an update on how ur miner is running when you have the time!
Look forward to seeing it, man! Honestly, the build in the video I made was for a buddy of mine. I have another 13 GPU mining motherboard but need to wait until more funds are available for another miner.
I am running 6 GPUs with the bios switch as well. And so far things are running pretty good! I have only had one blip but not sure what was the cause. Had to do a restart and that was about it. Since then it has been running pretty good. At the moment it is still cool in my area but once it starts to warm up I have to think of how to deal with the heat! I do have a few fans mounted on the rig to get some better air flow but I am not sure if that will be sufficient! I guess I will deal with it when the weather gets warmer!
The rig is mining flawlessly! Under 17.50 and Claymore 10.
I got my first rig going in texas and the heat didnt bother em too much. I wouldn't over think it. Now taht im in washington it is going to keep my office warm in the winter hahahaha
I recently rebuilt my rig and now everything mines at 0.00MH/s. Everything has been installed and configured the way it was before. I tried moving the video cards onto difference PCIe slots and difference cables etc. but nothing seems to work. Sometimes I get one or two GPU's to work but the rest are always at 0.000 Mh/s any ideas what is causing this?
Hey sleong! Apologies for the delay I just finished my move to seattle! if you could take a screenshot of the miner startup i could help you even more...
Software setup? the mine.sh file or what setup are you referring to?
When you try to start the miner... it runs script and gives errors... i need a picture of that
After some thought I decided I am going to sell my rig. I initially got started as a hobby as most of us have and due to some changes in the office where I am hosting the rig, I no longer have that space available.
It was a good run while it lasted and learned a lot as well.