Jump to content

WIP Project: GPU OC tool which applies OC depending on running software (C#, WPF)

Started from this thread:

 

I'm using C# and WPF to create the interface, and NvAPIWrapper to interact with NVIDIA APIs: https://github.com/tylercamp/ezgpuctl

I've managed a basic MVP which can display GPU info and apply OCs with core offset, memory offset, and power target.

 

Mostly using this thread to share info about this project, though it's still not entirely functional yet (recent commit removes OC GUI as I reorganize UI).

 

Putting this thread up early in case someone wants to try their hand at adding support for AMD GPUs. Anyone interested can comment here, and should try getting readings and applying an OC using a local C# project before bringing anything into this. (I don't have abstractions yet to easily swap out the underlying GPU interface.) A C++ implementation works too, I can just write a C# wrapper for it.

 

Not looking for this to become an in-depth OC tool (ie, no frequency curves), and GPU monitoring is essentially just for the user to verify the current GPU state, so don't need to get in-depth with reporting/OC capabilities. This is partly to constrain design scope, partly because NvAPIWrapper doesn't seem to have all of the NVIDIA APIs needed for more advanced stuff.

 

For reference on what data to fetch, these are the current classes I have for managing GPU data: https://github.com/tylercamp/ezgpuctl/tree/main/GPUControl.Lib/GPU

 

Screenshots:

Spoiler

ezgpuctl-s1.png.6a27c40adca4ed52fe270123464a8eb6.png

 

Link to comment
Share on other sites

Link to post
Share on other sites

This looks like mostly a beginner forum, so probably not the best place to put this. Wanted some place to be able to post updates, get feedback, and potentially get some collaboration going. Mods can move as appropriate

Link to comment
Share on other sites

Link to post
Share on other sites

Spoiler

ezgpuctl-s2.png.9f5f1531332ecd17bc8b35b1adb02f56.png

 

Sick with the flu, but fortunately the brain-hurty tasks had already been done, so I was able to put together the remaining logic without much issue.

 

First working version, downloadable binaries available under github Releases from the OP.

Link to comment
Share on other sites

Link to post
Share on other sites

Added other conveniences like run on startup, minimize to system tray, and right-click options for changing OC mode from the system tray. I'm not good with UI design and wasn't sure how to arrange the different controls, so I just imported a docking library and let the user do it if they want.

 

Since this is the first functional version that's close to final changes, I added an About window for license references. It's finally at the point where I'm comfortable keeping a copy of this build on my desktop and can expect it to work properly.

 

Some other things I want to add:

- Temperature-based policies - built-in temperature limits bottom out at ~60C, but I want to be able to set lower limits than that

- Make it so that applied policies/profiles are displayed in bold again

- Proper error handling and runtime checks

- More info for GPU details

- Misc. UI cleanup / reorganization

 

A basic abstraction is in place for supporting different GPU types. I took a stab at adding support for AMD GPUs using ADLX and their auto-generated C# wrapper, but I couldn't get it to initialize despite using an AMD GPU with latest drivers. Looks like their OC API offers the same controls exposed in this app (plus the usual OC settings you'd expect, which NVIDIA threw out) so it should be straightforward to add once that init issue is sorted out.

 

Code uses "MVVM", as in, I wanted to use the MVVM pattern... but before long I just started resetting the whole view-model after each change due to issues with maintaining consistency between different model references. Widgets under "Controls" namespace generally uses MVVM without issue, everything else typically relies on full view-model reload. Ended up a bit spaghetti-ish as a result, but otherwise separation of concerns is OK and it's not too much of a chore to navigate the codebase. Now that all the main logic/concerns have been fleshed out, a rewrite/refactor could be done to resolve this. Not a priority at the moment, taking a break from this for a little while.

 

Binaries available on GitHub as mentioned before.

 

Spoiler

ezgpuctl-s3.thumb.png.d9e60034320e491f80ed92ec5ad21220.pngezgpuctl-s3-2.png.e8ab941613ae86676911c888d5a596d7.png

Link to comment
Share on other sites

Link to post
Share on other sites

  • 3 weeks later...

A bunch more updates, some for performance, some bugfixes, but most are just UI enhancements. Updated profile policies so you can now use regex and enable case-insensitive compare. Added support for setting specific fan speeds, though I can't really test it since I'm entirely water cooled. Seems like there's a memory leak somewhere, looking into that on the side.

 

On the bright side, AMD is back on the menu (check amd-support branch) (ty AMD for saying the ADLX DLL was shipped with drivers even though it actually wasn't)

 

Though now I've gotta' figure out how I'm going to encapsulate this ridiculously-annoying API/wrapper (but hey at least it's something). Still a ways away from supporting AMD GPUs in the app itself. I think this should work with older GPUs too, AMD says it's supposed to be "forward and backward compatible", but I don't have anything to test it with other than a 6700 XT.

 

adlx-woot.png

gpucontrol2.png

Link to comment
Share on other sites

Link to post
Share on other sites

Oh, it looks like AMD Adrenaline already has this feature (switching OCs depending on running software, ie "Game Profiles"), so I guess I can just ignore AMD GPUs then? Does anyone think there's a point to AMD support if this is already in their own stock software? Doesn't seem like there's any value-add if the stock software is already more feature-complete than whatever I'll be supporting in my app

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×