eth on ubuntu

Use 16.03.4 and Nothing else.

The AMD Drivers are VERY VERY VERY Version specific. And despite converting the packages from this to that ... I could not get anything else to see the AMD Packages.

Hardware

ASUS Z270-A Prime

I hate this motherboard.... after 6 weeks I finally got it working with

And for future victims of this board, I figured it out!

Set everything to gen2 but PCI-E. Leave that at auto Enable 4g Disable onboard audio Make sure your stupid USB drive is 3.0 or use a SSD.

GPU

I currently have

  • Radeon RX580

Check If GPU Software in installed

Use this command

dpkg -l amdgpu-pro

I see

dpkg-query: no packages found matching amdgpu-pro

To get the drivers, I do the following.

Open the AMD Web Page And I manually select the package I need.

I pick on the web site

  • Desktop Graphics
  • Radeon RX Series
  • Radeon RX5xx
  • Ubuntu x86_64

I download the link https://www2.ati.com/drivers/linux/ubuntu/amdgpu-pro-17.50-511655.tar.xz, it is 500Mb

Now expand it using

tar xf archive.tar.xz

Software

Use the PPA (it works for 16.03 but not 17)

apt-get install git cmake
mkdir ethermin
cd ethermin
git clone https://github.com/ethereum-mining/ethminer .
mkdir build
cd build
cmake .. -DETHASHCUDA=OFF

Testing

Before we get carried away with the Mining - lets try this

ethminer -U -M --benchmark-warmup 30

Add User to the video card group

usermod -a -G video tim

Test Hash rate

ethminer -G -M --opencl-device 0

Show the devices

ethminer  --list-devices

I see something like this (only 1 Card)

[OPENCL]:Using device: Ellesmere(OpenCL 1.2 AMD-APP (2482.3))
[OPENCL]:Printing program log
[OPENCL]:
[OPENCL]:Creating one big buffer for the DAG
[OPENCL]:Loading single big chunk kernels
[OPENCL]:Mapping one big chunk.
[OPENCL]:Creating buffer for header.
[OPENCL]:Creating mining buffer 0
[OPENCL]:Creating mining buffer 1
12845056
Trial 2... 22806528
Trial 3... 22806528
Trial 4... 22806528
Trial 5... 22806528
min/mean/max: 12845056/20814233/22806528 H/s
inner mean: 7602176 H/s

A longer test would be

sudo ethminer -G -M  --benchmark-warmup  10 --benchmark-trial 10 --benchmark-trials 4 --opencl-device 1

Create Eth Account

apt-get install geth geth account new *18* etc

My account id is (Dec 2017)

{1b2fa7465d979aff875d1d406cec7cd9f35ba6de}

Show the Account

 geth account list

Set the eth for mining

We need to tell eth up for mining

geth --mine --minerthreads=4
geth start

See you Hashrate

Although you can see this from the ethminer command output here also works

 geth console
 miner.hashrate

Ketstore Value

This is my Keystore value

{"address":"1b2fa7465d979aff875d1d406cec7cd9f35ba6de","crypto":{"cipher":"aes-128-ctr","ciphertext":"c9093f66fe496
c601079c155c8a408ff3cbcb8d44a379d156317f1624cb2661d","cipherparams":{"iv":"93227b4835aea5778ecea860f3cb5e7c"},"kdf
":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"fc181f2b5afb72b67e4c089e311ef37520ef3ab5d0b11391
00f5a0465795c584"},"mac":"436456b44ce056b06c05f028354631dfaf787b6dd02f4eb689b5f70b94556193"},"id":"dc152851-315c-4
9f9-ba46-545ff530aeea","version":3}

Check your account

geth console
personal.unlockAccount(eth.coinbase,"password")

If you see True, the account is Ok. We can double check this by

personal.listWallets[0].status

and I see "Unlocked"

Sync the BlockChain

This seems to be the recommendation.

geth --fast --cache=2048

Show the Account balance

geth console
Now you are in geth console and paste
web3.eth.getBalance(web3.eth.accounts[0])
0 - represents first account

Joining a pool

ethminer -G --opencl-device 0  -F http://eth-eu.dwarfpool.com:80/{1b2fa7465d979aff875d1d406cec7cd9f35ba6de}
for a in $(seq 0 1)
do
sudo ethminer -G --opencl-device $a-F http://eth-eu.dwarfpool.com:80/1b2fa7465d979aff875d1d406cec7cd9f35ba6de.20
done

Run Multiple Cards

This seems to work.... 30 Mh/s

sudo ethminer -G  -F http://eth-eu.dwarfpool.com:80/1b2fa7465d979aff875d1d406cec7cd9f35ba6de.21 --opencl-device 0,1 -t 2 -v 9

Check the pool

Make sure the url request is ok

curl -s -I http://eth-eu.dwarfpool.com:80/{1b2fa7465d979aff875d1d406cec7cd9f35ba6de}.20| head -1

And I see

HTTP/1.1 200 OK

Check Progress

https://dwarfpool.com/exp

miner  21:42:45.946|ethminer  Mining on PoWhash #7e89b41c… : 35534382 H/s = 29884416 hashes / 0.841 s
miner  21:42:46.776|ethminer  Mining on PoWhash #7e89b41c… : 35416318 H/s = 29360128 hashes / 0.829 s
miner  21:42:47.620|ethminer  Mining on PoWhash #7e89b41c… : 35450078 H/s = 29884416 hashes / 0.843 s
miner  21:42:48.456|ethminer  Mining on PoWhash #7e89b41c… : 35119770 H/s = 29360128 hashes / 0.836 s
miner  21:42:49.296|ethminer  Mining on PoWhash #7e89b41c… : 35576685 H/s = 29884416 hashes / 0.84 s
 miner  21:42:50.136|ethminer  Mining on PoWhash #7e89b41c… : 34994193 H/s = 29360128 hashes / 0.839 s
miner  21:42:50.976|ethminer  Mining on PoWhash #7e89b41c… : 35619089 H/s = 29884416 hashes / 0.839 s
  ℹ  21:42:51.816|ethminer  Solution found; Submitting to http://eth-eu.dwarfpool.com:80/0x1b2fa7465d979aff875d1d406cec7cd9f35ba6de/miner0 ...
  ℹ  21:42:51.816|ethminer    Nonce: 484931379456abc5
  ℹ  21:42:51.816|ethminer    Mixhash: ac108034f8e5f5c77b9939721d9e37359eda55d1a993daba83411db8601a30bb
  ℹ  21:42:51.816|ethminer    Header-hash: 7e89b41c6013ee32deb1aa6661a692575c314f1ce99b52d7d142fa219c068299
  ℹ  21:42:51.816|ethminer    Seedhash: 9d2e3fc27256471aefd0ac060863e72fa7ca01ae239f872242f7c9797c1eb775
  ℹ  21:42:51.816|ethminer    Target: 0000000225c17d04dad2965cc5a02a23e254c0c3f75d9178046aeb27ce1ca574
  ℹ  21:42:51.816|ethminer    Ethash: 00000001d2c312308c5de79092a71237548da2d0d75c191c5da3a1a3af280cdc
  ℹ  21:42:51.997|ethminer  B-) Submitted and accepted.
miner  21:42:51.997|ethminer  Getting work package...

GPU Utilities

You should install the following packages also

  • lm-sensors
  • fancontrol

sensors

To see the GPU states

sensors

I get

```text coretemp-isa-0000 Adapter: ISA adapter Package id 0: +36.0°C (high = +80.0°C, crit = +100.0°C) Core 0: +35.0°C (high = +80.0°C, crit = +100.0°C) Core 1: +36.0°C (high = +80.0°C, crit = +100.0°C)

amdgpu-pci-0100 Adapter: PCI adapter fan1: 2212 RPM temp1: +72.0°C (crit = +0.0°C, hyst = +0.0°C)

asus-isa-0000 Adapter: ISA adapter cpu_fan: 0 RPM

amdgpu-pci-0300 Adapter: PCI adapter fan1: 1388 RPM temp1: +71.0°C (crit = +0.0°C, hyst = +0.0°C) ```

How To Import A Private Key Into Go Ethereum (geth)

To import a private key using geth:

Create a text file containing your private key

$ more privatekey
3a1076bf45ab87712ad64ccb3b10217737f7faacbf2872e88fdd9a537d8fe266

Execute geth to import your private key

$ geth account import privatekey 
Your new account is locked with a password. Please give a password. Do not forget this password.
Passphrase: 
Repeat passphrase: 
Address: {c2d7cf95645d33006175b78989035c7c9061d3f9}

Remember to delete the text file containing your private key

$ rm privateky

New Geth Account

My Public Wallet is now

33de37ad89e01c78fce9698dd039a51384c6e6b4
*8**G*a