Skip to content

A C# implementation of the Ryzen Adjust API, using WinRing0 (Ols - OpenLibSys), in order to make SMU calls on Ryzen processors.

Notifications You must be signed in to change notification settings

GoelBiju/RyzenAdjustApi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

RyzenAdjustApi

A C# implementation of the API which allows access to modify SMU (System Management Unit) parameters for Ryzen processor CPUs and APUs.

The original C/C++ implementation can be found as RyzenAdj.

NOTE: This library is intended for 64-bit systems only.

Installation

The RyzenAdjustApi(.dll) class library built from this solution requires the use of the WinRing0 (Ols - OpenLibSys) class library and drivers.

The following files are present in the solution and copied across to the debug/release folders when building the RyzenAdjustApi solution:

  • WinRing0x64.dll
  • WinRing0x64.exp
  • WinRing0x64.lib
  • WinRing0x64.sys

NOTE: These files along with the RyzenAdjustApi.dll needs to be present in the same folder in order to use this library.

Usage

In order to use the library add a reference to the RyzenAdjustApi.dll in your project solution.

  1. Add a using statement for the RyzenAdjustApi.
using RyzenAdjustApi
  1. Create an AdjustApi object to make use of the API.
AdjustApi api = new AdjustApi()
  1. Get a ryzen_access object to use for each call to the API and ensure that you can use object by checking for the access.use boolean property.
ryzen_access access = api.GetRyzenAccess();
if (access.use)
{
    // The access object can be used, perform actions using the API...
} 
else 
{
    // Show error message...
}
  1. Make calls to change parameters using the api object and passing the ryzen_access object and call parameters.
// E.g. Set the STAPM limit to 25W (25000).
int value = 25000;
bool result = api.SetStapmLimit(access, value);

if (result)
    // Set successfully
else 
    // Error setting parameter.
  1. When you have finished with the api object, call the api.Cleanup() method; there is a finalizer/class deconstructor in the class to automatically cleanup when the garbage collector cleans up.
api.Cleanup();

NOTE: All parameters in the API can be found on the original repository.

Contributing

Any pull requests or issues relating to the project is welcomed.

Authors and acknowledgment

About

A C# implementation of the Ryzen Adjust API, using WinRing0 (Ols - OpenLibSys), in order to make SMU calls on Ryzen processors.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages