Controlling CPU Fan Speed on Mac mini 5,2 with Ubuntu 24.04
If you have a Mac mini 5,2 (Mid 2011) running Ubuntu 24.04, a convenient setup is to use applesmc + mbpfan . mbpfan 2.4.0 is also included as a standard package in Ubuntu 24.04 (Noble). Ubuntu Packages The Linux applesmc driver provides Intel Mac temperature sensors and fan control via sysfs. GitHub 1. First, check applesmc sudo modprobe applesmc sudo modprobe coretemp lsmod | grep -E…
Controlling CPU Fan Speed on Mac mini 5,2 with Ubuntu 24.04
To control the CPU fan speed on a Mac mini 5,2 (Mid 2011) running Ubuntu 24.04, first install the applesmc and mbpfan packages. The Linux applesmc driver provides Intel Mac temperature sensors and fan control via sysfs. Follow these steps:
1. Check applesmc and coretemp modules:
- Run `sudo modprobe applesmc` and `sudo modprobe coretemp`.
- Verify the modules with `lsmod | grep -E applesmc|coretemp`.
2. Check the fan interface:
- Find the SMC directory: `SMC=$(find /sys/devices/platform -maxdepth 1 -type d -name applesmc.* -print -quit)`.
- List the fan interface files: `ls -l $SMC /fan *`.
3. View fan control values:
- Check minimum and maximum fan speeds: `cat $SMC /fan1_min` and `cat $SMC /fan1_max`.
- Check current fan speed: `cat $SMC /fan1_input`.
4. Manually adjust fan speed:
- Temporarily set fan speed to 3000 RPM: `echo 1 | sudo tee $SMC /fan1_manual` and `echo 3000 | sudo tee $SMC /fan1_output`.
- Check actual fan speed again with `cat $SMC /fan1_input`.
5. Return to automatic control:
- Ensure automatic control by setting `echo 0 | sudo tee $SMC /fan1_manual`.
6. Recommended method using mbpfan:
- Install mbpfan: `sudo apt update` and `sudo apt install mbpfan lm-sensors`.
- Enable mbpfan: `sudo systemctl enable --now mbpfan`.
- Check mbpfan status: `systemctl status mbpfan`.
- Configure mbpfan in `/etc/mbpfan.conf` with appropriate low, high, and max temperatures.
- Restart mbpfan: `sudo systemctl restart mbpfan`.
7. Monitor CPU and fan temperatures/RPM:
- Use `sensors` or `watch -n 1 sensors` to monitor real-time temperatures.
- View fan RPM directly with `watch -n 1 cat $SMC /fan1_input`.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.