Coder Social home page Coder Social logo

mschewe / fan-control-daemon Goto Github PK

View Code? Open in Web Editor NEW

This project forked from linux-on-mac/mbpfan

0.0 2.0 0.0 141 KB

A simple daemon to control fan speed on all Macbook/Macbook Pros (probably all Apple computers) for Linux 3.x.x

Makefile 1.45% Shell 4.69% C 93.86%

fan-control-daemon's Introduction

Fan-Control-Daemon

Introduction

This 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

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 tests and bug reports.

Supported distributions:

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

Tested Macbook Models

  • MacBook Pro 8.1 13" (Intel i7 - Linux 3.2)
  • MacBook Pro 6,2 15" (Intel i7 - Linux 3.2)
  • MacBook Pro 2,2 15" (Intel Core 2 Duo - Linux 3.4.4)

Warning

Be sure to load the kernel modules applesmc and coretemp.

Compile Instructions

Compile with

make

Install Instructions

Install with

sudo make install

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

Run The Tests (Recommended)

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 (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

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

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.