Skip to content

Instantly share code, notes, and snippets.

@szymonrucinski
Last active March 3, 2021 22:05
Show Gist options
  • Save szymonrucinski/534030b0bd5112319f460bf4e2c89d3f to your computer and use it in GitHub Desktop.
Save szymonrucinski/534030b0bd5112319f460bf4e2c89d3f to your computer and use it in GitHub Desktop.
Fix for Lolminer halving hashrate while mining with Nvidia gtx 1660 series GPUS.
@ECHO OFF
:: Check WMIC is available
WMIC.EXE Alias /? >NUL 2>&1 || GOTO s_error
setlocal enableDelayedExpansion
Rem #################################
Rem ## Begin of user-editable part ##
Rem #################################
set "POOL=eu1.ethermine.org:4444"
set "WALLET=address.minerName"
set "NUMBER_OF_CARDS=2"
rem ## NO TRAILING SLASHES ON PATHS!! ##
set "MINER_PATH=C:\miner"
set "LOGFILEDIR=C:\miner\logs"
Rem #################################
Rem ## End of user-editable part ##
Rem #################################
REM ## DO NOT CHANGE ##
set "MINERNUM=0"
REM ## DO NOT CHANGE ##
cls
echo Starting ETH miners, press CTRL-C twice to cancel!
timeout 5
:: Use WMIC to retrieve date and time
FOR /F "skip=1 tokens=1-6" %%G IN ('WMIC Path Win32_LocalTime Get Day^,Hour^,Minute^,Month^,Second^,Year /Format:table') DO (
IF "%%~L"=="" goto s_done
Set _yyyy=%%L
Set _mm=00%%J
Set _dd=00%%G
Set _hour=00%%H
SET _minute=00%%I
SET _second=00%%K
)
:s_done
:: Pad digits with leading zeros
Set _mm=%_mm:~-2%
Set _dd=%_dd:~-2%
Set _hour=%_hour:~-2%
Set _minute=%_minute:~-2%
Set _second=%_second:~-2%
Set logtimestamp=%_yyyy%-%_mm%-%_dd%_%_hour%_%_minute%_%_second%
goto make_logfile
:s_error
echo WMIC is not available, using default log filename
Set logtimestamp=_
:make_logfile
set FILENAME=%LOGFILEDIR%\lolminer_%logtimestamp%_dev%MINERNUM%.txt
echo Logging device %MINERNUM% to Filename: *%FILENAME%*
echo.
start !MINER_PATH!\lolMiner.exe --algo ETHASH --pool !POOL! --user !WALLET!%MINERNUM% --log --logfile %FILENAME% --devices %MINERNUM%
echo.
set /a MINERNUM += 1
if %MINERNUM%==%NUMBER_OF_CARDS% goto all_done
goto make_logfile
:all_done
echo all done!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment