You are not logged in.

#1 2010-05-01 15:56:31

wazyk
Member
Registered: 2010-05-01
Posts: 15

i8k gone crazy

Hi all,

Since recent update, I have a problem with i8k on my Dell Inspiron 6000 laptop.
Fans are running full speed whatever wat inside temperature is. No recent change to i8k conf was made.

Here is i8kctl command output:

1.0 (null) H31N12J 127 -1 163 20250 20250 0 -1

Here is acpi -t command output:

Thermal 0: ok, 28.5 degrees C

And now i8kmon output:

i8kmon v1.27 17/06/2005 - Copyright (C) 2001 Massimo Dal Zotto <dz@debian.org>
config(0)          = {-1 0} -1 50 -1 55
config(1)          = {-1 1} 45 60 45 70
config(2)          = {-1 2} 55 80 65 85
config(3)          = {-1 2} 70 128 75 128
config(auto)       = 1
config(daemon)     = 1
config(geometry)   = 
config(i8kfan)     = /usr/bin/i8kfan
config(min_speed)  = 2000
config(proc_ac24)  = /proc/acpi/ac_adapter/0/status
config(proc_ac26)  = /proc/acpi/ac_adapter/AC/state
config(proc_apm)   = /proc/apm
config(proc_i8k)   = /proc/i8k
config(sysconfig)  = /etc/i8kutils/i8kmon.conf.conf
config(t_high)     = 80
config(timeout)    = 1
config(unit)       = C
config(use_conf)   = 1
config(userconfig) = ~/.i8kmon
config(verbose)    = 1
1272729060 opening /proc/i8k
1272729060 opening /proc/acpi/ac_adapter/AC/state
1272729060 acpi: state:                   on-line
1272729060 1.0 A09 H31N12J 127 -22 163 675 675 1 -22
# (127>=-1), state=1, low=45, high=60
# (127>=60), state=2, low=55, high=80
# (127>=80), state=3, low=70, high=128
# exec /usr/bin/i8kfan -1 2
1272729061 1.0 A09 H31N12J 127 -22 163 675 675 1 -22

It seems that i8k "thinks" the temperature of my laptop is 127°C so this is why, with the existing config, fans are running full speed.

Any idea why i8k goes wrong like this ?

Thanks in advance.

Offline

#2 2010-05-02 14:31:14

nacre
Member
From: China
Registered: 2007-08-18
Posts: 2

Re: i8k gone crazy

I have excatly the same problem. Revert back to kernel 2.6.33.2 seems to solve the problem.

Last edited by nacre (2010-05-02 15:16:40)

Offline

#3 2010-05-03 21:02:26

wazyk
Member
Registered: 2010-05-01
Posts: 15

Re: i8k gone crazy

Thanks for advice. Unfortunaltely I am not able to install previous version of kernel as my pacman cache is purged.
I tried to see if there was any bug related to temperature detection in kernel 2.6.33.3-1 version but no luck. Hope it will be fixed in next update.

Offline

#4 2010-05-10 22:08:08

wazyk
Member
Registered: 2010-05-01
Posts: 15

Re: i8k gone crazy

Update to kernel 2.6.33.3-3 doesn't solve the problem sad
Now I just wonder which mechanism i8k uses to detect laptop temperature. If it was using ACPI data it would be OK.

Offline

#5 2010-05-27 06:49:33

jalu
Member
Registered: 2009-04-05
Posts: 140

Re: i8k gone crazy

This is very strange, yes.

i8k is also reporting a CPU temperature of 127 for me. I am using an E1505 with kernel 2.6.33.4-1. My fans aren't spinning out of control, despite the fact that I am using the default i8kmon.conf file.

The number 127 is interesting. This obviously looks to be some kind of bug, though I don't know who's responsible for it.

Last edited by jalu (2010-05-27 06:54:18)

Offline

#6 2010-05-27 07:50:50

wazyk
Member
Registered: 2010-05-01
Posts: 15

Re: i8k gone crazy

i8k gets the temperature using SMM (System Management Mode) BIOS call.

I had a short discussion with i8k developer (i don't think he is maintening it anymore). He sent me an executable to perform SMM call from terminal console. Result was that it seems that returned temperature is OK from BIOS.

try the following commands:

   smm 10a3 0
   smm 10a3 1
   smm 10a3 2

the command returns temperature in ax and thermal zone in bx.

> sudo ./smm 10a3 0
eax=000010a3 ebx=00000000 ecx=00000000 edx=00000000 esi=00000000 edi=00000000
eax=0000001d ebx=0000370a ecx=00000000 edx=00000000 esi=00000000 edi=00000000 0

> sudo ./smm 10a3 1
eax=000010a3 ebx=00000001 ecx=00000000 edx=00000000 esi=00000000 edi=00000000
eax=00000020 ebx=00003280 ecx=00000000 edx=00000000 esi=00000000 edi=00000000 0

> sudo ./smm 10a3 2
eax=000010a3 ebx=00000002 ecx=00000000 edx=00000000 esi=00000000 edi=00000000
eax=00000026 ebx=00003719 ecx=00000000 edx=00000000 esi=00000000 edi=00000000 0

If bold values are temperatures in HEX, it looks ok to me ...

To me the problem lies in the recent kernel updates.
I'd like to have more proofs to fill a kernel bug because it requires a bullet-proof bug report for the bug to be taken it account at this level...

Offline

#7 2010-05-28 07:01:09

Celti
Member
From: Phoenix, AZ, USA
Registered: 2004-02-28
Posts: 43
Website

Re: i8k gone crazy

I'm having similar, but not identical issues. I've got a Dell Latitude C610, and until I upgraded from 2.6.33.2 to 2.6.34 today, i8k worked just fine.

Today, I upgrade, reboot, and get:
FATAL: Error inserting i8k (/lib/modules/2.6.34-ARCH/kernel/drivers/char/i8k.ko): No such device'

I try `modprobe i8k force=1`, and it loads, I can control the fans, but i8kctl gives me this as readout:
1.0  JN85J11 127 163 163 20250 20250 0 0

Nothing I do changes it. Any ideas?

EDIT: dmesg says:
i8k: unable to get SMM Dell signature

Last edited by Celti (2010-05-28 12:45:44)


“A stupid person can make only certain, limited types of errors; the mistakes open to a clever fellow are far broader. But to the one who knows how smart he is compared to everyone else, the possibilities for true idiocy are boundless.”  —S.K.Z. Brust

Offline

#8 2010-05-28 13:41:00

wazyk
Member
Registered: 2010-05-01
Posts: 15

Re: i8k gone crazy

Today I also tried to rmmod i8k.

Reason is that, in conjunction with i8k problems after kernel 2.6.33.3 update, my system had regular hangs after a while. The whole system was freezing for 5 secs every 5-10 mins after system was up for a couple of hours.

It seems to have made things really better, to be confirmed. I really suspect that module has a real compatibility problem with recent kernel and therefore, having it loaded and non working properly makes things worse.

Offline

#9 2010-05-30 07:40:39

yumigator
Member
Registered: 2009-07-21
Posts: 8

Re: i8k gone crazy

i8k still works fine for me, so I wrote up a (terrible) bash script as a substitute for i8kmon until this gets fixed (if ever). It controls the fans based on your settings and the ACPI temperature readout, and it outputs a nice status message too.

EDIT: you must force the i8k kernel module to load.

The only requirements are bash (obviously), i8kutils, and acpi (pacman -S acpi). Here's how it works: you define the variables level1, level2, and level3. WARNING: you must alter these variables from my default values. Most systems should never be allowed to reach 50C, but that is how I run mine (and it's been running nicely for many years). Even if I keep the fans on full blast, my temperature would never dip below 38C. These represent three temperatures, each in celcius. What does this mean?

If your fans are running at `i8kfan 0 0` (off), they will not be turned on until you reach level2.

If your fans are running at `i8kfan 1 1` (slow), they will not be turned off until temperature reaches level1. They will not be turned to `i8kfan 2 2` until temperature reaches level3.

If your fans are running at `i8kfan 2 2` (full blast), they will not be turned off until you reach level2.

By default, temperatures and fan speeds update every three seconds.

And my disclaimer - you NEED to change the values of level1, level2, and level3 to a known safe value for you. Also, it is extremely stupid to use a bash script to monitor and control something as important to system stability as the cooling fans (but I am going to do it anyway big_smile ). If your system overheats, you could at best lose some unsaved files and at worst cause some hardware damage - and none of that is my fault.

Without further ado, the script:

#!/bin/bash

## these are the temperatures
level1=50
level2=60
level3=70

fanstate=2
while [ true ]
do
    temp=`acpi -t | sed -e 's/\(\.[0-9]\+ \)\?degrees C$//' -e 's/^Thermal 0: ok, //'`

    if [ "$temp" -lt "$level1" ]; then
        fanstate=0

    elif [ "$temp" -ge "$level1" ] && [ "$temp" -lt "$level2" ]; then
        if [ "$fanstate" -le 1 ]; then
            false
        elif [ "$fanstate" -gt 1 ]; then
            fanstate=1
        fi

    elif [ "$temp" -ge "$level2" ] && [ "$temp" -lt "$level3" ]; then
        if [ "$fanstate" -le 1 ]; then
            fanstate=1
        elif [ "$fanstate" -gt 1 ]; then
            false
        fi

    elif [ "$temp" -ge "$level3" ]; then
        fanstate=2
    fi

    i8kfan $fanstate $fanstate | false
    echo "Fan state: $fanstate, Temp: $temp C"

    sleep 3
done

Good luck and enjoy! I'd appreciate any feedback - this is pretty much my first bash script ever, but I do know that a lot of that is awful programming practice - and if you find it useful, a "thank you" post would be nice smile .

Thanks for reading!

Last edited by yumigator (2010-05-30 07:46:41)

Offline

#10 2010-05-30 07:47:27

el mariachi
Member
Registered: 2007-11-30
Posts: 595

Re: i8k gone crazy

For me the fan keeps going full and shutting down in a loop. But I blame that on the i8k module

Offline

#11 2010-05-30 07:56:15

yumigator
Member
Registered: 2009-07-21
Posts: 8

Re: i8k gone crazy

el mariachi wrote:

For me the fan keeps going full and shutting down in a loop. But I blame that on the i8k module

That means your BIOS is still attempting to control the fan, conflicting with this script. Honestly, I have no idea what you could do about it. hmm

Offline

#12 2010-05-30 11:27:25

el mariachi
Member
Registered: 2007-11-30
Posts: 595

Re: i8k gone crazy

I'm using the latest BIOS (A15) and ALL versions have had this issue. So it's either i8k or Dell being lazy about it tongue

Offline

#13 2010-06-03 09:48:10

wazyk
Member
Registered: 2010-05-01
Posts: 15

Re: i8k gone crazy

For info, unloading i8k had in the end no impact on my cyclic display hangs problem (was fixed with disabling of KMS for my X300 ATI card, KMS is enabled by default since this 2.6.33 kernel ...).
So what now?
This experiment of stopping the use of i8k made me realize that it seems that my laptop works OK without i8k now (DELL inspiron 6000). Fans are working good and global temperature is correct.
Time will tell.

Last edited by wazyk (2010-06-03 09:48:51)

Offline

#14 2010-06-11 11:18:32

daemon76
Member
Registered: 2009-09-01
Posts: 19

Re: i8k gone crazy

Hi I am also having this problem, I find it the  easiest way to solve the problem is to downgrade to kernel 2.6.33-2.
wazyk, you have said that

wazyk wrote:

Thanks for advice. Unfortunaltely I am not able to install previous version of kernel as my pacman cache is purged.

you can find older versions of packages from http://arm.konnichi.com/.

Now I'm using kernel 2.6.33-2 without any problem. However, you can give a try dellfand also, if you want to control fans. http://dellfand.dinglisch.net/

Offline

#15 2010-06-24 12:40:19

dking
Member
Registered: 2010-06-24
Posts: 1

Re: i8k gone crazy

I think I found the cause of this problem.  In the source for the i8k module, it uses the "asm()" construct. I put in some debugging logic, and it was as if the code in the "asm()" never ran.  The first thing the module does is ask the SMM for the Dell signature; but it was as if this "asm()" call returned the request code as its answer, which was wrong. So the i8k module logged "unable to get SMM Dell signature".  This module has worked fine for me on my system in earlier kernels and other distributions.

Looking further, I found that gcc was optimizing the "asm()" construct away. I found a gcc page advising users of the construct to change it to "asm volatile()" to inhibit optimization.  When I did this to the i8k.c source and rebuilt the kernel (just for the module), the module worked.  So I suspect that a few months ago, Arch went to a version of gcc that optimizes more severely, and "asm()" calls stopped working.

BTW, I also tried dellfand.  It didn't work for me, for the same reason as the i8k module: its "asm()" statements didn't work. When I fixed it to "asm volatile()" dellfand worked for me.

I've reported this to the kernel people who own the i8k source, so eventually it could get fixed there. For now, if using an older kernel version doesn't work, you could get the kernel source for whatever kernel version you are using and fix just that one module.

Offline

#16 2010-06-24 13:06:55

wazyk
Member
Registered: 2010-05-01
Posts: 15

Re: i8k gone crazy

@dking:
Wow, that is a clear explanation !
Hopefully there is people like you that know how to hack and spot the root of problems.

So you meant that you've reported the problem to Arch kernel people, right ? Is there any bug report filled ?

Thanks for this analysis. Sure it will have interest for many Dell users.

Off topic:
I have problems with KMS, Radeon driver and recent xorg 1.8 (http://bbs.archlinux.org/viewtopic.php?id=99610). Do you have any idea ?

Offline

#17 2010-06-24 13:34:49

Celti
Member
From: Phoenix, AZ, USA
Registered: 2004-02-28
Posts: 43
Website

Re: i8k gone crazy

Just rebuilt the module, and I can confirm that this change works. Many thanks!


“A stupid person can make only certain, limited types of errors; the mistakes open to a clever fellow are far broader. But to the one who knows how smart he is compared to everyone else, the possibilities for true idiocy are boundless.”  —S.K.Z. Brust

Offline

#18 2010-06-24 15:50:39

el mariachi
Member
Registered: 2007-11-30
Posts: 595

Re: i8k gone crazy

I understood what was wrong, but i never rebuilt a module before. Which file do I have to change?

Offline

#19 2010-06-24 16:42:33

Celti
Member
From: Phoenix, AZ, USA
Registered: 2004-02-28
Posts: 43
Website

Re: i8k gone crazy

el mariachi wrote:

I understood what was wrong, but i never rebuilt a module before. Which file do I have to change?

The file to change is 'drivers/char/i8k.c'.

What I did, to avoid rebuilding the entire kernel, is grab the kernel26 PKGBUILD and run `makepkg -o` to download and extract the source. I then modified i8k.c, manually executed everything from the build function of the PKGBUILD except for the final make, and instead ran `make drivers/char/i8k.ko` to build that single module.


“A stupid person can make only certain, limited types of errors; the mistakes open to a clever fellow are far broader. But to the one who knows how smart he is compared to everyone else, the possibilities for true idiocy are boundless.”  —S.K.Z. Brust

Offline

#20 2010-06-29 20:09:02

tuhyk
Member
From: Czech Rep.
Registered: 2010-01-12
Posts: 49
Website

Re: i8k gone crazy

I tried your suggestion, changed i8k.c file but I failed to follow the PKGBUILD manually. I suppose I  must be doing something wrong but I do not have time to figure it out as my laptop is overheating at the moment. Does the module have to be built on my machine or can anyone upload it? I am using stock kernel 2.6.34-2. Thanks guys


All I really need to know I learned from watching Star Trek

Offline

#21 2010-06-29 20:22:39

Celti
Member
From: Phoenix, AZ, USA
Registered: 2004-02-28
Posts: 43
Website

Re: i8k gone crazy

If you trust some random schmuck to compile a kernel module for you, I've uploaded it here. Should work for any 2.6.34-ARCH kernel.

Edit:  Rebuilt for 2.6.35-ARCH; see below.

Last edited by Celti (2010-09-15 04:46:59)


“A stupid person can make only certain, limited types of errors; the mistakes open to a clever fellow are far broader. But to the one who knows how smart he is compared to everyone else, the possibilities for true idiocy are boundless.”  —S.K.Z. Brust

Offline

#22 2010-06-29 20:57:57

wazyk
Member
Registered: 2010-05-01
Posts: 15

Re: i8k gone crazy

Maybe other solution is to submit this change to i8k Arch package maintainer, no ?

Offline

#23 2010-06-30 12:23:56

Celti
Member
From: Phoenix, AZ, USA
Registered: 2004-02-28
Posts: 43
Website

Re: i8k gone crazy

There is no i8k package maintainer; the i8k module is in the kernel. dking said he reported it upstream, so unless someone wants to maintain a PKGBUILD for the module in the AUR (and I don't particularly), or submit a patch to the kernel26 maintainer, that's all that can be done for the moment.


“A stupid person can make only certain, limited types of errors; the mistakes open to a clever fellow are far broader. But to the one who knows how smart he is compared to everyone else, the possibilities for true idiocy are boundless.”  —S.K.Z. Brust

Offline

#24 2010-06-30 18:05:40

tuhyk
Member
From: Czech Rep.
Registered: 2010-01-12
Posts: 49
Website

Re: i8k gone crazy

BTW Celti thank you, it is working now.


All I really need to know I learned from watching Star Trek

Offline

#25 2010-09-15 04:45:38

Celti
Member
From: Phoenix, AZ, USA
Registered: 2004-02-28
Posts: 43
Website

Re: i8k gone crazy

Since this still is not fixed as of 2.6.35.4, I rebuilt i8k.ko for 2.6.35-ARCH kernels: it is available here.

Edit: Rebuilt for 2.6.36-ARCH; see below.

Last edited by Celti (2010-12-09 23:50:13)


“A stupid person can make only certain, limited types of errors; the mistakes open to a clever fellow are far broader. But to the one who knows how smart he is compared to everyone else, the possibilities for true idiocy are boundless.”  —S.K.Z. Brust

Offline

Board footer

Powered by FluxBB