[Support] lnxd - XMRig


Recommended Posts

Do you know how to enable the http API to check worker status??

 

EDITED: Found it! you can add it as an additional param in "Additional XMRig Arguments" variable, just add:

 

--api-worker-id <your worker name> --http-host 0.0.0.0 --http-port 8888 (example)

 

Also mind to add a port mapping from container to host as it is not done by default

Edited by Koldo
Link to comment
  • 3 weeks later...

Hi,

I'm new to all of this, since there is no webUI, how do I interact with the application?

When I open the console all I have is mine.sh and start.sh, is there a way I can 'connect' to the process that is already running?

Also, i've been looking for optimization tips, how do I enable huge pages and 1GB pages?

I've added

Quote

echo vm.nr_hugepages=$(nproc) >> /etc/sysctl.conf

to the go file, is that the right way to do it?

 

Also, I can't find a config.json file, how do I configure the app?

 

thanks!

Edited by shpitz461
  • Like 1
Link to comment

Im not sure why i never accept any jobs.

Ive been tested for few days that its still the same.

 

* ABOUT XMRig/6.12.1 gcc/9.3.0
* LIBS libuv/1.41.0 OpenSSL/1.1.1j hwloc/2.4.1
* HUGE PAGES supported
* 1GB PAGES disabled
* CPU Intel(R) Xeon(R) CPU E5649 @ 2.53GHz (1) 64-bit AES
L2:1.5 MB L3:12.0 MB 6C/12T NUMA:1
* MEMORY 22.7/23.5 GB (97%)
J2: 4 GB Reserved @ 1333 MHz J2
J3: 4 GB Reserved @ 1333 MHz J3
J4: 4 GB Reserved @ 1333 MHz J4
J5: 4 GB Reserved @ 1333 MHz J5
J6: 4 GB Reserved @ 1333 MHz J6
J7: 4 GB Reserved @ 1333 MHz J7
* MOTHERBOARD LENOVO - Lenovo
* DONATE 1%
* ASSEMBLY intel
* POOL #1 xmr-asia1.nanopool.org:14444 coin monero
* COMMANDS 'h' hashrate, 'p' pause, 'r' resume, 's' results, 'c' connection
* OPENCL disabled
* CUDA 11.2/11.4/6.12.0
* NVML disabled (failed to load NVML)
* CUDA GPU #0 03:00.0 Quadro P400 1252/2005 MHz smx:2 arch:61 mem:1966/1999 MB
[2021-11-21 00:05:39.523] net use pool xmr-asia1.nanopool.org:14444 139.99.101.232
[2021-11-21 00:05:39.523] net new job from xmr-asia1.nanopool.org:14444 diff 480045 algo rx/0 height 2497488
[2021-11-21 00:05:39.523] cpu use argon2 implementation SSSE3
[2021-11-21 00:05:39.524] randomx init dataset algo rx/0 (12 threads) seed d02e1b1704b67497...
[2021-11-21 00:05:39.816] randomx allocated 2336 MB (2080+256) huge pages 100% 1168/1168 +JIT (293 ms)
[2021-11-21 00:05:41.451] net new job from xmr-asia1.nanopool.org:14444 diff 480045 algo rx/0 height 2497488
[2021-11-21 00:05:45.186] randomx dataset ready (5369 ms)
[2021-11-21 00:05:45.186] cpu use profile rx (6 threads) scratchpad 2048 KB
[2021-11-21 00:05:45.186] nvidia use profile rx (1 thread) scratchpad 2048 KB
| # | GPU | BUS ID | INTENSITY | THREADS | BLOCKS | BF | BS | MEMORY | NAME
| 0 | 0 | 03:00.0 | 128 | 32 | 4 | 0 | 0 | 256 | Quadro P400
[2021-11-21 00:05:45.200] cpu READY threads 6/6 (6) huge pages 100% 6/6 memory 12288 KB (15 ms)
[2021-11-21 00:05:45.186] randomx dataset ready (5369 ms)
[2021-11-21 00:05:45.186] cpu use profile rx (6 threads) scratchpad 2048 KB
[2021-11-21 00:05:45.186] nvidia use profile rx (1 thread) scratchpad 2048 KB
| # | GPU | BUS ID | INTENSITY | THREADS | BLOCKS | BF | BS | MEMORY | NAME
| 0 | 0 | 03:00.0 | 128 | 32 | 4 | 0 | 0 | 256 | Quadro P400
[2021-11-21 00:05:45.200] cpu READY threads 6/6 (6) huge pages 100% 6/6 memory 12288 KB (15 ms)
[2021-11-21 00:05:46.030] nvidia READY threads 1/1 (843 ms)
[2021-11-21 00:06:41.723] net new job from xmr-asia1.nanopool.org:14444 diff 480045 algo rx/0 height 2497488
[2021-11-21 00:06:41.723] net new job from xmr-asia1.nanopool.org:14444 diff 480045 algo rx/0 height 2497488
[2021-11-21 00:06:45.232] nvidia #0 03:00.0 0W 0C
[2021-11-21 00:06:45.232] miner speed 10s/60s/15m 1398.9 n/a n/a H/s max 1411.8 H/s
[2021-11-21 00:07:45.272] nvidia #0 03:00.0 0W 0C
[2021-11-21 00:07:45.272] miner speed 10s/60s/15m 1386.3 1373.5 n/a H/s max 1411.8 H/s
[2021-11-21 00:07:45.631] net new job from xmr-asia1.nanopool.org:14444 diff 480045 algo rx/0 height 2497488
[2021-11-21 00:08:45.311] nvidia #0 03:00.0 0W 0C
[2021-11-21 00:08:45.311] miner speed 10s/60s/15m 1395.3 1394.6 n/a H/s max 1411.8 H/s
[2021-11-21 00:08:45.311] nvidia #0 03:00.0 0W 0C
[2021-11-21 00:08:45.311] miner speed 10s/60s/15m 1395.3 1394.6 n/a H/s max 1411.8 H/s
[2021-11-21 00:08:46.105] net new job from xmr-asia1.nanopool.org:14444 diff 480045 algo rx/0 height 2497488
[2021-11-21 00:08:51.526] net new job from xmr-asia1.nanopool.org:14444 diff 480045 algo rx/0 height 2497489
[2021-11-21 00:08:51.526] net new job from xmr-asia1.nanopool.org:14444 diff 480045 algo rx/0 height 2497489
[2021-11-21 00:09:45.357] nvidia #0 03:00.0 0W 0C
[2021-11-21 00:09:45.357] miner speed 10s/60s/15m 1400.6 1402.0 n/a H/s max 1411.8 H/s
[2021-11-21 00:09:52.659] net new job from xmr-asia1.nanopool.org:14444 diff 480045 algo rx/0 height 2497489
[2021-11-21 00:09:52.659] net new job from xmr-asia1.nanopool.org:14444 diff 480045 algo rx/0 height 2497489
[2021-11-21 00:10:19.253] net no active pools, stop mining
[2021-11-21 00:10:24.608] net use pool xmr-asia1.nanopool.org:14444 139.99.102.74
[2021-11-21 00:10:24.608] net new job from xmr-asia1.nanopool.org:14444 diff 480045 algo rx/0 height 2497490
[2021-11-21 00:10:45.409] nvidia #0 03:00.0 0W 0C
[2021-11-21 00:10:45.409] miner speed 10s/60s/15m 1402.9 1260.3 n/a H/s max 1411.8 H/s
[2021-11-21 00:11:11.737] net new job from xmr-asia1.nanopool.org:14444 diff 480045 algo rx/0 height 2497490
[2021-11-21 00:11:45.462] nvidia #0 03:00.0 0W 0C
[2021-11-21 00:11:45.462] miner speed 10s/60s/15m 1404.3 1382.1 n/a H/s max 1411.8 H/s
[2021-11-21 00:12:12.768] net new job from xmr-asia1.nanopool.org:14444 diff 480045 algo rx/0 height 2497490
[2021-11-21 00:12:45.512] nvidia #0 03:00.0 0W 0C
[2021-11-21 00:12:45.512] miner speed 10s/60s/15m 1396.7 1397.5 n/a H/s max 1411.8 H/s
[2021-11-21 00:13:14.011] net new job from xmr-asia1.nanopool.org:14444 diff 480045 algo rx/0 height 2497490
[2021-11-21 00:13:14.011] net new job from xmr-asia1.nanopool.org:14444 diff 480045 algo rx/0 height 2497490
[2021-11-21 00:13:45.566] nvidia #0 03:00.0 0W 0C
[2021-11-21 00:13:45.566] miner speed 10s/60s/15m 1394.6 1397.4 n/a H/s max 1411.8 H/s
[2021-11-21 00:14:12.857] net new job from xmr-asia1.nanopool.org:14444 diff 480045 algo rx/0 height 2497490
[2021-11-21 00:14:45.621] nvidia #0 03:00.0 0W 0C
[2021-11-21 00:14:45.621] miner speed 10s/60s/15m 1390.1 1397.5 n/a H/s max 1411.8 H/s
[2021-11-21 00:14:46.850] net new job from xmr-asia1.nanopool.org:14444 diff 480045 algo rx/0 height 2497491
[2021-11-21 00:15:09.065] net new job from xmr-asia1.nanopool.org:14444 diff 480045 algo rx/0 height 2497492
[2021-11-21 00:15:09.982] net new job from xmr-asia1.nanopool.org:14444 diff 480045 algo rx/0 height 2497493
[2021-11-21 00:15:45.679] nvidia #0 03:00.0 0W 0C
[2021-11-21 00:15:45.679] miner speed 10s/60s/15m 1389.8 1400.4 n/a H/s max 1416.4 H/s
[2021-11-21 00:16:00.322] net new job from xmr-asia1.nanopool.org:14444 diff 480045 algo rx/0 height 2497494
[2021-11-21 00:16:42.072] net new job from xmr-asia1.nanopool.org:14444 diff 480045 algo rx/0 height 2497495
[2021-11-21 00:16:45.738] nvidia #0 03:00.0 0W 0C
[2021-11-21 00:16:45.738] miner speed 10s/60s/15m 1393.4 1402.8 n/a H/s max 1416.4 H/s
[2021-11-21 00:17:42.379] net new job from xmr-asia1.nanopool.org:14444 diff 480045 algo rx/0 height 2497495
[2021-11-21 00:17:45.805] nvidia #0 03:00.0 0W 0C
[2021-11-21 00:17:45.805] miner speed 10s/60s/15m 1377.2 1386.6 n/a H/s max 1416.4 H/s
[2021-11-21 00:18:43.510] net new job from xmr-asia1.nanopool.org:14444 diff 480045 algo rx/0 height 2497495
[2021-11-21 00:18:45.864] nvidia #0 03:00.0 0W 0C
[2021-11-21 00:18:45.865] miner speed 10s/60s/15m 1385.3 1397.8 n/a H/s max 1416.4 H/s

Link to comment
  • 2 weeks later...

Hey everyone, sorry for my long absence. As I mentioned on my PhoenixMiner thread, I've had a lot of things going on and not enough free time. If I've missed any important posts please feel free to reply to this again and I'll revisit. 

 

On 12/8/2021 at 4:55 AM, daemon_of_chaos said:

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

I do plan on it assuming it's compatible and not a massive amount of work. Problem is I've forgotten the password for my build VM which is where I stored all my build files, and they're not backed up of course. I'm going to have to make another VM and mount the image over there to get them out. Time is still a massive issue for me, so this will likely happen over the next few days to weeks as I get back on top of things. 

 

On 12/1/2021 at 5:47 AM, mdrodge said:

Any plans to add Raptoreum as an option?

(at the moment i'm running a VM to do this but it would be sweet to run this in a container)

Had never heard of this until now haha. See my reply to @daemon_of_chaos above though. I think the latest update introduces support for it so yeah, it's probably coming down the line. 

 

On 11/10/2021 at 7:03 AM, shpitz461 said:

Also, is it possible for you to create a container for this one?

 

https://github.com/Bendr0id/xmrigCC

If you still want this let me know, it shouldn't be a massive amount of work to add it to this container as it's just an xmrig fork, but for simplicity's sake I wouldn't have the three different dev fee options for it.

 

On 11/8/2021 at 12:19 PM, shpitz461 said:

I'm new to all of this, since there is no webUI, how do I interact with the application?

Check out the container logs to get updates, etc. I usually look at the graphs generated by the pool I'm mining to in order to monitor progress as they're way prettier and have come a long way, but you *can* view the docker logs over http / ssh, or access the API directly as @Koldo has provided steps for above.

 

While the binary is interactive in that you can watch the output and use keyboard commands to exert very basic control over it, as you found it's usually controlled by a config file. This container doesn't rely on that config file though, it uses variables which can be set in the edit container page. Your question was so long ago though that I'm assuming you worked it out shortly after posting.

 

It is possible and quite easy to get an interactive session from this container and have it running over SSH in terminal. I used it for testing while I was developing this, but it goes slightly against the way docker was integrated into Unraid so I designed the container to rely on the environment variables instead. 

Edited by lnxd
  • Like 2
Link to comment
On 12/10/2021 at 1:13 AM, lnxd said:

If you still want this let me know, it shouldn't be a massive amount of work to add it to this container as it's just an xmrig fork, but for simplicity's sake I wouldn't have the three different dev fee options for it.

That would be great since I'm only running the cpu portion. the CC fork also says that api is built-in, would be nice to interact with the miner via API.

Thanks!

Link to comment
  • 2 weeks later...

How would i limit the miner to only about 20% of each core ? or run only when the cpu core is idle?

affinity settings work , but it loads the chosen cores 100% , and i would like it to mine only when cores arent used

--cpu-priority=0 doesnt do anything , changing the value from 0 to anything up to 5 doesnt matter , it always loads the same cores to 100%

Edited by Xcage
Link to comment

I dont know what I am doing wrong but I can not get the docker to install I am getting the following.

 

root@localhost:# /usr/local/emhttp/plugins/dynamix.docker.manager/scripts/docker run -d --name='XMRig' --net='bridge' --cpuset-cpus='1,2,3,4,5,7,8,9,10,11' -e TZ="America/Los_Angeles" -e HOST_OS="Unraid" -e 'POOL'='gulf.moneroocean:10128' -e 'WALLET'='XXXXXXXXXXXXXXXXXXXXX' -e 'WORKER'='Unraid' -e 'ADDITIONAL'='--no-color ' -e 'DONATE'='1' -e 'FEE'='lnxd-fee' -e 'COIN'='monero' -e 'DRIVERV'='' -e 'NVIDIA_VISIBLE_DEVICES'='' -e 'NVIDIA_DRIVER_CAPABILITIES'='all' --device='' 'lnxd/xmrig:latest'

docker: bad format for path: .
See 'docker run --help'.

 

Link to comment

You've got an empty device in the template.  Remove it.

--device=''

 

Quote

Container Device:
*Important* You can remove this if you don't want to use GPU passthrough from host to container. Set it to '/dev/dri:/dev/dri' if you want to use your GPU. This Isn't necessary if privileged mode is enabled, but won't hurt to have it enabled anyway.

What this means to to actually hit the remove button, not simply blank it out

Link to comment
  • 3 weeks later...
On 4/1/2021 at 9: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 🙂

How do I stop / get past the error message:

"Execution error

Server error"

When starting the container?

 

I must have configured something wrong but I have never seen that message before. I cannot even see any entries in the log file.

Edited by Richard J
grammatical edit
Link to comment
18 minutes ago, Richard J said:

How do I stop / get past the error message:

"Execution error

Server error"

When starting the container?

 

I must have configured something wrong but I have never seen that message before. I cannot even see any entries in the log file.

I enabled privileged mode and it verks!

Link to comment
  • 2 weeks later...
On 12/10/2021 at 7:13 AM, lnxd said:

Had never heard of this until now haha. See my reply to @daemon_of_chaos above though. I think the latest update introduces support for it so yeah, it's probably coming down the line.

Hi, big thanks for the image! I'm new to both docker and linux altogether but still managed to run it on an OMV media server with good results.

I did fail though on trying to launch RTM mining by tinkering with additional arguments. Am I correct to think that the current release does not support RTM? Do you foresee an implementation?

Link to comment
  • 1 month later...
  • 7 months later...

How can I get rid of the "." that comes at the end of the wallet address with the worker name?

I get ""Long payment IDs are no longer supported by the Monero network. You MUST switch to either a normal address/subaddres or an integrated address.", code: -1" in the logs. 

If I use a [space] it still keeps the "." and if I remove the worker from the Unraid Docker template it adds ".Docker"

Edited by sem1845
clarity
Link to comment
  • 7 months later...

After ugrading to Unraid 6.12 XMRIG has stopped working. It just wouldn't start anymore. I deleted the app from my Unraid and tried installing it fresh. It failed with this error:

"Error response from daemon: error gathering device information while adding custom device "/dev/dri": no such file or directory."

Link to comment
  • 1 month later...

Hi im not sure what im missing..

i have run the updatet script but still getting the error

#!/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 grep -E 'AMD Ryzen|AMD EPYC' /proc/cpuinfo > /dev/null;
        then
        if grep "cpu family[[:space:]]\{1,\}:[[:space:]]25" /proc/cpuinfo > /dev/null;
                then
                        if grep "model[[:space:]]\{1,\}:[[:space:]]97" /proc/cpuinfo > /dev/null;
                                then
                                        echo "Detected Zen4 CPU"
                                        wrmsr -a 0xc0011020 0x4400000000000
                                        wrmsr -a 0xc0011021 0x4000000000040
                                        wrmsr -a 0xc0011022 0x8680000401570000
                                        wrmsr -a 0xc001102b 0x2040cc10
                                        echo "MSR register values for Zen4 applied"
                                else
                                        echo "Detected Zen3 CPU"
                                        wrmsr -a 0xc0011020 0x4480000000000
                                        wrmsr -a 0xc0011021 0x1c000200000040
                                        wrmsr -a 0xc0011022 0xc000000401570000
                                        wrmsr -a 0xc001102b 0x2000cc10
                                        echo "MSR register values for Zen3 applied"
                                fi
                else
                        echo "Detected Zen1/Zen2 CPU"
                        wrmsr -a 0xc0011020 0
                        wrmsr -a 0xc0011021 0x40
                        wrmsr -a 0xc0011022 0x1510000
                        wrmsr -a 0xc001102b 0x2000cc16
                        echo "MSR register values for Zen1/Zen2 applied"
                fi
elif grep "Intel" /proc/cpuinfo > /dev/null;
        then
                echo "Detected Intel CPU"
                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."

[2023-08-11 10:51:48.249]  msr      msr kernel module is not available
[2023-08-11 10:51:48.249]  msr      FAILED TO APPLY MSR MOD, HASHRATE WILL BE LOW

I am running it on a AMD EPYC 7302

Edited by MrYoshii
Link to comment
  • 1 month later...
On 8/11/2023 at 11:00 AM, MrYoshii said:

Hi im not sure what im missing..

i have run the updatet script but still getting the error

#!/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 grep -E 'AMD Ryzen|AMD EPYC' /proc/cpuinfo > /dev/null;
        then
        if grep "cpu family[[:space:]]\{1,\}:[[:space:]]25" /proc/cpuinfo > /dev/null;
                then
                        if grep "model[[:space:]]\{1,\}:[[:space:]]97" /proc/cpuinfo > /dev/null;
                                then
                                        echo "Detected Zen4 CPU"
                                        wrmsr -a 0xc0011020 0x4400000000000
                                        wrmsr -a 0xc0011021 0x4000000000040
                                        wrmsr -a 0xc0011022 0x8680000401570000
                                        wrmsr -a 0xc001102b 0x2040cc10
                                        echo "MSR register values for Zen4 applied"
                                else
                                        echo "Detected Zen3 CPU"
                                        wrmsr -a 0xc0011020 0x4480000000000
                                        wrmsr -a 0xc0011021 0x1c000200000040
                                        wrmsr -a 0xc0011022 0xc000000401570000
                                        wrmsr -a 0xc001102b 0x2000cc10
                                        echo "MSR register values for Zen3 applied"
                                fi
                else
                        echo "Detected Zen1/Zen2 CPU"
                        wrmsr -a 0xc0011020 0
                        wrmsr -a 0xc0011021 0x40
                        wrmsr -a 0xc0011022 0x1510000
                        wrmsr -a 0xc001102b 0x2000cc16
                        echo "MSR register values for Zen1/Zen2 applied"
                fi
elif grep "Intel" /proc/cpuinfo > /dev/null;
        then
                echo "Detected Intel CPU"
                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."

[2023-08-11 10:51:48.249]  msr      msr kernel module is not available
[2023-08-11 10:51:48.249]  msr      FAILED TO APPLY MSR MOD, HASHRATE WILL BE LOW

I am running it on a AMD EPYC 7302

I have exactly the same issue on a TR 2990WX

Link to comment
  • 1 month later...

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

Edited by amapo
Posted solution
  • Like 2
Link to comment
  • 4 weeks later...

I've been off unraid for probably 18 months or so, but I've got a Threadripper 12 bay server that's just sitting in my office in pieces and I've got excess electricity from my solar array so I'm going to fire it up to mine some monero.

 

Debating a windows VM with nicehash or monero mining vs. this docker - can this docker still be used in 2023?   Looks like it's kinda abandoned.

 

I might just install portainer, but figured chucking in all my extra drives into unraid would be a bit easier.

Edited by Ystebad
Link to comment

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...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.