Code Monkey home page Code Monkey logo

nvfancontrol's People

Contributors

foucault avatar nazar-pc avatar openglfreak avatar tzh1043 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

nvfancontrol's Issues

RTX Fan Control Windows

Hello,

I was trying your controller in windows. I have multiple GPUs.

Found 8 available GPU(s)
GPU #0: GeForce GTX 1070
 COOLER-0

It doesn't seem like they all show up.

So I tried to set a fan speed:

nvfan -g 1 -l 40,50
WARN - No config file found; using default curve
thread 'main' panicked at 'index out of bounds: the len is 1 but the index is 1', /rustc/a53f9df32fbb0b5f4382caaad8f1a46f36ea887c\src\libcore\slice\mod.rs:2695:10
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

So I tried -g 0 (but instructions say must be > 0 )

nvfan -g 0 -l 40,50
WARN - No config file found; using default curve
INFO - NVIDIA driver version: 430.86
INFO - NVIDIA graphics adapter #0: GeForce GTX 1070
INFO -   GPU #0 coolers: COOLER-0
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: "NvAPI_GPU_GetFullName() failed; error -101"', src\libcore\result.rs:999:5
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

Am I using it wrong? I placed the recent nvapi .dll's in source directory, just like instructions.

Setup:

Mixture of RTX & GTX cards (8 total). I am trying to find a command line tool that will set fan speed for both. 64-bit Windows 10

Can't built this thing

I'm trying to build this thing, but unfortunately it fails like following:

root@9c993574d3a6:/rust# cargo build --release
    Updating registry `https://github.com/rust-lang/crates.io-index`
 Downloading log v0.3.6
 Downloading getopts v0.2.14
 Downloading nix v0.7.0
 Downloading time v0.1.35
 Downloading xdg v2.0.0
 Downloading libc v0.2.17
 Downloading void v1.0.2
 Downloading cfg-if v0.1.0
 Downloading bitflags v0.4.0
 Downloading rustc_version v0.1.7
 Downloading semver v0.1.20
 Downloading winapi v0.2.8
 Downloading kernel32-sys v0.2.2
 Downloading winapi-build v0.1.1
   Compiling nvctrl v0.1.0 (file:///rust/src/nvctrl)
   Compiling nix v0.7.0
Build failed, waiting for other jobs to finish...
error: failed to run custom build command for `nvctrl v0.1.0 (file:///rust/src/nvctrl)`
process didn't exit successfully: `/rust/target/release/build/nvctrl-beba15aebcc2b6bb/build-script-build` (exit code: 101)
--- stderr
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error { repr: Os { code: 2, message: "No such file or directory" } }', ../src/libcore/result.rs:837
note: Run with `RUST_BACKTRACE=1` for a backtrace.

root@9c993574d3a6:/rust# RUST_BACKTRACE=1 cargo build --release
   Compiling nvctrl v0.1.0 (file:///rust/src/nvctrl)
   Compiling nix v0.7.0
Build failed, waiting for other jobs to finish...
error: failed to run custom build command for `nvctrl v0.1.0 (file:///rust/src/nvctrl)`
process didn't exit successfully: `/rust/target/release/build/nvctrl-beba15aebcc2b6bb/build-script-build` (exit code: 101)
--- stderr
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error { repr: Os { code: 2, message: "No such file or directory" } }', ../src/libcore/result.rs:837
stack backtrace:
   1:     0x5597f9d46b8a - std::sys::imp::backtrace::tracing::imp::write::he3d1bfbdbf113480
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:42
   2:     0x5597f9d4b9ef - std::panicking::default_hook::{{closure}}::h575f1b40d2e88f07
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/libstd/panicking.rs:247
   3:     0x5597f9d4a1c6 - std::panicking::default_hook::h3d5dccce8125d0cf
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/libstd/panicking.rs:263
   4:     0x5597f9d4a7b7 - std::panicking::rust_panic_with_hook::h00b81bb3dcbd51f2
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/libstd/panicking.rs:451
   5:     0x5597f9d4a644 - std::panicking::begin_panic::ha6a0d553db9869ff
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/libstd/panicking.rs:413
   6:     0x5597f9d4a569 - std::panicking::begin_panic_fmt::h24d113aee3ee4081
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/libstd/panicking.rs:397
   7:     0x5597f9d4a4f7 - rust_begin_unwind
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/libstd/panicking.rs:373
   8:     0x5597f9d8151d - core::panicking::panic_fmt::he441b2ea2036b98a
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/libcore/panicking.rs:69
   9:     0x5597f9d3f2fb - core::result::unwrap_failed::h88381ff2d9927dee
  10:     0x5597f9d3f97c - build_script_build::main::h62d404266768de3e
  11:     0x5597f9d534ca - __rust_maybe_catch_panic
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/libpanic_unwind/lib.rs:97
  12:     0x5597f9d4af95 - std::rt::lang_start::h74b3afbdd8daef1c
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/libstd/panicking.rs:332
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/libstd/panic.rs:351
                        at /buildslave/rust-buildbot/slave/nightly-dist-rustc-linux/build/obj/../src/libstd/rt.rs:57
  13:     0x7f682ca5bb44 - __libc_start_main
  14:     0x5597f9d3f108 - <unknown>
  15:                0x0 - <unknown>

I've tried both rustc 1.14.0-nightly (cae6ab1c4 2016-11-05) and rustc 1.15.0-nightly (0bd2ce62b 2016-11-19).
At least 1.15 should be "nightly enough".

As I'm not working with Rust, can you suggest anything in this scenario?

I've used this docker image and just installed libxnvctrl-dev there.

How to be without GUI?

./nvfancontrol
WARN - No config file found; using default curve
ERROR - XNVCtrl failed: XOpenDisplay failed; is $DISPLAY set?

/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found

I used to be able to run the nvfancontrol.service. I had a minor issue where I couldn't seem to get it to run properly on startup, so I would just rerun it after logging in.

After a long vacation, I got back home and it wouldn't start (probably after an update).

So I looked for an update to nvfancontrol.service and saw you released 0.50, so I downloaded and ran that. Now I get a new error. Do you have a suggestion how to most easily fix this? I'm fine with co-locating the dependencies with your application to minimize breakage other places in my system.

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04.1 LTS
Release:	20.04
Codename:	focal
$ systemctl --user status nvfancontrol.service 
● nvfancontrol.service - "NVIDIA Dynamic fan control"
     Loaded: loaded (/home/jhgoodwin/.config/systemd/user/nvfancontrol.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Mon 2021-01-25 10:32:15 EST; 7s ago
    Process: 7436 ExecStart=/home/jhgoodwin/.config/systemd/user/nvfancontrol (code=exited, status=1/FAILURE)
   Main PID: 7436 (code=exited, status=1/FAILURE)

Jan 25 10:32:15 jhg-R3700X systemd[2853]: Started "NVIDIA Dynamic fan control".
Jan 25 10:32:15 jhg-R3700X nvfancontrol[7436]: /home/jhgoodwin/.config/systemd/user/nvfancontrol: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by /home/jhgoodwin/.config/systemd/user/nvfancontrol)
Jan 25 10:32:15 jhg-R3700X systemd[2853]: nvfancontrol.service: Main process exited, code=exited, status=1/FAILURE
Jan 25 10:32:15 jhg-R3700X systemd[2853]: nvfancontrol.service: Failed with result 'exit-code'.

I saw some other person in a different forum mentioned using the LD_LIBRARY_PATH to pin a version that was downloaded. I wanted to see what you suggest before doing weird stuff to fix it.

John

Monitor (-m) flag modifies fan speed on exit

When using -m -j on Windows, upon exiting the program (Ctrl-C), the fan speeds are reset to 0. In other words: -m isn't just "pure monitoring". When using -d, I can clearly see at the end the message Resetting fan control (I suspect this is the cause).

I'm using the version provided here since I have an RTX GPU (in contrast, 0.5.0 crashes).

Testing methodology:

  1. Launch EVGA Precision X1 and set fan speed to 44%. Verify fan RPMs are around 1674 or so.
  2. Run nvcontrol -m -j -- fan speeds look fine (still 44%).
  3. SIGINT/Ctrl-C nvcontrol -- instantly fan speeds drop to 0 and stasy that way until Precision X1 is re-run. (This EVGA card's BIOS, by default, actually turns off the fans entirely if a certain load isn't met)

System details: Windows 7 SP1 x64 with an NVIDIA RTX 2060 SUPER (EVGA RTX 2060 Super SC Ultra Black Gaming, model 08G-P4-3065-KR).

Pre-built binaries for Linux?

Hi,
First, this is a super important project, so thanks!
The readme mentions you provide pre-built binaries. I can't find those in the project. Was wondering if you could share them, as I would like to refrain from building myself.
I would like to run it on Ubuntu 18.04, where I have 4x RTX 2080Ti which get very hot but still have their fans on 50%...
Thanks.

RTX3090 @ driver 471.68

C:\test>nvfancontrol.exe>log.log
INFO - Loading configuration file: "C:\Users\Admin\AppData\Roaming\nvfancontrol.conf"
INFO - NVIDIA driver version: 471.68
INFO - NVIDIA graphics adapter #0: NVIDIA GeForce RTX 3090
WARN - Could not get GPU cooler indices or unsupported OS
thread 'main' panicked at 'called Result::unwrap() on an Err value: "NvAPI_GPU_GetCoolerSettings() failed; error -104"', src\main.rs:715:59
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
thread 'main' panicked at 'called Result::unwrap() on an Err value: "NvAPI_GPU_GetCoolerSettings() failed; error -104"', src\main.rs:84:30
stack backtrace:
0: 0x7ff6acd4eeae -
1: 0x7ff6acd657eb -
2: 0x7ff6acd48b98 -
3: 0x7ff6acd51d9d -
4: 0x7ff6acd51804 -
5: 0x7ff6acd526ae -
6: 0x7ff6acd521d1 -
7: 0x7ff6acd4f80f -
8: 0x7ff6acd52129 -
9: 0x7ff6acd63600 -
10: 0x7ff6acd63433 -
11: 0x7ff6acd04054 -
12: 0x7ff6acd0efb6 -
13: 0x7ffb24d31030 -
14: 0x7ffb24d34a52 - is_exception_typeof
15: 0x7ffb24d3e7f4 - _C_specific_handler
16: 0x7ffb24d33cc8 - is_exception_typeof
17: 0x7ffb24d3f131 - _CxxFrameHandler3
18: 0x7ffb3f4f21ff - _chkstk
19: 0x7ffb3f480939 - RtlUnwindEx
20: 0x7ffb24d3ecbe - _C_specific_handler
21: 0x7ffb24d32955 - is_exception_typeof
22: 0x7ffb24d32d81 - is_exception_typeof
23: 0x7ffb24d33dc4 - is_exception_typeof
24: 0x7ffb24d3f131 - _CxxFrameHandler3
25: 0x7ffb3f4f217f - _chkstk
26: 0x7ffb3f4a1454 - RtlRaiseException
27: 0x7ffb3f4a11a5 - RtlRaiseException
28: 0x7ffb3ccb4ed9 - RaiseException
29: 0x7ffb24d36220 - CxxThrowException
30: 0x7ff6acd57a11 -
31: 0x7ff6acd57999 -
44 32: 0x7ff6acd52768 -
33: 0x7ff6acd52744 -
34: 0x7ff6acd521d1 -
35: 0x7ff6acd4f80f -
36: 0x7ff6acd52129 -
37: 0x7ff6acd63600 -
38: 0x7ff6acd63433 -
39: 0x7ff6acd0a7cd -
40: 0x7ff6acd0fef6 -
41: 0x7ff6acd0ff2c -
42: 0x7ff6acd52864 -
43: 0x7ff6acd0f5d7 -
44: 0x7ff6acd6c160 -
45: 0x7ffb3d4d7034 - BaseThreadInitThunk
46: 0x7ffb3f4a2651 - RtlUserThreadStart
thread panicked while panicking. aborting.

C:\test>ver

Microsoft Windows [Version 10.0.19042.1165]

any idea what can be wrong ?

Fans still work despite being forced & had aggressive idle mode

[cooper@arch ~]$ nvfancontrol -fd
INFO - Loading configuration file: "/home/cooper/.config/nvfancontrol.conf"
DEBUG - Curve points: [(60, 0), (65, 20), (70, 40), (75, 60), (80, 80), (85, 100)]
INFO - NVIDIA driver version: 510.60.02
INFO - NVIDIA graphics adapter #0: NVIDIA GeForce GTX 1660 SUPER
INFO -   GPU #0 coolers: COOLER-0
DEBUG - Temp: 54; Speed: [0] RPM ([0]%); Load: 23%; Mode: Auto
DEBUG - Temp: 54; Speed: [871] RPM ([26]%); Load: 21%; Mode: Auto
DEBUG - Temp: 54; Speed: [0] RPM ([0]%); Load: 20%; Mode: Auto
DEBUG - Temp: 54; Speed: [868] RPM ([26]%); Load: 20%; Mode: Auto
DEBUG - Temp: 54; Speed: [0] RPM ([0]%); Load: 21%; Mode: Auto
DEBUG - Temp: 54; Speed: [0] RPM ([0]%); Load: 20%; Mode: Auto
DEBUG - Temp: 54; Speed: [0] RPM ([0]%); Load: 20%; Mode: Auto
DEBUG - Temp: 54; Speed: [805] RPM ([24]%); Load: 21%; Mode: Auto
DEBUG - Temp: 54; Speed: [844] RPM ([26]%); Load: 21%; Mode: Auto
DEBUG - Temp: 54; Speed: [0] RPM ([0]%); Load: 21%; Mode: Auto
DEBUG - Temp: 54; Speed: [0] RPM ([0]%); Load: 20%; Mode: Auto
DEBUG - Temp: 54; Speed: [0] RPM ([0]%); Load: 20%; Mode: Auto
DEBUG - Temp: 54; Speed: [0] RPM ([0]%); Load: 20%; Mode: Auto
DEBUG - Temp: 54; Speed: [0] RPM ([0]%); Load: 20%; Mode: Auto
DEBUG - Temp: 54; Speed: [0] RPM ([0]%); Load: 20%; Mode: Auto
DEBUG - Temp: 56; Speed: [0] RPM ([0]%); Load: 7%; Mode: Auto
DEBUG - Temp: 55; Speed: [0] RPM ([0]%); Load: 32%; Mode: Auto
DEBUG - Temp: 55; Speed: [0] RPM ([0]%); Load: 29%; Mode: Auto
DEBUG - Temp: 55; Speed: [831] RPM ([25]%); Load: 8%; Mode: Auto
DEBUG - Temp: 56; Speed: [853] RPM ([26]%); Load: 11%; Mode: Auto
DEBUG - Temp: 56; Speed: [0] RPM ([0]%); Load: 1%; Mode: Auto

Is there anyway to disable autocontrol? It's GTX 1660S & also has beefy cooler that can even handle constant 60 degrees on idle.

Floating dependency versions

The following dependencies in master as of 0f642a6 use only wildcards:

  • getopts
  • time
  • dirs
  • nix
  • ctrlc

Another 5 are pinned to exact versions.

the floating versions on master make this kind of harder that it should be

Effectively impossible. I was going to submit another change to pin the remaining dependency versions for precisely that reason but hadn't gotten to it yet. Why do you want to avoid that?

Originally posted by @commonquail in #19 (comment)

Apparently all versions are pinned in the two release-* branches.

Over time, this is liable to invite breakage of master by incompatibilities introduced in new versions of the unpinned dependencies; and relative to to the README this has already happened with getopts v0.2.20 and libloading v0.6.0.

It's unclear if this is an oversight or deliberate, and if so, what the motivation behind is.

X Error of failed request: BadValue (integer parameter out of range for operation)

I get this error when trying to run the program.
I'm on linux arch, everything up-to-date.
Laptop is a Lenovo Y500 with 2 geforce 650m

❯ sudo nvfancontrol -d
WARN - No config file found; using default curve
DEBUG - Curve points: [(41, 20), (49, 30), (57, 45), (66, 55), (75, 63), (78, 72), (80, 80)]
INFO - NVIDIA driver version: 381.22
INFO - NVIDIA graphics adapter #1: GeForce GT 650M
INFO - NVIDIA graphics adapter #2: GeForce GT 650M
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  156 (NV-CONTROL)
  Minor opcode of failed request:  2 ()
  Value in failed request:  0x17
  Serial number of failed request:  24
  Current serial number in output stream:  24

Why does limitation 20..80% exists?

Bear in mind that for most GPUs the fan speed can't be below 20% or above 80% when in manual control, even if you use greater values.

Can you elaborate why? I can easily set any level manually below 20% in NVIDIA X Server Settings (including 0%) as well as 100% (GPU is GIGABYTE GTX 1070 G1 Gaming). But this tool still limits its lower limit to 20%.

The default curve in my GPU is like [(0, 0), (51, 0), (52, 28), (90, 100)], but I want to change it to [(0, 0), (60, 0), (61, 25), (90, 100)].

 nazar-pc  ~  nvfancoltrol  ./nvfancontrol -f -d                                                                                                                                                                                       
DEBUG - Curve points: [(0, 0), (60, 0), (61, 25), (90, 100)]
Using NVIDIA driver version 375.20
DEBUG - Temp: 49; Speed: 800 RPM (19%); Load: 6%; Mode: Manual
DEBUG - Temp: 49; Speed: 821 RPM (20%); Load: 3%; Mode: Manual
DEBUG - Temp: 49; Speed: 835 RPM (20%); Load: 3%; Mode: Manual
DEBUG - Temp: 49; Speed: 836 RPM (20%); Load: 8%; Mode: Manual
DEBUG - Temp: 49; Speed: 842 RPM (20%); Load: 8%; Mode: Manual
DEBUG - Temp: 49; Speed: 838 RPM (20%); Load: 4%; Mode: Manual

can it work if I use iGPU to display?

If I install nvidia driver with option --no-opengl-files, and I use an integrated GPU to display leaving nvidia GPUs for deep learning, dose this fan speed control work?

Fan Control issue on a Inno3d RTX 3060

I am having an issue with fan control on a Inno3d RTX 3060.

I can not enable fan control to enable a max RPM of 1200rpm(30%) and also maintain the function of fan speed at 0 below around 30c with nvfancontrol under Linux

I have used the -l 0 and/or -f options to no avail.

I am able to get the desired behaviour in Windows via MSI Afterburners option that enables maintaining the zero fan behaviour from the video cards BIOS even with a manual fan speed or curve set.

How would I replicate this behaviour with this utility ? if even this is possible ?

Fan is enabled on auto control; doing nothing

Followed instructions closely on

Description:	EndeavourOS Linux
5.15.7-arch1-1
x11

but

msi: ~ $ nvfancontrol -d -l 0
INFO - Loading configuration file: "/home/k7ara/.config/nvfancontrol.conf"
DEBUG - Curve points: [(20, 0), (30, 0), (40, 20), (50, 45), (60, 55), (70, 70), (80, 80)]
INFO - NVIDIA driver version: 495.44
INFO - NVIDIA graphics adapter #0: NVIDIA GeForce GTX 1060 6GB
INFO -   GPU #0 coolers: COOLER-0
DEBUG - Fan is enabled on auto control; doing nothing
DEBUG - Temp: 26; Speed: [1043] RPM ([35]%); Load: 0%; Mode: Auto
DEBUG - Fan is enabled on auto control; doing nothing
DEBUG - Temp: 25; Speed: [1039] RPM ([35]%); Load: 0%; Mode: Auto
DEBUG - Fan is enabled on auto control; doing nothing

please provide a windows build

please provide a windows build. not everyone has the time or knowledge to compile this. why not just provide a download?

Limits not working?

i have driver version 390, no particular warnings emitted, but it seems like I still can't override the fan limits.
My config:

cat ~/.config/nvfancontrol.conf
10 0
30 0
60 0
65 50
80 80

when I try to run it:

$ ./nvfancontrol -d -f -l 0
INFO - Loading configuration file: "/home/marc/.config/nvfancontrol.conf"
DEBUG - Curve points: [(10, 0), (30, 0), (60, 0), (65, 50), (80, 80)]
INFO - NVIDIA driver version: 390.138
INFO - NVIDIA graphics adapter #0: GeForce GTX 580
INFO -   GPU #0 coolers: COOLER-0
DEBUG - Temp: 45; Speed: [1260] RPM ([18]%); Load: 0%; Mode: Manual
DEBUG - Temp: 45; Speed: [1230] RPM ([17]%); Load: 0%; Mode: Manual

So it still seems to idle at 17%. If i use the nvidia server settings to set the speed down to 10%, it applies, but anything below 10% does nothing. Any ideas?

ERROR - Could not update fan speed

First, thanks for doing this! My GPU fans make a weird croaking/bullfrog sound (one in particular) as it stops and then restarts every few seconds. It is super annoying and I'm hoping your project will help me fix that.

I've followed the README except for running X11 as root. Since my driver version is 460.73.01 I was hoping to avoid doing that. Unfortunately it seems that may be the reason I get the error. Here's my output:

➤ ./nvfancontrol -d
WARN - No config file found; using default curve
DEBUG - Default configuration loaded
DEBUG - [[gpu]]
id = 0
enabled = true
points = [[41, 20], [49, 30], [57, 45], [66, 55], [75, 63], [78, 72], [80, 80]]
DEBUG - Curve points: [(41, 20), (49, 30), (57, 45), (66, 55), (75, 63), (78, 72), (80, 80)]
INFO - NVIDIA driver version: 460.73.01
INFO - NVIDIA graphics adapter #0: GeForce RTX 3070
INFO -   GPU #0 coolers: COOLER-1, COOLER-0
ERROR - Could not update fan speed: XNVCtrl QueryAttr(COOLER_MANUAL_CONTROL) failed; error 0
DEBUG - Temp: 57; Speed: [211, 329] RPM ([35, 38]%); Load: 0%; Mode: ERR

I'd just like to get your advice before I open a security hole by running X11 as root. Is this error caused by my unprivileged X11 use?

Ability to control each fan speed independently

My GPU has two fans (coolers). I would like to set curve for each fan independently.

$ nvfancontrol --print-coolers
Found 1 available GPU(s)
GPU #0: NVIDIA GeForce RTX 2080
 COOLER-1
 COOLER-0

In nvfancontrol.conf I can set a cooling curve in format:

{TEMP}    {FAN%}        # example: 30    40

Could the config file format look like this?:

{TEMP}    {FAN1%}    {FAN2%}        # example: 30    40    45

where, the FAN1 is the first cooler reported by nvfancontrol --print-coolers - COOLER-1 and FAN2 is COOLER-0.

or another format which could be compatible with the one we have now.

Crash on startup

Hi, thanks for making nvfancontrol, I've been using it successfully for some months now. Very useful.

I upgraded my nvidia drivers to version 455.45.01(non-free) today and it's started crashing on launch with this message:

thread 'main' panicked at 'called Result::unwrap() on an Err value: ParseFloatError { kind: Invalid }', src/main.rs:86:17
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

I'm using 5.9.10-1-MANJARO kernel and my graphics card is NVIDIA GeForce RTX 2060 SUPER. Reinstalling hasn't helped.

Help appreciated!

XNVCtrl SetAttr(THERMAL_COOLER_LEVEL) failed

Not sure what is the problem here, just recently updated my (arch linux) system and it stopped working
The only relation i can see is the jump of the nvidia driver from 460 to 465.

nvfancontrol -d
WARN - No config file found; using default curve
DEBUG - Default configuration loaded
DEBUG - [[gpu]]
id = 0
enabled = true
points = [[41, 20], [49, 30], [57, 45], [66, 55], [75, 63], [78, 72], [80, 80]]
DEBUG - Curve points: [(41, 20), (49, 30), (57, 45), (66, 55), (75, 63), (78, 72), (80, 80)]
INFO - NVIDIA driver version: 465.24.02
INFO - NVIDIA graphics adapter #0: NVIDIA GeForce GTX 1070
INFO -   GPU #0 coolers: COOLER-0
ERROR - Could not update fan speed: XNVCtrl SetAttr(THERMAL_COOLER_LEVEL) failed; error 0

Fan control only sets the speed of one fan

I have an MSI RTX 2070 that has two fans, however, the controller only sets the fan speed of one of the fans (Fan 1 according to the nvidia-settings GUI) and leaves the other fan (Fan 0) at 0. Is there any easy fix to this?
nvidia-settings

Run as daemon on Windows

Would be nice if there was a switch like "--daemon" to fork into the background on Windows, ideally it would go into the system tray.

Problem setting fanspeed

Hi, I have a strange problem here that I don't know how to fix, any help / clues will be appreciated

I have 2*1080Ti GPU, with one monitor plugged into iGPU. My intention is using GPU for CUDA and iGPU for display output. In xorg.conf, first I assigned a screen to each card respectively while setting coolbits, nvfancontrol works normally under this setting. But since the desktop environment is running on GPU:0 and use optimus (or something like that) to output to iGPU then to monitor, not only it takes up VRAM, but is very buggy as well. nvidia-smi looks like this, Desktop environment takes some VRAM.

+-----------------------------------------------------------------------------+
| NVIDIA-SMI 460.73.01    Driver Version: 460.73.01    CUDA Version: 11.2     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  GeForce GTX 108...  Off  | 00000000:01:00.0 Off |                  N/A |
| 23%   31C    P8     8W / 250W |    204MiB / 11178MiB |      6%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
|   1  GeForce GTX 108...  Off  | 00000000:02:00.0 Off |                  N/A |
| 20%   23C    P8     7W / 250W |     28MiB / 11178MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A     10376      G   /usr/bin/Xorg.bin                 121MiB |
|    0   N/A  N/A     10542      G   /usr/bin/kwin_x11                  38MiB |
|    0   N/A  N/A     10587      G   /usr/bin/plasmashell               37MiB |
|    1   N/A  N/A     10376      G   /usr/bin/Xorg.bin                  17MiB |
|    1   N/A  N/A     10545      G   /usr/bin/kwin_x11                   7MiB |
+-----------------------------------------------------------------------------+

So I add another screen in xorg.conf running on iGPU, which perfectly addressed the problems above, but nvfancontrol refuse to work now, while I can set fanspeed normally on NV X server settings. nvidia-smi looks like this, can see that xserver is running normally on both GPU but desktop environment and applications are not on it (on iGPU instead)

+-----------------------------------------------------------------------------+
| NVIDIA-SMI 460.73.01    Driver Version: 460.73.01    CUDA Version: 11.2     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  GeForce GTX 108...  Off  | 00000000:01:00.0 Off |                  N/A |
| 23%   34C    P8     9W / 250W |     52MiB / 11178MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
|   1  GeForce GTX 108...  Off  | 00000000:02:00.0 Off |                  N/A |
| 20%   26C    P8     8W / 250W |     52MiB / 11178MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A     13864      G   /usr/bin/Xorg.bin                  17MiB |
|    0   N/A  N/A     14173      G   /usr/bin/kwin_x11                  31MiB |
|    1   N/A  N/A     13864      G   /usr/bin/Xorg.bin                  17MiB |
|    1   N/A  N/A     14174      G   /usr/bin/kwin_x11                  31MiB |
+-----------------------------------------------------------------------------+

I Tried using the binary you posted here and got the following output:

NvidiaControl::init() opening display :0
NvidiaControl::init() display :0 opened successfully
NvidiaControl::init() counting GPUs
NvidiaControl::init() GPUs enumerated
get_version() enter
get_version() querying attribute CTRL_ATTR::NVIDIA_DRIVER_VERSION
X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  156 (NV-CONTROL)
  Minor opcode of failed request:  4 ()
  Serial number of failed request:  14
  Current serial number in output stream:  14

Note that I still can set fanspeed normally on NV X server settings when this happens. And I noticed a difference in NV X server settings. In previous situation, I can see my monitor plus two Xscreen in NV X server settings -> Display Configuration. But I cannot see my monitor in latter one, only two Xscreen

I strongly avoid running desktop environment on Nvidia GPU, so I'm curious about what caused this and are there methods to fix this under the second situation.

Many thanks!

Implement hysteretic fan control

I need temperature hysteresis for my fan control, because the vendor thought it might be fun to start fans only at stable low-load usage so they could market "our fans literally don't even run" as "0db", at the cost of those fans being completely bloody insufferable as soon as you do anything at all.

Here are some resources:

I think the Preisach model is the simplest general explanation but it's not accurate for this problem.

I've hacked something together that works OK for my purposes and I was planning to submit that for consideration after I've had time to clean it up. I'm not entirely satisfied with the behaviour, however, and this opens up for a bunch of questions about which of many possible ways it ought to work, where exactly it ought to be implemented, and most importantly, whether it's even desirable at all.

So let's start with the last question. I need temperature hysteresis, and I'm willing to work (a little) for it. Do you want it?

GPU doesn't always follow the targeted Fan Speed

I'm trying to solve a problem where the GPU Fan gets extremely loud when GPU temperature reaches 80 degrees. So I tried nvfancontrol but it didn't help.

I run ./nvfancontrol -l 50,50 which should keep the fan constantly at 50%. This works at the beginning, I hear the constant fan speed, even nvidia-settings says the target speed is 50. But when I start a game then the fan speed is not constant anymore. And when temperature reaches 80 then the fan kicks in at full power.

I watched the settings GPUTargetFanSpeed and GPUCurrentFanSpeed and noticed that GPUTargetFanSpeed is always at 50 but the readonly setting GPUCurrentFanSpeed is 118 when temperature is at 80 degrees.

Even when system is idle then nvfancontrol seems to loose control over the fan. Target Speed and Current Speed drops to 0 after a while, then after some time it gets back to 50 as it should.

What the heck is going on here? I have no other Fan Control program running (at least none I know of and I'm pretty sure there is none by default). It feels like there is some automatic control coming from the NVidia driver itself which overrides the settings set by nvfancontrol. Maybe newer nvidia drivers need some more tweaking to disable the built-in fan control?

System:

  • Debian 11
  • NVidia RTX 2080 Super
  • NVidia Driver 525.60.13
  • CoolBits 4

Crash on Windows 10 with 2070 Super

I get this Error when trying to use nvfancontrol. I tried the release version and also compiled it myself. Same result.
From the other bug report it looks like nvfancontrol just does not work on RTX cards because NvAPI does not work with RTX cards yet?

.\nvfancontrol.exe -d
WARN - No config file found; using default curve
DEBUG - Default configuration loaded
DEBUG - [[gpu]]
id = 0
enabled = true
points = [[41, 20], [49, 30], [57, 45], [66, 55], [75, 63], [78, 72], [80, 80]]
DEBUG - Curve points: [(41, 20), (49, 30), (57, 45), (66, 55), (75, 63), (78, 72), (80, 80)]
INFO - NVIDIA driver version: 450.12
INFO - NVIDIA graphics adapter #0: GeForce RTX 2070 SUPER
WARN - Could not get GPU cooler indices or unsupported OS
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: "NvAPI_GPU_GetCoolerSettings() failed; error -104"', src\main.rs:705:37
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
DEBUG - Resetting fan control
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: "NvAPI_GPU_GetCoolerSettings() failed; error -104"', src\main.rs:82:9
stack backtrace:
   0:     0x7ff7249deb6f - backtrace::backtrace::trace_unsynchronized
                               at C:\Users\VssAdministrator\.cargo\registry\src\github.com-1ecc6299db9ec823\backtrace-0.3.44\src\backtrace\mod.rs:66
   1:     0x7ff7249deb6f - std::sys_common::backtrace::_print_fmt
                               at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\/src\libstd\sys_common\backtrace.rs:78
   2:     0x7ff7249deb6f - std::sys_common::backtrace::_print::{{impl}}::fmt
                               at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\/src\libstd\sys_common\backtrace.rs:59
   3:     0x7ff7249f505b - core::fmt::write
                               at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\/src\libcore\fmt\mod.rs:1063
   4:     0x7ff7249d7d6c - std::io::Write::write_fmt<std::sys::windows::stdio::Stderr>
                               at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\/src\libstd\io\mod.rs:1426
   5:     0x7ff7249e1dfc - std::sys_common::backtrace::_print
                               at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\/src\libstd\sys_common\backtrace.rs:62
   6:     0x7ff7249e1dfc - std::sys_common::backtrace::print
                               at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\/src\libstd\sys_common\backtrace.rs:49
   7:     0x7ff7249e1dfc - std::panicking::default_hook::{{closure}}
                               at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\/src\libstd\panicking.rs:204
   8:     0x7ff7249e1a4f - std::panicking::default_hook
                               at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\/src\libstd\panicking.rs:224
   9:     0x7ff7249e25d7 - std::panicking::rust_panic_with_hook
                               at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\/src\libstd\panicking.rs:470
  10:     0x7ff7249e215f - std::panicking::begin_panic_handler
                               at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\/src\libstd\panicking.rs:378
  11:     0x7ff7249f2fc0 - core::panicking::panic_fmt
                               at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\/src\libcore\panicking.rs:85
  12:     0x7ff7249f2df3 - core::option::expect_none_failed
                               at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\/src\libcore\option.rs:1211
  13:     0x7ff7249959e0 - <&mut toml::de::Deserializer as serde::de::Deserializer>::deserialize_struct::he6b7ea5729fafcaf
  14:     0x7ff7249a0f32 - nvfancontrol::validate_gpu_id::h65825082353cce93
  15:     0x7ffabfda1030 - <unknown>
  16:     0x7ffabfda4a2b - is_exception_typeof
  17:     0x7ffabfdae3d4 - _C_specific_handler
  18:     0x7ffabfda3cb0 - is_exception_typeof
  19:     0x7ffabfdaed01 - _CxxFrameHandler3
  20:     0x7ffad3d5016f - _chkstk
  21:     0x7ffad3cd1c56 - RtlUnwindEx
  22:     0x7ffabfdae892 - _C_specific_handler
  23:     0x7ffabfda2941 - is_exception_typeof
  24:     0x7ffabfda2d6d - is_exception_typeof
  25:     0x7ffabfda3dac - is_exception_typeof
  26:     0x7ffabfdaed01 - _CxxFrameHandler3
  27:     0x7ffad3d500ef - _chkstk
  28:     0x7ffad3cfb474 - RtlRaiseException
  29:     0x7ffad3cfb1c5 - RtlRaiseException
  30:     0x7ffad1843e49 - RaiseException
  31:     0x7ffabfda61e0 - CxxThrowException
  32:     0x7ff7249e5e51 - panic_unwind::imp::panic
                               at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\/src\libpanic_unwind\seh.rs:308
  33:     0x7ff7249e5dd9 - panic_unwind::__rust_start_panic
                               at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\/src\libpanic_unwind\lib.rs:111
  34:     0x7ff7249e26b8 - std::panicking::rust_panic
                               at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\/src\libstd\panicking.rs:522
  35:     0x7ff7249e2691 - std::panicking::rust_panic_with_hook
                               at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\/src\libstd\panicking.rs:492
  36:     0x7ff7249e215f - std::panicking::begin_panic_handler
                               at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\/src\libstd\panicking.rs:378
  37:     0x7ff7249f2fc0 - core::panicking::panic_fmt
                               at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\/src\libcore\panicking.rs:85
  38:     0x7ff7249f2df3 - core::option::expect_none_failed
                               at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\/src\libcore\option.rs:1211
  39:     0x7ff72499cdec - nvfancontrol::validate_gpu_id::h65825082353cce93
  40:     0x7ff7249a3f86 - serde::ser::SerializeMap::serialize_entry::hac995fd7f3fa2505
  41:     0x7ff7249e1ff7 - std::rt::lang_start_internal::{{closure}}
                               at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\/src\libstd\rt.rs:52
  42:     0x7ff7249e1ff7 - std::panicking::try::do_call<closure-0,i32>
                               at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\/src\libstd\panicking.rs:303
  43:     0x7ff7249e5d52 - panic_unwind::__rust_maybe_catch_panic
                               at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\/src\libpanic_unwind\lib.rs:86
  44:     0x7ff7249e2818 - std::panicking::try
                               at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\/src\libstd\panicking.rs:281
  45:     0x7ff7249e2818 - std::panic::catch_unwind
                               at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\/src\libstd\panic.rs:394
  46:     0x7ff7249e2818 - std::rt::lang_start_internal
                               at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd\/src\libstd\rt.rs:51
  47:     0x7ff7249a1457 - main
  48:     0x7ff7249ff164 - invoke_main
                               at d:\agent\_work\4\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:78
  49:     0x7ff7249ff164 - __scrt_common_main_seh
                               at d:\agent\_work\4\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288
  50:     0x7ffad37c6fd4 - BaseThreadInitThunk
  51:     0x7ffad3cfcec1 - RtlUserThreadStart
thread panicked while panicking. aborting.

Add Cargo.lock for nix packaging

Hi, I'm currently trying to package this for NixOS, and it needs the Cargo.lock file available to produce reproducible binaries. Could you please remove the Cargo.lock file from the gitignore?

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.