acerhdf - A kernelmodule which monitors the temperature
of the aspire one netbook, turns on/off the fan
as soon as the upper/lower threshold is reached.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
0.0: VERY SHORT REFERENCE
install: make && make install
load module: modprobe acerhdf interval=10 fanon=67 fanoff=62
read temperature: cat /sys/class/thermal/thermal_zone0/temp
change parameter: echo 50 > /sys/module/acerhdf/parameters/fanoff
1.0: INSTALL
1.1: DISTRIBUTION
Ensure you've installed everything to build a kernelmodule. For debian you
need at least to do: 'apt-get install build-essentials linux-kernel-headers'
1.2: ACERHDF
Obtain the source of the latest version from http://piie.net/?section=acerhdf
Untar the sources: 'tar xfvz acerhdf_kmod-<version>.tar.gz'
Compile: 'cd acerhdf_kmod && make'
Install: 'sudo make install'
2.0: USAGE
2.1: LOADING THE MODULE
To load the module into the kernel type: 'modprobe acerhdf'
If you want let this happen automatically on system boot-up, add the module
acerhdf to your list of autoloaded modules. (ask google how this works for
your distribution)
2.2: CHECK
Launch the command 'dmesg|grep acerhdf' and read the messages printed out.
2.3: READING THE TEMPERATURE
The current temperature can be read by:
'cat /sys/class/thermal/thermal_zone0/temp'
2.4: MONITORING / CONTROLLING THE FAN
The fan can be monitored via:
'cat /sys/class/thermal/thermal_zone0/cdev0/cur_state'
ATTENTION: setting the fan state manually can damage your hardware!
To change the state manually you must first switch to user mode (see 2.5),
then following commands will change the state:
ON: 'echo 1 > /sys/class/thermal/thermal_zone0/cdev0/cur_state'
OFF: 'echo 0 > /sys/class/thermal/thermal_zone0/cdev0/cur_state'
2.5: CHANGING BETWEEN KERNEL AND USER MODE
kernel: acerhdf controls the fan automatically depending on the temperature
and the temperature thresholds (see 2.6).
user: acerhdf offers only the interface for reading the temperature and
setting the state of the fan. A userspace program must take care about
changing the fan state.
Kernel mode is the default operation mode of acerhdf.
To switch to user mode, enter:
'echo user > /sys/class/thermal/thermal_zone0/mode'
You can switch back to kernel mode via:
'echo kernel > /sys/class/thermal/thermal_zone0/mode'
2.6: CONFIGURATION / PARAMETERS
acerhdf has following parameters:
o interval=10 - The interval in seconds, in which the temperature should be
checked in kernel mode. (default=10)
o fanon=67 - The temperature in Celsius above the fan should be switched on.
(default=67)
o fanoff=62 - The temperature in Celsuis below the fan should be switched
off. (default=62)
o verbose=0 - Print out verbose messages to dmesg. (default=0)
o force_bios="" - For testing purposes, see below.
Those parameters can be set when loading the module. E.g:
'modprobe acerhdf interval=5 fanon=65 fanoff=60'
You can add them to '/etc/modprobe.conf', so that they are automatically
applied, when the module is loaded. The line in modprobe.conf can look like
this:
'options acerhdf interval=5 fanon=65 fanoff=60'
Additionally every parameter (besides force_bios) can also be read and written
by accessing it via cat'ing or echo'ing the specific file in
/sys/module/acerhdf/parameters/*
Example:
'cat /sys/module/acerhdf/parameters/interval' to read the interval setting.
'echo 50 > /sys/module/acerhdf/parameters/fanoff' to change the fanoff
setting.
3.0: TESTING UNSUPPORTED HARDWARE
!!!! ATTENTION !!!!
This could harm your hardware if you do not know what you are doing!
If you have hardware / bios which isn't officially supported by acerhdf, but
you are sure it should work, you can try to load the module by:
'modprobe acerhdf force_bios="v0.3305"' or any other bios version defined in
source of acerhdf. The force_bios parameter will cause acerhdf to omit the
hardware and bios check and to pretend the chosen bios version is available.
-> acerhdf will be started in user mode.
Before switching to kernel mode (see 2.5) test if the temperature and the fan
can be correctly accessed (see 2.4)
IMPORTANT: if you get your hardware / bios working with this parameter,
report it to peter (a) piie.net then it will get into the list of supported
devices.