Simple steps on how to get started with ETHMiner by manually compiling it and configuring it for mining with Nanopool (although it will work for other pools as well).
While mining Ethereum on Windows is much easier, there is probably an improvement in hashrate when you are using Linux as a driver.
Commands and essence of this guide
First, make sure you have installed the latest AMDGPU-pro drivers with OpenCL support. в качестве драйвера.
sudo apt-get install opencl-amdgpu-pro-icd cmake git mesa-common-dev
git clone https://github.com/ethereum-mining/ethminer.git cd ethminer git submodule update --init --recursive mkdir build; cd build cmake .. -DETHASHCUDA=OFF -DETHASHCL=ON cmake --build . -- -j sudo make install ethminer -G -M 0 ethminer -G --report-hr -P stratum1+tcp://[email protected]ool.org:9999
sudo apt-get install nvidia-cuda-toolkit cmake mesa-common-dev
git clone https://github.com/ethereum-mining/ethminer.git cd ethminer git submodule update --init --recursive mkdir build; cd build cmake .. -DETHASHCUDA=ON -DETHASHCL=OFF cmake --build . -- -j sudo make install ethminer -U -M 0 ethminer -U --report-hr -P stratum1+tcp://[email protected]ool.org:9999
Since Ethereum is optimized for GPU mining, one or more powerful GPUs are great. It doesn’t matter if it’s NVidia or AMD, although we prefer to use AMD.
Also make sure your graphics card has enough memory. You can use the DAG file size calculator, to find out how much memory you need. Video cards with less than 5GB of memory are no longer enough.
You will also need a wallet to provide your unique Ethereum address.
For AMD cards, you also need to install the AMDGPU-pro driver with OpenCL support before compiling Ethminer.
Installing AMDGPU pro driver with OpenCL support
# See: https://www.amd.com/en/support tar -xf amdgpu-pro-*.tar.xz cd amdgpu-pro-*/ ./amdgpu-pro-install --opencl=legacy,pal reboot
Vega10 (or newer) cards require change, replace
Optionally, you can add
--headless / or an
--no-dkms option to the
./amdgpu-pro-install command if you don’t want AMD drivers loaded in the desktop environment:
./amdgpu-pro-install --opencl=legacy,pal --no-dkms --headless
Building Ethminer fot ubuntu
There is no need to manually collect Ethminer. The latest version can be downloaded from the releases page. However, if you are a professional and want to get additional hashes from your graphics card, compile the miner yourself by following the steps below.
- First, install the necessary drivers for your video card:
- For NVidia use:
sudo apt-get install nvidia-cuda-toolkit
- For AMD, first install the driver with OpenCL support and then use:
sudo apt-get install opencl-amdgpu-pro-icd
- For NVidia use:
- Also make sure that all required packages exist on your system:
sudo apt-get install cmake mesa-common-dev git
- Now download the latest version from GitHub into a new folder:
git clone https://github.com/ethereum-mining/ethminer.git cd ethminer git submodule update --init --recursive
- Finally, compile it (the command will take a while, so be patient):
- For AMD use:
mkdir build; cd build cmake .. -DETHASHCUDA=OFF -DETHASHCL=ON cmake --build . -- -j
- To use NVidia:
mkdir build; cd build cmake .. -DETHASHCUDA=ON -DETHASHCL=OFF cmake --build . -- -j
- For AMD use:
- Optionally, you can install it as an executable file:
sudo make install
First launch of Ethmienr
If you skipped step 5 above, you can start Ethminer from the ethminer directory inside the build directory you are probably still in:
Otherwise, you can run it directly:
The commands above show brief Ethminer documentation. For lengthy documentation, use an
--help-ext option with one of the valid extensions:
Optionally, you can view all options in the cpp-ethereum readme file (which is the GPU-enabled ethminer source).
To get an idea of the Mh / s being achieved by your farm, you can run the test first. For ATI / OpenCL use:
./ethminer/ethminer -G -M 0
For NVidia / CUDA use:
./ethminer/ethminer -U -M 0
If the test returns an empty result (which it probably will be the first few times), wait for the DAG file to be generated.
Divide “MAX hashrate” by 1,000,000 to get the speed in megahashes. This is your real hash rate in MH/s.
Finally, we are ready to start mining! The last step is actually very simple, just run the following command:
./ethminer/ethminer -G --report-hr -P stratum1+tcp://[email protected]ool.org:9999
0x5576999cc34c1c0030f28939444d6ba9cd6919c2 - change the address of your Eth-wallet.
rigname - the name of your rig (or just remove it, as this is an optional option).
Mining should now start working. Optionally, you can track your progress by viewing your wallet address on the miner’s statistics page.
Ethminer supports all the latest protocols, allowing you to connect to any pool you want. See examples on how to connect to different pools to get started.
To understand if there is the best Ethereum mining pools, there are many factors that need to be considered that determine profitability.
-P stratum1+tcp://[email protected]s.com:2020
-P stratum1+tcp://[email protected].com:8008
- miningpoolhub.com needs username.workername in the internal login process. Use
%2eto join them into one parameter.
- It seems the password is not being verified by the pool so you can use a plain
%40for the @-sign in your email address.
.-sign on Linux in 0x5576999cc34c1c0030f28939444d6ba9cd6919c2.WORKERNAME
-P stratum1+tcp://[email protected].whalesburg.com:8082
Getting system information
Some of the commands we used to understand which drivers or devices are recognized or not:
List GPU’s with loaded drivers:
lspci -k | grep -EA3 'VGA|3D|Display'
Show loaded kernel modules:
lsmod | grep "kms\|drm\|amdgpu"
List OpenCL platforms and devices:
List devices Ethminer recognises:
Ethminer test keeps giving 0H / s
This mostly happens on CUDA cards and / or when DAG generation takes longer than the test time.
The option has
--benchmark-warmup been removed, so be patient and let the DAG file be generated.
Error - unsupported GNU version! gcc versions later than 8 are not supported
Build Ethminer fails. This error is actually self-explanatory and can be resolved by manually installing the gcc version:
First, remove all existing files from the current directory
Now install required libs and restart building:
sudo apt-get install gcc-8 g++-8
For ATI/OpenCL use:
cmake -D CMAKE_C_COMPILER=gcc-8 -D CMAKE_CXX_COMPILER=g++-8 -DETHASHCUDA=OFF -DETHASHCL=ON .. cmake --build . -- -j
For Nvidia/CUDA use:
cmake -D CMAKE_C_COMPILER=gcc-8 -D CMAKE_CXX_COMPILER=g++-8 -DETHASHCUDA=ON -DETHASHCL=OFF .. cmake --build . -- -j
Ethminer does not see usable devices with AMD card.
clinfo, check if any platforms with OpenCL support are found:
# This is wrong Number of platforms 0 # This is good Number of platforms 1 Platform Name AMD Accelerated Parallel Processing Platform Vendor Advanced Micro Devices, Inc. Platform Version OpenCL 2.1 AMD-APP (3143.9) Platform Profile FULL_PROFILE [...]
ethminer does not see the devices, which means that you are using a device driver or not working properly, or does not support OpenCL. See above for how to install the driver for your device. Uninstall any existing drivers in advance. Optionally, you can check if the AMD driver is loaded into the kernel using:
lsmod | grep amdgpu
SIGSEGV, not enough memory available on device
Ошибка SIGSEGV означает, что на устройстве недостаточно памяти. A SIGSEGV error means there is not enough memory on the device.
Look at the lines above the trace message to figure out exactly what went wrong. If your device is low on memory, you can squeeze extra life out of your card by stopping all other programs and / or stopping the GUI / desktop environment.
Use the DAG Size Calculator to find out the minimum GPU memory required for mining.
ethminer --list-devices shows the amount of memory available.
An alternative solution would be to mine other coins that run on Ethash Proof of Work, such as Expanse or Metaverse.
Others (compatibility issues)
Sometimes, using the latest version leads to strange problems or bugs that have not been fixed yet. So you can check an earlier version (like v0.18.0) and try if it works:
git clone --single-branch --branch v0.18.0 https://github.com/ethereum-mining/ethminer.git
Then follow the same assembly steps as above.
It is also important to check for conflicting drivers or other issues. For AMD, you can manually uninstall the existing drivers:
amdgpu-pro-uninstall rm -Rf /etc/vulkan /opt/amdgpu /opt/amdgpu-pro
After installing Linux with a prebuilt version of Ethminer, the hash rate jumped by almost 4 Mh / s. Therefore, we must conclude that the extra effort to get the miner and drivers up and running is really worth it.
Mining will shorten the lifespan of your hardware and force your computer to use more power, resulting in higher electricity bills. In addition, you can lose all the money you have invested. So, be careful!
You and you alone are responsible for any damage to you, your equipment, or financial loss.
-t 1 The flag is removed as it is not needed. Added a
--report-hr flag to report hash to the pool. Changed the AMD drivers download page to ensure that users always get the latest driver.
-j ability to use all processor cores during assembly, because this significantly speeds up the process. Added documentation for the AMDGPU-pro driver farm with OpenCL support.
Added additional troubleshooting information, low memory resolution and other minor fixes. Corrected version indication gcc, and
g++ in the assembly.
Maximum supported version
gcc/g++ - 8, replaced by
6 in the bug fix.
sudo before commands requiring additional privileges.