Skip to content

Instantly share code, notes, and snippets.

@hz9xa
Created September 12, 2013 05:14
Show Gist options
  • Select an option

  • Save hz9xa/6533271 to your computer and use it in GitHub Desktop.

Select an option

Save hz9xa/6533271 to your computer and use it in GitHub Desktop.
The script fix fan noise after wakeup in linux
Hi, using kernel 3.8.0-23-generic, 'normal' ubuntu 13.04, HP6830s and an older HP laptop of which I don't know by heart the model, same problem.
I modified the script a little; I presume it will work on all laptops like this since it does for mine:
nano /etc/pm/sleep.d/99fancontrol.sh
#!/bin/bash
#
#
case "$1" in
hibernate|suspend)
# Stopping is not required.
;;
thaw|resume)
# In background.
for cooling_device in $(ls /sys/devices/virtual/thermal/cooling_device?/cur_state -1)
do
echo -n 0 > $cooling_device
sleep 2
done
;;
*) exit $NA
;;
esac
chmod +x /etc/pm/sleep.d/99fancontrol.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment