# laptop fan does not stop

## josephg

once it starts, my laptop fan does not seem to stop even when it has cooled down. i used to reboot to stop the fan, but now i find a suspend is enough. 

initially i thought this was because my gentoo was always compiling something or the other. but now that my gentoo has settled down a bit, most of the time my loadavg hovers around the bottom.

the fan spins up correctly when coretemp heats up, but does not turn off when coretemp goes down.  i can even feel the cool drafts on myself.

this time, the fan started during an emerge sync/update, which finished long ago. after that the screen went to sleep, and now coretemp is down to 30°C, but the fan is still whirring away. i do a suspend to stop the fan, resume and continue working.

i have noticed that this does not happen on debian/arch. what might have i misconfigured in gentoo, and/or what should i be looking for?

----------

## Buffoon

What brand and model?

----------

## josephg

Toshiba A300-2C2

----------

## josephg

it's just happened again. fan is still blowing away.. after a long time since the kernel compile and emerge finished.. coretemp is 33"C.. i think cold enough.. fan not stopping. no messages in dmesg.

what should i be looking for?

----------

## Buffoon

There are some utilities in portage, see app-laptop/*.

----------

## josephg

the fan is still whirring after a few hours on coretemp scraping the bottom.. now 38"C

 *Buffoon wrote:*   

> There are some utilities in portage, see app-laptop/*.

 

do you mean any of these? the only fan i see is thinkfan. but this is not a thinkpad. would it still work?

```
 $ eix -Cc app-laptop

[N] app-laptop/batti (0.3.8-r2): A upower based battery monitor for the system tray, similar to batterymon

[N] app-laptop/configure-trackpoint (--): Thinkpad GNOME configuration utility for TrackPoint (For the linux kernel 2.6 TrackPoint driver)

[N] app-laptop/dispad (~0.3.1): Daemon to disable trackpads while typing

[N] app-laptop/easy-slow-down-manager (--): provides Linux users with functionality similar to Samsung Easy Speed Up Manager

[N] app-laptop/hdaps-gl (0.0.5): OpenGL visualization for HDAPS data

[N] app-laptop/hdapsd (20141203): IBM ThinkPad Hard Drive Active Protection System (HDAPS) daemon

[N] app-laptop/i8kutils (1.33-r1): Dell Inspiron and Latitude utilities

[N] app-laptop/ibam (~0.5.2-r3): Intelligent Battery Monitor

[N] app-laptop/laptop-mode-tools (1.66): Linux kernel laptop_mode user-space utilities

[N] app-laptop/lphdisk (0.9.1-r2): utility for preparing a hibernation partition for APM Suspend-To-Disk

[N] app-laptop/nvidiabl (0.83): Linux driver for setting the backlight brightness on laptops using NVIDIA GPU

[N] app-laptop/pbbuttonsd (~0.8.1-r4): Handles power management and special keys on laptops

[N] app-laptop/pommed (1.39-r1): Manage special features such as screen and keyboard backlight on Apple MacBook Pro/PowerBook

[N] app-laptop/powerprefs (~0.8.0): program to interface with pbbuttonsd (Powerbook/iBook) keys

[N] app-laptop/radeontool (1.6.3): Manage the backlight, external video output and registers of ATI Radeon graphics cards

[N] app-laptop/samsung-tools (--): Tools for Samsung laptops

[N] app-laptop/spicctrl (1.9-r1): tool for the sonypi-Device (found in Sony Vaio Notebooks)

[N] app-laptop/thinkfan (0.9.2-r1): simple fan control program for thinkpads

[N] app-laptop/tp_smapi (0.41): IBM ThinkPad SMAPI BIOS driver

[N] app-laptop/tpacpi-bat (--): Control battery thresholds of recent ThinkPads, not supported by tp_smapi

[N] app-laptop/tpb (0.6.4-r1): IBM ThinkPad buttons utility
```

----------

## russK

There may be a package that helps there, but also sometimes simpler approach is smart fan settings in BIOS.

Regards

----------

## Ant P.

sys-apps/lm_sensors

----------

## Logicien

Yes, lm_sensors contain a service application call fancontrol. It work for me on an Asus EeePc 900 and a Thinkpad T420. There is a problem with Fancontrol.

You can configure Fancontrol with the command pwmconfig. It create a file /etc/fancontrol who use the detected paths to the sensors and fans. After a reboot or a shutdown the Linux path to those devices can have change. You have to reconfigure Fancontrol to use the new devices paths. It is not practicle but Fancontrol work ok when the devices paths are good in /etc/fancontrol.

I manage only the processor fan with Fancontrol. It may not be able to control other fans.

----------

## josephg

thanks folks. i had installed lm_sensors a few days before i created this thread. it didn't work as expected, and i removed it as i don't like keeping useless stuff. i will try it again now.

----------

## josephg

i ran sensors-detect and said yes to everything. the only module it found was coretemp. i wonder if i have crippled something, and it's supposed to find more things on my laptop. this is what's generated:

```
$ cat /etc/conf.d/lm_sensors

# Generated by sensors-detect on Wed Oct 12 08:49:51 2016

# This file is sourced by /etc/init.d/lm_sensors and defines the modules to

# be loaded/unloaded.

#

# The format of this file is a shell script that simply defines variables:

# HWMON_MODULES for hardware monitoring driver modules, and optionally

# BUS_MODULES for any required bus driver module (for example for I2C or SPI).

# Load modules at startup

LOADMODULES=yes

# Initialize sensors at startup

INITSENSORS=yes

HWMON_MODULES="coretemp"
```

and first run:

```
 # /etc/init.d/lm_sensors start

 * Caching service dependencies ...                                                                                                                                                                           [ ok ]

 * MODULE_0 is not set in /etc/conf.d/lm_sensors, try running sensors-detect

 * ERROR: lm_sensors failed to start
```

not working  :Sad: 

----------

## josephg

```
# pwmconfig 

# pwmconfig revision 6166 (2013-05-01)

This program will search your sensors for pulse width modulation (pwm)

controls, and test each one to see if it controls a fan on

your motherboard. Note that many motherboards do not have pwm

circuitry installed, even if your sensor chip supports pwm.

We will attempt to briefly stop each fan using the pwm controls.

The program will attempt to restore each fan to full speed

after testing. However, it is ** very important ** that you

physically verify that the fans have been to full speed

after the program has completed.

/usr/sbin/pwmconfig: There are no pwm-capable sensor modules installed
```

----------

## josephg

```
$ sensors

coretemp-isa-0000

Adapter: ISA adapter

Core 0:       +52.0°C  (high = +100.0°C, crit = +100.0°C)

Core 1:       +52.0°C  (high = +100.0°C, crit = +100.0°C)
```

----------

## Zucca

I remember I had to install a seperate module for the kernel to have at least some control over my Acer laptop fan. The module was named acerhdf. And to control the fan I neede to insert module parameters while inserting the module into the kernel. So basically I needed to edit the kernel command line.

And the case with this might be somewhat the same.

Toshiba A300s use actually omnibook (HP, yes) kernel module for acpi stuff.

There's no ebuild for it (afaik), so you must install it manually.

Before you go check that your laptop has Phoenix BIOS.

Then I'll redirect you to https://sourceforge.net/projects/omnibook/ and wish the best luck. :)

----------

## josephg

i tested this in debian on the same laptop, and the above commands do the same, ie nothing! but i don't have this fan problem in debian. it seems to stop automatically when cputemp goes down.

 *Zucca wrote:*   

> There's no ebuild for it (afaik), so you must install it manually.
> 
> Before you go check that your laptop has Phoenix BIOS.

 

i don't know if it is Phoenix.. it says InsydeH2O BIOS.. can't find anything else in the bios setup screens.

does this help?

```
# dmidecode -t0

# dmidecode 2.12

SMBIOS 2.4 present.

Handle 0x0000, DMI type 0, 24 bytes

BIOS Information

        Vendor: INSYDE

        Version: 2.20

        Release Date: 12/07/2009

        ROM Size: 1024 kB

        Characteristics:

                PCI is supported

                BIOS is upgradeable

                BIOS shadowing is allowed

                Boot from CD is supported

                Selectable boot is supported

                BIOS ROM is socketed

                EDD is supported

                Japanese floppy for NEC 9800 1.2 MB is supported (int 13h)

                Japanese floppy for Toshiba 1.2 MB is supported (int 13h)

                5.25"/360 kB floppy services are supported (int 13h)

                5.25"/1.2 MB floppy services are supported (int 13h)

                3.5"/720 kB floppy services are supported (int 13h)

                3.5"/2.88 MB floppy services are supported (int 13h)

                8042 keyboard services are supported (int 9h)

                CGA/mono video services are supported (int 10h)

                ACPI is supported

                USB legacy is supported

                Targeted content distribution is supported
```

----------

## Zucca

 *josephg wrote:*   

> i tested this in debian on the same laptop, and the above commands do the same, ie nothing! but i don't have this fan problem in debian. it seems to stop automatically when cputemp goes down.

 If you can run debian on this laptop (Live CD maybe?) then run "lsmod | grep omnibook" and see if it's loaded. If it's there, then it (the omnibook kernel module) might well solve your problem.

----------

## josephg

 *Zucca wrote:*   

> If you can run debian on this laptop (Live CD maybe?) then run "lsmod | grep omnibook" and see if it's loaded. If it's there, then it (the omnibook kernel module) might well solve your problem.

 

i have a debian (and arch) installed on this same laptop. running the following from debian fully updated:

```
# lsmod | grep omni

# modprobe -c | grep omni

alias usb:v0586p1000d*dc*dsc*dp*ic*isc*ip*in* omninet

alias usb:v0586p2000d*dc*dsc*dp*ic*isc*ip*in* omninet

# modprobe omninet

# lsmod | grep omni

omninet                16384  0

usbserial              32768  1 omninet

usbcore               184320  6 uhci_hcd,uvcvideo,usbserial,ehci_hcd,ehci_pci,omninet
```

can't find any other omni modules. that omninet seems to be something usb related.

----------

## Zucca

Just in case... You have these options configured as modules or in kernel?:CONFIG_ACPICONFIG_ACPI_FANCONFIG_ACPI_THERMALCONFIG_ACPI_PROCESSOR

----------

## josephg

 *Zucca wrote:*   

> Just in case... You have these options configured as modules or in kernel?:CONFIG_ACPICONFIG_ACPI_FANCONFIG_ACPI_THERMALCONFIG_ACPI_PROCESSOR

 

CONFIG_ACPI=y

CONFIG_ACPI_FAN=m

CONFIG_ACPI_THERMAL=m

CONFIG_ACPI_PROCESSOR=y

```
$ cat /usr/src/linux/.config | grep CONFIG_ACPI

CONFIG_ACPI=y

CONFIG_ACPI_LEGACY_TABLES_LOOKUP=y

CONFIG_ACPI_SYSTEM_POWER_STATES_SUPPORT=y

# CONFIG_ACPI_DEBUGGER is not set

CONFIG_ACPI_SLEEP=y

# CONFIG_ACPI_PROCFS_POWER is not set

CONFIG_ACPI_REV_OVERRIDE_POSSIBLE=y

# CONFIG_ACPI_EC_DEBUGFS is not set

CONFIG_ACPI_AC=m

CONFIG_ACPI_BATTERY=m

CONFIG_ACPI_BUTTON=y

CONFIG_ACPI_VIDEO=y

CONFIG_ACPI_FAN=m

CONFIG_ACPI_DOCK=y

CONFIG_ACPI_CPU_FREQ_PSS=y

CONFIG_ACPI_PROCESSOR_IDLE=y

CONFIG_ACPI_PROCESSOR=y

CONFIG_ACPI_HOTPLUG_CPU=y

CONFIG_ACPI_PROCESSOR_AGGREGATOR=m

CONFIG_ACPI_THERMAL=m

# CONFIG_ACPI_CUSTOM_DSDT is not set

# CONFIG_ACPI_INITRD_TABLE_OVERRIDE is not set

# CONFIG_ACPI_DEBUG is not set

# CONFIG_ACPI_PCI_SLOT is not set

CONFIG_ACPI_CONTAINER=y

CONFIG_ACPI_HOTPLUG_IOAPIC=y

CONFIG_ACPI_SBS=m

CONFIG_ACPI_HED=y

# CONFIG_ACPI_CUSTOM_METHOD is not set

# CONFIG_ACPI_REDUCED_HARDWARE_ONLY is not set

CONFIG_ACPI_APEI=y

CONFIG_ACPI_APEI_GHES=y

CONFIG_ACPI_APEI_PCIEAER=y

# CONFIG_ACPI_APEI_EINJ is not set

# CONFIG_ACPI_APEI_ERST_DEBUG is not set

# CONFIG_ACPI_EXTLOG is not set

CONFIG_ACPI_I2C_OPREGION=y

CONFIG_ACPI_THERMAL_REL=m

CONFIG_ACPI_WMI=m

CONFIG_ACPI_TOSHIBA=m

# CONFIG_ACPI_CMPC is not set
```

```
$ lsmod | grep -e acpi -e fan -e therm -e proc

toshiba_acpi           21876  0

sparse_keymap           2056  1 toshiba_acpi

wmi                     5606  1 toshiba_acpi

thermal                 6939  0

fan                     3202  0

acpi_cpufreq            5179  0
```

----------

## Zucca

 *josephg wrote:*   

> 
> 
> ```
> $ lsmod | grep -e acpi -e fan -e therm -e proc
> 
> ...

 You have toshiba_acpi module. Let's see what it has to offer:

```
modinfo toshiba_acpi | awk '/^parm:/ {$1=""; print $0}'
```

----------

## josephg

 *Zucca wrote:*   

> You have toshiba_acpi module. Let's see what it has to offer:
> 
> ```
> modinfo toshiba_acpi | awk '/^parm:/ {$1=""; print $0}'
> ```
> ...

 

```
$ modinfo toshiba_acpi | awk '/^parm:/ {$1=""; print $0}'

$ modinfo toshiba_acpi

filename:       /lib/modules/4.4.21-gentoo-josephg/kernel/drivers/platform/x86/toshiba_acpi.ko.gz

license:        GPL

description:    Toshiba Laptop ACPI Extras Driver

author:         John Belmonte

alias:          acpi*:TOS1900:*

alias:          acpi*:TOS6208:*

alias:          acpi*:TOS6207:*

alias:          acpi*:TOS6200:*

depends:        sparse-keymap,wmi

intree:         Y

vermagic:       4.4.21-gentoo-josephg SMP mod_unload CORE2
```

btw you don't have to parse such complicated queries. try this instead  :Wink:  simpler

```
$ modinfo -p <module>
```

----------

## Zucca

 *josephg wrote:*   

> btw you don't have to parse such complicated queries. try this instead ;) simpler
> 
> ```
> $ modinfo -p <module>
> ```
> ...

 I'm too used to awk. ;P

Anyway. Does echoing 0, 1, 2 or 3 to /sys/devices/virtual/thermal/cooling_device*/cur_state do anything to the fan?

----------

## josephg

 *Zucca wrote:*   

>  *josephg wrote:*   btw you don't have to parse such complicated queries. try this instead  simpler
> 
> ```
> $ modinfo -p <module>
> ```
> ...

 

i like awk  :Smile:  i should get used to it more.. but i keep looking for simpler ways  :Razz: 

 *Zucca wrote:*   

> Anyway. Does echoing 0, 1, 2 or 3 to /sys/devices/virtual/thermal/cooling_device*/cur_state do anything to the fan?

 

i'll have to try that when my fan blows up again.. don't know how to trigger that

the current values at coretemp 37"C are

```
$ grep . /sys/devices/virtual/thermal/cooling_device*/cur_state 

/sys/devices/virtual/thermal/cooling_device0/cur_state:0

/sys/devices/virtual/thermal/cooling_device1/cur_state:0

/sys/devices/virtual/thermal/cooling_device2/cur_state:1

/sys/devices/virtual/thermal/cooling_device3/cur_state:7
```

----------

## Zucca

 *josephg wrote:*   

> i'll have to try that when my fan blows up again.. don't know how to trigger that

 Hmmm... Try suspending and then wakeup. If the fan ramps up, then you'll need to reload the module causing it. Maybe "fan" or "toshiba_laptop".

I remember this being an issue in some cases.

----------

## josephg

when my fan blows aggressively and the coretemp is very low, i can usually trigger a suspend which stops the fan.

i meant i don't know how to kickstart the fan to start blowing. suspend/resume does not start the fan on this laptop.

----------

## josephg

i just did a suspend. i hadn't noticed that the fan was spinning. it wasn't very fast though. i did notice the silence when laptop suspended. laptop resumed without the fan blowing up. it is quiet and peaceful now.

these values are still the same:

```
$ grep . /sys/devices/virtual/thermal/cooling_device*/cur_state 

/sys/devices/virtual/thermal/cooling_device0/cur_state:0

/sys/devices/virtual/thermal/cooling_device1/cur_state:0

/sys/devices/virtual/thermal/cooling_device2/cur_state:1

/sys/devices/virtual/thermal/cooling_device3/cur_state:7
```

----------

