Bug#732242: general: CPU fan always on (high speed)

2016-11-29 Thread Mathieu Malaterre
On Mon, Nov 28, 2016 at 9:43 PM, Mathieu Malaterre  wrote:
>> I find these informations here:
>> http://www.linux-hell.com/2015/04/11/temperature-control-on-dell-latitude-e7440-under-ubuntu-14-04-2-lts/
>
> Also referenced here: http://askubuntu.com/a/398635/248166
>
> Seems to works very nicely on my system:
>
> $ sudo dmidecode | grep -A3 '^System Information'
> System Information
> Manufacturer: Dell Inc.
> Product Name: Dell System Vostro 3750
> Version: Not Specified

I forgot that this i8k module (or is it i8kmon?) has an impact on my
touchpad. See ref: http://superuser.com/a/914245/106444

Eg:

[...]
[111590.820108] psmouse serio1: DualPoint TouchPad at
isa0060/serio1/input0 lost synchronization, throwing 1 bytes away.
[111591.332409] psmouse serio1: resync failed, issuing reconnect request
[...]



Bug#732242: general: CPU fan always on (high speed)

2016-11-28 Thread Mathieu Malaterre
> I find these informations here:
> http://www.linux-hell.com/2015/04/11/temperature-control-on-dell-latitude-e7440-under-ubuntu-14-04-2-lts/

Also referenced here: http://askubuntu.com/a/398635/248166

Seems to works very nicely on my system:

$ sudo dmidecode | grep -A3 '^System Information'
System Information
Manufacturer: Dell Inc.
Product Name: Dell System Vostro 3750
Version: Not Specified



Bug#732242: general: CPU fan always on (high speed)

2015-09-04 Thread Pétur Viljamson
Hi,

On a fresh install of Debian, the installation of i8kutils makes the fan
starts and stops every 5 seconds approximately. This problem is present on
Debian stable and unstable and is, of course, restricted to some DELL
laptops (mine is the latitude 6430u).

I did some research:

The problem seems to be the BIOS fan control which is not desactivated when
i8kmon is working. Both BIOS and i8kmon are trying to handle the fan and
the BIOS cancels every action from i8kmon. The consequency is the fan
start/stop/change speed for few seconds (because i8kmon commands) and the
BIOS takes again control of the fan and the fan modifications is reversed.

There are two solutions:
  1. Just delete i8kutils package and the system will handle the fan
via the BIOS. It's working but some BIOSes do a poor job. The laptop could
be noisy, the fan could be always on (it's the case on my latitude 6430u)
and you will maybe lose autonomy.
  2. There is a way to desactivate the BIOS fan control. After that
i8kmon could do this job and controlling fans. I'm using this solution and
it is working. I describre this solution below.

i8kutils should be fixed for disabling BIOS fan control out of the box.


---

Details of solution 2 :

The package i8kutils contains Disable BIOS-Fan-Control

Step 1: Compiling

# apt-get install gcc-4.6-multilib
$ cd ~
$ mkdir .bin
$ cd .bin
# apt-get source i8kutils
# apt-get build-dep i8kutils
$ tar xf i8kutils_1.41.tar.xz
$ cd i8kutils-1.41
# gcc -g -O2 -Wall -I. -o smm -m32 smm.c
# ./smm 30a3
# cp smm /usr/sbin/

After step 1, you should have access to these two commands:

# /usr/sbin/smm 30a3 # disable the BIOS fan control
# /usr/sbin/smm 31a3 # enable the BIOS fan control

i8kmon should working after launching "/usr/sbin/smm 30a3"

Step 2: setup i8kmon to stop the bios-fan-control automatically
# nano /etc/init.d/i8kmon

Find the following:
case „$1″ in
start)
log_daemon_msg „Starting $DESC“ „$NAME“

And change it into:
case „$1″ in
start)
/usr/sbin/smm 30a3
log_daemon_msg „Starting $DESC“ „$NAME“

In the same file find the following:
stop)
log_daemon_msg „Stopping $DESC“ „$NAME“

And change it into:
stop)
/usr/sbin/smm 31a3
log_daemon_msg „Stopping $DESC“ „$NAME“

This will disable Bios-Fan-Control directly while starting i8kmon. And
enable it while shutting down the service i8kmon.

Step 3: adjust the way i8kmon handle fans. i8kmon config is for 2 fans
computers. If you have only one fan, you should change it.

# nano /etc/i8kmon.conf

Change to the following:

# Automatic fan control, override with –auto option
set config(auto)1

# Automatic fan control, override with –auto option
# Adjust this for your number of fan.
set config(auto)1

set config(0)  {{-1 0}  -1  30  -1  30}
set config(1)  {{-1 0}  30  50  30  50}
set config(2)  {{-1 1}  45  60  45  60}
set config(3)  {{-1 2}  55 128  55 128}

# end of file

The last block in this file controls the fan-speed based on temperatures.
Here is how to read the block:
{{ -1 0} -1 30 -1 30}
{{ first_fan_speed second_fan_speed} low_temp_on_ac high_temp_on_ac
low_temp_on_bat high_temp_on_bat}

Because the Dell Latitude has no first fan, we can setup the first fan
always to „-1″


I find these informations here:

http://www.linux-hell.com/2015/04/11/temperature-control-on-dell-latitude-e7440-under-ubuntu-14-04-2-lts/


-- System Information:
Debian Release: stretch/sid
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'unstable'), (500, 'testing'),
(500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 4.1.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=fr_FR.utf8, LC_CTYPE=fr_FR.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages i8kutils depends on:
ii  acpi1.7-1
ii  libc6   2.19-19
ii  tcl 8.6.0+8
ii  tclx8.4 [tclx]  8.4.1-1
ii  tk  8.6.0+8

i8kutils recommends no packages.

i8kutils suggests no packages.

-- Configuration Files:
/etc/init.d/i8kmon changed:
PATH=/sbin:/bin:/usr/sbin:/usr/bin
. /lib/lsb/init-functions
NAME=i8kmon
DAEMON=/usr/bin/i8kmon
PROC_I8K=/proc/i8k
DESC="Dell fan/cpu-temperature monitor"
I8KMON_ARGS="--daemon --nouserconfig --auto"
PIDFILE=/var/run/$NAME.pid
test -x $DAEMON || exit 5
if [ -f /etc/default/$NAME ] ; then
. /etc/default/$NAME
fi
case "$1" in
start)
 /usr/sbin/smm 30a3
log_daemon_msg "Starting $DESC" "$NAME"
modprobe i8k >/dev/null 2>&1 || true
if [ ! -f "$PROC_I8K" ]; then
log_progress_msg "Could not find $PROC_I8K."
log_end_msg 1
exit 1
fi
start-stop-daemon --start --quiet --pidfile $PIDFILE \
--background --make-pidfile --startas $DAEMON -- $I8KMON_ARGS
log_end_msg $?
;;
stop)
/usr/sbin/smm 31a3
log_daemon_msg "Stopping $DESC" "$NAME"