Wave Layer Blog

Crypto Friendly Dedicated Servers Located In 50+ Countries!
World Class 24×7 Support:

How to Setup GPU Mining on Ubuntu

GPU mining involves using a graphics processing unit (GPU) to perform cryptocurrency mining. Initially, Central Processing Units (CPUs) were used for mining. However, CPUs are inefficient for mining because they are designed for general-purpose computing.

 

On the other hand, GPUs are terrifi at parallel processing and can manage multiple tasks simultaneously. This makes them ideal for mining.

 

Miners use their GPUs to perform hashing, which is a process that involves finding a specific value that satisfies certain conditions for a given block of transactions. The first miner to identify the correct hash gets to add the block to the blockchain and is rewarded with newly created cryptocurrency coins such as Bitcoin or Ethereum.

 

The following are some advantages of using GPUs for  Mining:

 

  • Higher hash rates: GPUs can perform multiple hash calculations per second, increasing the chances of finding the correct solution.
  • Versatility: GPUs can mine various cryptocurrencies.
  • Availability: GPUs are widely available and can be used by individual miners.

 

Installing and configuring the necessary software is the first step in setting up GPU mining on Ubuntu. After that, you can start the mining process. Here is a basic guide on how to get you going.

Step 1: Check GPU Compatibility

Make sure your GPU model is compatible with mining. Nvidia and AMD GPUs are commonly used for this process. In addition, ensure your GPU has enough Video Random Access Memory (VRAM) for the specific cryptocurrency you want to mine. To confirm which GPU model you are using, you can use the following command:

				
					sudo lshw -C display
				
			

In this tutorial, I’m using AMD to set up GPU mining on Ubuntu, so you should be comfortable following this guide if you’re using the AMDGPU model too.

Step 2: Update System Repositories

Open your terminal and run the following commands:

				
					sudo apt update

				
			
				
					sudo apt upgrade
				
			

Step 3: Download the required GPU Driver

If you are using an AMD GPU, check out here to find the software packages you are required to download: The following link is to the specific AMD GPU Pro driver package that is compatible with my GPU model:

				
					wget --referer https://www.amd.com/en/support/kb/release-notes/rn-amdgpu-unified-linux-21-30 https://drivers.amd.com/drivers/linux/amdgpu-pro-21.30-1290604-ubuntu-20.04.tar.xz

				
			
				
					tar xJf amdgpu-pro-21.30-1290604-ubuntu-20.04.tar.xz
				
			

Next, run the following commands to install the driver software and necessary dependencies:

				
					 cd amdgpu-pro-21.30-1290604-ubuntu-20.04/
				
			
				
					chmod +x amdgpu-install
				
			
				
					./amdgpu-install -y --opencl=rocr,legacy
				
			

Note:

The amdgpu-pro-install script is used specifically for installing the AMDGPU-Pro driver on Linux systems. Unlike the open-source AMDGPU driver, AMDGPU-Pro includes additional proprietary components and features.

 

The amdgpu-install script is part of the ROCm (Radeon Open Compute) stack, which provides open-source GPU compute and machine learning libraries for AMD GPUs.

 

Make sure to add the –opencl=rocr,legacy option so that your driver software can support OpenCL. You can also check if your GPU supports the Pro driver from here.

Step 3: Configure the Driver Software

Open your terminal and run the following commands:

				
					 sudo usermod -a -G render $LOGNAME
				
			
				
					 sudo usermod -a -G video $LOGNAME
				
			

The first command adds the current user to the “render” group, granting permissions related to graphics rendering and acceleration.

The second command adds the current user to the “video” group, which provides access to video-related resources and hardware acceleration.

Step 4: Update OpenCL and Driver Libraries

To verify whether OpenCL support is correctly installed and all installed packages are to their latest versions, run the following commands:

				
					 sudo apt-get install -y clinfo
				
			
				
					sudo apt upgrade amdgpu
				
			

Step 5: Download the Mining Software

There are various mining software options available. One popular choice is the “lolMiner.” You can download it from the official lolMiner site or use the official GitHub repository. To get started, open your terminal and run:

				
					 wget https://github.com/Lolliedieb/lolMiner-releases/releases/download/1.88/lolMiner_v1.88_Lin64.tar.gz
				
			

Next, extract the downloaded files using the following command:

				
					 tar -xvf lolMiner_v1.88_Lin64.tar.gz
				
			

Step 6: Restart your PC

				
					 sudo reboot
				
			

Step 7: Run the Miner

To run the miner, run the following command, replacing <pool_address>, <wallet_address>, and <worker_name> with your actual details:

				
					./lolMiner --algo ETHASH --pool  --user . --pass x
				
			

Conclusion

Mining solo can be daunting task. You can always join a mining pool to combine your hashing power with others and receive more consistent rewards. In addition, Mining is resource intensive work, and may affect your system’s functionalities. Remember to monitor temperatures, power consumption, and hash rates to optimize your setups.

Share the Post:

Related Posts

How to install Kryptex Miner on Ubuntu

/*! elementor – v3.19.0 – 07-02-2024 */ .elementor-heading-title{padding:0;margin:0;line-height:1}.elementor-widget-heading .elementor-heading-title[class*=elementor-size-]>a{color:inherit;font-size:inherit;line-height:inherit}.elementor-widget-heading .elementor-heading-title.elementor-size-small{font-size:15px}.elementor-widget-heading .elementor-heading-title.elementor-size-medium{font-size:19px}.elementor-widget-heading .elementor-heading-title.elementor-size-large{font-size:29px}.elementor-widget-heading .elementor-heading-title.elementor-size-xl{font-size:39px}.elementor-widget-heading .elementor-heading-title.elementor-size-xxl{font-size:59px} Kryptex Miner Kryptex Miner is a

Read More