Mbpfan: Difference between revisions
From wikinotes
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
Uses information from [[lm_sensors]] to control macbook fans on a T2-cpu macbook from linux. | |||
= Documentation = | = Documentation = | ||
Line 13: | Line 9: | ||
|} | |} | ||
</blockquote><!-- Documentation --> | </blockquote><!-- Documentation --> | ||
= Locations = | |||
<blockquote> | |||
{| class="wikitable" | |||
|- | |||
| <code>/etc/mbpfan.conf</code> || config | |||
|- | |||
|} | |||
</blockquote><!-- Locations --> | |||
= Install = | = Install = | ||
<blockquote> | <blockquote> | ||
{{ WARNING | | {{ WARNING | | ||
The AUR package for mbpfan refers to the original mbpfan, which won't work on a mac with a T2 chip. | The AUR package for mbpfan refers to the original mbpfan, which won't work on a mac with a T2 chip. | ||
* (supports T2) https://github.com/networkException/mbpfan | * (supports T2) https://github.com/networkException/mbpfan | ||
* (supports ~2012 macs) https://github.com/dgraziotin/mbpfan | * (supports ~2012 macs) https://github.com/dgraziotin/mbpfan | ||
}} | }} | ||
== Build/Install == | |||
<blockquote> | |||
Build | Build | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
Line 39: | Line 46: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Detect sensors '''important!!''' | |||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
yes | sensors-detect # dumps a config with sensor info | |||
sensors # | |||
</syntaxhighlight> | </syntaxhighlight> | ||
</blockquote><!-- Build/Install --> | |||
== Verify == | |||
<blockquote> | |||
I found I needed to tweak the config | |||
<syntaxhighlight lang="bash"> | |||
sudo systemctl status mbpfan.service # ensure running | |||
watch sensors # monitor cpu temp every 2s | |||
</syntaxhighlight> | |||
</blockquote><!-- Verify --> | |||
</blockquote><!-- Install --> | </blockquote><!-- Install --> | ||
= Configuration = | |||
<blockquote> | |||
I found the default thresholds a bit hot for my liking, but it's easy to tweak. | |||
<syntaxhighlight lang="conf"> | |||
[general] | |||
low_temp = 48 | |||
high_temp = 58 | |||
max_temp = 86 | |||
</syntaxhighlight> | |||
</blockquote><!-- Configuration --> | |||
= Troubleshooting = | = Troubleshooting = |
Latest revision as of 23:47, 6 March 2022
Uses information from lm_sensors to control macbook fans on a T2-cpu macbook from linux.
Documentation
https://github.com/networkException/mbpfan
Locations
/etc/mbpfan.conf
config
Install
WARNING:
The AUR package for mbpfan refers to the original mbpfan, which won't work on a mac with a T2 chip.
- (supports T2) https://github.com/networkException/mbpfan
- (supports ~2012 macs) https://github.com/dgraziotin/mbpfan
Build/Install
Build
git clone https://github.com/networkException/mbpfan cd mbpfan make sudo make install sudo make testsEnable
sudo cp mbpfan.service /etc/systemd/system sudo systemctl enable mbpfan.service sudo systemctl daemon-reload sudo systemctl start mbpfan.serviceDetect sensors important!!
yes | sensors-detect # dumps a config with sensor infoVerify
I found I needed to tweak the config
sudo systemctl status mbpfan.service # ensure running watch sensors # monitor cpu temp every 2s
Configuration
I found the default thresholds a bit hot for my liking, but it's easy to tweak.
[general] low_temp = 48 high_temp = 58 max_temp = 86
Troubleshooting
# watch it run mbpfan -f # run in foreground mbpfan -v # verboseSome background info for debugging:
applesmc
is builtin to the linux kernel.- mbpfan uses applesmc exposed info from files in
/sys/devices/platform/*
(ex:APP, applesmc.768