Apple MacBook Pro 13-inch (2020, Intel, Four Thunderbolt 3 Ports)

From Gentoo Wiki
Jump to:navigation Jump to:search

The Apple MacBook Pro 13-inch (2020, Four Thunderbolt 3 ports) is an Intel-based laptop with the Model Identifier MacBookPro16,2. It is the final MacBook Pro which was released before the switch to Apple silicon.

There are very similar models with the identifiers MacBookPro16,1…16,4 and most information here applies to the others as well.

Hardware

A number of components are not supported by the mainline kernel (as of 6.9). Out-of-tree patches need to be applied to use these components.

Components

Device Make/model Status Vendor ID / Product ID Kernel driver(s) Kernel version Notes
CPU Intel Core i5-1038G7 Works N/A N/A 6.9.4
iGPU Intel Iris Plus Graphics G7 Works PCI 8086:8a53 i915 6.9.4
GPIO Intel GPIO Pin Controller Works N/A pinctrl_intel 6.9.4
I2C/SMBus Controller Intel SMBus Controller Works PCI 8086:38c8 i2c_i801 6.9.4
SPI Controller Intel Ice Lake SPI Controller Works PCI 8086:38a4 spi_intel_pci 6.9.4
LPSS Controller Intel Low Power Subsystem Controller Works PCI 8086:38a8 intel_lpss_acpi, intel_lpss_pci 6.9.4 required for Bluetooth
Serial Controller Designware Serial Controller Works ? 8250_dw 6.9.4 required for Bluetooth
VHCI bridge Apple T2 Bridge Controller Partial PCI 106b:1801 apple-bce out of tree driver requires that the IOMMU is enabled; required for keyboard, trackpad, and the Apple Audio device
Secure element Apple T2 Secure Enclave Processor Unsupported PCI 106b:1802
NVMe Apple ANS2 NVMe Controller Works PCI 106b:2005 nvme 6.9.4
Audio Intel Corporation HD Audio device Works PCI 8086:7270 snd_hda_intel, snd_soc_avs, snd_sof_pci_intel_icl 6.9.4 for HDMI/DisplayPort audio
Audio Apple Audio Device Partial PCI 106b:1803 apple-bce out of tree driver only playback, no recording
Wireless LAN Broadcom BCM4364 802.11ac Wireless Network Adapter Works PCI 14e4:4464 brcmfmac 6.9.4 needs firmware that is not in linux-firmware.git, see #Wifi
Bluetooth Broadcom BCM4364 Bluetooth Works PCI 14e4:4464 hci_uart, hci_uart_bcm 6.9.4
Thunderbolt 3 Intel Ice Lake Thunderbolt NHI Works PCI 8086:8a17, PCI 8086:8a0d thunderbolt 6.9.4 also requires that CONFIG_HOTPLUG_PCI_PCIE is enabled
USB 3 Intel Ice Lake USB Controller Works PCI 8086:38ed xhci_hcd 6.9.4
Keyboard Apple Magic Keyboard Works USB 05ac:027e usbhid 6.9.4
Touchpad Apple Magic Touchpad Works USB 05ac:027e bcm5974 6.9.4
Touchbar Apple Touchbar Works USB 05ac:8302, USB 05ac:8102 appletbdrm, hid_appletb_bl, hid_appletb_kbd out of tree driver Controlled by app-laptop/tiny-dfr, see #Touchbar
Fingerprint sensor Apple Touch ID sensor Unsupported ?
Webcam Apple FaceTime HD Camera Works USB 05ac:8514 uvcvideo 6.9.4
Hardware Monitoring various Works acpi_battery, applesmc, coretemp, int340x, nvme, sbs 6.9.4 applesmc needs out of tree patches
Ambient light sensor Apple Ambient Light Sensor Unknown USB 05ac:8262 hid_sensor_hub

ACPI / Power management

Function Status Kernel driver(s) Kernel version BIOS version Notes
CPU frequency scaling Works intel_pstate, intel_rapl 6.9.4 2022.100.22.0.0
GPU Powersaving Not tested i915
PCIe Power Management (ASPM) Not tested
USB Type C Power Delivery Works 6.9.4 2022.100.22.0.0
Battery Works sbs 6.9.4 2022.100.22.0.0
Suspend to RAM Not tested
Suspend to disk (hibernate) Not tested
Display backlight control Works backlight_apple 6.9.4 2022.100.22.0.0
Keyboard backlight control Works hid_apple_magic_backlight out of tree driver 2022.100.22.0.0

Extra hardware information

root #lspci -nnk
root #lscpu
root #lsusb

Configuration

CPU flags

FILE /etc/portage/make.conf
COMMON_FLAGS="-O2 -pipe -march=icelake-client"
FILE /etc/portage/package.use/00cpu-flags
*/*  CPU_FLAGS_X86: aes avx avx2 avx512_bitalg avx512_vbmi2 avx512_vnni avx512_vpopcntdq avx512bw avx512cd avx512dq avx512f avx512ifma avx512vbmi avx512vl f16c fma3 mmx mmxext pclmul popcnt rdrand sha sse sse2 sse3 sse4_1 sse4_2 ssse3 vpclmulqdq

Installation

Preparation

Mainline kernels do not support the internal keyboard, trackpad, Wifi and Bluetooth. Either connect USB keyboard/mouse/network or use a Linux image from t2linux during installation.

Kernel

Out of tree patches can be found on t2linux github.

Wifi

Several methods to obtain Wifi firmware are described in the t2linux documentation

Touchbar

Install app-laptop/tiny-dfr.

On OpenRC installations, add it to the boot runlevel.

root #rc-update add tiny-dfr boot

On systemd installations, enable the tiny-dfr service:

root #systemctl enable tiny-dfr.service

Troubleshooting

Framebuffer

Problem: The framebuffer may be too large for the panel, causing text to go off screen or become garbled.

Solution: Apply i915 patch 7001-drm-i915-fbdev-Discard-BIOS-framebuffers-exceeding-h.patch from t2linux

Touchbar

Problem: Touchbar not recognized after forced poweroff by holding the power button.

Solution: Reboot once more.

Problem: tiny-dfr fails to bind to the touchbar because the DRM device is already in use.

Solution: Ensure that tiny-dfr loads before Xorg or Wayland graphical sessions, as otherwise these may claim the touchbar drm device.