A simple daemon to control fan speed on all MacBook/MacBook Pros (probably all Apple computers) for Linux Kernel 3 and newer
Find a file
2012-08-22 15:53:07 +02:00
src Fixes #14 and enhances Readme.md 2012-08-22 15:53:07 +02:00
.gitignore Added Eclipse project files to .gitignore 2012-07-05 01:06:40 +02:00
AUTHORS Cleanup, reformatting, better Makefile and better README 2012-08-22 15:05:52 +02:00
Makefile Fixes #14 and enhances Readme.md 2012-08-22 15:53:07 +02:00
mbpfan.conf Added support for configfile /etc/mbpfan.conf 2012-07-05 01:22:48 +02:00
mbpfan.init.debian Added syslog as dependency for init scripts, added systemd service file 2012-07-05 01:13:38 +02:00
mbpfan.init.redhat Added syslog as dependency for init scripts, added systemd service file 2012-07-05 01:13:38 +02:00
mbpfan.rc-not-maintained Added non-maintained files 2012-06-09 19:14:17 +02:00
mbpfan.service Added syslog as dependency for init scripts, added systemd service file 2012-07-05 01:13:38 +02:00
mbpfan.upstart Add Upstart (ubuntu) job 2012-08-19 08:34:26 -04:00
PKGBUILD-not-maintained Added non-maintained files 2012-06-09 19:14:17 +02:00
README.md Fixes #14 and enhances Readme.md 2012-08-22 15:53:07 +02:00

Fan-Control-Daemon

Introduction

This is an enhanced version of rvega's Fan-Control-Daemon, which itself is an enhanced version of Allan McRae mbpfan

Fan-Control-Daemon is a daemon that uses input from coretemp module and sets the fan speed using the applesmc module. This enhanced version assumes any number of processors and fans (max. 10).

  • It only uses the temperatures from the processors as input.
  • It requires coretemp and applesmc kernel modules to be loaded.
  • It requires root use
  • It daemonizes or stays in foreground
  • Verbose mode for both syslog and stdout
  • Users can configure it using the file /etc/mbpfan.conf

Compile Instructions

Compile with make

Manually compile with gcc -o bin/mbpfan src/mbpfan.c -lm

Install Instructions

Install with sudo make install

It copies mbpfan to /usr/sbin and mbpfan.conf to /etc

It is recommended to run the tests after installing the program sudo ./bin/mbpfan -t or sudo make tests

Run Instructions

If not installed, run with sudo bin/mbpfan

If installed, manually run with sudo mbpfan

If installed and using the init file, run with (Ubuntu example) sudo service mbpfan start

Starting at boot

Ubuntu For upstart based init systems (Ubuntu), an example upstart job has been provided for use in place of the LSB-style init script. To use, execute: sudo cp mbpfan.upstart /etc/init/mbpfan.conf sudo start mbpfan

Debian An init file suitable for /lib/lsb/init-functions (Debian) is located in the main folder of the source files, called mbpfan.init.debian Rename it to mbpfan, give it execution permissions (chmod +x mbpfan) and move it to /etc/init.d Then, add it to the default runlevels with sudo update-rc.d mbpfan defaults

Redhat, CentOS, Fedora An init file suitable for /etc/rc.d/init.d/functions (RHEL/CentOS & Fedora) is also located at the same place, this file is called mbpfan.init.redhat. Also rename it to mbpfan, give it execution permissions and move it to /etc/init.d To add the script to the default runlevels, run the following as root: chkconfig --level 2345 mbpfan on && chkconfig --level 016 mbpfan off

systemd As a special bonus, a service file for systemd is also included. To use it, execute the following as root: sudo cp mbpfan.service /usr/lib/systemd/system sudo ln -s /usr/lib/systemd/system/mbpfan.service /etc/systemd/system/mbpfan.service sudo systemctl daemon-reload sudo systemctl start mbpfan.service

To start the service automatically at boot, also execute the following: sudo systemctl enable mbpfan.service

Usage

Usage: ./mbpfan OPTION(S) -h Show the help screen -f Run in foreground -t Run the tests -v Be (a lot) verbose

License

GNU General Public License version 3

Based On