Be ready to CPU mine on Digibyte with RandomX and your Rock64 ARM with XMRig

David Léonard
Nov 4, 2020 · 7 min read
The Rock64 has a Quad-Core ARM Cortex a53 64-bit that you could easily be used to catch few more $DGB

Digibyte wants to bring back CPU mining implementing RandomX lowering more the barrier to mine Digibyte and get started without any kind of “commitment”. Be ready and prepare your ARM device to grab few more $DGB!

In one of the last stories we learned how to install your Rock64 and how to create a DigiByte Full node with a Rock64. Now you’re standing with this brand new node and wondering if you could make it mine some $DGB? Or simply, you just own a Rock64 and are wondering why it wouldn’t mine a bit, yes every coin count! Here is a small step by step guide.

CPU mining are you serious?

Make it mine !

Install dependencies

sudo apt install -y build-essential cmake libuv1-dev libmicrohttpd-dev libssl-dev libhwloc-dev automake libtool autoconf
Installing the dependancies

Download the sources

cd ~git clone
Cloning the XMRig sources

Remove donation settings before building XMRig

nano xmrig/src/donate.h

To remove automatic donations built into XMRig simply put a 0 at the end of those lines:

constexpr const int kDefaultDonateLevel = 0;constexpr const int kMinimumDonateLevel = 0;

Make a CTRL+X and Y to exit and save the file and you are good to go.

Put 0 at the end of those lines and save

Create the build destination folder and compile [1]

cd ~mkdir xmrig/build && cd./ && cd ../buildsudo cmake .. -DXMRIG_DEPS=scripts/depssudo make -j$(nproc)
Screenshot taken during the build part
Screenshot taken during the cmake part
Screenshot taken during the make part

Change ownership on the folder you created

chown -R <name_of_your_user> ~/xmrig

Enable HugePage support

Please note 1280 pages means 2560 MB of memory will be reserved for huge pages and become not available for other usage.
You can use this command to make it temporary:

sudo sysctl -w vm.nr_hugepages=1280

If you want to make it permanent:

sudo bash -c "echo vm.nr_hugepages=1280 >> /etc/sysctl.conf"sudo bash -c "echo kernel.shmmax = 2684354560 >> /etc/sysctl.conf"sudo bash -c "echovm.hugetlb_shm_group = 0 >> /etc/sysctl.conf"

Test it

sudo ./xmrig -a randomx -o stratum+tcp:// -u 42SNM6kfbbD697cBmv67jddCymSyVpq6bK5iVooghJzY1xEfH5eyj9vHeeu5acpQDGLmnjGgJeNewWfTKAd19A1b61PZDnW+25000
Mining Monero to test that RandomX is working on your Rock64

Benchmark the perf of your Rock64

sudo ./xmrig --bench=1M --submit

It will take few hours to complete and return you a link to wit all your results. If you want to compare yours with mine, here is my link.

Benchmark result on

Create the config.json file

cd ~/xmrig/build
nano config.json

To finish, just save with CMD+X and CMD+Y.

Overclocking the Rock64

By default your Rock64 has a max CPU frequency set to 1.3GHz max. Check your current CPU frequency with:

cpufreq-info -c 0
Actually this Rock64 can go up to 1.30GHz

No need to reboot, we can slightly bump this settings while mining to 1.51GHz using these commands:

sudo sed -i "s/MAX_SPEED=.*/MAX_SPEED=1512000/" /etc/default/cpufrequtilssudo systemctl restart cpufrequtils

Now the Rock64 can increase itself its CPU frequency up to 1.51GHz if it needs it.

Now the Rock64 can run at 1.51GHz

You can directly notice the bump in KH/s (about 15% more hashes)

If you want to try different settings, you can get the list of the accepted frequencies by using this command:

cat /sys/devices/system/cpu/cpufreq/policy0/scaling_available_frequencies
Rock’s available scaling frequencies

If you like to go back to the previous settings, just use these commands (beware to replace the “ with the right quotation mark

sudo sed -i "s/MAX_SPEED=.*/MAX_SPEED=1296000/" /etc/default/cpufrequtilssudo systemctl restart cpufrequtils

Check the temperature of your Rock64

sudo armbianmonitor -m
87.7°C is too hot for you CPU, you better aim for 79°C max

I don’t have a big enough heatsink on my CPU and the 1512000 max-speed setting was a bit too much, so I did choose 1392000 setting which my Rock64 seems to appreciate much more.

Graphically monitor your Rock64 with SSH and s-tui

It is pretty straightforward to install, just enter these commands to install and detect the sensors:

sudo apt-get install lm-sensors
sudo sensors-detect

Say yes to all questions and carry on with these commands that will install s-tui:

sudo apt-get install python3-pip stress
sudo apt-get install python3-dev
sudo -H pip3 install — upgrade setuptools
sudo -H pip3 install ez_setup
sudo -H pip3 install s-tui

Now it has been installed, to launch it:

sudo s-tui

If you want to have all the information, you have to run s-tui with sudo.

Too bad the Rock64 has no Power sensor


Also, Read


Coinmonks is a non-profit Crypto educational publication.


Coinmonks is a non-profit Crypto educational publication. Follow us on Twitter @coinmonks Our other project -

David Léonard

Written by

IT Guru • Defender against the Digital Dark Arts🛡 • Blockchain Advocate 🔑️.


Coinmonks is a non-profit Crypto educational publication. Follow us on Twitter @coinmonks Our other project -