Update: As of 2019-10-14, this project is being maintained by the community linux-on-mac. Please head to https://github.com/linux-on-mac/mbpfan to download the latest release of mbpfan and to report bugs. The project has also changed since the publication of this tutorial. Thanks!

Mbpfan is a daemon that controls the fans of Macbook/Macbook Pro laptops when they run GNU/Linux. It is a lightweight replacement of macfanctld, although it does not implement all of its features. It has got a different algorithm to control the fans. In a couple of words, it keeps Macbook fans a lot more silent.

This project is an enhanced version of Allan McRae mbpfan.

The mbpfan project is a daemon that uses input from


module and sets the fan speed using the


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; init scripts for Ubuntu/Debian, Fedora/RedHat/CentOS, Gentoo, Archlinux (unmaintained), and systemd included
  • Verbose mode for both syslog and stdout
  • It lets users specify settings in the /etc/mbpfan.conf file


You can clone/download mbpfan on GitHub: https://github.com/dgraziotin/mbpfan.
You can download “stable” releases as gzipped tars on the Tag page: https://github.com/dgraziotin/mbpfan/tags.

You can report issues either on the issue tracker: https://github.com/dgraziotin/mbpfan/issues?page=1&state=open


There are several concerns about compatibility and dependencies in order to correctly use mbpfan


mbpfan has been tested on v3.x.x kernels and on v4.x.x kernels.
Be sure to load the kernel modules applesmc and coretemp.
Also, be sure to not use other fan control daemons such as macfanctld while mbpfan is active.

Supported GNU/Linux Distributions

We provide scripts to to load mbpfan daemon at system boot for many distros.
Please note that the support is provided by volunteers. mbpfan needs test and bug reports.

The following are the supported distributions:

  • Ubuntu
  • Debian
  • Fedora
  • RedHat
  • CentOS
  • Gentoo

Tested Macbook Models

  • 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)

How to use mbpfan

A step-by-step, beginner’s friendly tutorial for Ubuntu is available here.

Compile Instructions

Compile with


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


sudo make tests

Run Instructions

If installed, manually run with

sudo /usr/sbin/mbpfan

If installed and using the init file, run with (Ubuntu example)

sudo start mbpfan

Starting at boot

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

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

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

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

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


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


GNU General Public License version 3


A list of authors, maintainers, and contributors can be found in the AUTHORS file.


What is going to be next is:

  • Create an Ubuntu deb


  • Molte grazie! Perfect tutorial, have not seen many of this quality yet! Worked like a charm on my macbook air (3.1 – Debian Wheezy).
    Tanti saluti da Basilea


  • This project is highly appreciated! Never expected my MBP to be this silent under Ubuntu 14.04.

    Looking forward for the DEB package… maybe there will be a Ubuntu PPA, too?

    • I am really glad that it works fine for you. I have difficulties to find the time to maintain a ppa. Perhaps you could maintain a ppa for mbpfan? :-)

  • Trying to install on a Gentoo-based system (Sabayon) on a Macbook 9,2 (2012)

    sudo make install gives me several errors. What could be wrong? See terminal response below. Thanks for your help!

    make[1]: Entering directory ‘/home/mark/mbpfan-1.9.1’
    mkdir -p bin
    Compiling src/minunit…
    g++ -c -g src/minunit.c -osrc/minunit.o
    make[1]: g++: Command not found
    Makefile:46: recipe for target ‘src/minunit.o’ failed
    make[1]: *** [src/minunit.o] Error 127
    make[1]: Leaving directory ‘/home/mark/mbpfan-1.9.1’
    Makefile:66: recipe for target ‘install’ failed
    make: *** [install] Error 2”

    • That is an easy one!

      g++: Command not found

      . You are missing g++ on Sabayon.

      I am not using any Gentoo system since a decade or so, but I think I remember that you need to emerge gcc again using different use flags. Ask around in the Sabayon forum.

      • Thanks, mate, that helped!

        I installed gcc (through Sabayon’s onboard package manager, Rigo) and could finally install mbpfan.

        Thank you so much for developing it! your work is all the more appreciated since the development of macfanctld seems to have come to a halt.

        This piece of software helps Apple refugees like myself start a new life in the Linux land of the free ;-)

About Author


Dr. Daniel Graziotin is a senior researcher (Akademischer Rat) at the University of Stuttgart, Germany. His research interests include human, behavioral, and psychological aspects of empirical software engineering, studies of science, and open science. He is associate editor at the Journal of Open Research Software and academic editor at the Research Ideas and Outcomes (RIO) journal. Daniel was awarded an Alexander von Humboldt Fellowship for postdoctoral researchers in 2017, the European Design Award (bronze) in 2016, and the Data Journalism Award in 2015. He received his Ph.D. in computer science at the Free University of Bozen-Bolzano, Italy.