Home

How do I fix "randomx init failed" in XMRig?

randomx init failed means XMRig could not prepare RandomX, the mining system Monero uses, before it could start working. The most common cause is a memory allocation problem, but the lines immediately above the error usually tell you what to fix.

Read the lines before the error

Look at the last 10–20 lines in XMRig’s console output. The final error is a summary; an earlier message often identifies the actual problem.

Watch for messages about:

  • Memory allocation: XMRig could not reserve the memory it needs.
  • Dataset initialization: It could not build RandomX’s large working set of data.
  • Huge pages: Larger-than-usual memory blocks were unavailable.
  • Permissions or JIT: Your system may be blocking a feature RandomX needs. JIT means turning mining instructions into code your processor can run directly.

A huge-page warning alone usually does not explain a complete initialization failure. XMRig can normally run with regular memory pages, although it will be slower. Likewise, an MSR warning—about changing certain processor settings—is usually a performance issue, not a fatal error.

Check available memory first

RandomX’s fast mode uses a dataset of about 2,080 MB, plus a 256 MB cache, along with additional memory for XMRig and its mining threads. Your operating system and other apps also need room.

Check available memory, not just your computer’s installed RAM. A computer with 4 GB installed can still struggle if other software is using most of it.

Try this sequence:

  1. Close memory-heavy apps, especially browsers with many tabs.
  2. Restart XMRig.
  3. Check whether a virtual machine or container has a memory limit.
  4. If needed, restart your computer and test before opening other apps.

Reducing the number of mining threads can free some memory, but it does not remove the large dataset requirement. On systems with multiple processor memory regions, called NUMA nodes, XMRig may allocate multiple datasets. Disabling NUMA in XMRig’s RandomX settings can help you test whether those extra allocations are the problem.

Test RandomX light mode

Light mode avoids the large dataset and uses a smaller cache instead. It is much slower, but it is a useful diagnostic test.

From your XMRig folder, keep your usual pool and wallet settings and add:

./xmrig --randomx-mode=light

On Windows:

.\xmrig.exe --randomx-mode=light

Alternatively, change the mode inside the existing randomx section of your configuration:

"mode": "light"

If light mode starts while fast mode fails, that strongly points toward a memory-capacity or allocation problem. Light mode is a fallback, not a performance upgrade.

Check the build and system restrictions

If memory changes do not help:

  • Use a current, official XMRig build that matches your operating system and processor type.
  • Use a 64-bit operating system and build for normal RandomX fast-mode mining.
  • Review security alerts. Do not broadly disable your antivirus or other protections.
  • If you enabled optional 1 GB huge pages, turn that option off while troubleshooting.

Do not assume running as administrator or root is the cure. Extra permissions can help with some performance settings, but they cannot create more RAM.

The bottom line

Start with the log lines above randomx init failed, then check available memory and test light mode. If it still fails, share your XMRig version, operating system, CPU, RAM, and nearby log lines—removing wallet details, passwords, and access tokens first.

All 1,000 questions

MyAiMiner.com

MyAiMiner.com — Monero mining blog. 1,000 questions. Clear answers.

Monero (XMR) Mining BLOG

Hashes0
Blocks accepted0
Blocks rejected0
Runtime00:00:00