Failed to apply msr mod hashrate will be low

Original setup was fine and everything worked. Then ran into some issues: No Sound (was testing with snes) 2. No Sound in specific emulators (megadrive/gameboy/nintendo, snes worked per step 1) Delete retroarch.cfg from each emulator under /opt/retropie/configs/<emulator>/ <–it’ll regenerate 3. Backspace doesn’t work as hotkey any more Removing the exit_emulator_btn from /opt/retropie/configs/all/retroarch.cfg 4. 2 Player […]


Go to github, upper right dropdown -> settings -> developer settings -> personal access tokens. make a new token, which you use as your “password” in jenkins. In jenkins, “manage jenkins” -> (scroll down) manage credentials. Create “username with password”. For username use your github username. Password is token above.


run cmd as administrator. then run xmrig, e.g: cd %~dp0xmrig.exe -o node.xmr.to:18081 -a rx/0 -u 477PSP8j5WL3vek3fosm1BYCFG7jSHWgZNPUdS9ushYy8zpnkrPWSTt6TEZw9wLZhE9oVyS2uZtPpYyKdMLnPrm835bqXUS –daemon –cudadaemon -c config.jsonpause


Prebuilt xmrig requires 1% donation. To get rid of this: git clone xmrig’s repo. Change src/donation.h to: constexpr const int kDefaultDonateLevel = 0;constexpr const int kMinimumDonateLevel = 0; Now need to build it. Follow instructions here: https://xmrig.com/docs/miner/build/windows But customs stuff I did: Create folder c:\xmrig-deps Download the most recent version of prebuilt dependencies  by using the green Code button and Download […]


DISABLE_UNTRACKED_FILES_DIRTY=”true” in .zshrc


This is useful in case you often use mac terminal with different (color) profiles, e.g. one for ssh to another machine, one for local. with normal Terminal on mac, choose profile, mess with colors or what not. In menu: Shell -> Export Settings. This saves a .terminal file for you to execute Since mac’s dock […]


/etc/dhcpcd.conf interface eth0static ip_address=192.168.4.57/24static domain_name_servers=192.168.4.57 8.8.8.8 interface wlan0static ip_address=192.168.4.56/24static domain_name_servers=192.168.4.56 8.8.8.8 This will also set /etc/resolv.conf for dns servers


/etc/default/keyboard XKBMODEL=”pc105″XKBLAYOUT=”us”XKBVARIANT=”altgr-intl”XKBOPTIONS=”termina


So after sorting out the issue with “alternate roof” from my previous review, the install continued. At this point, the original roof was off. And since work cannot be done over the labor day weekend, my roof was bare for several days, until Tuesday when the crew came back to continue work. So far, these […]


Telsa solar roof install. This is classic story about redemption. About how Tesla can thoroughly disappoint its customers. And about why I’m nevertheless very impressed despite the thorough disappointment. So since signing up for Tesla Solar roof back in May, I had 0 communication from Tesla for the next 3 months. There was one call […]


  1. XMRig
  2. RandomX Optimization Guide
  3. MSR

Hardware prefetchers is a fundamental performance issue, RandomX accesses memory randomly, so prefetchers just don't work. All places where prefetching can help already have explicit prefetch instructions in the code. Sometimes prefetchers can be disabled in BIOS, for Intel it usually Hardware Prefetcher and Adjacent Cache Line Prefetch, but some prefetchers not possible disable even in BIOS.

Solution is configure prefetchers by using MSR registers from OS level.
If you use recent XMRig with root privileges (Linux) or admin privileges (Windows) the miner configure all MSR registers automatically.
If all good, the miner got all required privileges and your CPU supported you will saw line like below in miner log.

 msr  register values for "intel" preset has been set successfully (16 ms)

With some hardware/software configurations is also need to disable Secure Boot to make MSR mod works, please check issue #1891 on github.

Supported CPUs:

  • Intel (Nehalem, Westmere, Sandy Bridge, Ivy Bridge, Haswell, Broadwell and newer)
  • Ryzen (All Zen based CPUs: Ryzen, Threadripper, EPYC)

XMRig revert initial MSR values on exit by default, anyway changes is not persistent, computer reboot always reset any changes.

Reddit discussions

  • Crazy intel randomx optimization - intel i7-7700k single thread 537 h/s to 687 h/s , ~30% boost
  • 9526 h/s on Ryzen 7 3700X (XMRig 5.2.0 + 1GB pages + MSR mod on Ubuntu)
  • RandomX boost guide for Ryzen on Windows (9100 h/s -> 9670 h/s on my Ryzen 3700X)

Configuration

For configuration 2 options available in "randomx" object: "rdmsr" and "wrmsr"

rdmsr boolean

Use "rdmsr": false to disable reverting initial MSR values on exit.

wrmsr boolean

"wrmsr": true (by default) enable MSR feature or "wrmsr": false to disable MSR feature.

wrmsr number

"wrmsr": 15 Only available for Intel. Default value 15 for Intel good in general, but may not best, please check issue #1433 on github for details.

wrmsr array

Very advanced format, for precise configuration with caution. Preset values shipped with the miner:

  • "wrmsr": ["0x1a4:0xf"] Intel preset.
  • "wrmsr": ["0xc0011020:0x4480000000000", "0xc0011021:0x1c000200000040:0xffffffffffffffdf", "0xc0011022:0xc000000401500000", "0xc001102b:0x2000cc14"] AMD Ryzen (Zen3).
  • "wrmsr": ["0xc0011020:0x0", "0xc0011021:0x40:0xffffffffffffffdf", "0xc0011022:0x1510000", "0xc001102b:0x2000cc16"] AMD Ryzen (Zen1/Zen2).
  • "wrmsr": ["0xc0011020:0x0", "0xc0011021:0x60", "0xc0011022:0x510000", "0xc001102b:0x1808cc16"] Special custom value for first generation Zen CPUs (with known hardware bug) to disable opcache and enable MSR mod.

Manual OS configuration

Manual configuration on Windows is a very complicated process and is not recommended, please check out the original post on Reddit for details.

XMRig use signed WinRing0 driver (© 2007-2009 OpenLibSys.org) to access to MSR registers, it make automatic configuration very simple.

Easiest way to manual configuration is go to miner source directory and run sudo ./scripts/randomx_boost.sh script source .