LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-18-2017, 10:34 AM   #1
kevmccor
Member
 
Registered: Aug 2004
Location: Texas
Distribution: slackware
Posts: 158

Rep: Reputation: 44
Getting lm-sensors to work for cpu fan control


I recently upgrade my cpu and I don't know how to get the cpu fan to quiet down. I think the solution is lm-sensors, but I find very little about it with regard to Slackware. What I do find is pretty confusing.

These are, hopefully, informative bits of information:

Set cpu speed and fan control with lm-sensors

Mobo: Asrock H61MV-ITX
CPU: Intel i5-3470T
cpu heatsink: Dynatron T459 Intel LGA 1155
No system fan

Selected lines from /var/log/dmesg:
Code:
[    0.000000] Linux version 4.4.88 (root@hive64) (gcc version 5.3.0 (GCC) ) #1 SMP Thu Sep 14 14:07:01 CDT 2017
[    0.000000] Command line: auto BOOT_IMAGE=Modular-4488 ro root=802 vt.default_utf8=1 acpi_enforce_resources=lax quiet

[    0.053924] cpuidle: using governor ladder
[    0.057929] cpuidle: using governor menu

[    0.335145] intel_idle: MWAIT substates: 0x1120
[    0.335146] intel_idle: v0.4.1 model 0x3A
[    0.335147] intel_idle: lapic_timer_reliable_states 0xffffffff

[    3.564714] Intel P-state driver initializing.

[    6.759389] ACPI Warning: SystemIO range 0x0000000000000428-0x000000000000042F conflicts with OpRegion 0x0000000000000400-0x000000000000047F (\PMIO) (20150930/utaddress-254)
[    6.759394] ACPI: This conflict may cause random problems and system instability
[    6.759395] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver
[    6.759400] ACPI Warning: SystemIO range 0x0000000000000540-0x000000000000054F conflicts with OpRegion 0x0000000000000500-0x0000000000000563 (\GPIO) (20150930/utaddress-254)
[    6.759402] ACPI: This conflict may cause random problems and system instability
[    6.759402] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver
[    6.759403] ACPI Warning: SystemIO range 0x0000000000000530-0x000000000000053F conflicts with OpRegion 0x0000000000000500-0x0000000000000563 (\GPIO) (20150930/utaddress-254)
[    6.759405] ACPI: This conflict may cause random problems and system instability
[    6.759406] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver
[    6.759406] ACPI Warning: SystemIO range 0x0000000000000500-0x000000000000052F conflicts with OpRegion 0x0000000000000500-0x0000000000000563 (\GPIO) (20150930/utaddress-254)
[    6.759408] ACPI: This conflict may cause random problems and system instability
[    6.759409] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver

[    7.168229] acpi device:41: registered as cooling_device4

[    7.222640] [drm:intel_set_pch_fifo_underrun_reporting [i915]] *ERROR* uncleared pch fifo underrun on pch transcoder A
[    7.222669] [drm:intel_pch_fifo_underrun_irq_handler [i915]] *ERROR* PCH transcoder A FIFO underrun
Selected lines from /var/log/syslog:

Code:
kernel: [    0.005178] ACPI: 4 ACPI AML tables successfully acquired and loaded
kernel: [    0.005396] ENERGY_PERF_BIAS: Set to 'normal', was 'performance'
kernel: [    0.005397] ENERGY_PERF_BIAS: View and update with x86_energy_perf_policy(8)
kernel: [    0.058062] pmd_set_huge: Cannot satisfy [mem 0xf8000000-0xf8200000] with a huge-page mapping due to MTRR override.
There were boot-up errors on resource conflicts, so I added this in lilo.conf
acpi_enforce_resources=lax

The motherboard reports cpu temp of around 45 C in the bios configure screen

Results from # sensors-detect (defaults)
Driver `nct6775':
* ISA bus, address 0x290
Chip `Nuvoton NCT5573D/NCT5577D/NCT6776F Super IO Sensors' (confidence: 9)

Driver `coretemp':
* Chip `Intel digital thermal sensor' (confidence: 9)

/etc/sysconfig/lm_sensors:

HWMON_MODULES="coretemp nct6775"

Code:
# sensors
coretemp-isa-0000
Adapter: ISA adapter
Physical id 0:  +44.0°C  (high = +87.0°C, crit = +91.0°C)
Core 0:         +44.0°C  (high = +87.0°C, crit = +91.0°C)
Core 1:         +42.0°C  (high = +87.0°C, crit = +91.0°C)
$ modprobe nct6775

$ sensors

Code:
coretemp-isa-0000
Adapter: ISA adapter
Physical id 0:  +42.0°C  (high = +87.0°C, crit = +91.0°C)
Core 0:         +42.0°C  (high = +87.0°C, crit = +91.0°C)
Core 1:         +42.0°C  (high = +87.0°C, crit = +91.0°C)

nct6776-isa-0290
Adapter: ISA adapter
Vcore:          +0.86 V  (min =  +0.00 V, max =  +1.74 V)
in1:            +0.17 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
AVCC:           +3.39 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
+3.3V:          +3.39 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
in4:            +0.56 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
in5:            +1.71 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
in6:            +1.87 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
3VSB:           +3.41 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
Vbat:           +3.28 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
fan1:             0 RPM  (min =    0 RPM)
fan2:          3082 RPM  (min =    0 RPM)
fan3:             0 RPM  (min =    0 RPM)
fan4:             0 RPM  (min =    0 RPM)
fan5:             0 RPM  (min =    0 RPM)
SYSTIN:         +45.0°C  (high =  +0.0°C, hyst =  +0.0°C)  ALARM  sensor = thermistor
CPUTIN:        +127.5°C  (high = +80.0°C, hyst = +75.0°C)  ALARM  sensor = thermistor
AUXTIN:         -30.5°C  (high = +80.0°C, hyst = +75.0°C)  sensor = thermistor
PECI Agent 0:   +42.0°C  (high = +80.0°C, hyst = +75.0°C)
                         (crit = +91.0°C)
PCH_CHIP_TEMP:   +0.0°C  
PCH_CPU_TEMP:    +0.0°C  
PCH_MCH_TEMP:    +0.0°C  
cpu0_vid:      +0.000 V
intrusion0:    OK
intrusion1:    OK
beep_enable:   disabled
 
Old 11-18-2017, 02:23 PM   #2
Skaendo
Senior Member
 
Registered: Dec 2014
Location: West Texas, USA
Distribution: Slackware64-14.2
Posts: 1,445

Rep: Reputation: Disabled
I would think that this is more of a MoBo/BIOS issue than software.

Do you have the latest BIOS?
 
Old 11-19-2017, 10:15 AM   #3
kevmccor
Member
 
Registered: Aug 2004
Location: Texas
Distribution: slackware
Posts: 158

Original Poster
Rep: Reputation: 44
I do have the latest BIOS. I opened the case and re-attached the cpu fan plug, which might have been off by one pin, unlikely but it is on correctly now. You are right that it is controlled automatically in the BIOS and probably my best solution is making the adjustments there. My cpu heatsink is low profile with a thin 70mm fan. I may be able to put in a thicker fan that is more quiet.

I used the command pwmconfig to get a configuration for lm-sensors to control the fan.
Code:
$ pwmconfig
# pwmconfig revision 6243 (2014-03-20)

Found the following devices:
   hwmon0 is coretemp
   hwmon1 is nct6776

Found the following PWM controls:
   hwmon1/pwm1           current value: 255
   hwmon1/pwm2           current value: 117
hwmon1/pwm2 is currently setup for automatic speed control.
In general, automatic mode is preferred over manual mode, as
it is more efficient and it reacts faster. Are you sure that
you want to setup this output for manual control? (n)
So hwmon1/pwm2 (with current value: 117) is the cpu fan control. Just to test it out, I ran the script for manual control. The pwmconfig script went through the process of shutting down and restarting the fan and setting different speeds, but I thought it went through that too quickly to get accurate readings because the fan did not slow down much as the speed pulse signal was lowered. At any rate, I do not have much confidence in the fancontrol script.

I added this to /etc/rc.d/rc.modules.local
Code:
#### lm-sensors for asrock h61mv-itx
# module coretemp is loaded in normal boot but modprobe will not load it twice
# Chip `Intel digital thermal sensor' (confidence: 9)
/sbin/modprobe coretemp
#
# Chip `Nuvoton NCT5573D/NCT5577D/NCT6776F Super IO Sensors' (confidence: 9)
# module nct6775 is not loaded in normal boot
/sbin/modprobe nct6775        
# starting lm-sensors
echo "rc.modules.local - starting lm-sensors"
/usr/bin/sensors -s
FYI, the -s option is necessary for lm-sensors to read the configuration files and get the values for the particular chip. The hwmon module apparently manages all this and uses the path /sys/class/hwmon which has symlinks to /sys/devices
Code:
ls -l /sys/class/hwmon/
total 0
lrwxrwxrwx 1 root root 0 Nov 19 08:24 hwmon0 -> ../../devices/platform/coretemp.0/hwmon/hwmon0/
lrwxrwxrwx 1 root root 0 Nov 19 08:24 hwmon1 -> ../../devices/platform/nct6775.656/hwmon/hwmon1/
At this point I think it is down to more fiddling with settings and fans.

Last edited by kevmccor; 11-19-2017 at 10:16 AM.
 
Old 11-20-2017, 04:18 PM   #4
ttk
Senior Member
 
Registered: May 2012
Location: Sebastopol, CA
Distribution: Slackware64
Posts: 1,038
Blog Entries: 27

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
This is what I've been using to control the fan on my T510 and T530:

# echo level 0 > /proc/acpi/ibm/fan (fan off)

# echo level 2 > /proc/acpi/ibm/fan (low speed)

# echo level 4 > /proc/acpi/ibm/fan (medium speed)

# echo level 7 > /proc/acpi/ibm/fan (maximum speed)

# echo level auto > /proc/acpi/ibm/fan (automatic - default)

# echo level disengaged > /proc/acpi/ibm/fan (disengaged)

.. from http://www.thinkwiki.org/wiki/How_to_control_fan_speed
 
Old 11-20-2017, 08:41 PM   #5
kevmccor
Member
 
Registered: Aug 2004
Location: Texas
Distribution: slackware
Posts: 158

Original Poster
Rep: Reputation: 44
I have no fan issues with my t61p Thinkpad. This is my desktop and it is just a little too loud. Have you tried thinkfan/?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
CPU fan control doesn't work bonedriven Linux - Laptop and Netbook 0 02-25-2014 01:45 AM
How to control cpu fan speed? no fan control with BIOS, acpi, lm-sensors startover Linux - Hardware 20 01-08-2011 03:18 AM
Trying to setup lm sensors for fan control on Debian janprunk Linux - Hardware 2 03-24-2010 01:24 AM
ACPI or lm-sensors fan control on Sony Vaio (fan runs at full speed) roanm Linux - Hardware 7 11-14-2009 07:37 PM
HP/Compaq NC8230 ACPI Fan Control / Fan Sensors / ACPI Questions Freaksta Linux - Hardware 2 02-11-2008 07:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 09:14 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration