Git Product home page Git Product logo

Comments (8)

MaynardMiner avatar MaynardMiner commented on May 27, 2024 2

Will get back to you.

I need to hook up the dev rig with RTX cards back into windows, and run the debug again.

from nvapiwrapper.

falahati avatar falahati commented on May 27, 2024

Based on this comment that you sent to me on 24 of July last year, GPUApi.GetCoolerSettings didn't work with RTX cards. The right way to get cooler information without relying on multiple fallback methods is to use the high-level API as follow:

        var GPUs = PhysicalGPU.GetPhysicalGPUs();
        var MyGPUIndex = 1;
        var coolers = GPUs[MyGPUIndex].CoolerInformation.Coolers.ToArray();
        for (int j = 0; j < coolers.Length; j++)
        {
            // Info available via `coolers[j]` properties
            // Set speed using this:
            // GPUs[MyGPUIndex].CoolerInformation.SetCoolerSettings(coolers[j].CoolerId, 100);
        }

Does this work for you with the high-level API?

I feel that you are missing something here. If you are sure that GPUApi.GetCoolerSettings worked before these commits with your RTX card (please double-check as it might retrieve information about the GTX card you have on the system), please find a way to narrow the problem to a single commit. Maybe by cloning the repository and trying every commit since that time, simply by checking out the changes and recompiling in a solution. I am asking for this since I checked the source code and couldn't find any change to this method or other relevant methods in the last year.

Thanks

from nvapiwrapper.

MaynardMiner avatar MaynardMiner commented on May 27, 2024

I am using the same exact codebase that I used. I simply tried to rebuild it with latest.

If I build the original code, it works.
If I try to build with the latest wrapper:
-GTX cards work.
-RTX cards to not work.

There is no difference in the code.

Steps to reproduce

Working version

namespace NvAPISample
{
    class Program
    {
        static void Main(string[] args)
        {
           int Speed = 75;
           int Index = 0;

          if (Speed > -1)
           {
              NVIDIA.Initialize();
              var GPUs = PhysicalGPU.GetPhysicalGPUs();
              var Cool = GPUs[Index].CoolerInformation.Coolers;
              Console.WriteLine("Current Fan Speed: " + GPUs[Index].CoolerInformation.CurrentFanSpeedLevel);
              foreach (GPUCooler cooler in Cool)
               {
                 GPUs[Index].CoolerInformation.SetCoolerSettings(cooler.CoolerId, Speed);
               }
             Console.WriteLine("New Fan Speed: " + Speed);
             NVIDIA.Unload();
          }
      }
   }
}
  • build

Step to reproduce (error)

  • Clone latest version.
  • Insert the above code into Program.cs (nvapisample)...Just for fast example.
  • build

I am doing nothing different...Maybe just generating a new key in the signing section.

The exception thrown is here:

https://github.com/falahati/NvAPIWrapper/blob/master/NvAPIWrapper/GPU/GPUCoolerInformation.cs#L43

It's just very weird that the same exact code can be built with the version I posted in the issue, but not the current. Don't get me wrong, I am just using the old version fine as a workaround. I just am posting because it's driving me nuts as to why it is happening...I personally don't see anything wrong with the codebase. It makes no sense to me, either.

from nvapiwrapper.

falahati avatar falahati commented on May 27, 2024

Hmm,

What is the value of e.Status when the exception is thrown?

I am talking about the line you mentioned:
https://github.com/falahati/NvAPIWrapper/blob/master/NvAPIWrapper/GPU/GPUCoolerInformation.cs#L43

from nvapiwrapper.

MaynardMiner avatar MaynardMiner commented on May 27, 2024

"NVAPI_NOT_SUPPORTED"

from nvapiwrapper.

MaynardMiner avatar MaynardMiner commented on May 27, 2024

image

from nvapiwrapper.

falahati avatar falahati commented on May 27, 2024

If you capture this exception, or just debug the main library at the line specified before, what is the value of e.Status in "integer"? Its an enum type and should have an integer value or at least a corresponding enum member. Is it NotSupported = -104?

I am sorry about these questions, but since I don't own an RTX card, you are the only one that can produce this problem.

from nvapiwrapper.

MaynardMiner avatar MaynardMiner commented on May 27, 2024

So I happened to flash a new windows and a new visual studio (I had to, to update my disk). After reloading everything and building...It appears to work.

I'm not sure why it didn't work before. I am clueless, but I guess this was in error. It must have been some build setting or something in my last Windows. I apologize, I just spent days trying to figure out issue before I posted here.

from nvapiwrapper.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.