El ventilador siempre funciona después de la suspensión

Si su ventilador parece estar funcionando a toda velocidad después de suspender la computadora, esto podría ayudar:

1. Crea un archivo llamado 99_fan con estos contenidos


#!/bin/sh
# fan spindown controller script
# /etc/pm/sleep.d/99_fan
#
# https://bugzilla.redhat.com/show_bug.cgi?id=895276
# @see https://bugzilla.redhat.com/show_bug.cgi?id=895276#c18

# Save value of screen brightness
# http://sdbillin.com/ubuntu-laptop-fan-speed-revisited/
value=`cat /sys/class/backlight/acpi_video0/brightness`
case "$1" in
    hibernate|suspend)
	;;
    thaw|resume)
	sleep 5;
	# Turn the fans back to normal
	for x in /sys/class/thermal/cooling_device*/cur_state; do
	    echo 0 > $x;
	done;
	# Restore value of screen brightness
	echo "$value" >/sys/class/backlight/acpi_video0/brightness;
	;;
    *) exit $NA
	;;
esac

2. Crea otro archivo llamado fan_ctrl con estos contenidos:

#!/bin/bash
# # To get the temperature of the cores (°C):
# # https://lkml.org/lkml/2012/12/4/428
# for i in /sys/devices/virtual/thermal/thermal_zone*/temp; do
#    echo $(( $(cat "$i") / 1000 ));
# done
# # To check that it's right:
# sensors
# # To deactivate the fans upon start:
# # https://bugzilla.redhat.com/show_bug.cgi?id=895276
#
for x in /sys/class/thermal/cooling_device*/cur_state; do
    sudo sh -c "echo 0 > $x";
done;

3. Haga que el archivo sea ejecutable (verifique la donde guardó los archivos, abra una terminal y escriba cd.

También puede hacer clic con el botón derecho del ratón en el archivo, ir a propiedades y marcar la casilla para que sea ejecutable):

chmod +x fan_ctrl 99_fan

4. Copie 99_fan a /etc/pm/sleep.d/ (requiere privilegios de administrador):

sudo mv 99_fan /etc/pm/sleep.d/

Puede ejecutar fan_ctrl siempre que necesite apagar el ventilador manualmente. El otro script (99_fan) se ejecutará automáticamente como superusuario.

Revisiones

06/03/2025 - 21:26
Carlos segura