# Asus KGPE-D16 server - fans running loud all the time



## pkubaj (Mar 14, 2016)

I've got an Asus KGPE-D16-based home server. It runs FreeBSD great, but one thing bothers me. Its fans run all the time at maximum volume, although it's not hot inside since it's in my basement. I've found that it uses Winbond W83795G chip for temperature detection, which seems to be supported by OpenBSD and NetBSD, but I haven't found anything about FreeBSD. Since it seems to use SMBus and I^2C, I've loaded corresponding kernel modules, but FreeBSD still doesn't detect the chip. Is there anything I can do about it to make fans running slower? It concerns me that the fans may break after some time.

In `$ dmesg -a` there's no mention of winbond, w83795g, iic or smb (I've grepped with `-i`). The same can be told about `$ pciconf -lv`.
`$ kldstat`

```
Id Refs Address            Size     Name
 1   35 0xffffffff80200000 134e870  kernel
 2    1 0xffffffff8154f000 2e6958   zfs.ko
 3    2 0xffffffff81836000 5640     opensolaris.ko
 4    1 0xffffffff8183c000 1d660    geom_eli.ko
 5    1 0xffffffff8185a000 21670    geom_mirror.ko
 6    1 0xffffffff81a11000 1ac28a   vmm.ko
 7    1 0xffffffff81bbe000 b25      nmdm.ko
 8    1 0xffffffff81bbf000 5d49     if_bridge.ko
 9    1 0xffffffff81bc5000 3c3a     bridgestp.ko
10    1 0xffffffff81bc9000 24ba     if_tap.ko
11    1 0xffffffff81bcc000 14b3     imgact_binmisc.ko
12    1 0xffffffff81bce000 d1a      iic.ko
13    1 0xffffffff81bcf000 19e6     iicbus.ko
14    1 0xffffffff81bd1000 c9a      smb.ko
15    1 0xffffffff81bd2000 89f      smbus.ko
```

`$ uname -a`:

```
FreeBSD xxx 10.2-RELEASE-p12 FreeBSD 10.2-RELEASE-p12 #11 r295065: Thu Feb 11 17:21:42 CET 2016     toor@xxx:/usr/obj/usr/src/sys/SERVER  amd64
```


----------



## SirDice (Mar 14, 2016)

Not sure if it's going to help but try loading acpi_thermal(4).


----------



## pkubaj (Mar 14, 2016)

SirDice said:


> Not sure if it's going to help but try loading acpi_thermal(4).


It doesn't help.

```
kldload: can't load acpi_thermal: No such file or directory
```
But it seems acpi_thermal(4) is bundled with acpi(4), which is built into my kernel:

```
kldstat -v | grep acpi
        34 acpi/acpi_lid
        264 acpi/atkbdc
        255 acpi/fpupnp
        254 root/nexus_acpi
        33 acpi/acpi_isab
        32 acpi/hpet
        28 acpi/acpi_button
        44 acpi/acpi_timer
        43 cpu/acpi_throttle
        31 acpi/acpi_ec
        42 acpi/acpi_tz
        41 acpi/acpi_smbat
        40 acpi/acpi_sysresource
        27 acpi/acpi_acad
        30 acpi/cpu
        39 cpu/acpi_perf
        38 pci/acpi_pcib
        37 acpi/acpi_pcib
        168 acpi/uart
        297 acpi/atdma
        294 acpi/attimer
        292 acpi/atrtc
        290 acpi/dmar
        149 acpi/ppc
        36 acpi/acpi_pci_link
        270 acpi/ipmi_acpi
        26 nexus/acpi
        29 acpi/acpi_cmbat
        35 pcib/acpi_pci
        267 acpi/psmcpnp
```

Although it seems like 
	
	



```
hw.acpi.thermal
```
 isn't here:

```
sysctl hw.acpi.       
hw.acpi.cpu.cx_lowest: C8
hw.acpi.reset_video: 0
hw.acpi.handle_reboot: 1
hw.acpi.disable_on_reboot: 0
hw.acpi.verbose: 0
hw.acpi.s4bios: 0
hw.acpi.sleep_delay: 1
hw.acpi.suspend_state: S3
hw.acpi.standby_state: S1
hw.acpi.lid_switch_state: NONE
hw.acpi.sleep_button_state: S1
hw.acpi.power_button_state: S5
hw.acpi.supported_sleep_state: S1 S3 S4 S5
```


----------



## protocelt (Mar 15, 2016)

I don't know if libreboot/coreboot works with FreeBSD, but this may be of some interest to you if it does.


----------



## pkubaj (Mar 15, 2016)

protocelt said:


> I don't know if libreboot/coreboot works with FreeBSD, but this may be of some interest to you if it does.


I know about Libreboot and Coreboot. In fact, I use a notebook with Libreboot (TP X200). Libreboot works with FreeBSD, but can't display X11 and has problems running at all on my notebook (so I use Linux there). Coreboot with Seabios works great with FreeBSD.

One of the reasons I bought this motherboard was that I wanted to install Libreboot. However, there's still no stable release for KGPE-D16, and I don't want to use a testing snapshot on a server, so I still run the proprietary BIOS in its newest version.


Anyway, why do you propose Libreboot / Coreboot? Would it solve my problem?


----------



## Terry_Kennedy (Mar 16, 2016)

pkubaj said:


> I've got an Asus KGPE-D16-based home server. It runs FreeBSD great, but one thing bothers me. Its fans run all the time at maximum volume, although it's not hot inside since it's in my basement. I've found that it uses Winbond W83795G chip for temperature detection, which seems to be supported by OpenBSD and NetBSD, but I haven't found anything about FreeBSD. Since it seems to use SMBus and I^2C, I've loaded corresponding kernel modules, but FreeBSD still doesn't detect the chip. Is there anything I can do about it to make fans running slower? It concerns me that the fans may break after some time.


There is usually some management processor, running its own firmware, that handles fan speeds (and sometimes accepts "suggestions" via external sources). The reason for this is that if the fan speed was directly controlled by the operating system, an operating system hang or crash could lead to the fans not providing sufficient cooling and lead to system damage. That's also the reason that most of those systems power up with their fans running at maximum speed (which, with 34,000 RPM fans, is quite something to hear) and only slow down the fans once the management processor is up and running and receiving data from thermal sensors in the system.

Having said all that, take a look at the type(s) of fans used in your system. 2-wire fans neither control nor report their speed. 3-wire fans normally are not controllable, but use the 3rd wire to either report an actual speed, an error if the speed is less than some amount, or an error if the fan is not turning at all (which of those is reported depends on the particular fan model). 4-wire fans both report their speed on the 3rd wire and allow PWM control of fan speed on the 4th wire.


----------



## User23 (Mar 17, 2016)

The fan speed can be controlled by the BIOS. Enter the BIOS -> Power -> Hardware Monitor -> Fan Speed Control

Fan Speed Control [Generic Mode]

Allows you to configure the ASUS Smart Fan feature that smartly adjusts the fan speeds for more efficient system operation. Configuration options: [Full Speed Mode] [Whisper Mode] [Generic Mode] [High Density Mode]


----------



## pkubaj (Mar 18, 2016)

Terry_Kennedy said:


> There is usually some management processor, running its own firmware, that handles fan speeds (and sometimes accepts "suggestions" via external sources). The reason for this is that if the fan speed was directly controlled by the operating system, an operating system hang or crash could lead to the fans not providing sufficient cooling and lead to system damage. That's also the reason that most of those systems power up with their fans running at maximum speed (which, with 34,000 RPM fans, is quite something to hear) and only slow down the fans once the management processor is up and running and receiving data from thermal sensors in the system.
> 
> Having said all that, take a look at the type(s) of fans used in your system. 2-wire fans neither control nor report their speed. 3-wire fans normally are not controllable, but use the 3rd wire to either report an actual speed, an error if the speed is less than some amount, or an error if the fan is not turning at all (which of those is reported depends on the particular fan model). 4-wire fans both report their speed on the 3rd wire and allow PWM control of fan speed on the 4th wire.






User23 said:


> The fan speed can be controlled by the BIOS. Enter the BIOS -> Power -> Hardware Monitor -> Fan Speed Control
> 
> Fan Speed Control [Generic Mode]
> 
> Allows you to configure the ASUS Smart Fan feature that smartly adjusts the fan speeds for more efficient system operation. Configuration options: [Full Speed Mode] [Whisper Mode] [Generic Mode] [High Density Mode]



Thanks, I'm going to add a 2nd CPU soon and will then look into BIOS and also investigate the wire issue.


----------



## Terry_Kennedy (Mar 20, 2016)

User23 said:


> The fan speed can be controlled by the BIOS. Enter the BIOS -> Power -> Hardware Monitor -> Fan Speed Control


That's what I meant by "accepts "suggestions" via external sources". For the reasons I gave in my earlier pot, it is unlikely the BIOS has direct control over the fan speeds. The BMC / hardware monitor IC will accept speed requests as long as they don't run the fans outside the speed range it thinks the fans support, nor at a low enough speed that the system won't be cooled to a safe level.


----------



## pkubaj (Mar 26, 2016)

1. The fans are connected using 3 wires and I've checked again - `sysctl hw.acpi` doesn't print thermal subtree.
2. Funny enough, I must have set BIOS to Whisper Mode (that's what it was when I checked it), but the fans still run at full speed all the time.


----------

