# Fan not working properly after suspend [FIXED]

## Tlaloc

Actual kernel version is 2.6.17-suspend2-r2, but problem was also present with other suspend2 version (don't remember which exactly).

The actual problem is that the fan still works when the notebook comes from resume, but it doesn't recognize trip points anymore, which means that it doesn't spin faster when the temperature increases.

Does anyone know what is wrong or where to look for help? I am a bit unsure where to start on this problem.

Bye, ValLast edited by Tlaloc on Thu May 17, 2007 5:31 pm; edited 1 time in total

----------

## mirko_3

Ever solved it? My fan doesn't spin after resume, but I suppose the two problems might be related...

----------

## Tlaloc

Not really since I never used suspend lately since laptop is practically stationary now and trying to fix this is awfully complicated for me (have to patch kernel additionally because of IDE problems and also because I have an ATI card  :Evil or Very Mad:  ).

But probably you can find useful information on the gentoo wiki like here (look at kernel section):

http://gentoo-wiki.com/HARDWARE_HP_Compaq_nx6125_with_Turion64

Bye, Val.

EDIT: In che birreria ti trovi adesso?   :Laughing: 

----------

## mirko_3

Great, I fixed it by adding the noapic option on boot; I wonder if it has any downsides to it?

I noticed that our to laptops are somewhat similar, you might find something interesting here...

http://de.gentoo-wiki.com/Compaq_HP_nx8220_Power_Management

Thanks!

EDIT:

Ce ne sono cosi' poche che offrono accesso wireless... Ma c'e' tanta birra a casa mia  :Wink: 

----------

## Tlaloc

Already saw that because my laptop is a nx8220   :Cool:  , do you own the same model and if so did you apply the IDE patch (it wouldn't be bad if I could enable suspend easily on my machine for the time I may need it, it is a laptop after all)?

Bye, Val.

----------

## mirko_3

Yes, nx8220 here; every kernel upgrade I manually apply the kernel ide patch, though it's really only needed for suspend-to-ram (S3); hibernate (suspend-to-disk) works without any patches other than suspend2, which you can find in many patchsets... I use ati-drivers 8.30.3-r1, because 8.32.5 can't hibernate...

I have everything working flawlessly now, except for a small problem with dmix; if you need me to post any configuration files or anything, ask.

----------

## Tlaloc

Hi mirko_3, the time has come I need Suspend to Ram working.   :Wink: 

Unfortunately I still have the problem with the fan not restarting after Suspend to Ram, but by investigating (trial  and error) I found out that the fan will start as usual when the next (higher temperature) trip point is reached, only for the lowest trip point it wouldn't spin at 40% anymore. I manually turned on the fan on and cooled the CPU below the temperature of the first trip point, but still after the CPU becoming hotter again the fan wouldn't start to spin until the second trip point was reached. This happens with suspend2 and gentoo sources 2.6.20, with suspend2 2.6.19 the fan would spin at 100% after suspend and continue to do so. The noapic boot option didn't work for me.

Would you have any hint for me?

BTW, currently I am compiling gentoo-sources-2.6.21, and it seems the ide patch is already included in that kernel.

EDIT: Seems I spoke to soon, 2.6.21 without patch does not resume from suspend and patch cannot be applied.   :Crying or Very sad: 

Bye, Tlaloc.

----------

## mirko_3

Can't really help you with the fan, as noapic made everything work fine; other fan-related stuff I have:

Root Crontab:

```

*/5 * * * * echo "85:85:65:60:55:50:45 " > /proc/acpi/thermal_zone/TZ1/trip_points
```

(it's in crontab as it appears that the settings are reset after some time...

/etc/conf.d/local.start

```

echo "800000:764,1067000:860,1333000:988,1733000:1116" > /sys/devices/system/cpu/cpu0/cpufreq/op_points_table

for i in /proc/acpi/thermal_zone/TZ?/polling_frequency

do

        echo 3 > $i

done

```

(I only post the relevant parts)

The first line in local.start lowers the voltage the cpu works at, so as to keep the laptop cooler and have the fans spin less. You need a patch, but it's included in beyond-sources, which is the kernel patchset I use (http://iphitus.loudas.com/beyond.html).

The boot options in grub are:

root=/dev/hda3 CONSOLE=/dev/tty1 video:vesafb:ywrap,mtrr:3,1024x768-16@60 vga=0x317 quiet reboot=b noapic fbcon=scrollback:128K splash=verbose,fadein,theme:EvenNewerTux.

Here are some websites which helped me:

http://www.xms.se/~zap/linux/hpnx8220gentoo.html

http://soften.ktu.lt/~s72482/nx8220/index.php?pid=4

http://avkrok.net/nw8240/

As for the IDE patch, it doesn't apply cleanly to the latest kernel versions, and it doesn't compile if I try manually... Didn't check to see if there's a newer vesion, as I don't have much time now. 

Hope this helps.

EDIT:

I've read on debianforums.de that the s3 patch has been in mainline since 2.6.17; I haven't even tried s3 as I got used to hibernate, and I can't try it now as I don't have the laptop with me. But I guess that any problems you may have come from ati-drivers, try different versions.

----------

## Tlaloc

First thank you for the quick answer.

I have thought of using lower voltages sometimes, but it never seemed necessary to me, but if I can solve the issue with the fan I might try it.

As for the trip points for TZ1, they really do change sometimes during normal operation of the laptop, but they always have reasonable values, so no urgent problem there (probably they are changed intentionally).

I really don't see why ati-drivers should cause the fan to stop working in the first trip point interval, but I will try newer versions anyway, as I also will try the kernel you use.

Bye, Val.

EDIT:I am trying beyond-sources from the custom-kernels overlay now, let's see how it turns out...

----------

## mirko_3

No, the ati-drivers was meant in response to this (maybe I misunderstood):

 *Quote:*   

> 
> 
> EDIT: Seems I spoke to soon, 2.6.21 without patch does not resume from suspend and patch cannot be applied. 
> 
> 

 

As for the fans, the only other thing I know about them is what I read in the paragraph "Fan" on http://avkrok.net/nw8240/; I messed with it before I found the noapic option, but maybe you already know of these controls...

----------

## Tlaloc

I should have mentioned that the hang after suspend looked like the good old ide issue..   :Wink: 

Anyway, out of frustration (beyond behaved like all other gentoo kernels) I installed Opensuse (back to the roots for me    :Surprised:   ) today and I got suspend working right (seems at least so far) just now.

The Opensuse 2.6.18 stock kernel does not need an IDE patch, but the noapic boot option was necessary to make the fan spin right after suspend (without it would start to spin at the speed of the second trip point). It definitely seems that the right gentoo kernel could solve this issue for me, so I will lurk around and still try other kernels now and then.

Thanks for all your help, Val.

----------

## mirko_3

Just a thought... You might try the OpenSuse kernel with gentoo...

----------

## Tlaloc

You were right mirko_3, the ide-acpi patch is included in recent kernels, the important thing is to enable it in the kernel too.   :Embarassed: 

Tried suspend2-2.6.21 (still hard-masked) and this time it really seems that things are working, I will still experiment and test a little and mark the thread as FIXED if I don't encounter any problems for a while.

Opensuse was a small excursion, I did the first kernel upgrade and boom, it would resume after suspend but the laptop screen would goe white and only a reboot could help.

Thanks, Val.

----------

## mirko_3

Right, I hadn't noticed that either... Where is the kernel option?

Good things are fixed though!

----------

## Tlaloc

Device Drivers  ---> ATA/ATAPI/MFM/RLL support -> [*] IDE ACPI support.

Currently I am playing with powertop to further increase battery life, but since my travel battery arrived and works well I think I am a bit exxagerating.   :Laughing: 

Bye, Tlaloc.

----------

## Hypnos

I had the opposite problem starting with kernel 2.6.19 (currently 2.6.21).  Upon resume from suspend2 hibernation, the fan would run at maximu, rather than the low speed dictated by the CPU thermal zone trip points.

The following worked to "reset" the CPU fan to the right setting on my machine:

```
# echo -n "active[3]" > /proc/acpi/thermal_zone/TZ1/cooling_mode
```

EDIT:  Fixed typo

----------

## Hypnos

When the above doesn't work, one hack is to do something that really fires up the CPU, like watching a movie.

Then, try the above afterward.  My guess is that when you heat up the CPU the thermal triggers get re-read in the ACPI BIOS.

----------

