美文网首页
在MacBook Pro 12-1 with ubuntu 16

在MacBook Pro 12-1 with ubuntu 16

作者: 小煞Xs | 来源:发表于2017-09-12 14:03 被阅读0次

前言

最近入了一款MacBook Pro 12-1(R屏 2015年 13款),由于工作内容需求,不得不安装了一份ubuntu,在使用过程中发现风扇转速不能很好的控制,经常出现温度过高,风扇却没怎么转的情况,Google了一下,发现有一个东西叫做mbpfan,这里记录一下安装及使用过程。

本文所有内容都基于ubuntu 16.04操作而来,不保证其他OS同样适用

开始安装

  1. 首先运行git clone https://github.com/dgraziotin/mbpfan.gitmbpfan源码下载下来,当然你也可以选择zip download等方法

  2. 将传感器mod加载进内核

xs@xs-MacBookPro:~$ sudo vim /etc/modules
#add coretemp and applesmc to save
#修改后的文件内容,已经加入coretemp和applesmc
xs@xs-MacBookPro:~$ cat /etc/modules
# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.
coretemp
applesmc
xs@xs-MacBookPro:~$
  1. 进入mbpfan源码目录开始进行安装测试
cd mbpfan #确保终端当前路径跟刚才clone所处路径相同
sudo apt-get install build-essential #安装编译必需环境
make
sudo make install #此命令会将mbpfan安装到/usr/sbin,将配置文件安装到/etc/mpfan.conf
sudo make tests #测试命令,会显示本机风扇、内核等关键信息
  1. 现在mbpfan已经可以正常运行了,但我们还要将其加入开机启动
sudo cp mbpfan.service /etc/systemd/system/ #systemd start
sudo systemctl daemon-reload
sudo systemctl start mbpfan.service
sudo systemctl enable mbpfan.service
sudo systemctl start mbpfan
sudo service mbpfan start #此时mbpfan就已经加入开机启动了,会每次跟随系统启动

关于mbpfan配置文件,大家可以自行更改,我将默认的转速降低到1000,低温感受不到风扇声音了

xs@xs-MacBookPro:~$ cat /etc/mbpfan.conf
[general]
min_fan_speed = 1000    # 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
xs@xs-MacBookPro:~$

参考文献
https://github.com/dgraziotin/mbpfan

相关文章

网友评论

      本文标题:在MacBook Pro 12-1 with ubuntu 16

      本文链接:https://www.haomeiwen.com/subject/jzscsxtx.html