linux-on-mac / mbpfan

A simple daemon to control fan speed on all MacBook/MacBook Pros (probably all Apple computers) for Linux Kernel 3 and newer
https://ineed.coffee/projects/mbpfan
GNU General Public License v3.0
895 stars 139 forks source link

Tested mbpfan on an iMac 2008 #251

Closed breversa closed 2 years ago

breversa commented 2 years ago

Hi!

I've installed mbpfan on an iMac 2008:

$ inxi --machine
Machine:   Type: Desktop System: Apple product: iMac8,1 v: 1.0 serial: <superuser/root required> 
           Mobo: Apple model: Mac-F226BEC8 v: PVT serial: <superuser/root required> UEFI: Apple 
           v: IM81.88Z.00C1.B00.0802091538 date: 02/09/08

As soon as mbpfan started, the fan ramped up in speed and became overly noisy.

I had a look at /etc/mbpfan.conf, and changed the values as follows:

[general]
# see https://ineed.coffee/3838/a-beginners-tutorial-for-mbpfan-under-ubuntu for the values
# 
# mbpfan will load the max / min speed of from the files produced by the applesmc driver. If these files are not found it will set all fans to the default of min_speed = 2000 and max_speed = 6200
# by setting the values for the speeds in this config it will override whatever it finds in:
# /sys/devices/platform/applesmc.768/fan*_min
# /sys/devices/platform/applesmc.768/fan*_max
# or the defaults.
#
# multiple fans can be configured by using the config key of min_fan*_speed and max_fan*_speed
# the number used will correlate to the file number of the fan in the applesmc driver that are used to control the fan speed.
#
min_fan1_speed = 1200   # put the *lowest* value of "cat /sys/devices/platform/applesmc.768/fan*_min"
max_fan1_speed = 6000   # put the *highest* value of "cat /sys/devices/platform/applesmc.768/fan*_max"
low_temp = 63           # try ranges 55-63, default is 63
high_temp = 66          # try ranges 58-66, default is 66
max_temp = 105          # take highest number returned by "cat /sys/devices/platform/coretemp.*/hwmon/hwmon*/temp*_max", divide by 1000
polling_interval = 1    # default is 1 seconds

In detail, the changed values were:

The fans are now much less noisy but still very noisier than when running OS X. I doubt it'll allow to be used on a daily basis.

If anyone has an idea on how to improve things, I'll gladly take it. :)

thisivanhoe commented 2 years ago

My iMac is a bit newer, late 2009.

inxi --machine
Machine:
  Type: Desktop System: Apple product: iMac11,1 v: 1.0
    serial: <superuser required>
  Mobo: Apple model: Mac-F2268DAE serial: <superuser required> UEFI: Apple
    v: 63.0.0.0.0 date: 06/14/2019

Since 2 days, this machine is running fine on Fedora 36 Workstation Edition.

I also started implementing mbpfan using the original tutorial: https://ineed.coffee/projects/mbpfan

The tweaking of mbpfan's config for keeping down CPU-, and especially GPU-heat levels took me a full day. Here are the relevant parts from my mbpfan.config:

[general]
min_fan1_speed = 1750     # default is 2000
max_fan1_speed = 3800    # default is 6200
min_fan2_speed = 1750     # default is 2000
max_fan2_speed = 5500    # default is 6200
min_fan3_speed = 1550     # default is 2000
max_fan3_speed = 2791    # default is 6200

low_temp = 55           # try ranges 55-63, default is 63
high_temp = 58          # try ranges 58-66, default is 66
max_temp = 83           # take highest number returned by "cat /sys/devices/platform/coretemp.*/hwmon/hwmon*/temp*_max", divide by 1000
polling_interval = 7                    # default is 1 seconds

The senors command shows how the the three inbuilt fans behave:

$ sensors
applesmc-isa-0300
Adapter: ISA adapter
ODD :        2380 RPM  (min = 1000 RPM, max = 3800 RPM)
HDD :        2913 RPM  (min = 1100 RPM, max = 5500 RPM)
CPU :        1867 RPM  (min =  940 RPM, max = 2100 RPM)
TA0P:         +26.8°C  
TA0V:         +26.8°C  
TA0p:         +31.8°C  
TA1v:         +32.0°C  
TC0C:         +56.2°C  
TC0D:        -127.0°C  
TC0H:         +50.8°C  
TC0P:        -127.0°C  
TC1C:         +56.0°C  
TG0D:         +69.2°C  
TG0H:         +65.0°C  
TG0p:         +66.0°C  
TH0O:          +1.0°C  
TH1O:          +1.0°C  
TL0P:         +41.2°C  
TL0V:         +47.8°C  
TL0p:         +54.0°C  
TL1V:         +44.0°C  
TL2V:         +49.2°C  
TLAV:         +49.2°C  
TLBV:         +47.0°C  
TLCV:         +47.8°C  
TMCD:          +0.0°C  
TO0P:         +50.0°C  
TO0p:         +51.0°C  
TPCD:         +59.0°C  
TS0V:         +49.2°C  
TS2P:         +47.0°C  
TS2V:         +45.5°C  
TS2p:         +47.0°C  
Tm0P:         +52.0°C  
Tm0p:         +52.0°C  
Tp1P:         +58.2°C  
Tp2H:         +69.8°C  
Tp3H:         +58.5°C  

coretemp-isa-0000
Adapter: ISA adapter
Core 0:       +57.0°C  (high = +83.0°C, crit = +99.0°C)
Core 1:       +53.0°C  (high = +83.0°C, crit = +99.0°C)
Core 2:       +56.0°C  (high = +83.0°C, crit = +99.0°C)
Core 3:       +53.0°C  (high = +83.0°C, crit = +99.0°C)

So now, the fans only start getting noisier on load only. Think I can live with that!

breversa commented 2 years ago

Thanks! I actually solved the issue and forgot about it, and as the computer has been shipped since, I can't look back at what I did. :-/

However, I think my issue came from the fact that I've had been tinkering with the older macfanctl before trying mbpfan. IIRC, after reinstalling Linux and installing mbpfan only, I did not encounter the issue.

I may not recall properly though, as I was going through a lots of trial & error at that time and didn't document everything.