Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NVIDIA Fan Speed showing percentage speed instead of RPM #84

Open
stephenangelico opened this issue Jun 28, 2018 · 17 comments
Open

NVIDIA Fan Speed showing percentage speed instead of RPM #84

stephenangelico opened this issue Jun 28, 2018 · 17 comments

Comments

@stephenangelico
Copy link

Expected behaviour

Values between 0 and 3000ish

Actual behaviour

Values between 0 and 40

Steps to reproduce the behaviour

  • Add MATE Sensors Applet to a panel
  • Enable CoolerLevel for an NVIDIA GPU
  • Observe reported fan speed as GPU fan spins up

MATE general version

1.18.0

Package version

1.18.2-5ubuntu0

Linux Distribution

Ubuntu MATE 17.10

I discovered that nvidia-settings has, among its query options, GPUCurrentFanSpeed, which returns a percentage, and GPUCurrentFanSpeedRPM, which returns a believable number or RPM. The command nvidia-settings -tq :0/GPUCurrentFanSpeedRPM returns a single value that should be the RPM of the GPU.

@raveit65
Copy link
Member

I can't test this as my nvidia card is fanless.

@dwinkler1
Copy link

dwinkler1 commented Jun 30, 2018

The plugin takes the cooler level as input it seems (see below). Can someone tell me where to find the appropriate nvidia header files?
I'll test this when I get to my PC.

if (XNVCTRLQueryTargetCount(nvidia_sensors_dpy,
                        NV_CTRL_TARGET_TYPE_COOLER,
                        &cnt)) {

            for (i = 0; i < cnt; i++) {
                gchar *id = g_strdup_printf("GPU%d%s", i, THERMAL_COOLER_LEVEL);

                sensors_applet_plugin_add_sensor(&sensors,
                                                 THERMAL_COOLER_LEVEL,
                                                 id,
                                                 _("GPU"),
                                                 FAN_SENSOR,
                                                 TRUE,
                                                 FAN_ICON,
                                                 DEFAULT_GRAPH_COLOR);

                g_free(id);
            }
        }

@monsta
Copy link
Contributor

monsta commented Aug 19, 2018

My GT 730 has a fan, but I can't find it in the sensors list anymore. I remember the fan was there before, now I have only two temp sensors which show the same value.

I don't think we made any related changes here, so it must be something in nvidia libs.

Tested in Mint 19 (based on Ubuntu 18.04).

@monsta
Copy link
Contributor

monsta commented Aug 20, 2018

@stephenangelico
Copy link
Author

So, big surprise, NVIDIA broke it. Does this mean to properly close this, we'll need to check which version of the driver is installed in case of legacy devices?

@raveit65
Copy link
Member

Why nvidia broke it?
I assume that that we need to build against a higher version for nvctrl.

@monsta
Copy link
Contributor

monsta commented Aug 21, 2018

Ok, I thought it was working until some point. Looks like it's not so.
Normally I don't have any fan sensors enabled in the applet, so no wonder I forgot about my own findings.

It was the same from the start:
#30 (comment)
#30 (comment)

Sorry about my memory 🙂

@monsta
Copy link
Contributor

monsta commented Aug 21, 2018

Actually, #30 (comment) is still reproducible. It's another GT 730 which I have on my work machine. It only exposes fan speed in percents, as can be seen on the screenshot.

monsta added a commit that referenced this issue Aug 27, 2018
requires libxnvctrl >= 331.13

fixes #84
@monsta
Copy link
Contributor

monsta commented Aug 27, 2018

@stephenangelico @danielw2904 please check out #86 for possible fix.

@stephenangelico
Copy link
Author

I don't have a build environment configured so it's not easy for me to test. If I could simply get a replacement libnvidia.so (or whichever file that commit changes) then I'd be happy to test that.

@monsta
Copy link
Contributor

monsta commented Aug 28, 2018

Do you still use Ubuntu 17.10? Because if you have already upgraded to 18.04, I can upload a patched mate-sensors-applet package to my PPA for testing. (17.10 is EOL now anyway.)

@stephenangelico
Copy link
Author

No, since opening this issue I have upgraded to 18.04.

@stephenangelico
Copy link
Author

Any further news on that patch? I saw changes requested on #86 and I haven't seen any patched package (nor have I been sure I found @monsta 's PPA).

@monsta
Copy link
Contributor

monsta commented Sep 17, 2018

Yeah, sorry, I should've packed it for testing... I'll do it tomorrow.

Changes are requested for the case when the fan is present but getting speed in RPMs is unsupported. When it's supported, the patch should work fine.

@monsta
Copy link
Contributor

monsta commented Sep 18, 2018

Ok, done. PPA is at https://launchpad.net/~monsta/+archive/ubuntu/testing

@stephenangelico
Copy link
Author

Sorry for taking so long with this, I had a lot on and also pushed back testing "until the next time I log on" which for me is rare. Anyways...
screenshot at 2018-10-06 17-34-39
It works! I haven't done much testing, I simply fired up an inefficient game that could quickly warm up the GPU and compared the numbers I was seeing to those in nvidia-settings. Looks good to me!

I won't close yet in case there are problems merging this patch into master, and in case there are other things I should test. Please note that I do not want to have to downgrade my driver (if older drivers are problematic for some people), and in fact I can't go back further than NVIDIA driver 375 as that appears to be the first driver with GTX 1060 support.

@monsta
Copy link
Contributor

monsta commented Oct 6, 2018

Ok, good. I need to get back to the PR to address the issues...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants