You are not logged in.

#1 2016-04-16 21:23:58

szdani96
New Member
Registered: 2016-04-16
Posts: 4

Fan control

I have a hp d530 sff computer and the fan is very quiet. The fan is not working, only rotate very slowly and not controlled. Here is the output the sensors command:

szdani96@debian:~$ sensors
adt7463-i2c-0-2e
Adapter: SMBus I801 adapter at fc00
in0:          +0.00 V  (min =  +0.00 V, max =  +3.32 V)  ALARM
Vcore:        +1.51 V  (min =  +0.00 V, max =  +2.99 V)
+3.3V:        +3.28 V  (min =  +2.97 V, max =  +3.63 V)
+5V:          +5.16 V  (min =  +4.50 V, max =  +5.50 V)
+12V:         +3.25 V  (min =  +0.00 V, max = +15.94 V)
fan1:           0 RPM  (min =    0 RPM)
fan2:           0 RPM  (min =    0 RPM)
fan3:           0 RPM  (min =    0 RPM)
fan4:           0 RPM  (min =    0 RPM)
temp1:        +31.2°C  (low  = -127.0°C, high = +127.0°C)
M/B Temp:     +37.5°C  (low  = -127.0°C, high = +127.0°C)
temp3:        +45.2°C  (low  = -127.0°C, high = +127.0°C)
cpu0_vid:    +1.525 V

The fan speed in not showing. I worry about that the summer is coming, so I would control the fan speed.

Offline

#2 2016-04-16 21:56:56

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,093
Website

Re: Fan control

Try this:

sudo apt install fancontrol
sudo systemctl enable fancontrol
sudo systemctl start fancontrol

Offline

#3 2016-04-17 05:01:31

nobody
The Great
Registered: 2015-08-10
Posts: 3,655

Re: Fan control

Not all fans can be usercontrolled. It depends on both the hardware's capabilities and the driver.

Chdir into /sys, and run

rinne:/sys 
 $ find -name *pwm* 
./devices/platform/thinkpad_hwmon/pwm1
./devices/platform/thinkpad_hwmon/pwm1_enable
find: ‘./kernel/debug’: Permission denied

You need to look into any PWM entries (pulse width modulation interfaces, required reading: pwm.text). They're what Linux uses to control fan speeds. In my case:

$ cd /sys/devices/platform/thinkpad_hwmon
$ ls
hwmon  power  driver  driver_override  fan1_input  modalias  name  pwm1  pwm1_enable  subsystem  uevent
$ cat driver/version
ThinkPad ACPI Extras v0.25

So I need to look at the thinkpad ACPI driver documentation to learn about the fan speed capabilities of the driver: https://www.kernel.org/doc/Documentatio … d-acpi.txt. This document tells me which extra kernel parameters I need to specifiy in order to be able to control the fan speed in software, and which control options I have:

hwmon device attribute pwm1_enable:
	0: PWM offline (fan is set to full-speed mode)
	1: Manual PWM control (use pwm1 to set fan level)
	2: Hardware PWM control (EC "auto" mode)
	3: reserved (Software PWM control, not implemented yet)

Currently, by default, my fan is controlled by the embedded controller:

rinne:/sys/devices/platform/thinkpad_hwmon 
 $ cat pwm1_enable 
2

In order to be able to use fancontrol as HoaS suggested, you need to permanently switch to manual or software PWM control so that fancontrold can use the interface. After rebooting with an extra module parameter:

NOTE NOTE NOTE: fan control operations are disabled by default for
safety reasons.  To enable them, the module parameter "fan_control=1"
must be given to thinkpad-acpi.
rinne:/sys/devices/platform/thinkpad_hwmon 
 $ echo 1 | sudo tee pwm1_enable 

and make the configuration permanent by adding them to /etc/tmpfiles.d (systemd-specific).

You need to adapt and replay the above workflow using the ACPI driver for your laptop, then you can proceed to use fancontrold. Just don't fry your computer by turning the fan off.

Offline

#4 2016-04-17 08:59:00

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,093
Website

Re: Fan control

twoion wrote:
rinne:/sys/devices/platform/thinkpad_hwmon 
 $ echo 1 | sudo tee pwm1_enable 
sudo tee pwm1_enable <<< "1"

tongue

Offline

#5 2016-04-22 21:09:19

szdani96
New Member
Registered: 2016-04-16
Posts: 4

Re: Fan control

I try your answer, but I think I haven't got thinkpad acpi.
My output:

/sys$ find -name *pwm* 
./devices/pci0000:00/0000:00:1f.3/i2c-0/0-002e/pwm1
./devices/pci0000:00/0000:00:1f.3/i2c-0/0-002e/pwm2
./devices/pci0000:00/0000:00:1f.3/i2c-0/0-002e/pwm3
./devices/pci0000:00/0000:00:1f.3/i2c-0/0-002e/pwm1_auto_channels
./devices/pci0000:00/0000:00:1f.3/i2c-0/0-002e/pwm1_enable
./devices/pci0000:00/0000:00:1f.3/i2c-0/0-002e/pwm1_auto_pwm_minctl
./devices/pci0000:00/0000:00:1f.3/i2c-0/0-002e/pwm2_auto_channels
./devices/pci0000:00/0000:00:1f.3/i2c-0/0-002e/pwm3_enable
./devices/pci0000:00/0000:00:1f.3/i2c-0/0-002e/pwm3_auto_channels
./devices/pci0000:00/0000:00:1f.3/i2c-0/0-002e/pwm3_auto_pwm_min
./devices/pci0000:00/0000:00:1f.3/i2c-0/0-002e/pwm2_auto_pwm_minctl
./devices/pci0000:00/0000:00:1f.3/i2c-0/0-002e/pwm2_auto_pwm_min
./devices/pci0000:00/0000:00:1f.3/i2c-0/0-002e/pwm1_freq
./devices/pci0000:00/0000:00:1f.3/i2c-0/0-002e/pwm2_freq
./devices/pci0000:00/0000:00:1f.3/i2c-0/0-002e/pwm3_freq
./devices/pci0000:00/0000:00:1f.3/i2c-0/0-002e/pwm2_enable
./devices/pci0000:00/0000:00:1f.3/i2c-0/0-002e/pwm3_auto_pwm_minctl
./devices/pci0000:00/0000:00:1f.3/i2c-0/0-002e/pwm1_auto_pwm_min
find: `./kernel/debug': Permission denied
szdani96@debian:/sys/devices/platform$ ls
alarmtimer  microcode  platform-framebuffer.0  power         serial8250
i8042       pcspkr     PNP0C0C:00              regulatory.0  uevent
szdani96@debian:/sys/devices/platform/i8042$ ls
driver  modalias  power  serio0  serio1  subsystem  uevent

So I'm stuck. What should I do?

Offline

#6 2016-04-23 03:55:04

nobody
The Great
Registered: 2015-08-10
Posts: 3,655

Re: Fan control

szdani96 wrote:

I try your answer, but I think I haven't got thinkpad acpi.
My output:

/sys$ find -name *pwm* 
./devices/pci0000:00/0000:00:1f.3/i2c-0/0-002e/pwm1
./devices/pci0000:00/0000:00:1f.3/i2c-0/0-002e/pwm2
./devices/pci0000:00/0000:00:1f.3/i2c-0/0-002e/pwm3
./devices/pci0000:00/0000:00:1f.3/i2c-0/0-002e/pwm1_auto_channels
./devices/pci0000:00/0000:00:1f.3/i2c-0/0-002e/pwm1_enable
./devices/pci0000:00/0000:00:1f.3/i2c-0/0-002e/pwm1_auto_pwm_minctl
./devices/pci0000:00/0000:00:1f.3/i2c-0/0-002e/pwm2_auto_channels
./devices/pci0000:00/0000:00:1f.3/i2c-0/0-002e/pwm3_enable
./devices/pci0000:00/0000:00:1f.3/i2c-0/0-002e/pwm3_auto_channels
./devices/pci0000:00/0000:00:1f.3/i2c-0/0-002e/pwm3_auto_pwm_min
./devices/pci0000:00/0000:00:1f.3/i2c-0/0-002e/pwm2_auto_pwm_minctl
./devices/pci0000:00/0000:00:1f.3/i2c-0/0-002e/pwm2_auto_pwm_min
./devices/pci0000:00/0000:00:1f.3/i2c-0/0-002e/pwm1_freq
./devices/pci0000:00/0000:00:1f.3/i2c-0/0-002e/pwm2_freq
./devices/pci0000:00/0000:00:1f.3/i2c-0/0-002e/pwm3_freq
./devices/pci0000:00/0000:00:1f.3/i2c-0/0-002e/pwm2_enable
./devices/pci0000:00/0000:00:1f.3/i2c-0/0-002e/pwm3_auto_pwm_minctl
./devices/pci0000:00/0000:00:1f.3/i2c-0/0-002e/pwm1_auto_pwm_min
find: `./kernel/debug': Permission denied
szdani96@debian:/sys/devices/platform$ ls
alarmtimer  microcode  platform-framebuffer.0  power         serial8250
i8042       pcspkr     PNP0C0C:00              regulatory.0  uevent
szdani96@debian:/sys/devices/platform/i8042$ ls
driver  modalias  power  serio0  serio1  subsystem  uevent

So I'm stuck. What should I do?

i8042 is a driver for mouse and keyboard input. Try and post please:

cd ./devices/pci0000:00/0000:00:1f.3/i2c-0/0-002e/
find *
echo ======= end find =========
cat *
echo ======= end cat ==========
cd ./devices/pci0000:00/0000:00:1f.3
grep DRIVER *
echo ======= end grep =========
ls subsystem/drivers

The existence of those pwm devices is promising because they're located on the i2c bus, a protocol for communicating between hardware components commonly used on mainboards and such.

Offline

#7 2016-04-25 17:02:12

szdani96
New Member
Registered: 2016-04-16
Posts: 4

Re: Fan control

szdani96@debian:/sys/devices/pci0000:00/0000:00:1f.3/i2c-0/0-002e$ find *
alarms
cpu0_vid
driver
fan1_alarm
fan1_input
fan1_min
fan2_alarm
fan2_input
fan2_min
fan3_alarm
fan3_input
fan3_min
fan4_alarm
fan4_input
fan4_min
hwmon
hwmon/hwmon0
hwmon/hwmon0/power
hwmon/hwmon0/power/control
hwmon/hwmon0/power/async
hwmon/hwmon0/power/runtime_enabled
hwmon/hwmon0/power/runtime_active_kids
hwmon/hwmon0/power/runtime_active_time
hwmon/hwmon0/power/autosuspend_delay_ms
hwmon/hwmon0/power/runtime_status
hwmon/hwmon0/power/runtime_usage
hwmon/hwmon0/power/runtime_suspended_time
hwmon/hwmon0/device
hwmon/hwmon0/subsystem
hwmon/hwmon0/uevent
in0_alarm
in0_input
in0_max
in0_min
in1_alarm
in1_input
in1_max
in1_min
in2_alarm
in2_input
in2_max
in2_min
in3_alarm
in3_input
in3_max
in3_min
in4_alarm
in4_input
in4_max
in4_min
modalias
name
power
power/control
power/async
power/runtime_enabled
power/runtime_active_kids
power/runtime_active_time
power/autosuspend_delay_ms
power/runtime_status
power/runtime_usage
power/runtime_suspended_time
pwm1
pwm1_auto_channels
pwm1_auto_pwm_min
pwm1_auto_pwm_minctl
pwm1_enable
pwm1_freq
pwm2
pwm2_auto_channels
pwm2_auto_pwm_min
pwm2_auto_pwm_minctl
pwm2_enable
pwm2_freq
pwm3
pwm3_auto_channels
pwm3_auto_pwm_min
pwm3_auto_pwm_minctl
pwm3_enable
pwm3_freq
subsystem
temp1_alarm
temp1_auto_temp_crit
temp1_auto_temp_max
temp1_auto_temp_min
temp1_auto_temp_off
temp1_fault
temp1_input
temp1_max
temp1_min
temp2_alarm
temp2_auto_temp_crit
temp2_auto_temp_max
temp2_auto_temp_min
temp2_auto_temp_off
temp2_input
temp2_max
temp2_min
temp3_alarm
temp3_auto_temp_crit
temp3_auto_temp_max
temp3_auto_temp_min
temp3_auto_temp_off
temp3_fault
temp3_input
temp3_max
temp3_min
uevent
vrm
szdani96@debian:/sys/devices/pci0000:00/0000:00:1f.3/i2c-0/0-002e$ echo ======= end find =========
======= end find =========
szdani96@debian:/sys/devices/pci0000:00/0000:00:1f.3/i2c-0/0-002e$ cat *
1
1525
cat: driver: Is a directory
0
0
0
0
0
0
0
0
0
0
0
0
cat: hwmon: Is a directory
1
3
3320
0
0
1506
2988
0
0
3274
3627
2973
0
5169
5495
4505
0
3250
15938
0
i2c:adt7463
adt7463
cat: power: Is a directory
0
3
0
0
2
88
255
-1
128
0
0
35
255
-1
128
0
0
88
cat: subsystem: Is a directory
0
100000
92000
90000
86000
0
27000
127000
-127000
0
100000
122000
90000
86000
33250
127000
-127000
0
84000
68300
65000
61000
0
42250
127000
-127000
DRIVER=lm85
MODALIAS=i2c:adt7463
90
szdani96@debian:/sys/devices/pci0000:00/0000:00:1f.3/i2c-0/0-002e$ echo ======= end cat ==========
======= end cat ==========
szdani96@debian:/sys/devices/pci0000:00/0000:00:1f.3$ grep DRIVER *
grep: driver: Is a directory
grep: i2c-0: Is a directory
grep: power: Is a directory
grep: remove: Permission denied
grep: rescan: Permission denied
grep: resource4: Permission denied
grep: subsystem: Is a directory
uevent:DRIVER=i801_smbus
szdani96@debian:/sys/devices/pci0000:00/0000:00:1f.3$ echo ======= end grep =========
======= end grep =========
szdani96@debian:/sys/devices/pci0000:00/0000:00:1f.3$ ls subsystem/drivers
agpgart-ali       agpgart-nvidia       ata_piix    lpc_ich     snd_intel8x0
agpgart-amdk7     agpgart-serverworks  ehci-pci    parport_pc  tg3
agpgart-ati       agpgart-sis          i801_smbus  pcieport    uhci_hcd
agpgart-efficeon  agpgart-via          i915        serial      xen-platform-pci
agpgart-intel     ata_generic          ioapic      shpchp

Here is the output.

Offline

#8 2016-05-27 13:36:37

szdani96
New Member
Registered: 2016-04-16
Posts: 4

Re: Fan control

What Can I do?

Offline

Board footer

Powered by FluxBB