Discussion:
fan noise after resuming from suspend
Xiang Liu
2013-11-18 03:45:58 UTC
Permalink
hello everyone,

I have found that the terrible noise of my cpu fan. It works well until after suspending. (sleep by xfce-power-manager or press the sleep button)

I examined and compared the values of /sys/devices/virtual/thermal/cooling_device{3,4,5,6,7}/cur_state, and found their values are changed after resuming from suspend.

so I wrote a simple script and hoped it to be run after each suspend.

=========








for i in /sys/devices/virtual/thermal/cooling_device{3,4,5,6,7}/cur_state; do echo $i ; echo 0> $i; done=========

But I wonder how can i trigger it after resuming in xfce environment.
thanks.
Guido Berhoerster
2013-11-18 08:09:48 UTC
Permalink
Hi,
Post by Xiang Liu
hello everyone,
I have found that the terrible noise of my cpu fan. It works well until after suspending. (sleep by xfce-power-manager or press the sleep button)
I examined and compared the values of /sys/devices/virtual/thermal/cooling_device{3,4,5,6,7}/cur_state, and found their values are changed after resuming from suspend.
so I wrote a simple script and hoped it to be run after each suspend.
[...]
Post by Xiang Liu
But I wonder how can i trigger it after resuming in xfce environment.
Xfce has no special facilities for that, however you should be
able to execute your script by creating a pm-utils hook, see
http://old-en.opensuse.org/Pm-utils#Creating_your_own_hooks
--
Guido Berhoerster
Marcus Moeller
2013-11-18 08:23:14 UTC
Permalink
Hi,
Post by Guido Berhoerster
Post by Xiang Liu
I have found that the terrible noise of my cpu fan. It works well until after suspending. (sleep by xfce-power-manager or press the sleep button)
I examined and compared the values of /sys/devices/virtual/thermal/cooling_device{3,4,5,6,7}/cur_state, and found their values are changed after resuming from suspend.
so I wrote a simple script and hoped it to be run after each suspend.
[...]
Post by Xiang Liu
But I wonder how can i trigger it after resuming in xfce environment.
Xfce has no special facilities for that, however you should be
able to execute your script by creating a pm-utils hook, see
http://old-en.opensuse.org/Pm-utils#Creating_your_own_hooks
You can also achieve something similar by dropping in a script in

/usr/lib/systemd/system-sleep/

See systemd-suspend.service(8) for details.

Greets
Marcus
Xiang Liu
2013-11-18 09:48:33 UTC
Permalink
Post by Guido Berhoerster
Hi,
Post by Xiang Liu
hello everyone,
I have found that the terrible noise of my cpu fan. It works well until after suspending. (sleep by xfce-power-manager or press the sleep button)
I examined and compared the values of /sys/devices/virtual/thermal/cooling_device{3,4,5,6,7}/cur_state, and found their values are changed after resuming from suspend.
so I wrote a simple script and hoped it to be run after each suspend.
[...]
Post by Xiang Liu
But I wonder how can i trigger it after resuming in xfce environment.
Xfce has no special facilities for that, however you should be
able to execute your script by creating a pm-utils hook, see
http://old-en.opensuse.org/Pm-utils#Creating_your_own_hooks
thanks, In fact, the full story is that I have tested the pm-utils hook before I asked help here.
It works only if pm-suspend was used to suspend the system.

but the /usr/lib/systemd/system-sleep way works.
Post by Guido Berhoerster
--
Guido Berhoerster
--
thanks you and marcus. yo

Loading...