tutulino / Megaminer

Multipool and multialgo windows miner
GNU General Public License v3.0
78 stars 69 forks source link

Not able to prelauch Afterburner preset before miner start. Bad formed json error. #341

Closed or1g1na1 closed 6 years ago

or1g1na1 commented 6 years ago

Hi Tutulino,

I spoke to you on the forum regarding trying to undervolt certain miners with afterburner via prelaunch command. Getting a bad formed json error.

It's not letting me attache a json file but i will paste the contents below:

{ "Path" : ".\Bin\NVIDIA-TPruvot\ccminer-x64.exe", "ExtractionPath" : ".\Bin\NVIDIA-TPruvot\", "Uri" : "https://github.com/tpruvot/ccminer/releases/download/2.2.4-tpruvot/ccminer-x64-2.2.4-cuda9.7z", "Types" : ["NVIDIA"], "Arguments" : "-o #PROTOCOL#://#SERVER#:#PORT# -u #LOGIN# -p #PASSWORD# -R 10 -r 4 -b #APIPORT# -d #DEVICES# #ALGORITHMPARAMETERS# ", "API" : "Ccminer", "Fee" : 0, "Dualmining":false, "APIPort" : 4068, "PrelaunchCommand":"C:\Program Files (x86)\MSI Afterburner\MSIAfterburner.exe -profile3", "Algorithms": [ {"skunk":"-a skunk"}, {"jha":"-a jha"}, {"Tribus":"-a tribus"}, {"lyra2z" : "-a lyra2z" }, {"lyra2v2" : "-a lyra2v2" }, {"whirpool":"-a whirl"}, {"phi":"-a phi"}, {"polytimos": "-a polytimos"}, {"keccakc":"-a keccakc"}, {"keccak":"-a keccakc"}

          ]

}

eMTee72 commented 6 years ago

Have you tried running MM with administrator permissions? Afterburner needs administrator credentials...

or1g1na1 commented 6 years ago

Get an error when launching as admin with or without the prelaunch command:

mm
eMTee72 commented 6 years ago

add this as the first line of the BAT-file: cd /d %~dp0

eMTee72 commented 6 years ago

@tutulino : as you now recommend running as an Administrator (to be able to run with pultiple powerprofiles), would you mind adding 'cd /d %~dp0' to START.BAT. That will force the Administrator-context to run from the directory where the MM START.BAT file is located.

or1g1na1 commented 6 years ago

Still getting error when running as admin

mm2

I changed the bat file:

cd /d %~dp0 REM --This is an example of how launch Megaminer without prompt for automatic coin selection pools

setx GPU_FORCE_64BIT_PTR 1 setx GPU_MAX_HEAP_SIZE 100 setx GPU_USE_SYNC_OBJECTS 1 setx GPU_MAX_ALLOC_PERCENT 100 setx GPU_SINGLE_ALLOC_PERCENT 100

:LOOP del "Stats*_Profit.txt"

powershell -version 5.0 -noexit -executionpolicy bypass -command "&.\core.ps1 -MiningMode AUTOMATIC -PoolsName MiningPoolHub,AHASHPOOL,NICEHASH,Zpool,Zergpool GOTO LOOP

tutulino commented 6 years ago

I see where problem is....

Inside a json file, all \ symbol must be double \

{ "Path" : ".\Bin\NVIDIA-TPruvot\ccminer-x64.exe", "ExtractionPath" : ".\Bin\NVIDIA-TPruvot\", "Uri" : "https://github.com/tpruvot/ccminer/releases/download/2.2.4-tpruvot/ccminer-x64-2.2.4-cuda9.7z", "Types" : ["NVIDIA"], "Arguments" : "-o #PROTOCOL#://#SERVER#:#PORT# -u #LOGIN# -p #PASSWORD# -R 10 -r 4 -b #APIPORT# -d #DEVICES# #ALGORITHMPARAMETERS# ", "API" : "Ccminer", "Fee" : 0, "Dualmining":false, "APIPort" : 4068, "PrelaunchCommand":"C:\Program Files (x86)\MSI Afterburner\MSIAfterburner.exe -profile3", "Algorithms": [ {"skunk":"-a skunk"}, {"jha":"-a jha"}, {"Tribus":"-a tribus"}, {"lyra2z" : "-a lyra2z" }, {"lyra2v2" : "-a lyra2v2" }, {"whirpool":"-a whirl"}, {"phi":"-a phi"}, {"polytimos": "-a polytimos"}, {"keccakc":"-a keccakc"}, {"keccak":"-a keccak"}

          ]
}
or1g1na1 commented 6 years ago

I was able to launch afterburner with this command: "PrelaunchCommand":"C:\Program Files (x86)\MSI Afterburner\MSIAfterburner.exe",

Was also able to bypass the windows promps by running bat file as admin.

However cannot find a way to select profile. "PrelaunchCommand":"C:\Program Files (x86)\MSI Afterburner\MSIAfterburner.exe -Profile3", above gives error that file not found. When I tried to write as suggested on this post - https://bitcointalk.org/index.php?topic=2105295.0 it gave me bad formed json: "PrelaunchCommand":"C:\Program Files (x86)\MSI Afterburner\MSIAfterburner.exe" -Profile3,

Also, is there a program that works better with the prelaunch command than afterburner? I'm not married to it and only use to undervolt.

or1g1na1 commented 6 years ago

I used 2\ in all the examples above but formatting stripped it.