Fix the fan problem of your MacBook (Pro/air)

on

This article is the result of a personal experience that I would like to share with you in the hope of helping you.
This tool has been tested on MacBook Macs of Mac mini, iMac and is surely compatible with your Mac. You can check the compatibility list here.
I had recovered an old MacBook Air of 2010 (MBA 1.1). His problem was that it was not possible to update OSX on it (I could not exceed OSX 10.9.5) even using all the stratagems imaginable. In short, so I installed xUbuntu as any geek who respects but to my greatest surprise, the fan was then blocked at 100% of its speed.

Under (x) Ubuntu, the MacBook Air fan was blocked at 100% of its speed.

Being quite upset (especially since it had become ultra noisy) I tried to look for some solutions to fix it.

Github to the rescue dgraziotin/mbpfan

So I searched a bit on the Web and I came across this tool. According to the author of the tool, it allows to control the speed of the fan of your MacBook Air according to the temperature of the processor.
Not sure if the tool was compatible with my machine, I decided to clone it and try it as well as bad to test (I didn't lose anything anyway).
Below the manipulation to do for users in Ubuntu:

Steps to install and set up

Before embarking on these steps, be aware that the author has taken care to write a little guide in English here.
The second thing to know is that the values you will have in the next step are dependent on your machine, carefully follow my instructions please.

The preliminaries

The first thing we will do is try to determine the minimum and maximum speed of the fan of your machine. In the first place, copy and paste this command:
CD/sys/devices/platform/applesmc.768/
Then, chain with this command:
Cat fan * _min
A number will be displayed, note it well. This is the minimum speed of your built-in fan.
The second command is as follows:
Cat fan * _max
The number that will be displayed represents the maximum speed of your fan.
As I have just said, note these two values because we will need them later.
With the speed interval noted, we will then need the critical temperature of your machine. Basically, it is the maximum temperature that your processor supports, beyond that your machine is likely to stop for example.
Enter this command:
Cat/sys/devices/platform/coretemp. */hwmon/hwmon */temp * _max
A number will be displayed, it must be divided by 1000. For me for example, I had 100000 which is 100 °c once divided by 1000.

Clone and compile!

We will now clone the source code of the project, compile it, install it and configure it. Don't panic, it's very simple and you can do it even if you don't know anything about it. (And you can boast in front of others about your little feat:D!)

So first, let's start by installing the necessary tools with these two commands:

sudo apt-get update
sudo apt-get install git build-essential

The first command will simply refresh the list of repositories, the second install git we will need to clone the project and build-essential that will allow us to compile everything.

Once done, we will clone the project simply via this command:

git clone https://github.com/dgraziotin/mbpfan.git

Once done, you will enter the folder with:

CD mpbfan

We have the source code, we are in the folder and so we will chain with the following three commands:


Make
sudo make install
sudo make tests

The first command will compile the mpbfan source code into an executable. The second command will install mpbfan in your system and the last will run tests. Everything will be good if you have the following text displayed in your Terminal "ALL TESTS PASSED".
If everything goes well and you see the previous message, you are good for the Setup. Otherwise, your machine may not be compatible or there has been a problem. If this is the case, you can share it with me in the comments.

The configuration

For configuration, you will need to edit a text file in "superuser" mode. In the case of xUbuntu, you will use this command:

sudo mousepad/etc/mbpfan.conf

A window with the text editor will open with the open mbpfan. conf file.

If this does not work or if you are on another variant of * Ubuntu:
Try this command:

sudo gedit/etc/mbpfan.conf

Once the file is opened, you will have a structure as follows:


[general]

min_fan_speed = 2000 # default is 2000
max_fan_speed = 6200 # default is 6200
low_temp = 63 # try ranges 55-63, default is 63
high_temp = 66 # try ranges 58-66, default is 66
max_temp = 86 # do not set it > 90, default is 86
polling_interval = 7 # default is 7

Change the value assigned to min_fan_speed to the minimum value that you noted earlier.
Likewise for max_fan_speed.
For the rest, I advise you to keep the defaults and save the file. You can change the value max_temp by putting this of the critical temperature of your processor (noted previously also) but this is something I do not recommend.

Once the file is saved, verify that you are still in the folder containing the mbpfan source code and enter these two commands:


sudo CP mbpfan. service/etc/systemd/system/
sudo systemctl enable mbpfan. service

The first one will turn mbpfan into service, the second will activate it.

Reboot your system, open a Terminal and enter this command to check if mbpfan is functional:


ps aux | a. mbpfan

If you see a line with/usr/sbin/mbpfan-FV is that everything is good, mbpfan is functional. You should also note that your fan does not sag as before.

I hope I could help you with this short guide. I didn't make any screenshot especially because I think it's all clear.
If you are unable to run mbpfan on your machine, you can share it with me in the comments.

Hoping to help you!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

By continuing to use the site, you agree to the use of cookies. More information

The cookie settings on this site are set to "accept cookies" to provide you with the best browsing experience possible. If you continue to use this site without changing your cookie settings or if you click "accept" below, you consent to this.

Close