xmrig-nvidia
xmrig-nvidia copied to clipboard
Not colored output

Launch script:
@echo off
xmrig-nvidia.exe -l cuda.log --donate-level 0 --cuda-bfactor 12 --cuda-bsleep 100 -o sg.minexmr.com:80 -u S340 -p x -k
pause
@xorz57 unlikely, we might have to wait 10 years to get this Windows Terminal covering lots of people. Simply calling them to download may work if we are willing to spend 1-2min, but there are definitely people who don't 🤷♂
I find that if I edit the running config file and switch color back on then it reloads on the fly and HAS COLOR JUST FINE
It will always shut it back off at launch, annoying.
Proof (from cpu miner but same deal):

^^^ This is on bog standard Win7 cmd.exe shell not powerjunk or any dumb things
Oh and I guess to the OP, use a config file not a billion args in a shell script, and you can tweak the color back on too. It has to be config file or the trick doesn't work (obviously, you can't edit and reload a commandline)
If this is true, this could be a bug.
I've patched this issue and it seems to work fine
diff --git a/src/common/log/ConsoleLog.cpp b/src/common/log/ConsoleLog.cpp
index b10812a..5e243bf 100644
--- a/src/common/log/ConsoleLog.cpp
+++ b/src/common/log/ConsoleLog.cpp
@@ -44,10 +44,14 @@ ConsoleLog::ConsoleLog(xmrig::Controller *controller) :
m_stream(nullptr),
m_controller(controller)
{
+# ifdef WIN32
+ uv_tty_init(uv_default_loop(), &m_tty, 1, 0);
+# else
if (uv_tty_init(uv_default_loop(), &m_tty, 1, 0) < 0) {
Log::colors = false;
return;
}
+# endif
uv_tty_set_mode(&m_tty, UV_TTY_MODE_NORMAL);
m_uvBuf.base = m_buf;
Basically, Windows libuv must be returning some weird negative number even though it worked, so skip the check on Windows. Examples of using uv_tty_init() on Windows elsewhere on the Internet never check the return value, so it must be cool not to?
This avoids the colors being shut off due to non-error errorcode being returned.
Similar patch to the other xmrig codebases but in different files...
PR #283 and PR #284
similar upcoming for xmrig/xmrig-amd
Someone please test on Win10 and/or with PowerShell but I think it works everywhere the same.
I ain't mining anymore but I will reopen this so more can test for ya