GithubHelp home page GithubHelp logo

yoshida-mediba / smc Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 0.0 172 KB

Apple System Management Control (SMC) Tool

License: GNU General Public License v2.0

Makefile 1.79% Groff 2.66% C 93.35% Ruby 2.20%

smc's Introduction

Warning
-------
This tool will allow you to write values to the SMC which could irreversably damage your
computer.  Manipulating the fans could cause overheating and permanent damange.  USE THIS
PROGRAM AT YOUR OWN RISK! 

Background
----------
I created this program because I was unhappy with my MacBook Pro running so hot and it
annoyed me that Apple didn't make any way for end users to set fan preferences.

This program will allow you to read and write values to the SMC using the AppleSMC kernel
extension.  The purpose of this is to show how to talk to the controller.  I've made no
effort to make it user friendly, however I'm releasing this in hopes that someone will
take the next logical step and make a nice *free* GUI. I think it's absurd that some
people are trying to charge for simple programs to manipulate this type of data.

In my testing I've been able to lower the average system temperature by 15C just
by running the fans at a low speed like 3500 RPM, which you can barely hear.

Usage 
------
# smc -h

Apple System Management Control (SMC) tool 0.01
Usage:
./smc [options]
    -f         : fan info decoded
    -h         : help
    -k <key>   : key to manipulate
    -l         : list all keys and values
    -r         : read the value of a key
    -w <value> : write the specified value to a key
    -v         : version

Fan control 
-----------
To decode:
# smc -f

To manually query and control:
FNum - tells you how many fans are in the system

To read data from each fan:
F0Ac - Fan actual speed
F0Mn - Fan minimum speed
F0Mx - Fan maximum speed
F0Sf - Fan safe speed
F0Tg - Fan target speed
FS!  - See if fans are in automatic or forced mode

[Replace 0 with fan #.  In the MacBook Pro there two fans so this applies for 0 (left)
 and 1 (right).]

To set a fan to a specific speed:
FS!  - Sets "force mode" to fan.  Bit 0 (right to left) is fan 0, bit 1
       is fan 1, etc
F0Tg - Sets target speed, make sure you fp78 encode it (left shift by 2)

For example, to force both fans to 3500 RPM:
# python -c "print hex(3500 << 2)"
0x36b0
# smc -k "FS! " -w 0003
# smc -k F0Tg -w 36b0
# smc -k F1Tg -w 36b0

..to force fan 0 to 4000 RPM and leave fan 1 in automatic mode:
# smc -k "FS! " -w 0001
# smc -k F0Tg -w 3e80

..to return both fans to automatic mode:
# smc -k "FS! " -w 0000

Temperature sensors
-------------------
TB0T
TC0D
TC0P
TM0P
TN0P
Th0H
Ts0P
TN1P
Th1H

Light sensors
-------------
ALV0 - Left 
ALV1 - Right 

Motion sensors
--------------
MO_X
MO_Y
MO_Z

smc's People

Contributors

yoshida-mediba avatar

Watchers

James Cloos avatar  avatar  avatar

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.