Member-only story

Build and Use xmrig CUDA Plugin in Gentoo Linux

This is a quick step-by-step guide on downloading, compiling and using the xmrig-Cuda plugin to keep your CUDA graphics card busy in its spare time, e.g., not running CUDA accelerated simulations.

S. K.
2 min readNov 13, 2021

A requirement is that you have previously enabled CUDA in your kernel and emerged the CUDA toolkit. Once this is satisfied, copy the below command in your terminal and execute them one after the other:

https://github.com/MoneroOcean/xmrig-cuda.gitmkdir xmrig-cuda/build && cd xmrig-cuda/buildcmake .. -DCUDA_LIB=/usr/local/cuda/lib64/stubs/libcuda.so -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cudamake .. -DCUDA_LIB=/usr/lib64/libcuda.so -DCUDA_TOOLKIT_ROOT_DIR=/opt/cudamake -j$(nproc)

Make sure you commit enough cores “nproc” to this. Without specifying CUDA_ARCH, it will build for all known architectures and take its time.

cp libxmrig-cuda.so /PATH_TO_XMRIG/
cd /PATH_TO_XMRIG/
vim config.json

Enable CUDA in the xmrig config.json, setting it to “true”:

Note: you can exit and save from vim by typing in the order “ESC”, “:wq”, “ENTER”. Or without saving: “ESC”, “:q!”, “ENTER”. Then start xmrig:

./xmrig

--

--

No responses yet