Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[Support] lnxd - XMRig

Featured Replies

Can anyone look please,

tried xmrig docker on a i9-12900hk (erying board) and got very poor Hash (1700) , used MSR script and got increase to 2200-2500, but my CPU should juice it to 10-13k

 

my xmrig log is uploaded.

What am i doing wrong?

161152647_erloiad.thumb.png.b0699839cd34ab5c19c05ea4e989a9f1.png

 

logx.txt

Edited by neighboring-ferryman2976

  • 2 months later...
  • Replies 135
  • Views 67.7k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • Have never had luck with the same on EPYC 7502P. The script applies successfully. But no matter if privileged run, or root or non-root image used, always get Failed to apply MSR. I believe the gu

  • Hey @horphi, this is quite difficult to set up but possible. Ravencoin uses the kawpow algorithm which is a GPU algorithm. To use XMRig you will need to go on the latest-root tag and re-install it fro

  • daemon_of_chaos
    daemon_of_chaos

    Do you plan to release an update for the latest XMrig version (currently v6.16.2)?

Posted Images

On 11/6/2023 at 5:10 AM, amapo said:

Have never had luck with the same on EPYC 7502P. The script applies successfully. But no matter if privileged run, or root or non-root image used, always get Failed to apply MSR.

I believe the guidance in the thread was "don't worry about it". But I cannot verify if it's actually working correctly or not.

 

Edit 1:

According to the following, the params "--randomx-wrmsr=-1 --randomx-no-rdmsr" disable MSR, but these are hard coded in to the image. And can be seen in log view prior to your XMRig additional commands. Source for file: https://github.com/lnxd/docker-xmrig/blob/main/mine.sh

 Can you comment?

@lnxd

 

Edit 2: 

I fixed the problem after years of encountering. This pre-built image is pulling a very old version of xmrig and numerous enhancements have been made to xmrig's AMD related codebase since.

 

I ended up cloning the git repo (https://github.com/lnxd/docker-xmrig.git), building xmrig on an equivalent environment to ubuntu:20.04 (because Dockerfile & packaged xmrig build based off it) and changing dev fee from 1 to 0 in src/donate.h, uploading somewhere,  updating the Dockerfile links to that location so it pulls my .tar.gz instead.

 

Replace command and echo lines in mine.sh to eliminate hard coded msr disabling parameter. I have:

echo "--url=${POOL} --coin=${COIN} --user=${WALLET}.${WORKER} --randomx-no-rdmsr ${ADDITIONAL}"


cd /home/docker/xmrig-${FEE}
./xmrig --url=${POOL} --coin=${COIN} --user=${WALLET}.${WORKER} --randomx-no-rdmsr --donate-level=${DONATE} ${ADDITIONAL}

 

Additionally, the final piece in the puzzle was using User root instead of User docker near bottom of the Dockerfile, and running as privileged.

 

Run docker build -t local-docker-xmrig-root .

Remove container + image to avoid caching. Add container, select XMrig in your dropdown, change image to local-docker-xmrig-root:latest

 

This has entirely finally fixed my hugepages and MSR issues. Happy days!

 

2023-11-06-175357.png.1c2162ef5e561fce5d8c7f49fb929b5a.png

Hello Amapo,

is it possible for you to create a fork of xmrig for our unraid?

I have Unraid 6.12.4 and would like to use the latest version of xmrig on my server.

 

the version of @Lnxd is no longer updated and does not have all the latest functionality of xmrig in 6.21.0 thank you in advance for your help

  • 3 months later...
On 11/6/2023 at 3:10 PM, amapo said:

Have never had luck with the same on EPYC 7502P. The script applies successfully. But no matter if privileged run, or root or non-root image used, always get Failed to apply MSR.

I believe the guidance in the thread was "don't worry about it". But I cannot verify if it's actually working correctly or not.

 

Edit 1:

According to the following, the params "--randomx-wrmsr=-1 --randomx-no-rdmsr" disable MSR, but these are hard coded in to the image. And can be seen in log view prior to your XMRig additional commands. Source for file: https://github.com/lnxd/docker-xmrig/blob/main/mine.sh

 Can you comment?

@lnxd

 

Edit 2: 

I fixed the problem after years of encountering. This pre-built image is pulling a very old version of xmrig and numerous enhancements have been made to xmrig's AMD related codebase since.

 

I ended up cloning the git repo (https://github.com/lnxd/docker-xmrig.git), building xmrig on an equivalent environment to ubuntu:20.04 (because Dockerfile & packaged xmrig build based off it) and changing dev fee from 1 to 0 in src/donate.h, uploading somewhere,  updating the Dockerfile links to that location so it pulls my .tar.gz instead.

 

Replace command and echo lines in mine.sh to eliminate hard coded msr disabling parameter. I have:

echo "--url=${POOL} --coin=${COIN} --user=${WALLET}.${WORKER} --randomx-no-rdmsr ${ADDITIONAL}"


cd /home/docker/xmrig-${FEE}
./xmrig --url=${POOL} --coin=${COIN} --user=${WALLET}.${WORKER} --randomx-no-rdmsr --donate-level=${DONATE} ${ADDITIONAL}

 

Additionally, the final piece in the puzzle was using User root instead of User docker near bottom of the Dockerfile, and running as privileged.

 

Run docker build -t local-docker-xmrig-root .

Remove container + image to avoid caching. Add container, select XMrig in your dropdown, change image to local-docker-xmrig-root:latest

 

This has entirely finally fixed my hugepages and MSR issues. Happy days!

 

2023-11-06-175357.png.1c2162ef5e561fce5d8c7f49fb929b5a.png

@amapo Nice work. Another request for you to create a fork for Unraid of your version.  :-)  

  • 1 month later...
On 6/1/2024 at 5:09 PM, jaso said:

@amapo Nice work. Another request for you to create a fork for Unraid of your version.  :-)  

Apologies, I know I've left this unreplied to for ages now. I'll put it on my list of things to get around to doing. Can't guarantee though. In the interim, shouldn't take much effort to follow my steps for a local version /@Wassabi

  • 7 months later...

Hey guys, im still getting this message even i applied the script from the first site.

 

Quote

[2025-03-20 09:35:51.807]  msr      FAILED TO APPLY MSR MOD, HASHRATE WILL BE LOW

 

Am i doing somethig wrong from my side?

  • 2 months later...

i'm new here. is this still work in 2025?

  • 1 month later...
On 6/17/2025 at 8:39 AM, brutalmethod said:

i'm new here. is this still work in 2025?

Yes but I think an update will be great D

  • 3 months later...

Is it working now? I have been running it for more than a month with no payout.

  • 3 months later...
On 4/1/2021 at 11:50 PM, lnxd said:

Overview: Support thread for lnxd/XMRig in CA.

Application: XMRig - https://github.com/xmrig/xmrig

Docker Hub: https://hub.docker.com/r/lnxd/xmrig

GitHub: https://github.com/lnxd/docker-xmrig

 

Please ensure that you know what you're doing before setting this up, as excessively high temperatures are BAD for computers and could damage your hardware / eventuate in data loss.

 

Instructions:

  1. Install lnxd's XMRig via CA.

  2. Add in your XMR receive address to the wallet field.

  3. Update the pool address to your closest node or preferred pool. Don't forget to pay attention to the port if you change pools, as they tend to use arbitrary ports.

  4. Set the --donate-level you would like to enable. Eg. entering a 1 causes XMRig to mine for 99 minutes for you, and then 1 minute for the fee option chosen in the next step. Setting the --donate-level flag to 0 will not work unless you follow the steps below.

  5. There are 3 fee options enabled by a custom build from my fork of the latest release source. This allows for some options that aren't available in the base version:
    no-fee: Makes it possible to set the --donate-level flag to 0%. Unless you set it to 0%, the fee goes to the developer of XMRig.
    dev-fee: The fee goes to the developer of XMRig.
    lnxd-fee: The fee goes to me 🙃 Thank you in advance if you choose this option.

  6. Turn on advanced mode for the template and select CPU core / thread pairs that you would like to use in CPU pinning. I recommend leaving core 1 and its thread pair unselected, as it could possibly cause Unraid to unexpectedly slow down / the Docker engine to quit if things get too intense while mining.
    670055416_ScreenShot2021-04-02at8_45_23am.png.87bc01e297840fadd32bdf36489369eb.png

  7. Run the container and check the temperature of your CPU and other hardware regularly for at least 20-30 minutes to ensure everything is safe and stable. If you get any errors that you can't decipher, feel free reach out and I'll take a look for you.

  8. (Optional) To increase your hash rate, you can add and run the following User Script. At the moment, in order to reset your MSR values to default you need to restart your Unraid host. For this reason, it needs to be re-run after every boot as the updated values do not survive reboots. The script installs msr-tools and then updates the registry values to optimise your CPU for XMRig. This may have performance implications for other functions on your server. The logs will also show that XMRig is being run with MSR MOD disabled, but if you run this script it serves the same purpose and you should get a higher hash rate.

    #!/bin/bash
    
    # Write XMRig Optimised MSR values
    # https://github.com/xmrig/xmrig/blob/master/scripts/randomx_boost.sh
    
    VERSION=1.3
    
    echo "Installing msr-tools v${VERSION}"
    echo ""
    echo "(don't!) blame lnxd if something goes wrong"
    echo ""
    curl -fsSL https://packages.slackonly.com/pub/packages/14.2-x86_64/system/msr-tools/msr-tools-${VERSION}-x86_64-1_slonly.txz -o /tmp/msr-tools-${VERSION}-x86_64-1_slonly.txz
    upgradepkg --install-new /tmp/msr-tools-${VERSION}-x86_64-1_slonly.txz
    rm /tmp/msr-tools-${VERSION}-x86_64-1_slonly.txz
    
    echo ""
    echo "Optimising register values for XMRig"
    echo ""
    modprobe msr
    
    if cat /proc/cpuinfo | grep "AMD Ryzen" >/dev/null; then
    	if cat /proc/cpuinfo | grep "cpu family[[:space:]]:[[:space:]]25" >/dev/null; then
    		echo "Detected Ryzen (Zen3)"
    		wrmsr -a 0xc0011020 0x4480000000000
    		wrmsr -a 0xc0011021 0x1c000200000040
    		wrmsr -a 0xc0011022 0xc000000401500000
    		wrmsr -a 0xc001102b 0x2000cc14
    		echo "MSR register values for Ryzen (Zen3) applied"
    	else
    		echo "Detected Ryzen (Zen1/Zen2)"
    		wrmsr -a 0xc0011020 0
    		wrmsr -a 0xc0011021 0x40
    		wrmsr -a 0xc0011022 0x1510000
    		wrmsr -a 0xc001102b 0x2000cc16
    		echo "MSR register values for Ryzen (Zen1/Zen2) applied"
    	fi
    elif cat /proc/cpuinfo | grep "Intel" >/dev/null; then
    	echo "Detected Intel"
    	wrmsr -a 0x1a4 0xf
    	echo "MSR register values for Intel applied"
    else
    	echo "No supported CPU detected"
    fi
    echo ""
    echo "Done!"
    echo "To reset values, please reboot your server."

     


If you get stuck, please feel free to reply to this thread and I'll do my best to help out 🙂

On 4/1/2021 at 11:50 PM, lnxd said:

Overview: Support thread for lnxd/XMRig in CA.

Application: XMRig - https://github.com/xmrig/xmrig

Docker Hub: https://hub.docker.com/r/lnxd/xmrig

GitHub: https://github.com/lnxd/docker-xmrig

 

Please ensure that you know what you're doing before setting this up, as excessively high temperatures are BAD for computers and could damage your hardware / eventuate in data loss.

 

Instructions:

  1. Install lnxd's XMRig via CA.

  2. Add in your XMR receive address to the wallet field.

  3. Update the pool address to your closest node or preferred pool. Don't forget to pay attention to the port if you change pools, as they tend to use arbitrary ports.

  4. Set the --donate-level you would like to enable. Eg. entering a 1 causes XMRig to mine for 99 minutes for you, and then 1 minute for the fee option chosen in the next step. Setting the --donate-level flag to 0 will not work unless you follow the steps below.

  5. There are 3 fee options enabled by a custom build from my fork of the latest release source. This allows for some options that aren't available in the base version:
    no-fee: Makes it possible to set the --donate-level flag to 0%. Unless you set it to 0%, the fee goes to the developer of XMRig.
    dev-fee: The fee goes to the developer of XMRig.
    lnxd-fee: The fee goes to me 🙃 Thank you in advance if you choose this option.

  6. Turn on advanced mode for the template and select CPU core / thread pairs that you would like to use in CPU pinning. I recommend leaving core 1 and its thread pair unselected, as it could possibly cause Unraid to unexpectedly slow down / the Docker engine to quit if things get too intense while mining.
    670055416_ScreenShot2021-04-02at8_45_23am.png.87bc01e297840fadd32bdf36489369eb.png

  7. Run the container and check the temperature of your CPU and other hardware regularly for at least 20-30 minutes to ensure everything is safe and stable. If you get any errors that you can't decipher, feel free reach out and I'll take a look for you.

  8. (Optional) To increase your hash rate, you can add and run the following User Script. At the moment, in order to reset your MSR values to default you need to restart your Unraid host. For this reason, it needs to be re-run after every boot as the updated values do not survive reboots. The script installs msr-tools and then updates the registry values to optimise your CPU for XMRig. This may have performance implications for other functions on your server. The logs will also show that XMRig is being run with MSR MOD disabled, but if you run this script it serves the same purpose and you should get a higher hash rate.

    #!/bin/bash
    
    # Write XMRig Optimised MSR values
    # https://github.com/xmrig/xmrig/blob/master/scripts/randomx_boost.sh
    
    VERSION=1.3
    
    echo "Installing msr-tools v${VERSION}"
    echo ""
    echo "(don't!) blame lnxd if something goes wrong"
    echo ""
    curl -fsSL https://packages.slackonly.com/pub/packages/14.2-x86_64/system/msr-tools/msr-tools-${VERSION}-x86_64-1_slonly.txz -o /tmp/msr-tools-${VERSION}-x86_64-1_slonly.txz
    upgradepkg --install-new /tmp/msr-tools-${VERSION}-x86_64-1_slonly.txz
    rm /tmp/msr-tools-${VERSION}-x86_64-1_slonly.txz
    
    echo ""
    echo "Optimising register values for XMRig"
    echo ""
    modprobe msr
    
    if cat /proc/cpuinfo | grep "AMD Ryzen" >/dev/null; then
    	if cat /proc/cpuinfo | grep "cpu family[[:space:]]:[[:space:]]25" >/dev/null; then
    		echo "Detected Ryzen (Zen3)"
    		wrmsr -a 0xc0011020 0x4480000000000
    		wrmsr -a 0xc0011021 0x1c000200000040
    		wrmsr -a 0xc0011022 0xc000000401500000
    		wrmsr -a 0xc001102b 0x2000cc14
    		echo "MSR register values for Ryzen (Zen3) applied"
    	else
    		echo "Detected Ryzen (Zen1/Zen2)"
    		wrmsr -a 0xc0011020 0
    		wrmsr -a 0xc0011021 0x40
    		wrmsr -a 0xc0011022 0x1510000
    		wrmsr -a 0xc001102b 0x2000cc16
    		echo "MSR register values for Ryzen (Zen1/Zen2) applied"
    	fi
    elif cat /proc/cpuinfo | grep "Intel" >/dev/null; then
    	echo "Detected Intel"
    	wrmsr -a 0x1a4 0xf
    	echo "MSR register values for Intel applied"
    else
    	echo "No supported CPU detected"
    fi
    echo ""
    echo "Done!"
    echo "To reset values, please reboot your server."

     


If you get stuck, please feel free to reply to this thread and I'll do my best to help out 🙂

Where to execute the user script? In the console of the XMRIG docker container?

I am running XMRIG in 2 places. The first one i an HP Microserver with 8 cores using 3 of them and everything is working as expected. But the other one i have which is an AMD Epyc with 32 cores and 64 threads where i have XMRIG running on 6 threads i get the error message "FAILED TO APPLY MSR MOD, HASHRATE WILL BE LOW".

How do i fix that problem? A different repository? I am running the recent version of the docker app.

  • 2 months later...
On 12/9/2023 at 11:53 PM, neighboring-ferryman2976 said:

Can anyone look please,

tried xmrig docker on a i9-12900hk (erying board) and got very poor Hash (1700) , used MSR script and got increase to 2200-2500, but my CPU should juice it to 10-13k

 

my xmrig log is uploaded.

What am i doing wrong?

logx.txt

Hi, I am very late to this discussion and am very new to mining too.

I have pinned 5 of the 6 physical cores of my Ryzen 2600 to the XMRig Docker container, and let it run for a while, but I am seeing the same behaviour as what you mentioned, with a ridiculiously low hashrate of around 2000 to 2800H/s whereas a Ryzen 2600 would normally run at over 10 kH/s.

The power draw to the wall did increase significantly (around 120W to the wall vs 37W when idling) so the thing is definitely running, and all of the cores I have pinned to this Docker container are shown as running at 100% in Unraid's dashboard.
There must be something I'm missing here. Could someone please help me?
Thank you in advance.

Have you set unraid power usage in settings to performance? That will help a bit more, but not to the extent you mention.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.