So.. to sum it up, in order to keep the rig running all the time, after every restart and so on..
First, this is how my Cast XMR folder looks like, with Cast XMR, devcon and OverdriveNTool inside:
https://s18.postimg.org/d456tnk7d/Capture.jpgBelow is the bat file content (Mine.bat, which calls itself when the timer expires). I start numbering the Vegas with r1 and p1 to work with OverdriveNTool because I use the Intel iGPU. If you don't use an iGPU they should be numbered starting from r0 and p0.
cd
devcon.exe disable "PCI\VEN_1002&DEV_687F"
timeout /t 5
devcon.exe enable "PCI\VEN_1002&DEV_687F"
timeout /t 5
OverdriveNTool.exe -r1 -r2 -r3 -r4 -r5 -r6 -p1Vega56 -p2Vega56 -p3Vega56 -p4Vega56 -p5Vega56 -p6Vega56
timeout /t 1
cd
@echo off
echo -------------------------------------------------------------------
echo Restarts the miner every 40 minutes //you can set it to your own liking
echo -------------------------------------------------------------------
echo:
set executable=cast_xmr-vega.exe
set commandline= -G 0,1,2,3,4,5 -S xmr-eu1.nanopool.org:14444 -u YourWalletAddress.RigNameOfYourChoice %*
set runforseconds=2400
set restartinseconds=2
set /a counter=0
timeout 2
:start
start "cast_xmr-vega" %executable% %commandline%
echo:
echo The program is going to run for %runforseconds% seconds
timeout %runforseconds%
taskkill /f /im %executable%
cd
Mine.bat
echo:
echo Restarting the app in %restartinseconds% seconds (%counter%)
timeout %restartinseconds%
set /a counter+=1
echo:
echo:
goto start
If you want your rig running ALL the time without you having to do anything even if you restart Windows or the computer powers off, you can call your own bat when Windows starts and you can automate the login process in Windows, following these steps:
Step 1: Configure BIOS Settings to power on the computer automatically if for whatever reason power is lostBefore we even get to Windows, make sure your mining computer’s BIOS settings are in order. Power on your computer, and press the “delete” key a few times immediately after power on. You should end up in the BIOS configuration area. Do the following, then save & exit:
Change power options so that the computer automatically turns itself on whenever power is restored. The reason for this is two-fold: first, it’ll make sure that your miner automatically starts up after a power outage. Second, it makes powering the computer on much easier if you don’t happen to have a power switch connected to the motherboard.
Disable all components that you don’t plan to use. This might save a little bit of power, and since your miner will likely be running 24/7, it’ll add up. For me, that meant disabling onboard audio, the USB 3.0 ports, one of the SATA controllers, the Firewire port, and the serial port.
If you’re running a lot of GPUs (4+), additional tweaks might be necessary to ensure that they’re all recognized by the OS. Exact tweaks vary by motherboard, but setting the PCIe speed to Gen1 is usually a good place to start. No need to change anything now, but make a mental note that you may need to come back and play around a bit if all of your GPUs don’t show up in the OS later.
Step 2: Configure automatic loginIf you’re building a dedicated mining rig, then you probably want your mining rig to boot up and start mining automatically, without any user intervention. We’ll need to enable auto-login for that to be possible.
Right-click on the Start Menu and select “Run”. Type “netplwiz” (without the quotes) at the prompt, and click “ok”.
Uncheck the box that says “Users must enter a user name and password to use this computer”.
Click “Apply”. You’ll be prompted to enter your password to confirm the change.
Step 3: Configure your miner to start automaticallyWe want our rig to automatically start mining whenever it’s powered on or rebooted. That way, we keep mining losses to a minimum whenever a power outage occurs, and we don’t have to worry about manually starting it back up in other situations.
Open Windows Explorer and navigate to the folder where you created “mine.bat” in the previous step.
Right-click on your mine.bat file, and pick “Copy”.
Now, navigate to %AppData%\Microsoft\Windows\Start Menu\Programs\Startup (should be something like C:\Users\[YOUR WINDOWS USERNAME]\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup).
Right-click anywhere on the empty background of the Startup folder and select “Paste shortcut”.
You should see a shortcut to your mine.bat file appear in the startup folder. Windows should automatically execute it upon bootup.
Note: This simple methods don't deal with hash rate drops you can experience when switching the VGA output on your iGPU and so on, there is the JJ script for that, but I don't experience that. This mostly works for rigs running 24/7 at home or remotely via Chrome Remote Desktop.
thank you for the tip. with this setting helps my vega rig run more stable without loss of hash rate. it helps also reduce the possibility of sudden freeze, that I think caused by HBM high temps/errors.
well, I would like to share some of my discoveries after some sleepless nights
over getting things stable --in addition to setting up the Vega 56 rig with 6 cards, I have a desktop computer with a single RX 570 and the program never failed, so overall Cast XMR tends to run well, I guess it depends on several factors.
STEP BY STEP GUIDE TO SET UP YOUR VEGA CARDS TO START MINING AT HIGH SPEED AND LOW POWER CONSUMPTIONSo I finally managed to keep everything stable and these are my settings and bats. First of all, this is how the folder with the tools to start mining looks like:
https://s31.postimg.org/cwmzlv31n/Capture.jpgImho, it is a good idea to keep all the software you need in the same folder, to make things easier for you.
Note that now I have 2 bats, one called
Mine.bat which
only runs once at Windows startup.. and it disables then enables the Vega cards, AND finally it calls
Mine2.bat (this one runs in an infinite loop). These are the contents of Mine.bat:
cd
devcon.exe disable "PCI\VEN_1002&DEV_687F"
timeout /t 5
devcon.exe enable "PCI\VEN_1002&DEV_687F"
timeout /t 5
OverdriveNTool.exe -r1 -r2 -r3 -r4 -r5 -r6 -p1Vega56 -p2Vega56 -p3Vega56 -p4Vega56 -p5Vega56 -p6Vega56
timeout /t 1
cd
Mine2.batNote1: the command line starts numbering the Vegas with r1 and p1 to work with OverdriveNTool because I use the Intel iGPU as the main GPU. If you don't use an iGPU they should be numbered starting from r0 and p0.
Note2: You shouldn't need to run devcon.exe more than once after you start the OS!! That's because once it disables and then re-enables the Vega cards they should never go below 1900Hs, except on very rare occasions where one of them can drop to 1700 something but in the next hash, it is back into the 1900s. However it might be useful to use that batch file again when you switch video output ports -say you use a HDMI headless ghost and you need to use an old VGA monitor with your rig, so you unplug the HDMI ghost and plug the monitor, that's normal and always causes a hash rate drop and the average hashrate drops from 1900+ to 1700 something for every card.
Note3: To keep everything automated with devcon.exe and any other mining program at startup so no program prompts you to let them run as an administrator, press the Windows key on the keyboard and search for
user -or something similar- thus the
Change User Account Control settings program appears, then just launch it and change the slider to
Never notify.
IMPORTANT!!: OverdriveNTool.exe looks into a file called
OverdriveNTool.ini for the parameters. These are my settings (I called the profile just like that, Vega56 but that parameter can be changed, and the OverdriveNTool command line needs to reflect that name (for Vega 64 owners, I have no experience with those, so the settings might differ):
[Profile_0]
Name=Vega56
GPU_P0=852;900
GPU_P1=991;900
GPU_P2=1084;900
GPU_P3=1138;900
GPU_P4=1150;900
GPU_P5=1202;900
GPU_P6=1212;905
GPU_P7=1407;935
Mem_P0=167;900
Mem_P1=500;900
Mem_P2=800;900
Mem_P3=935;900
FINAL NOTE: Where it says 935..., that's an important setting for stability. Vanilla Vega 56 cards can start complaining with any value above that, and this can cause random hangs in Cast XMR or devcon.exe (but you shouldn't need to use devcon.exe more than once, at startup, or in special situations), and those random hangs can mean quite a few minutes without mining til the corresponding bat file kills and restarts Cast XMR..., and that affects productivity a lot.
This amazing Vega mining guide I used to learn and helped me immensely when I started, which you can find here,
http://vega.miningguides.com/ uses 950 as a value instead of 935. Don't! It works, it can go for hours or days without issue, but in my personal experience anything above 935MHz can be problematic and it ends up manifesting.
Then I have another one called Mine2.bat, which is called by Mine.bat after disabling and enabling the cards with devcon.exe to keep them mining at 1900Hs. These are the contents of the batch file (infinite thanks to
FgTeamBR who gave me the basis for this!!):
timeout /t 1
OverdriveNTool.exe -r1 -r2 -r3 -r4 -r5 -r6 -p1Vega56 -p2Vega56 -p3Vega56 -p4Vega56 -p5Vega56 -p6Vega56
@echo off
echo -------------------------------------------------------------------
echo Restarts the miner every 30 minutes //you can set it to your own liking, of course
echo -------------------------------------------------------------------
echo:
set executable=cast_xmr-vega.exe
set commandline= -G 0,1,2,3,4,5 -S xmr-eu1.nanopool.org:14444 -u YourWalletAddress.RigNameOfYourChoice %*
set runforseconds=1800
set restartinseconds=2
set /a counter=0
timeout 2
:start
start "cast_xmr-vega" %executable% %commandline%
echo:
echo The program is going to run for %runforseconds% seconds
timeout %runforseconds%
taskkill /f /im %executable%
cd
Mine2.batThis one ends up calling itself in an infinite loop, which is what we want.
VERY IMPORTANT!!:
Note the OverdriveNTool.exe line at the very start of the batch file. I added this file after having issues and my own findings while running the cards for hours without apparent, superficial issues.
I repeat that you DO NOT need to call devcon.exe every time you restart Cast XMR, this reduces the stress on the cards plus you don't lose 20 seconds of mining while the cards are disabled and re-enabled.
HOWEVER, it is important that you refresh the OverdriveNTool settings in the cards from time to time, plus you restart Cast XMR,
the entire process doesnt take up more than 3 seconds, and it's very convenient.
From personal experience, I have been running the Vegas for hours without an issue but for no apparent reason, I noticed that one of them was running at like 83ºC -had to use GPU-Z to check that- and
it was as if it FORGOT their settings and aside from running hot, the fan speed dropped to 1500rpm for whatever mysterious reason, while the other cards kept their fans spinning at 3000+ rpm, the intended speed.
Plus, one of the cards permanently dropped the hashrate to 1700H/s, also for no apparent reason, so it seems like sometimes the cards can't recall their intended settings. After restarting their settings with OverdriveNTool, they go back to normal.
The temperature thing is very dangerous, it can significantly reduce your graphics card life for obvious reasons.
Finally, also from personal experience I'd wholeheartedly recommend
Remote Chrome Desktop to use as a remote manager for your rig. It is easy to use and set up, just don't forget to have a mouse plugged into the physical machine so the mouse pointer is always visible and that's it. An excellent program!
Some additional tips to keep your rig running 24/7 with basically no intervention of yours -remember to run your .bat file with devcon.exe every time Windows starts and that's it.
If you want your rig running ALL the time without you having to do anything even if you restart Windows or the computer powers off, you can call your own bat when Windows starts and you can automate the login process in Windows, following these steps:
Step 1: Configure BIOS Settings to power on the computer automatically if for whatever reason power is lostBefore we even get to Windows, make sure your mining computer’s BIOS settings are in order. Power on your computer, and press the “delete” key a few times immediately after power on. You should end up in the BIOS configuration area. Do the following, then save & exit:
Change power options so that the computer automatically turns itself on whenever power is restored. The reason for this is two-fold: first, it’ll make sure that your miner automatically starts up after a power outage. Second, it makes powering the computer on much easier if you don’t happen to have a power switch connected to the motherboard.
Disable all components that you don’t plan to use. This might save a little bit of power, and since your miner will likely be running 24/7, it’ll add up. For me, that meant disabling onboard audio, the USB 3.0 ports, one of the SATA controllers, the Firewire port, and the serial port.
If you’re running a lot of GPUs (4+), additional tweaks might be necessary to ensure that they’re all recognized by the OS. Exact tweaks vary by motherboard, but setting the PCIe speed to Gen1 is usually a good place to start. No need to change anything now, but make a mental note that you may need to come back and play around a bit if all of your GPUs don’t show up in the OS later.
Step 2: Configure automatic loginIf you’re building a dedicated mining rig, then you probably want your mining rig to boot up and start mining automatically, without any user intervention. We’ll need to enable auto-login for that to be possible.
Right-click on the Start Menu and select “Run”. Type “netplwiz” (without the quotes) at the prompt, and click “ok”.
Uncheck the box that says “Users must enter a user name and password to use this computer”.
Click “Apply”. You’ll be prompted to enter your password to confirm the change.
Step 3: Configure your miner to start automaticallyWe want our rig to automatically start mining whenever it’s powered on or rebooted. That way, we keep mining losses to a minimum whenever a power outage occurs, and we don’t have to worry about manually starting it back up in other situations.
Open Windows Explorer and navigate to the folder where you created “mine.bat” in the previous step.
Right-click on your mine.bat file, and pick “Copy”.
Now, navigate to %AppData%\Microsoft\Windows\Start Menu\Programs\Startup (should be something like C:\Users\[YOUR WINDOWS USERNAME]\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup).
Right-click anywhere on the empty background of the Startup folder and select “Paste shortcut”.
You should see a shortcut to your mine.bat file appear in the startup folder. Windows should automatically execute it upon bootup.
ConclusionPersonal experiences might differ, but with those settings a Vega 56 rig could run 24/7 without hashrate drops and very stable, which is the point, at an average of 1940H/s or so.