Social media


How to mine ethereum on a GeForce 3090 card in 2021?

Author: LB 2021-09-26 210

As ethereum mining is more profitable than ever before, I decided to buy a few GeForce 3090 Founders Edition card and install the latest t-rex miner binary on my system to test the performance and the profitability of these cards. I was expecting to get around 110 MH/s for the 3090 Founders Edition with approximately 350W of power consumption. Installing the miner on Ubuntu should be easy, however I faced some frustrating problems and I'm going to share my experiences in this regard. Let's see the details.


So first of all, the best option is to have a fresh Ubuntu OS installed on your computer. The latest CUDA drive runs smoothly on Ubuntu 20.04 and most of the ready made ethereum miner binaries run very well on Ubuntu. You might be able to more conveniently tweak your GPU's settings on Windows, but that's another story. So let's see the first commands to install CUDA on your Ubuntu machine. First let's update the system and install the necessary libraries:


$ sudo apt-get update && sudo apt-get install build-essential -y


Now let's download the installer using the following command:


$ wget https://developer.download.nvidia.com/compute/cuda/11.4.2/local_installers/cuda_11.4.2_470.57.02_linux.run

Now we can run the installer:


$ sudo sh cuda_11.4.2_470.57.02_linux.run

Unfortunately, in most cases the installer will complain with the following message:


Existing package manager installation of the driver found. It is strongly recommended that you remove this before continuing.

It doesn't say much about the way to solve this issue and I had to figure it out by myself. The solution goes like this. You have to examine the error in the installer's log file. In order to do this, you can use the following command:


cat /var/log/cuda-installer.log

Mine said the following:


[INFO]: Driver installation detected by command: apt list --installed | grep -e nvidia-driver-[0-9][0-9][0-9] -e nvidia-[0-9][0-9][0-9]
[INFO]: Cleaning up window
[INFO]: Complete

So it does tell you that the installer used the following to command to discovered the already installed drivers:


$ apt list --installed | grep -e nvidia-driver-[0-9][0-9][0-9] -e nvidia-[0-9][0-9][0-9]

I used the same command to discover my already existing drivers and deleted them manually using the following commands:


$ sudo apt remove linux-modules-nvidia-460-5.8.0-53-generic
$ sudo apt remove linux-modules-nvidia-460-5.11.0-36-generic
$ sudo apt remove linux-objects-nvidia-460-5.11.0-36-generic
$ sudo apt remove linux-objects-nvidia-460-5.8.0-53-generic

Even after these steps, I get the following error:


-> The file '/tmp/.X0-lock' exists and appears to contain the process ID '1419' of a running X server.
ERROR: You appear to be running an X server; please exit X before installing. For further details, please see the section INSTALLING THE NVIDIA DRIVER in the README available on the Linux driver download page at www.nvidia.com.

I found that I had to terminate the graphical interface with the following command to disable the X session:

$ sudo service lightdm stop

If we run the installer again from the command line, without X it should proceed and the CUDA library should be installed in a few moments. Type "accept" to the EULA license and wait for a few minutes.


Now the CUDA library is working and I can use the nvidia-smi command to display some information about my GPU. Let's download a convenient ethereum miner in the next step:


$ wget https://github.com/trexminer/T-Rex/releases/download/0.23.1/t-rex-0.23.1-linux.tar.gz

And untar the miner:


$ tar xvf t-rex-0.23.1-linux.tar.gz

And if everything worked well, you can start your ethereum mining process with the following command:


$ ./t-rex -a ethash -o stratum+tcp://eth.2miners.com:2020 -u [Ethereum wallet address] -p x -w my_first_worker


Don't forget to replace your wallet address and choose your favourite mining pool.


If you want to make everything perfect, you can create a desktop launcher icon, so you can launch your ethereum miner with a single click. In order to do that, you have to create a file on your desktop, with a name miner.desktop and you can paste the following content into the text file:


#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Type=Application
Terminal=true
Exec=gnome-terminal -- /home/[USER_NAME]/trex/t-rex -a ethash -o
stratum+tcp://eth.2miners.com:2020 -u [WALLET ADDRESS] -p x -w [WORKER_NAME]
Name=Trex
Comment=Trex
Icon=/home/[USER_NAME]/Downloads/m.png

When the t-rex miner is running and the ethereum mining is on, I get the following statistics for the card:


==============NVSMI LOG==============
Existing package manager installation of the driver found. It is strongly recommended that you remove this before continuing.


Timestamp : Sun Sep 26 22:59:22 2021
Driver Version : 470.57.02
CUDA Version : 11.4

Attached GPUs : 1
Existing package manager installation of the driver found. It is strongly recommended that you remove this before continuing.
GPU 00000000:08:00.0
Product Name : NVIDIA GeForce RTX 3090
Product Brand : GeForce
Display Mode : Disabled
Display Active : Disabled
Persistence Mode : Disabled
MIG Mode
Current : N/A
Pending : N/A
Accounting Mode : Disabled
Accounting Mode Buffer Size : 4000
Driver Model
Current : N/A
Pending : N/A
Serial Number : N/A
GPU UUID : GPU-8e029ea7-ecf9-e544-3bcf-48d1f44d15cc
Minor Number : 0
VBIOS Version : 94.02.4B.00.0B
MultiGPU Board : No
Board ID : 0x800
GPU Part Number : N/A
Module ID : 0
Inforom Version
Image Version : N/A
OEM Object : N/A
ECC Object : N/A
Power Management Object : N/A
GPU Operation Mode
Current : N/A
Pending : N/A
GSP Firmware Version : N/A
GPU Virtualization Mode
Virtualization Mode : None
Host VGPU Mode : N/A
IBMNPU
Relaxed Ordering Mode : N/A
PCI
Bus : 0x08
Device : 0x00
Domain : 0x0000
Device Id : 0x220410DE
Bus Id : 00000000:08:00.0
Sub System Id : 0x147D10DE
GPU Link Info
PCIe Generation
Max : 4
Current : 4
Link Width
Max : 16x
Current : 16x
Bridge Chip
Type : N/A
Firmware : N/A
Replays Since Reset : 0
Replay Number Rollovers : 0
Tx Throughput : 14000 KB/s
Rx Throughput : 53000 KB/s
Fan Speed : 71 %
Performance State : P2
Clocks Throttle Reasons
Idle : Not Active
Applications Clocks Setting : Not Active
SW Power Cap : Active
HW Slowdown : Not Active
HW Thermal Slowdown : Not Active
HW Power Brake Slowdown : Not Active
Sync Boost : Not Active
SW Thermal Slowdown : Not Active
Display Clock Setting : Not Active
FB Memory Usage
Total : 24265 MiB
Used : 4988 MiB
Free : 19277 MiB
BAR1 Memory Usage
Total : 256 MiB
Used : 10 MiB
Free : 246 MiB
Compute Mode : Default
Utilization
Gpu : 100 %
Memory : 100 %
Encoder : 0 %
Decoder : 0 %
Encoder Stats
Active Sessions : 0
Average FPS : 0
Average Latency : 0
FBC Stats
Active Sessions : 0
Average FPS : 0
Average Latency : 0
Ecc Mode
Current : N/A
Pending : N/A
ECC Errors
Volatile
SRAM Correctable : N/A
SRAM Uncorrectable : N/A
DRAM Correctable : N/A
DRAM Uncorrectable : N/A
Aggregate
SRAM Correctable : N/A
SRAM Uncorrectable : N/A
DRAM Correctable : N/A
DRAM Uncorrectable : N/A
Retired Pages
Single Bit ECC : N/A
Double Bit ECC : N/A
Pending Page Blacklist : N/A
Remapped Rows : N/A
Temperature
GPU Current Temp : 56 C
GPU Shutdown Temp : 98 C
GPU Slowdown Temp : 95 C
GPU Max Operating Temp : 93 C
GPU Target Temperature : 83 C
Memory Current Temp : N/A
Memory Max Operating Temp : N/A
Power Readings
Power Management : Supported
Power Draw : 337.55 W
Power Limit : 350.00 W
Default Power Limit : 350.00 W
Enforced Power Limit : 350.00 W
Min Power Limit : 100.00 W
Max Power Limit : 400.00 W
Clocks
Graphics : 1815 MHz
SM : 1815 MHz
Memory : 9501 MHz
Video : 1590 MHz
Applications Clocks
Graphics : N/A
Memory : N/A
Default Applications Clocks
Graphics : N/A
Memory : N/A
Max Clocks
Graphics : 2100 MHz
SM : 2100 MHz
Memory : 9751 MHz
Video : 1950 MHz
Max Customer Boost Clocks
Graphics : N/A
Clock Policy
Auto Boost : N/A
Auto Boost Default : N/A
Voltage
Graphics : 968.750 mV
Processes
GPU instance ID : N/A
Compute instance ID : N/A
Process ID : 1417
Type : G
Name : /usr/lib/xorg/Xorg
Used GPU Memory : 85 MiB
GPU instance ID : N/A
Compute instance ID : N/A
Process ID : 1767
Type : G
Name : /usr/bin/gnome-shell
Used GPU Memory : 65 MiB
GPU instance ID : N/A
Compute instance ID : N/A
Process ID : 2094
Type : G
Name : /usr/libexec/gnome-initial-setup
Used GPU Memory : 5 MiB
GPU instance ID : N/A
Compute instance ID : N/A
Process ID : 3582
Type : G
Name : gnome-control-center
Used GPU Memory : 4 MiB
GPU instance ID : N/A
Compute instance ID : N/A
Process ID : 6061
Type : C
Name : /home/c/t-rex
Used GPU Memory : 4823 MiB

As you can see, the power consumption is a little bit below 350.00 W and the actual memory usage, to store the DAG file and to perform the related operations is around 4823 MiB.


You might have to disable the nouveau module in the Ubuntu kernel. You can do this by creating a file at /etc/modprobe.d/blacklist-nouveau.conf with the following content:


blacklist nouveau

options nouveau modeset=0

Now regenerate the initramfs with the follwoing command:


$ sudo update-initramfs -u

Interesting entries


01.12.2021

Experiences with Bitcoin ATMs in Edinburgh

26.11.2021

Looking at cryptocurrency mining in 2022

21.11.2021

How to create your own Ethereum testnet?

05.11.2021

What is the DAG size in the ravencoin network?

05.11.2021

The CMP 170HX chip is producing world record hashrates in Russia