Why Use Ubuntu for Ethereum Mining?

Ubuntu offers a stable, lightweight, and secure environment for cryptocurrency mining. It has lower overhead than Windows, better long-term reliability, and excellent support for AMD OpenCL and ROCm compute stacks. Many miners choose Ubuntu for headless mining rigs because of its remote management capabilities.

Setting Up Ubuntu for AMD Mining

After installing Ubuntu (Desktop or Server LTS), update all packages and install build tools: sudo apt update && sudo apt upgrade -y && sudo apt install build-essential git cmake -y. For remote operation, enable SSH: sudo apt install openssh-server -y.

Installing AMD GPU Drivers

AMD provides two driver paths for compute workloads:

  • ROCm (Radeon Open Compute): The open-source platform for GPU computing. Install the rocm-opencl-runtime package for OpenCL support. ROCm works with recent AMD GPUs.
  • AMDGPU-PRO: The official proprietary driver stack. Install the amdgpu-pro package to get both graphics and compute support. Most mining software works well with AMDGPU-PRO.

After installation, verify GPU detection with rocm-smi or clinfo.

Choosing Mining Software

Popular Ethereum mining software that runs well on Ubuntu with AMD cards includes:

  • Ethminer (cpp-ethereum): Simple and open source, supports OpenCL.
  • PhoenixMiner: High performance and stable, Linux binary available.
  • T-Rex Miner: Feature-rich, supports AMD and NVIDIA.
  • lolMiner: Good for AMD cards and memory-tuning.

Download the miner, make it executable, and configure a batch file with your wallet address and pool settings.

Configuring the Miner for Optimal Performance

Sample command for Ethminer: ./ethminer -P stratum1+tcp://[email protected]:4444. Adjust pool and port according to your pool. Use the --opencl flag to enable AMD GPUs. For PhoenixMiner, use ./PhoenixMiner -pool us1.ethermine.org:4444 -wal YOUR_WALLET -worker rig1.

Overclocking and Tuning AMD GPUs on Ubuntu

Use tools like radeontop, CoreCtrl, or amdgpu-clocks to adjust core clock, memory clock, and voltage. Memory timing tweaks (e.g., memory_tweak or amdmemtweak) can significantly increase hashrate. Example with amdmemtweak: sudo ./amdmemtweak --tref 120 --tRFC 240 --REF 65535. Always test stability and monitor temperatures.

Pool Selection and Monitoring

Common pools for Ethereum mining are Ethermine, F2Pool, Hiveon, and SparkPool. Set up your miner to connect to the stratum server. For monitoring, use nvtop (supports AMD), amdgpu-top, or web dashboards provided by the pool.

Power Management and Cooling

Ubuntu power management tools like TLP or cpufrequtils help control CPU power states. For GPUs, undervolting and setting a conservative power limit reduces heat and electricity costs. Ensure proper airflow in your rig. Use rocm-smi --setpoweroverdrive 0 to lock power limits if needed.

Common Issues and Troubleshooting

  • OpenCL not detected: Install rocm-opencl-runtime or amdgpu-pro, and run sudo ldconfig.
  • Low hashrate: Verify memory clock is set correctly; check for overheating or throttling.
  • System freezes: Reduce overclock, increase voltage, or increase power limit.
  • GPU not recognized: Ensure you have the latest kernel and firmware.

Related Links