{"id":13805998,"url":"https://github.com/linux-on-mac/mbpfan","last_synced_at":"2025-05-13T21:32:09.070Z","repository":{"id":3518413,"uuid":"4576791","full_name":"linux-on-mac/mbpfan","owner":"linux-on-mac","description":"A simple daemon to control fan speed on all MacBook/MacBook Pros (probably all Apple computers) for Linux Kernel 3 and newer","archived":false,"fork":true,"pushed_at":"2023-08-03T23:28:09.000Z","size":313,"stargazers_count":855,"open_issues_count":18,"forks_count":134,"subscribers_count":22,"default_branch":"master","last_synced_at":"2024-06-19T00:36:52.553Z","etag":null,"topics":["apple","fan","fan-control","imac","linux","mac","macbook","thermal"],"latest_commit_sha":null,"homepage":"https://ineed.coffee/projects/mbpfan","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"rvega/Fan-Control-Daemon","license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/linux-on-mac.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-06-06T19:07:14.000Z","updated_at":"2024-06-16T11:46:17.000Z","dependencies_parsed_at":"2023-01-11T16:17:12.178Z","dependency_job_id":null,"html_url":"https://github.com/linux-on-mac/mbpfan","commit_stats":null,"previous_names":["dgraziotin/mbpfan"],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linux-on-mac%2Fmbpfan","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linux-on-mac%2Fmbpfan/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linux-on-mac%2Fmbpfan/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linux-on-mac%2Fmbpfan/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/linux-on-mac","download_url":"https://codeload.github.com/linux-on-mac/mbpfan/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":213870459,"owners_count":15650178,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apple","fan","fan-control","imac","linux","mac","macbook","thermal"],"created_at":"2024-08-04T01:01:07.016Z","updated_at":"2024-08-04T01:05:34.596Z","avatar_url":"https://github.com/linux-on-mac.png","language":"C","readme":"# mbpfan\n\n[![Build Status](https://travis-ci.org/dgraziotin/mbpfan.svg?branch=master)](https://travis-ci.org/dgraziotin/mbpfan)\n\nThis is an enhanced version of [Allan McRae mbpfan](http://allanmcrae.com/2010/05/simple-macbook-pro-fan-daemon/)\n\nmbpfan is a daemon that uses input from coretemp module and sets the fan speed using the applesmc module.\nThis enhanced version assumes any number of processors and fans (max. 10).\n\n* It only uses the temperatures from the processors as input.\n* It requires coretemp and applesmc kernel modules to be loaded.\n* It requires root use\n* It daemonizes or stays in foreground\n* Verbose mode for both syslog and stdout\n* Users can configure it using the file /etc/mbpfan.conf\n\n**Table Of Contents**\n\n- [Supported GNU/Linux Distributions](#supported-gnulinux-distributions)\n- [Tested Mac Models](#tested-mac-models)\n- [Requirements](#requirements)\n- [Installation](#installation)\n\t- [Arch Linux](#arch-linux)\n\t- [CRUX Linux](#crux-linux)\n\t- [Debian](#debian)\n\t- [Fedora](#fedora)\n\t- [Gentoo](#gentoo)\n\t- [Solus](#solus)\n\t- [Ubuntu](#ubuntu)\n\t- [Generic Install Instructions (All Other Operating Systems)](#generic-install-instructions-all-other-operating-systems)\n- [Run Instructions](#run-instructions)\n- [Starting at boot](#starting-at-boot)\n- [Usage](#usage)\n- [References](#references)\n- [License](#license)\n- [Credits](#credits)\n\n## Supported GNU/Linux Distributions\n\nWe provide scripts to to load mbpfan daemon at system boot for many distros.\nPlease note that the support is provided by volunteers. mbpfan needs tests and bug reports.\n\nSupported distributions:\n\n- Ubuntu\n- Debian\n- Archlinux\n- Fedora\n- RedHat\n- CentOS\n- Gentoo\n- Alpine\n- Trisquel\n- Solus\n\n## Tested Mac Models\n\nSee https://github.com/linux-on-mac/mbpfan/wiki/Tested-Mac-Models .\n\n## Requirements\n\nBe sure to load the kernel modules **applesmc** and **coretemp**.\n\nThese modules are often automatically loaded when booting up GNU/Linux on a MacBook. If that is not the case, you should make sure to load them at system startup.\n\n**How do I know if applesmc and coretemp are loaded?**\n\nIn most distributions, you can run the following command:\n\n```bash\nlsmod | grep -e applesmc -e coretemp\n```\n\nIf you see `coretemp` and `applesmc` listed, you are all set.\n\n**If you do not see `coretemp` and `applesmc` listed, you must load them.**\n\nThis is _usually_ achieved by inserting the following two lines in the file `/etc/modules`\n\n```\ncoretemp\napplesmc\n```\n\nPlease check the relevant documentation of your GNU/Linux distribution.\n\n## Installation\n\n### Arch Linux\n\nSee [mbpfan-git at AUR](https://aur.archlinux.org/packages/mbpfan-git/).\nOtherwise, please refer to the Generic Instructions.\n\n### CRUX Linux\n\nFollow the instructions on [jolupalabs REPO](https://github.com/jolupa/jolupalabs) for installation.\n\n### Debian\n\nOn Debian 10 or later install via:\n\n```\nsudo apt-get install mbpfan\n```\n\n### Fedora\n\nOn Fedora 30 or later:\n\n```\nsudo dnf install mbpfan\n```\n\n### Gentoo\n\nInstall the ```mbpfan``` package with:\n\n    sudo emerge -av app-laptop/mbpfan\n\n\n### Solus\n\nOn Solus, install the package with:\n```\nsudo eopkg install mbpfan\n```\nthen enable the service.\n\n\n### Ubuntu\n\nOn Ubuntu 18.04 or later install via:\n\n```\nsudo apt-get install mbpfan\n```\n\n### Generic Install Instructions (All Other Operating Systems)\n\nCompile with\n\n    make\n\nInstall with\n\n    sudo make install\n\nIt copies mbpfan to /usr/sbin, mbpfan.conf to /etc (and overwrites existing files),\nREADME.md to /usr/share/doc/mbpfan, and mbpfan.8.gz to /usr/share/man/man8\n\nIf you would like to compile with Clang instead of GCC, simply set your system's\ndefault compiler to be Clang. Tested with Clang 3.8 and 3.9. Tested with Clang\n4.0 along with llvm-lld (The LLVM Linker).\n\n\nRun The Tests (Optional)\n------------------------\nUsers may run the tests after building the program.  Please run the following command _from within the source directory_.\n\n    sudo make tests\n\nNote that this only works on MacBook and not desktop computers due to different environment expectations.\n\n\n## Run Instructions\n\nIf not installed, run with\n\n    sudo bin/mbpfan\n\nIf installed, manually run with\n\n    sudo mbpfan\n\nIf installed and using the init file, run with (Ubuntu example)\n\n    sudo service mbpfan start\n\n\n## Starting at boot\n\n**Ubuntu**\n\nFor systemd based init systems (Ubuntu 16.04+), see the systemd section below.\n\nFor upstart based init systems (Ubuntu before 16.04), an example upstart job has been provided.\nFor using it, execute:\n\n    sudo cp mbpfan.upstart /etc/init/mbpfan.conf\n    sudo start mbpfan\n\n**Debian**\nAn init file suitable for /lib/lsb/init-functions (Debian)\nis located in the main folder of the source files, called mbpfan.init.debian\nRename it to mbpfan, give it execution permissions (chmod +x mbpfan)\nand move it to /etc/init.d\nThen, add it to the default runlevels with (as root):\n\n    sudo update-rc.d mbpfan defaults\n\n**Redhat, CentOS, Fedora**\nAn init file suitable for /etc/rc.d/init.d/functions\n(RHEL/CentOS \u0026 Fedora) is also located at the same place, this file is called\nmbpfan.init.redhat. Also rename it to mbpfan, give it execution permissions\nand move it to /etc/init.d\nTo add the script to the default runlevels, run the following as root:\n\n    chkconfig --level 2345 mbpfan on \u0026\u0026 chkconfig --level 016 mbpfan off\n\n**Gentoo**\n\nTo automatically run mbpfan at boot, run as root:\n\n    rc-update add mbpfan default\n\n\n**systemd**\nAs a special bonus, a service file for systemd is also included. To use it,\nexecute the following (as root):\n\n    sudo cp mbpfan.service /etc/systemd/system/\n    sudo systemctl enable mbpfan.service\n    sudo systemctl daemon-reload\n    sudo systemctl start mbpfan.service\n\n**dinit**\nA [dinit](https://github.com/davmac314/dinit) service definition is also included. To use it, execute the following:\n    \n    sudo cp mbpfan.dinit /etc/dinit.d/mbpfan\n    sudo dinitctl enable mbpfan\n    sudo dinitctl start mbpfan\n\n## Usage\n\n    Usage: ./mbpfan OPTION(S)\n\n    -h Show the help screen\n    -f Run in foreground\n    -v Be (a lot) verbose\n\n## References\n\n* [mbpfan on Ask Ubuntu](https://askubuntu.com/search?q=mbpfan+is%3Aquestion)\n\n## License\n\nGNU General Public License version 3\n\n## Credits\n\n**This Project Is Based On:**\n\n* http://allanmcrae.com/2010/05/simple-macbook-pro-fan-daemon/\n* http://allanmcrae.com/2011/08/mbp-fan-daemon-update/\n* https://launchpad.net/macfanctld\n* https://www.lobotomo.com/products/FanControl/\n\n**This Project uses following library:**\n\n* [ANSI C Application Settings Management](http://pokristensson.com/settings.html) by Per Ola Kristensson.\n","funding_links":[],"categories":["C"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinux-on-mac%2Fmbpfan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flinux-on-mac%2Fmbpfan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinux-on-mac%2Fmbpfan/lists"}