nan0s7 / nfancurve

A small and lightweight POSIX script for using a custom fan curve in Linux for those with an Nvidia GPU.
GNU General Public License v3.0
314 stars 57 forks source link

Fix num_fans and num_gpus value extraction #21

Closed pitamar closed 4 years ago

pitamar commented 4 years ago

nvidia-settings returns the following queries for me:

$ nvidia-settings -q fans
2 Fans on workspace:1

    [0] workspace:1[fan:0] (Fan 0)

      Has the following name:
        FAN-0

    [1] workspace:1[fan:1] (Fan 1)

      Has the following name:
        FAN-1
$ nvidia-settings -q gpus
2 GPUs on workspace:1

    [0] workspace:1[gpu:0] (GeForce GTX 1080 Ti)

      Has the following names:
        GPU-0
        GPU-e915a2f6-a06f-ba99-b10b-9933ab8cd26d

    [1] workspace:1[gpu:1] (GeForce RTX 2080 Ti)

      Has the following names:
        GPU-1
        GPU-66a1cde9-efde-b533-2750-5ce8f1afcafc

The extra 's' there prevented the code from extracting the correct values for me.

nan0s7 commented 4 years ago

What exactly is the problem you're having? I ran your output through the code I wrote in the script and it gave the correct values for me.

pitamar commented 4 years ago

I checked on the computer I had the troubles with again and you're correct. I think I had a different problem causing it not to work at first. Perhaps I had an issue with nvidia-settings that I also resolved while trying resolve my issue and thought that my code change was necessary as well. My sincere apologies

nan0s7 commented 4 years ago

No worries, glad it's working fine now! :)