How to control fan speed on ubuntu 23.04 server without screen?

hi,
how to control fan speed on ubuntu 23.04 server without screen, and multiple gpus ?

I got this error :

ERROR: The control display is undefined; please run nvidia-settings --help for usage information.

thank you

Hi,

NVIDIA (for multiple years) refused to give us a simple “nvidia-smi” command to call from terminal to do this.

You have to write and compile your software based on the NV-CONTROL extension.
I have done it myself, it works for my PC (I don’t know for other systems).

You should be able to find multiple “do it yourself” implementations.
I think that my implementation is pretty decent, but surely there’s something better out there.

One note: I’m pretty sure that this version works only with one video card in the system, with only 2 fans and keeps them at the same speed in percentage (should be good for symmetrical 2 fans designs).

This is not what OP asked for.

And yes, it is possible to control GPU fans without an X server.

thank you, so how can I do that ?

1 Like

This is not what OP asked for.

And yes, it is possible to control GPU fans without an X server.

You say that I’m wrong but you didn’t explained how to do it.

For example read this:

And read this:

There are many posts on the same or similar topic.

yes I allready viewed these topics, but they’re too old.

Anyway BlueGoliath say “it’s possible”, yes thank you sir but my question is how ^^

And I’m not a coder guy, I don’t understand how to use your software…
so If I can set manually gpu’s fans with it i’m ok but how to use it ?

thank you

It’s available in the NVML library since the launch of the RTX 4090. Those threads were correct for their time.

You’ll have to wait for someone to create an executable for you. No one else besides me has noticed it’s possible.

Can you share the API from the NVML documentation to set the fan speed?

Even with his brand new method (if it really exist) you have to code it yourself.

If you read the README on my repo it is pretty self explanatory, but if you aren’t able to give execution permission to files or edit a bash script in two places with the path of the executables… I would advise to you to learn some Linux basics; not to be rude but these are the basics.

However as said I have coded it for my use case of one videocard with 2 symmetric fans, you say that you have multiple cards (still for the first one should work I think)… but I don’t have much time to modify the code (everyone is free to do so).

Why are you so reluctant to share the single “Set” API?

If you said it on the first message it would have been fine, while saying that you had to code it yourself in the first place.

Instead also now you are not open to share it easily.

If you know where it is you do a favor to everyone to share it openly, if you don’t and you say multiple times “it is possibile” without any detail you seem fishy.

You just had to say in the first message when asked:

nvmlReturn_t DECLDIR nvmlDeviceSetFanSpeed_v2(nvmlDevice_t device, unsigned int fan, unsigned int speed);

I will look into it and how it behaves performance wise, in this case I think it isn’t necessary to have good performances but while playing games certain APIs can cause stuttering (even nvidia-smi, my repo explains it), but I will do it in my free time so it could even be one year from now (I work and have a lot of stuff to do in general).

1 Like

Sorry but “lazy and incapable people” is not a coder guy. I just ask for a simple thing who is doable since many years on other OS to keep my gpu safe and “cold”. People want quiet, but a gpu at 70° with fans at 40% it’s nonsence and bios switch is on “OC mode”, I don’t imagine what “Quiet mode” do
So I switched back to hiveos, wich is able to do that with NVtool.
@BlueGoliath if you don’t want to share you knowledge, do come to ask “yes it possible, but I dont want to tell you how bye bye”.
it’s useless
have a good day

My words were not really intended to be directed at you. Yes, I absolutely agree, it is simple, other OSs have plenty of user-friendly software to do it already, and AIB’s have weird fan profiles that can only be fully or partially fixed with utility apps. You are well within your right to ask for and expect such a thing. My apologies if I offended you.

There is no point in saying anything more than “Yes, it is possible” and then dropping a link to the NVML header. If people can’t do the absolute minimum of ctrl + f searching a file that was provided to them then they probably aren’t going to or are unable to do anything meaningful with it anyway. I’m not going to sit there and hold Linux’s “many” programmer’s hands in order to make a basic app when they’ve continuously disregarded me and my own app.

I’ve been very open about how my software works, not just fan control. In fact, my app’s GitHub page links to the same NVML header I posted above. And yet, despite providing the source multiple times, which is an official Nvidia C header from an official Nvidia Github repo, people in the Linux space release cobbled together NVXCtrl apps that do not work under Wayland, the command line, or even on X. org sometimes because they want to do things the “Linux” way.

If anything, I’ve been far too open on how my software works. Accusing me of being “shady” because Linux’s “many” programmers can’t ctrl + f search through a plain text header file is asinine.

I’m sorry to be off topic but I need to reply to this nonsense:

  1. I think that you are really stressed @BlueGoliath, I don’t know why you are, but you should address it.
  2. You have said that it is a new API since RTX 4090, it is a pretty new API then, it is normal to not knowing it.
  3. I’m looking at this API: you need to install the cuda libraries to use it (NVML is included there); meanwhile you have an easier access to NVXCtrl (you can compile it directly from the samples of nvidia-settings).
  4. I have looked at your repo, where is the java source code? what I see referenced is a “module” binary file… this is the contrary of being open.
  5. In the repo you say that it needs 500 megabytes of RAM per GPU to use it… I understand that it is Java, but it is a little too much to ask (at least for controlling fans and why didn’t you propose this to the OP in the first place is still a mystery).
  6. I’ve clearly said that my app was for my use case, it was just an example for the OP that what he wanted was something that NVIDIA is not providing.
  7. It is you having started the “it is possible” and not being agreeable at all behaviour (you even said that you don’t want to share what you know) then you complain, what you seed is what you get.

You can be free of criticizing my code, as said for my use case it is fine, it isn’t intended right now for a wider audience… but claiming that yours it is, while being a binary with no open source code, makes me laugh.

This is my last reply here, sorry for the off topic.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.