Last active
June 28, 2023 12:44
-
-
Save xanderlent/c4e618da01bfa655b500f1b9baa7a7bf to your computer and use it in GitHub Desktop.
systemd service to run MacBook Pro fans at maximum, tested on a MacBookPro11,3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Max out MacBook Pro fans | |
[Service] | |
Type=oneshot | |
RemainAfterExit=True | |
ExecStart=/bin/bash -c "echo 1 > /sys/devices/platform/applesmc.768/fan1_manual" | |
ExecStart=/bin/bash -c "cat /sys/devices/platform/applesmc.768/fan1_max > /sys/devices/platform/applesmc.768/fan1_output" | |
ExecStart=/bin/bash -c "echo 1 > /sys/devices/platform/applesmc.768/fan2_manual" | |
ExecStart=/bin/bash -c "cat /sys/devices/platform/applesmc.768/fan2_max > /sys/devices/platform/applesmc.768/fan2_output" | |
ExecStop=/bin/bash -c "echo 0 > /sys/devices/platform/applesmc.768/fan1_manual" | |
ExecStop=/bin/bash -c "echo 0 > /sys/devices/platform/applesmc.768/fan2_manual" | |
[Install] | |
WantedBy=default.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ah, College! No idea where I got this info from, probably frantic Googling at the time. I made this because I was worried my laptop (a MacBookPro11,3) was overheating when booting into Fedora. Not sure if that was true at the time, I do vaguely remember seeing machine check errors at one point (not sure if it was in this cycle of installing Linux on my MBP or an earlier one, though). Who knows if it was actually overheating, could have just been me looking for problems or that the fan curve was different under macOS. I think I had installed Fedora around this time to mess with building IBM's OpenPOWER firmware, which was, for some reason, very exciting to me then.