You are not logged in.

#1 2018-07-19 11:53:02

winnetou
Member
Registered: 2018-05-04
Posts: 7

Asus GTX 1080 external fan header control

Hello!

I want to ask, if there is any chance to get the external fan headers on my asus GTX 1080 to work under arch with nvidia drivers.
they work fine on windows when using AsusGPUTweak2, but honestly: who cares about windows...

thx

Offline

#2 2018-07-20 20:46:40

Ropid
Member
Registered: 2015-03-09
Posts: 1,069

Re: Asus GTX 1080 external fan header control

Do you see something interesting in /sys/class/hwmon?

How do those fan headers work by default without any special software in Windows? Are they enabled and sending the same speed as what the main GPU fans are using?

Did you enable fan control for the nvidia driver in Linux?

Last edited by Ropid (2018-07-20 20:48:54)

Offline

#3 2018-07-21 10:16:11

winnetou
Member
Registered: 2018-05-04
Posts: 7

Re: Asus GTX 1080 external fan header control

In windows the fans attached to the headers do nothing, unless I start GPUTweak2 and tell them to turn.
I even don't know if other software like msi afterburner or precisionX can control the fans.

I really want those fans working, because they are controlled by the gpu and thus are coupled to the gpu temp.
They make it easy to control case airflow based on gpu temp, as the mainboard cannot control fans based on gpu temp.


On Arch they do nothing. They definitely do not copy the speed on the main (shroud) fans.
And yes I have fan control enabled for the nvidia-drivers:

nvidia-settings -a "[gpu:0]/GPUFanControlState=1"
nvidia-settings -a "[fan:0]/GPUTargetFanSpeed=33"

but I am still looking for a way to adjust the fan curve (RPM vs temp) beside the fixed value assignment.


cloud you please tell me for what I should look inside /sys/class/hwmon ?
there is a lot of stuff... tree outputs 71800 lines....
so its a bit too much for just looking around.

Offline

#4 2018-07-21 10:36:58

Ropid
Member
Registered: 2015-03-09
Posts: 1,069

Re: Asus GTX 1080 external fan header control

About /sys/class/hwmon, look at file names in the sub-folders:

ls /sys/class/hwmon/*/

And look at the name of the driver that's providing the entries in the different sub-folders:

tail /sys/class/hwmon/*/name

I bet you will find nothing interesting. sad But you never know, so still try it.

The way I do things in Linux is, I have all fans connected to the motherboard. I then have a script that reads CPU and GPU temperatures, then does a sort of fan curve to translate it into a fan speed and sets that for the motherboard fan headers. Here's the script if you are interested:

http://ix.io/1hWu

In Windows, I had a similar setup with all fans connected to the motherboard, then used a software named "SpeedFan" to set up a fan curve. SpeedFan can use the GPU temperature as input for a fan curve, and you can also do two curves for two inputs (for CPU and for GPU) that both overlay and send output to the same fans.

Offline

#5 2018-07-21 11:08:49

winnetou
Member
Registered: 2018-05-04
Posts: 7

Re: Asus GTX 1080 external fan header control

well I cannot find anything unusal, but I am not too familiar with those things...
so I put the outputs here:

$ ls /sys/class/hwmon/*/
/sys/class/hwmon/hwmon0/:
device  fan1_input  fan1_label  name  power  pwm1_enable  subsystem  uevent

/sys/class/hwmon/hwmon1/:
device  subsystem         temp1_input  temp2_crit        temp2_label  temp3_crit_alarm  temp3_max         temp4_input  temp5_crit        temp5_label
name    temp1_crit        temp1_label  temp2_crit_alarm  temp2_max    temp3_input       temp4_crit        temp4_label  temp5_crit_alarm  temp5_max
power   temp1_crit_alarm  temp1_max    temp2_input       temp3_crit   temp3_label       temp4_crit_alarm  temp4_max    temp5_input       uevent
$ tail /sys/class/hwmon/*/name
==> /sys/class/hwmon/hwmon0/name <==
asus

==> /sys/class/hwmon/hwmon1/name <==
coretemp

so I guess the hwmon0 folder is the asus gpu with only 1 fan showing up (the shroud)...
but the fan1_label there shows up as cpu_fan



thank you for the script. I was thinking of doing something like this myself. But I am concerned about performance/interrupts. Wouldn't a very high polling rate be required to set the fan speed fast enough? (I mean under 1 s = high). Or is there another way of doing this via deamons for example (I do have very little knowledge out those).
I would rather have a built in (driver) solution. Though reading nvidia-temps with nvidia-smi and co would not be that difficult I guess.

I set all my fan curves for the sytem fans in BIOS. I don't like software controlling that, especially on windows I had very bad experience with them (resetting everything, not working properly). I have an Asus MB and even their AISuite did not work out well for me.
What I wonder though is: how do BIOS settings cooperate with your script? don't they overwrite each other?
(edit: I just understood your script, and the pwmX_enable settings controls that)

Do you know a nice app with graphical UI for fan control on Arch? (I will probalby post another topic with that question, as it kind of is off-topic here)

Last edited by winnetou (2018-07-21 11:31:55)

Offline

#6 2018-07-21 13:32:57

Ropid
Member
Registered: 2015-03-09
Posts: 1,069

Re: Asus GTX 1080 external fan header control

I guess that "asus" device is useless. It's missing a "pwm1" file where you would write a speed into to manually set a fan speed.

Did you run "sudo sensors-detect"? It might find the chip that your motherboard uses for sensors and fan control, and perhaps there's also some chip on the GPU that can be found. Try looking at /sys/class/hwmon again after running 'sensors-detect'.

I don't know about any graphical tool to control fans on Linux.

My script does the exact opposite of reacting fast. It only reacts very slowly and gradually to temperature changes. I wanted something that makes things like compiling something for just 15 seconds less annoying with regards to fans ramping up and down.

The way the script works is, it has a buffer where it collects temperature readings from the last two minutes. For setting the fan speed, it uses the average temperature of those last two minutes. The coolers on my CPU and GPU seem to buffer heat for longer than that, so the fans needing two minutes to ramp up to full speed is fine. I also like the idea that after the stress on CPU or GPU stops, the fans will still keep running fast for another minute and keep moving heat out of the coolers and the case.

About polling rate, it only reads temperatures every three seconds, and it only sets a new fan speed every nine seconds. That's fast enough because the average of the last two minutes is changing really slowly when there's stress starting up or shutting down.

Offline

#7 2018-07-21 14:39:55

winnetou
Member
Registered: 2018-05-04
Posts: 7

Re: Asus GTX 1080 external fan header control

I had already run sensors-detect. But I just did it another time. Nothing changed.
output of sensors is:

$ sensors
asus-isa-0000
Adapter: ISA adapter
cpu_fan:        0 RPM

no clue why cpu_fan is 0 RPM. maybe related to that missing pwm1 file?
I think that the "asus" device is my asus mainboards fan control. not the gpu.

well that upsets me. My platform is intel z170, my MB Asus ROG Maximus Ranger VIII
that is not the newest by now. it has been out there some time. I had hoped support was better.

I get your point on that fan-setting method. if your thermal mass is large enough it does make sense to "average" over short load bursts to keep the fans from unnecessary spin-ups. But everybody has to find their balance of workload and noise I guess.

Did you think of implementing your script as a deamon?
wouldn't that get rid of the "while true"-loop?

Thank you for the help till now!

Offline

#8 2018-07-21 15:55:19

Ropid
Member
Registered: 2015-03-09
Posts: 1,069

Re: Asus GTX 1080 external fan header control

I start it with a systemd service file:

$ cat /etc/systemd/system/fanauto.service 
[Unit]
Description=Automatic Fan Control
After=lm_sensors.service

[Service]
Type=simple
PIDFile=/var/run/fanauto.pid
ExecStart=/usr/local/bin/fanauto
Restart=always
RestartSec=30

[Install]
WantedBy=multi-user.target

About your motherboard, you can try to find out what "SuperIO" chip is used on it with Google. There seems to often be a way to make an existing driver load for unknown, newer chips that aren't yet officially supported. You might find something in for example issues discussions if there's a github repository for a driver's development.

What if that 'asus' device is actually the chip on your GPU that's managing the two extra fan headers that your GPU has? You don't have a 'pwm1' file there where you can set a speed, but you do have a 'pwm1_enable' file. That kind of file usually is to switch between different control modes of the chip, between an automatic fan speed behavior and a manual speed setting for example. Maybe check its contents with 'cat', then try to write something else into it. You could let a command "watch sensors" run in another window while you experiment, to see if something interesting happens to that 0 RPM on that 'cpu_fan'. About how to write into those files as a user, one way to do it is like this:

echo 1 | sudo tee /sys/class/hwmon/hwmon0/pwm1_enable

Offline

Board footer

Powered by FluxBB