From 59313d9cc39e233196167f4a5d86460c9a9d4d27 Mon Sep 17 00:00:00 2001 From: SChernykh Date: Fri, 26 Jun 2020 19:54:06 +0200 Subject: [PATCH] Print error message when MSR mod fails Make sure user knows that hashrate is worse than it could be. --- src/crypto/rx/Rx_linux.cpp | 3 +++ src/crypto/rx/Rx_win.cpp | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/crypto/rx/Rx_linux.cpp b/src/crypto/rx/Rx_linux.cpp index f3f9df16..c919109a 100644 --- a/src/crypto/rx/Rx_linux.cpp +++ b/src/crypto/rx/Rx_linux.cpp @@ -228,6 +228,9 @@ void xmrig::Rx::msrInit(const RxConfig &config) if (wrmsr(preset, config.rdmsr())) { LOG_NOTICE(CLEAR "%s" GREEN_BOLD_S "register values for \"%s\" preset has been set successfully" BLACK_BOLD(" (%" PRIu64 " ms)"), tag, config.msrPresetName(), Chrono::steadyMSecs() - ts); } + else { + LOG_ERR(CLEAR "%s" RED_BOLD_S "FAILED TO APPLY MSR MOD, HASHRATE WILL BE LOW", tag); + } } diff --git a/src/crypto/rx/Rx_win.cpp b/src/crypto/rx/Rx_win.cpp index 7f914b48..dc8a36fb 100644 --- a/src/crypto/rx/Rx_win.cpp +++ b/src/crypto/rx/Rx_win.cpp @@ -361,6 +361,9 @@ void xmrig::Rx::msrInit(const RxConfig &config) if (wrmsr(preset, config.rdmsr())) { LOG_NOTICE(CLEAR "%s" GREEN_BOLD_S "register values for \"%s\" preset has been set successfully" BLACK_BOLD(" (%" PRIu64 " ms)"), tag, config.msrPresetName(), Chrono::steadyMSecs() - ts); } + else { + LOG_ERR(CLEAR "%s" RED_BOLD_S "FAILED TO APPLY MSR MOD, HASHRATE WILL BE LOW", tag); + } }