mbpfan/README.md

178 lines
4.3 KiB
Markdown
Raw Normal View History

2012-06-09 14:40:12 +00:00
Fan-Control-Daemon
====================
Introduction
---------------------
2012-08-23 20:32:49 +00:00
This is an enhanced version of [Allan McRae mbpfan](http://allanmcrae.com/2010/05/simple-macbook-pro-fan-daemon/)
2012-06-09 14:25:28 +00:00
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).
2012-06-11 19:43:53 +00:00
* It only uses the temperatures from the processors as input.
* It requires coretemp and applesmc kernel modules to be loaded.
* It requires root use
2012-07-03 08:39:30 +00:00
* It daemonizes or stays in foreground
* Verbose mode for both syslog and stdout
* Users can configure it using the file /etc/mbpfan.conf
2012-06-09 14:25:28 +00:00
Supported GNU/Linux Distributions
---------------------------------
We provide scripts to to load mbpfan daemon at system boot for many distros.
2012-10-20 15:18:30 +00:00
Please note that the support is provided by volunteers. mbpfan needs tests and bug reports.
Supported distributions:
- Ubuntu
- Debian
- Archlinux
- Fedora
- RedHat
- CentOS
- Gentoo
Tested Macbook Models
2012-06-09 14:40:12 +00:00
---------------------
- MacBook Pro 9,2 13" (Intel i5/i7 - Linux 3.10)
- Macbook Pro 8,2 15" (Intel i7 - Linux 3.6.2)
- MacBook Pro 8,1 13" (Intel i7 - Linux 3.2.0)
- Macbook Pro 6,2 15" (Intel i7 - Linux 3.5.0)
- MacBook Pro 6,2 15" (Intel i7 - Linux 3.2.0)
- MacBook Pro 2,2 15" (Intel Core 2 Duo - Linux 3.4.4)
2012-06-09 14:40:12 +00:00
Warning
-------
Be sure to load the kernel modules **applesmc** and **coretemp**.
Arch Linux
---------
See [mbpfan-git at AUR](https://aur.archlinux.org/packages/mbpfan-git/).
Otherwise, please refer to the Generic Instructions.
Ubuntu
------
Install the ```build-essential``` package.
Then, refer to the Generic Install Instructions.
Generic Install Instructions
-------------------------
2012-06-09 14:25:28 +00:00
Compile with
make
2012-06-09 14:40:12 +00:00
2012-06-15 19:12:51 +00:00
Install with
2012-06-15 19:47:23 +00:00
sudo make install
2012-06-15 19:47:23 +00:00
It copies mbpfan to /usr/sbin and mbpfan.conf to /etc
2012-06-15 19:47:23 +00:00
2012-06-15 19:12:51 +00:00
Run The Tests (Recommended)
---------------------------
It is recommended to run the tests after installing the program
sudo ./bin/mbpfan -t
or
2012-06-09 14:25:28 +00:00
sudo make tests
2012-06-15 19:12:51 +00:00
2012-06-09 14:40:12 +00:00
Run Instructions
----------------
2012-06-15 19:47:23 +00:00
If not installed, run with
sudo bin/mbpfan
2012-06-09 14:40:12 +00:00
2012-06-15 19:47:23 +00:00
If installed, manually run with
sudo mbpfan
2012-06-15 19:47:23 +00:00
If installed and using the init file, run with (Ubuntu example)
sudo service mbpfan start
2012-06-15 19:47:23 +00:00
Starting at boot
----------------
2012-08-22 13:53:07 +00:00
**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
2012-08-22 13:53:07 +00:00
**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 (as root):
sudo update-rc.d mbpfan defaults
2012-08-22 13:53:07 +00:00
**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
**Gentoo**
An init file is available for gentoo users: mbpfan.init.gentoo
To install, run as root:
cp mbpfan.init.gentoo /etc/init.d/mbpfan
To automatically run mbpfan at boot, run as root:
rc-update add mbpfan default
2012-08-22 13:53:07 +00:00
**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
2012-08-22 13:53:07 +00:00
To start the service automatically at boot, also execute the following:
sudo systemctl enable mbpfan.service
2012-07-03 08:39:30 +00:00
Usage
-------
Usage: ./mbpfan OPTION(S)
-h Show the help screen
-f Run in foreground
-t Run the tests
-v Be (a lot) verbose
2012-07-03 08:39:30 +00:00
2012-06-09 14:40:12 +00:00
License
---------------------
GNU General Public License version 3
2012-06-09 14:25:28 +00:00
2012-01-25 15:26:01 +00:00
2012-06-09 14:40:12 +00:00
Based On
---------------------
2012-06-11 19:43:53 +00:00
* http://allanmcrae.com/2010/05/simple-macbook-pro-fan-daemon/
* http://allanmcrae.com/2011/08/mbp-fan-daemon-update/
* https://launchpad.net/macfanctld
* http://paste2.org/p/862259
* http://www.lobotomo.com/products/FanControl/