Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I've just installed ubuntu 13.04 on my notebook Compaq 6720s and found the cpu fun working at high speed after waking system up. When the system is booted the fan works normaly and realy calm. But after sleep and waking up fan is really noisy. I hadn't this problem with ubuntu 12.10. Any help appreciated.

share|improve this question

2 Answers 2

up vote 2 down vote accepted

I've found solution for my Compaq 6720s fan and Ubuntu 13.04 here:

Create the file ”/etc/pm/sleep.d/99fancontrol.sh”, insert the code below and chmod 755 it. Script:

#!/bin/sh
#
#

case "$1" in
 hibernate|suspend)
  # Stopping is not required.
  ;;
 thaw|resume)
# In background.
    echo -n 0 > /sys/devices/virtual/thermal/cooling_device0/cur_state;
    sleep 2
    echo -n 0 > /sys/devices/virtual/thermal/cooling_device1/cur_state;
    sleep 2
    echo -n 0 > /sys/devices/virtual/thermal/cooling_device2/cur_state;

  ;;
 *) exit $NA
  ;;
esac
share|improve this answer
    
Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. –  Eric Carvalho Apr 29 '13 at 15:20
    
Thanks Alexey. The script works. –  PeterSharp May 1 '13 at 18:40
    
Yes, it would be great if someone could explain what this is doing. I don't have fan problems so much as my CPU gets really hot after suspend. Running 13.04 on a lenovo thinkpad x131e. I'm loath to use the script as i don't know what it does and it if pertains to the fan then i might overheat my machine by switching it off. –  MorrisseyJ May 8 '13 at 18:03

For my "HP 2510p" is high fan speed everytime so I run it on start too:

cd /etc/init.d
ln -s {source_path}/99fancontrol.sh
update-rc.d 99fancontrol.sh defaults

Also device is set to multiple inputs "cooling_device0 ~ 6" - 6 is 30%, all to zero means 0% speed - and at the same time temperature controller works too so when temperature is high set on of these inputs automatically.

File: 99fancontrol.sh

#!/bin/sh

case "$1" in
 hibernate|suspend)
  ;;
 start|thaw|resume)
 ( 
  sleep 5 ; 
  echo -n "0" > /sys/devices/virtual/thermal/cooling_device0/cur_state; 
  echo -n "0" > /sys/devices/virtual/thermal/cooling_device1/cur_state; 
  echo -n "0" > /sys/devices/virtual/thermal/cooling_device2/cur_state; 
  echo -n "0" > /sys/devices/virtual/thermal/cooling_device3/cur_state; 
  echo -n "0" > /sys/devices/virtual/thermal/cooling_device4/cur_state; 
  echo -n "0" > /sys/devices/virtual/thermal/cooling_device5/cur_state; 
  echo -n "1" > /sys/devices/virtual/thermal/cooling_device6/cur_state;
 ) &
  ;;
 *) exit $NA
  ;;
esac

Ref: Fabrizio

share|improve this answer

protected by Community May 3 '13 at 20:03

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.