Dual Boot (not VM) for Kali Linux ver2020.2 on MacBook pro 2017

Motivation to write

Recent Macbook pros are equipped with Touchbar and new peripherals are introduced. There are many cases where the keyboard and touchpad cannot be used after starting Linux. Furthermore, the fan does not work, so the computer gets hot. However, the contributions of many developers are solving such problems. I hope it helps if the same thing happens to my friends and colleagues. By the way, this is my first post, so if you have any small mistakes or improvements, please comment.

things to do

  1. Peripheral / driver updates (keyboard, Tocuhar, Touchpad)
  2. Fan management module
  3. Power management module
  4. (Optional) WiFi improvements


1. Update peripherals / drivers

Use the following Git Hub repository.


git clone https://github.com/cb22/macbook12-spi-driver

Then check the kernel version. Kali Linux ver2020.2 is * 5.3 *. If the kernel is * 4.11 * or less, * intremap = nosid * when booting, You need to make sure that * noapi * is not in the kernel options.

Next, add the spi to be included in the file system image ** / etc / initramfs-tools / module. Then put in kernel module support called dkms and install Apple peripherals.

echo -e "\n# applespi\napplespi\nspi_pxa2xx_platform\nintel_lpss_pci" >> /etc/initramfs-tools/modules

apt install dkms
git clone https://github.com/cb22/macbook12-spi-driver.git /usr/src/applespi-0.1
dkms install -m applespi -v 0.1

With the above actions, you can now do the following.

-Keyboard typing -TouchBar (Press Fn to use Fn key) -Basic touchpad function (2,3,4 finger scrolling)

2. Fan management module

First, check if there are modules called applesmc and coretemp.

lsmod | grep -e applesmc -e coretemp

If it does not exist, add the following to ** / etc / modules / **.


Then use the following Git Hub repository.


git clone https://github.com/linux-on-mac/mbpfan

Then go into the repository and

make && sudo make install
sudo make tests

Enter the management file ** /etc/mbpfan.conf ** You can buy the fan speed and reaction temperature moderately.

** Caution **: Since the macbook has two fans, add the left and right information to min_fan1 and min_fan2 respectively.

min_fan1_speed = 4500
min_fan2_speed = 4500	
max_fan1_speed = 5500
max_fan2_speed = 5500	
low_temp = 63			# try ranges 55-63, default is 63
high_temp = 66			# try ranges 58-66, default is 66
max_temp = 86			
polling_interval = 1	# default is 1 seconds

Normally, the fan speed is 2000 rpm, but I wanted to cool it, so I increased it to 4500 rpm. Also, max_fan * sometimes suddenly reaches max_temp, so I thought 6200 was bad for fans, so I lowered it.

Renamed mbpfan.debian to mbpfan to run mbpfan at boot time

sudo update-rc.d mbpfan defaults

And run

The executable file is located in ** / usr / sbin / mbpfan **.

This is the end of fan management.

3. Power management module

I used the module from the official website below.


Add Devian's official repository to ** /etc/apt/sources.list **.

deb http://ftp.debian.org/debian buster-backports main
deb http://ftp.debian.org/debian stretch-backports-sloppy main


apt update && apt install tlp tlp-rdw


systemctl start tlp

4. WiFi improvement

In the default state, WiFi does not arrive.

Reference: What are the benefits of lowering Wi-Fi output? -gigazine.net- https://gigazine.net/news/20190411-wi-fi-power/

So I reduced the WiFi output.

iwconfig wlan0 txpower 10


wlan0     IEEE 802.11  ESSID:"router-xxx"  
          Mode:Managed  Frequency:2.422 GHz  Access Point: xx:xx:xx:xx   
          Bit Rate=72.2 Mb/s   Tx-Power=10 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality=31/70  Signal level=-79 dBm  
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:64  Invalid misc:0   Missed beacon:0

You can now connect to WiFi even if you are a little far away!

Recommended Posts

Dual Boot (not VM) for Kali Linux ver2020.2 on MacBook pro 2017
Supports JIS keyboard on Kali Linux ver2020.4
OpenPose on MacBook Pro
OpenPose on MacBook Pro Part 2
pykintone on Windows Subsystem for Linux
Create a permanent write area on Kali Linux with USB memory boot