You are not logged in.

#1 2025-06-29 11:36:16

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,731
Website

Unable to get xmrig to use GPU ... missing drivers or libs? [SOLVED]

I would like to run a GPU bench using xmrig but am unable to get it to use the GPU. It seems that OPENCL is disabled:

% xmrig --bench=1M --opencl --no-cpu
 * ABOUT        XMRig/6.24.0 gcc/15.1.1 (built for Linux x86-64, 64 bit)
 * LIBS         libuv/1.51.0 OpenSSL/3.5.0 hwloc/2.12.1
 * HUGE PAGES   supported
 * 1GB PAGES    disabled
 * CPU          AMD Ryzen 9 9950X 16-Core Processor (1) 64-bit AES
                L2:16.0 MB L3:64.0 MB 16C/32T NUMA:1
 * MEMORY       4.0/93.8 GB (4%)
 * DONATE       0%
 * ASSEMBLY     auto:ryzen
 * POOL #1      benchmark algo auto
 * COMMANDS     hashrate, pause, resume, results, connection
 * OPENCL       disabled
 * CUDA         disabled
[2025-06-29 07:33:31.389]  bench    start benchmark hashes 1M algo rx/0
[2025-06-29 07:33:31.389]  cpu      use argon2 implementation AVX-512F
[2025-06-29 07:33:31.390]  msr      cannot read MSR 0xc0011020
[2025-06-29 07:33:31.390]  msr      FAILED TO APPLY MSR MOD, HASHRATE WILL BE LOW
[2025-06-29 07:33:31.390]  randomx  init dataset algo rx/0 (32 threads) seed 0000000000000000...
[2025-06-29 07:33:31.391]  randomx  allocated 2336 MB (2080+256) huge pages 0% 0/1168 +JIT (0 ms)
[2025-06-29 07:33:32.125]  randomx  dataset ready (734 ms)

I have the following opencl packages installed, what could be missing that would prevent the benchmark on the GPU?

% for i in opencl amd; do pacman -Qs $i ; done
local/clinfo 3.0.23.01.25-1
    Simple OpenCL application that enumerates all available platform and device properties
local/libclc 20.1.6-1
    Library requirements of the OpenCL C programming language
local/ocl-icd 2.3.3-1
    OpenCL ICD Bindings
local/opencl-headers 2:2024.10.24-1
    OpenCL (Open Computing Language) header files
local/opencl-mesa 1:25.1.4-1
    Open-source OpenCL drivers
local/rocm-opencl-runtime 6.4.1-1
    OpenCL implementation for AMD
local/amd-ucode 20250627-1
    Microcode update image for AMD CPUs
local/comgr 6.4.1-1
    AMDGPU GPU Code Object Manager
local/linux-firmware-amdgpu 20250627-1
    Firmware files for Linux - Firmware for AMD Radeon GPUs
local/rocm-core 6.4.1-1
    AMD ROCm core package (version files)
local/rocm-device-libs 6.4.1-1
    AMD specific device-side language runtime libraries
local/rocm-opencl-runtime 6.4.1-1
    OpenCL implementation for AMD
local/xf86-video-amdgpu 23.0.0-2 (xorg-drivers)
    X.org amdgpu video driver

EDIT: Ah, my mistake was using --bench which I guess configures opencl blockage.

% xmrig --stress --opencl --no-cpu
 * ABOUT        XMRig/6.24.0 gcc/15.1.1 (built for Linux x86-64, 64 bit)
 * LIBS         libuv/1.51.0 OpenSSL/3.5.0 hwloc/2.12.1
 * HUGE PAGES   supported
 * 1GB PAGES    disabled
 * CPU          AMD Ryzen 9 9950X 16-Core Processor (1) 64-bit AES
                L2:16.0 MB L3:64.0 MB 16C/32T NUMA:1
 * MEMORY       6.4/93.8 GB (7%)
 * DONATE       1%
 * ASSEMBLY     auto:ryzen
 * POOL #1      stratum+ssl://randomx.xmrig.com:443 algo auto
 * COMMANDS     hashrate, pause, resume, results, connection
 * ADL          press e for health report
 * OPENCL       #0 AMD Accelerated Parallel Processing/OpenCL 2.1 AMD-APP.dbg (3649.0)
 * OPENCL GPU   #0 03:00.0 AMD Radeon RX 6400 (gfx1034) 2320 MHz cu:6 mem:3468/4080 MB
 * CUDA         disabled
[2025-06-29 07:59:01.836]  net      use pool randomx.xmrig.com:443 TLSv1.3 178.128.242.134
[2025-06-29 07:59:01.836]  net      fingerprint (SHA-256): "14d840c47898b7fb5515393822840074510813c0b9ecc52618608193bda57f29"
[2025-06-29 07:59:01.836]  net      new job from randomx.xmrig.com:443 diff 1000K algo rx/0 height 3444599 (37 tx)
[2025-06-29 07:59:01.836]  cpu      use argon2 implementation AVX-512F
[2025-06-29 07:59:01.838]  msr      cannot read MSR 0xc0011020
[2025-06-29 07:59:01.838]  msr      FAILED TO APPLY MSR MOD, HASHRATE WILL BE LOW
[2025-06-29 07:59:01.838]  randomx  init dataset algo rx/0 (32 threads) seed c60226909b345d14...
[2025-06-29 07:59:01.838]  randomx  allocated 2336 MB (2080+256) huge pages 0% 0/1168 +JIT (0 ms)
[2025-06-29 07:59:02.334]  net      new job from randomx.xmrig.com:443 diff 1000K algo rx/0 height 3444599 (42 tx)
[2025-06-29 07:59:02.587]  randomx  dataset ready (748 ms)
[2025-06-29 07:59:02.587]  opencl   use profile  rx  (2 threads) scratchpad 2048 KB
|  # | GPU |  BUS ID | INTENSITY | WSIZE | MEMORY | NAME
|  0 |   0 | 03:00.0 |        64 |     8 |    128 | AMD Radeon RX 6400 (gfx1034)
|  1 |   0 | 03:00.0 |        64 |     8 |    128 | AMD Radeon RX 6400 (gfx1034)
[2025-06-29 07:59:02.773]  opencl   READY threads 2/2 (185 ms)
[2025-06-29 07:59:12.707]  net      new job from randomx.xmrig.com:443 diff 1000K algo rx/0 height 3444599 (43 tx)
[2025-06-29 07:59:22.599]  net      new job from randomx.xmrig.com:443 diff 1000K algo rx/0 height 3444599 (46 tx)
[2025-06-29 07:59:31.665]  net      new job from randomx.xmrig.com:443 diff 1000K algo rx/0 height 3444600 (4 tx)

Created the following to help future peeps: https://wiki.archlinux.org/title/Benchmarking#xmrig

Last edited by graysky (2025-06-29 13:45:38)

Offline

Board footer

Powered by FluxBB