Author

Topic: [Tool] AMD-Compute-Switcher for switch automatically to compute mode (Read 17439 times)

newbie
Activity: 1
Merit: 0
Hey! I wanted to configure taskscheduler to automatically turn on the switcher when the computer is idle along with the miner, but I don’t understand what argument to add to confirm the launch of switching video cards and hidden launch without windows.
hero member
Activity: 2086
Merit: 562
I saw that i have a comment in this thread wayback 2018 in the high demand of mining, but i tried this one as of this moment with the latest radeon driver, seems it's good because the tools pop up and says that it was successful, but when i run the miner nothing changes, the 3 cards that i\ve been set to compute mode manually work well and increase the hashrate, while the others remain 10MH, I am using rx 570 4gb cards, does the dev of this tools have a latest update?

I've used this tool after every driver install/update and it's worked on each one I've tried including 20.4.2. Just gotta remember to reboot after you use it.

Thanks I though it was not useful for the latest driver, It bring headache the manual configuration, you can wait morethan 10 minutes in every each card that you manually set to compute in AMD software, I will try it again. Thanks for the heads up!
jr. member
Activity: 78
Merit: 3
I saw that i have a comment in this thread wayback 2018 in the high demand of mining, but i tried this one as of this moment with the latest radeon driver, seems it's good because the tools pop up and says that it was successful, but when i run the miner nothing changes, the 3 cards that i\ve been set to compute mode manually work well and increase the hashrate, while the others remain 10MH, I am using rx 570 4gb cards, does the dev of this tools have a latest update?

I've used this tool after every driver install/update and it's worked on each one I've tried including 20.4.2. Just gotta remember to reboot after you use it.
jr. member
Activity: 82
Merit: 3
You can set compute by pressing Y in Claymore and PhoenixMiner. Maybe other mining SW also has this ability. If not just download Claymore and use it to switch all GPUs to compute.
hero member
Activity: 2086
Merit: 562
I saw that i have a comment in this thread wayback 2018 in the high demand of mining, but i tried this one as of this moment with the latest radeon driver, seems it's good because the tools pop up and says that it was successful, but when i run the miner nothing changes, the 3 cards that i\ve been set to compute mode manually work well and increase the hashrate, while the others remain 10MH, I am using rx 570 4gb cards, does the dev of this tools have a latest update?
newbie
Activity: 45
Merit: 0
Is it possible to delete the AMD settings program if you use that?
(To avoid it going back for default settings)

If restarts from kernel power errors or overclocked failure right?

It was a good ideia, or if wattman can startup the profile we choose on restart like afterburner, right?

Im interested too Smiley

I used Revo uninstaller (free shareware)
to uninstall all the AMD software. (that includes the Branding thingy) and kept the drivers installed.
Alternatively you can manually install/upgrade/downgrade the drivers via devmgmt.msc (you can put it on your desktop, really useful to do so)

My rigs run a lot more stable, probably because less software conflicts, especially Wattman.
And, I noticed a tiny power draw drop at the wall even. Negligible for one rig. but If you run a small farm it might be worthit.

Hence I was looking for a tool like this to make sure I'm running compute mode Smiley
imo it's worth a try only installing the AMD drivers if you use things like Afterburner, overdriveNtool, etc. Or even simply having the miner control the fans.
newbie
Activity: 1
Merit: 0
All I just recently created a tool to do basically the same thing.  It can be found on GIT.

https://github.com/gr0d/AMD.Compute.Mode.Toggle/tree/master/AMD.Compute.Mode.Toggle/bin/Release

Some key features are

  • Run in list mode to determine all Radeon cards and whether or not compute mode is enabled/disabled
  • Enable/disable all Radeon cards at once
  • Enable/disable specific cards via index

Usage:

AMD.Compute.Mode.Toggle [/L] [/M:0/1] [/A:1,2,4,5] [/R]

/L      List all AMD Devices and its configuration
/M      Enable or Disable Compute Mode.  0 Disable, 1 Enable
/A      Specify devices to modify.  Devices mnust be separated by commas.
/R      Reboot device after change is  made, default is not to reboot.

Example: AMD.Compute.Mode.Toggle /L Lists all AMD devcies and their current compute mode setting.  /L Can only be used by itself.
Example: AMD.Compute.Mode.Toggle /M:0 - Disable compute mode for all AMD devices.  /M Can only be used with /A /R
Example: AMD.Compute.Mode.Toggle /M:1 - Enable compute mode for all AMD devices.  /M Can only be used with /A /R
Example: AMD.Compute.Mode.Toggle /M:0 /R - Disable compute mode for all AMD devices and reboot.  /M Can only be used with /A /R
Example: AMD.Compute.Mode.Toggle /M:1 /R - Enable compute mode for all AMD devices. and reboot. /M Can only be used with /A /R
Example: AMD.Compute.Mode.Toggle /M:1 /A:1,3,6,7 /R - Enable compute mode for AMD devices number 1, 3, 6, 7 and reboot.  /M Can only be used with /A /R
Example: AMD.Compute.Mode.Toggle /M:0 /A:1,3,6,7 /R - Disable compute mode for AMD devices number 1, 3, 6, 7 and reboot.  /M Can only be used with /A /R
full member
Activity: 137
Merit: 100
I wonder can you make one for disabling crossfire/ulps.

Here is an alternative for that:

https://gist.github.com/hobbsh/b3737dfa1515bfc3c8483c67f63a74ee

If you have, for example, 6 cards, edit .ps1 and add them in $cards = ("0000", "0001", "0002", "0003", "0004", "0005")
hero member
Activity: 848
Merit: 500
I wonder can you make one for disabling crossfire/ulps.
jr. member
Activity: 62
Merit: 3
Thank you for the tool. Saves hours of waiting. It was easy to see which card was not on compute by launching Phoenix miner and watching the output. But that AMD settings BS was sooooooo sloooow it drove me nuts.

hero member
Activity: 848
Merit: 500
How i didn't saw this erlier. I never install crappy wattman. Tnx!
full member
Activity: 219
Merit: 100
Hey I just wanted to say thanks! I've been trying to get compute working on something other than Blockchain drivers on my mixed 570/580 rig. The AMD drivers never gives an option to switch the 570's to compute and also it incorrectly displays them as 580's. Your tool lets me write compute values for all cards, however it doesn't actually switch the 570's to compute. But, after using your tool, the compute option becomes available within AMD driver settings, and it works! Just figured I'd leave that here in case someone has a similar situation to troubleshoot.
full member
Activity: 263
Merit: 131
Does this enable compute mode on windows 7? Because far as I know compute mode is only available on Windows 10.

Good question.  Anyone knows if it works on Windows 7 with adrenalin?


Because this question was two times not answered:
No.

It will (maybe) write your registry entries, but those will stay unused even after a reboot.
There is a driver for windows 7 I guess which will bring you more benefits on mining, but it is not official / stable.

Anyways. The update to Win10 is still free with a Win7 COA.
But dont go with a Win7Home to a Win10Home. Go with Pro, only. (many reasons ...)

The new Linux kernel is bringing some of the -windows benefits- (almost like Wattman) on mining.

Have fun and good mining.
newbie
Activity: 141
Merit: 0
Great tool, thank you.
newbie
Activity: 28
Merit: 0
Hello boys my rig a since 2 weeks problems.

It crashes after 2 days and then i have to cut the power off.

Problem was on 11.6 so i stepped down to 11.5 this helped me allot but now its also happening here on 11.5.

What do you think boys
hero member
Activity: 906
Merit: 507
Does the newest drivers give anymore of a hashrate than the blockchain beta drivers just wondering because when I installed them on one rig I turned on compute than I started mining and either my miner crashed or I had some issue so I ran DD reinstalled the beta is was fine again so I haven't bothered to try them on any other rig
legendary
Activity: 1726
Merit: 1018
I have no machines where this would be useful.  However it looks like everything is being done in the same area of the registry and people are asking for other options so here is an idea. 

set everything the way you want with the standard tools
launch regedit.exe
Go to  HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E968-E325-11CE-BFC1-08002BE10318}
Right click at that level and select 'Export' from the context menu
Save that somewhere

Now if you want to implement the changes you should be able to right click the .reg file you saved from the steps above and select 'Merge'

If you want to script it in a batch file you should be able to do it like this: regedit.exe /s "C:\Users\\Documents\.reg"

Someone else will have to test this though, as I say I have no machines where this would matter.
member
Activity: 161
Merit: 10
Please add support for parameters, something like "-compute" or "-on", so that I can make a .bat file to be executed on boot and make sure all cards are in compute mode (autonomous actions always help).
jr. member
Activity: 56
Merit: 1
Thanks for this! Works great for me on windows 10, 2x rigs with 8 and 9 cards each.
member
Activity: 108
Merit: 11
Does this enable compute mode on windows 7? Because far as I know compute mode is only available on Windows 10.


Good question.  Anyone knows if it works on Windows 7 with adrenalin?

I just tried it and it does nothing. It completes with "success" but Im guessing it doesnt turn on anything because windows 7 doesnt have those registry values.
newbie
Activity: 14
Merit: 0
Please add the crossfire automatic shut-off function.
sr. member
Activity: 784
Merit: 282
Thank you very much this is incredibly useful especially for people like me whose radeon settings takes so long to load.

Source code from 1.0.0:
-snip-

I'm particularly glad you posted the actual source code. Would it be possible for you to give us instructions on how to compile this ourselves?
hero member
Activity: 2086
Merit: 562
This tool is very usefull to me, before I setting up all my gpu one by one and a wasting of time. every gpu need to restart the radeon then open it again when you finish to set it up in compute mode, but this tool made the miners life very easy!!  Thanks dude for this tool!!  Wink  Wink  Wink
member
Activity: 273
Merit: 17
Does this enable compute mode on windows 7? Because far as I know compute mode is only available on Windows 10.


Good question.  Anyone knows if it works on Windows 7 with adrenalin?
newbie
Activity: 35
Merit: 0
This tool does NOT work correctly.Started to mine today again with Claymore.Some GPUs gave 19MH/s.Recheck compute mode with tool and start Claymore again --> Still some GPUs are giving 19MH!
Had to set all from Radeon settings and restart the whole computer.
legendary
Activity: 2366
Merit: 1405
This tool works great.
Merited.
hero member
Activity: 751
Merit: 517
Fail to plan, and you plan to fail.
Super tool, makes my job soo much easier. Repped/Merited.
member
Activity: 413
Merit: 17
Can you make an update that allows us to select what cards to switch to compute mode?

I would like to disable compute mode for gpu0 (internal gpu on cpu)

This setting has no effect on anything except RX cards and maybe Vega.
newbie
Activity: 312
Merit: 0
Can you make an update that allows us to select what cards to switch to compute mode?

I would like to disable compute mode for gpu0 (internal gpu on cpu)
newbie
Activity: 5
Merit: 0
Thank you for this.  I created this account specifically to post on one thing before this, so I don’t say much.  But I think the best thing we have going is community.  Yes, there a lot of dicks.  But, there a hundred more times as many people pushing this stuff forward and helping others.  Thanks again! 
fgm
newbie
Activity: 43
Merit: 0
I have 13 gpu, But it detects 14? From GPU 0000 to GPU 0013
It also detects the hidden devices ( leftover drivers ), you can check in device manager by going to view - show hidden devices.
member
Activity: 108
Merit: 11
Does this enable compute mode on windows 7? Because far as I know compute mode is only available on Windows 10.
member
Activity: 95
Merit: 11
Solid tool, appreciate the work! Radeon Settings app is so unbearably slow to cycle through switching cards one by one.

And with that said, I'd hate to ask, but anyway to implement a detection of IGPU? Feel like I'm gonna break something hitting "ok" with the IGPU listed as one of the cards.
newbie
Activity: 72
Merit: 0
very useful thanks
newbie
Activity: 312
Merit: 0
Maybe your onboard graphics?

Intel pentium with compute mode?Smiley
newbie
Activity: 182
Merit: 0
Maybe your onboard graphics?
newbie
Activity: 312
Merit: 0
I have 13 gpu, But it detects 14? From GPU 0000 to GPU 0013
newbie
Activity: 182
Merit: 0
It's useful if you don't use the blockchain drivers.
sr. member
Activity: 756
Merit: 250
what is this tool? i dont understand

i have blockchain driver and my amd rx works good
member
Activity: 182
Merit: 10
Thank you for this
full member
Activity: 126
Merit: 100
Thank you for this. My control center would not save settings even after a driver wipe/reinstall. This saved the day!
newbie
Activity: 182
Merit: 0
Why is this an .exe executable instead of a simple PowerShell, for example, script?  It's much easier to vet scripts than executables with no source.
Agreed
newbie
Activity: 296
Merit: 0
Is it possible to delete the AMD settings program if you use that?
(To avoid it going back for default settings)

If restarts from kernel power errors or overclocked failure right?

It was a good ideia, or if wattman can startup the profile we choose on restart like afterburner, right?

Im interested too Smiley
newbie
Activity: 182
Merit: 0
Is it possible to delete the AMD settings program if you use that?
(To avoid it going back for default settings)



EDIT : You can rename it, so it doesn't load on startup.
sr. member
Activity: 462
Merit: 258
Small Time Miner, Rig Builder, Crypto Trader
any possibility to allow the program to detect how many gpus the rig has? I noticed it just sets 11 or 12 gpus to compute or graphics mode without actually knowing how many gpus its actually setting
newbie
Activity: 4
Merit: 14
executables with no source.

Yea you are right. But when I started I wanted to create a much bigger software as it is now.
I planned some features for the future so this is not the final version  Cool

Source code from 1.0.0:
Code:
using Microsoft.Win32;
using System;
using System.Collections.Generic;
using System.Windows.Forms;

namespace AMD_Compute_Switcher
{
    static class Program
    {
        [STAThread]
        static void Main()
        {
            RegistryKey localMachineKey = Registry.LocalMachine;
            RegistryKey softwareKey = localMachineKey.OpenSubKey("SYSTEM\\CurrentControlSet\\Control\\Class\\{4d36e968-e325-11ce-bfc1-08002be10318}");
            var cardFolders = softwareKey.GetSubKeyNames();
            Dictionary results = new Dictionary();
            int notComputeMode = 0;
            int tmp;

            foreach (var cardFolder in cardFolders)
                if (int.TryParse(cardFolder, out tmp))
                {
                    RegistryKey cardRegistry = null;
                    try
                    {
                        cardRegistry = softwareKey.OpenSubKey(cardFolder);
                    }
                    catch (Exception) { }
                    if (cardRegistry != null)
                    {
                        var KMD_EnableInternalLargePage = cardRegistry.GetValue("KMD_EnableInternalLargePage");
                        if (KMD_EnableInternalLargePage == null || KMD_EnableInternalLargePage.ToString() != "2")
                        {
                            notComputeMode++;
                            results.Add(cardFolder, "Not in compute mode");
                        }
                        else
                        {
                            results.Add(cardFolder, "Compute mode");
                        }
                    }
                }

            var cardString = "All cards will be switched to " + (notComputeMode > 0 ? "compute" : "graphics") + " mode!\n";
            foreach (var result in results)
            {
                cardString += "\n" + result.Key + ": " + result.Value;
            }

            if (MessageBox.Show(cardString, "Do you want to switch?", MessageBoxButtons.OKCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1) == DialogResult.OK)
            {
                results = new Dictionary();

                foreach (var cardFolder in cardFolders)
                    if (int.TryParse(cardFolder, out tmp))
                    {
                        RegistryKey cardRegistry = null;
                        try
                        {
                            cardRegistry = softwareKey.OpenSubKey(cardFolder, true);
                        }
                        catch (Exception) { }
                        if (cardRegistry != null)
                        {
                            if (notComputeMode > 0)
                            {
                                /** Switch all to compute mode */
                                try { cardRegistry.SetValue("KMD_EnableInternalLargePage", "2", RegistryValueKind.DWord); results.Add(cardFolder, "Success"); }
                                catch(Exception ex) { results.Add(cardFolder, "Error: " + ex.Message); }
                            }
                            else
                            {
                                /** Switch all to graphics mode */
                                try { cardRegistry.DeleteValue("KMD_EnableInternalLargePage"); results.Add(cardFolder, "Success"); }
                                catch (Exception ex) { results.Add(cardFolder, "Error: " + ex.Message); }
                            }
                        }
                    }
               
                cardString = "Switched successfully to " + (notComputeMode > 0 ? "compute" : "graphics") + " mode!\n";
                foreach (var result in results)
                {
                    cardString += "\n" + result.Key + ": " + result.Value;
                }

                MessageBox.Show(cardString, "Switched successfully!", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
    }
}
newbie
Activity: 1
Merit: 0
Why is this an .exe executable instead of a simple PowerShell, for example, script?  It's much easier to vet scripts than executables with no source.

Joe
newbie
Activity: 4
Merit: 14
yeah I like to grab this as well but I don't wanna sign up just to download 1 file from a place ill prolly never use again

Sorry VirusTotal was only the document where you can see that there is no virus on it.


The forum here removed the link.
I added the mega.nz link now: https://mega.nz/#!Qgl3EYxJ!_7Aes-JHrnhGpIl2v_3EwG6E_jAsV_gjyj-Eg3IFGkY
sr. member
Activity: 462
Merit: 258
Small Time Miner, Rig Builder, Crypto Trader
yeah I like to grab this as well but I don't wanna sign up just to download 1 file from a place ill prolly never use again
newbie
Activity: 6
Merit: 0
Any chance you can put it out on Mega.nz or Google drive?  The VirusTotal link won't let you download.
newbie
Activity: 31
Merit: 0
AMD-Compute-Switcher helps you to easily switch between compute and graphics mode.
It loops all registry folders of your AMD software and detects if the card is in graphics or compute mode.
If one is not in compute mode it will try to switch all to compute mode and if all are in compute mode it allows you to go back to graphics mode.

Download: (VirusTotal)

Compatible with AMD Crimson software. (17.10.2 and higher because before there is no compute option or you can use blockchain driver instead)

Getting started:
  • Run AMD-Compute-Switcher.exe
  • Read the message, on top you see "switch to compute mode" or "switch to graphics mode". Press OK if you see "switch to compute mode. - this happens if one card is not in compute mode.
  • Reboot

Changelog:
  • 1.0.0: First release with simple switch

Special thanks to this post because I'm using this logic.
https://bitcointalksearch.org/topic/m.23637946

If you have any improvements you can post them here or send me a private message.

Thanks for the tools, will try it on my next build.
newbie
Activity: 4
Merit: 14
AMD-Compute-Switcher helps you to easily switch between compute and graphics mode.
It loops all registry folders of your AMD software and detects if the card is in graphics or compute mode.
If one is not in compute mode it will try to switch all to compute mode and if all are in compute mode it allows you to go back to graphics mode.

Download: https://mega.nz/#!Qgl3EYxJ!_7Aes-JHrnhGpIl2v_3EwG6E_jAsV_gjyj-Eg3IFGkY (VirusTotal)

Compatible with AMD Crimson software. (17.10.2 and higher because before there is no compute option or you can use blockchain driver instead)

Getting started:
  • Run AMD-Compute-Switcher.exe
  • Read the message, on top you see "switch to compute mode" or "switch to graphics mode". Press OK if you see "switch to compute mode. - this happens if one card is not in compute mode.
  • Reboot

Changelog:
  • 1.0.0: First release with simple switch

Special thanks to this post because I'm using this logic.
https://bitcointalksearch.org/topic/m.23637946

If you have any improvements you can post them here or send me a private message.
Jump to: