Skip to content

About

Omarchy (Arch + Hyprland) on the 2016/2017 Touch Bar MacBook Pro (A1706, Apple T1): sound, Touch Bar, Touch ID, 5 GHz Wi-Fi and Bluetooth that survive sleep (brcmfmac patch, DKMS), s2idle, ambient light sensor

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Omarchy on the MacBook Pro 13" 2016/2017 with Touch Bar (A1706, T1)

Everything needed to make a MacBookPro13,2 (A1706) a first-class Omarchy machine: sound, Touch Bar, 5 GHz Wi-Fi that survives sleep, working sleep, Touch ID, camera, ambient light sensor with automatic brightness, trackpad. Written from a real install (Omarchy 4.0.4, kernel 7.2.5, October 2026): every command here was run on the machine, and every dead end that cost hours is written down too, so you can skip it.

The same guide very likely applies to the other T1 Touch Bar models, MacBookPro14,2 (the 2017 A1706) and the 15" MacBookPro13,3 and 14,3 (A1707), whose hardware is nearly identical. They are untested here. The 13" models without a Touch Bar (MacBookPro13,1 and 14,1, A1708) have no T1 but probably share the sound, Wi-Fi and sleep parts.

Only here for Wi-Fi and Bluetooth after sleep on a 2016/2017 MacBook Pro (BCM43602, any distribution)? See brcmfmac-apple-resume/: a driver fix, installed with one command.

What works, and how well

Part State Notes
Installer, boot, disk, keyboard, trackpad works The erase-disk install wipes the Touch Bar firmware: read the install notes before you install
Sound (speakers, microphone) works Community CS8409 driver via DKMS, with a patch for the mic's level. docs/02-sound.md
5 GHz Wi-Fi (BCM43602) works at boot Needs an NVRAM file. docs/03-wifi.md
Touch Bar, camera, ambient light sensor works Needs the T1 firmware restored; volume, brightness and keyboard-light sliders, no polling. docs/04-touchbar.md
Sleep (deep, S3) works A kernel module keeps Thunderbolt and USB-C alive through sleep and hibernation (Apple's power handling, as macOS does it); the T1 told after the wake; about 0.9 % battery per hour. docs/05-sleep.md, alpine-ridge-sleep/
Wi-Fi and Bluetooth after sleep fixed (driver patch) Stock brcmfmac fails 5 GHz and Bluetooth stutters after a resume; a DKMS-packaged patch fixes it. docs/06-wifi-after-sleep.md
Automatic keyboard light and screen brightness works From the ambient light sensor. docs/07-light.md
Trackpad palm trouble, scrolling, gestures tuned docs/08-input.md
Touch ID works For sudo and Polkit prompts, with T1Bridge. docs/09-touch-id.md
Workspace overview, dock, night light by location optional docs/10-desktop-extras.md
Graphics compression (power) works A boot option lets the graphics compress the screen image. docs/11-power.md

The short version

On a fresh Omarchy install (2.4 GHz Wi-Fi or a USB Ethernet adapter is enough to start), with the charger plugged in, in a terminal in the desktop:

omarchy update                     # first: a current Omarchy and kernel, then reboot
git clone https://github.com/olofd/omarchy-macbookpro-a1706 && cd omarchy-macbookpro-a1706
sh scripts/setup.sh                # as yourself; it asks for sudo where it needs it

setup.sh runs every step below in order. Each step checks what is already there and only does what is missing or changed, so it is safe to run again, and on an up-to-date Mac it changes nothing. When a step needs a reboot (sound, Wi-Fi, the Touch Bar, the driver fix), the steps that depend on it wait and the summary says so: reboot and run it again until it says "All done". Run it again after every git pull too: that is how the Mac keeps matching this repository. Options: --fallback MyNetwork (a 2.4 GHz connection for the wake check, chapter 5), --no-touchid, --no-extras. Two Touch ID steps stay by hand (it prints them): enrolling a finger, and adding Touch ID to sudo. After the Touch Bar step, back up the T1 firmware it restored: sudo tar -C /boot/EFI -czf efi-apple.tgz APPLE, and keep the file off the machine.

The steps, one by one (what setup.sh runs):

sudo sh scripts/install-sound.sh              # then reboot
sudo sh scripts/install-wifi.sh               # NVRAM for 5 GHz (the tested values); then reboot
sudo bash scripts/install-touchbar.sh         # mains power; restores the T1 firmware; log out/in after
sh scripts/install-touchbar-renderer.sh       # the guide's Touch Bar renderer: sliders, no polling
sudo sh scripts/install-sleep.sh              # deep sleep; optional argument: a 2.4 GHz connection to fall back to
sudo sh scripts/install-thunderbolt-sleep.sh  # kernel module: Thunderbolt and USB-C through sleep (no reboot)
sudo sh scripts/install-wifi-sleep-fix.sh     # patched Wi-Fi driver (DKMS) for 5 GHz and Bluetooth after sleep; reboot
sudo sh scripts/install-light.sh              # automatic keyboard light and screen brightness
sh scripts/install-input.sh                   # trackpad settings, in your ~/.config/hypr/input.lua
sudo sh scripts/install-touchid.sh install    # Touch ID; reboot, then the enroll and pam steps (docs/09)
sudo sh scripts/install-power.sh              # graphics compression (a boot option); reboot
sh scripts/install-overview.sh                # desktop extras (docs/10); also install-dock, -nightlight, -chime

In this order: the light sensor and Touch ID need the Touch Bar step (both sit on the T1), and the sleep steps are only worth testing once Wi-Fi works.

Check that it all works

sh scripts/verify.sh                          # every fix, one line each: ok / FAIL (no root needed)
sudo sh scripts/sleep-test.sh                 # real sleeps woken by the clock, verify.sh after each one

verify.sh checks sound, Wi-Fi (5 GHz, traffic), Bluetooth, the T1 (Touch Bar, Touch ID, light sensor), Thunderbolt and USB-C, the sleep setup, and the kernel log since the last wake for the errors this guide fixes. sleep-test.sh runs deep and s2idle sleeps through systemd (so the sleep hook runs as for the lid), measures how long the Mac really slept, names what woke it, and runs verify.sh after each (sudo sh scripts/sleep-test.sh deep:20 deep:600 s2idle:30; results also in /var/log/sleep-test.log). Leave the Mac alone while it runs.

Check and undo each step

Step Check Undo
Sound aplay -l lists CS8409/CS42L83 Analog; after a deep sleep journalctl -k -b | grep "lost power in sleep" sudo dkms remove snd_hda_macbookpro/0.1 --all, sudo rm -rf /usr/local/src/snd_hda_macbookpro /etc/wireplumber/wireplumber.conf.d/60-a1706-internal-mic.conf, reboot
Wi-Fi (5 GHz) iw phy | grep -c 5180 prints more than 0 sudo sh scripts/install-wifi.sh remove, reboot
Touch Bar sudo t1bridge status says touchbar: ready sudo pacman -Rns t1bridge t1bridge-dkms and delete the [standardagents] lines from /etc/pacman.conf; the restored T1 firmware stays (it is Apple's)
Touch Bar renderer systemctl --user cat t1-touchbar shows the 50-a1706-renderer.conf drop-in sh scripts/install-touchbar-renderer.sh remove
Sleep cat /sys/power/mem_sleep shows [deep]; the lid closes and opens sudo sh scripts/install-sleep.sh remove, reboot
Wi-Fi after sleep modinfo -F parm brcmfmac | grep mac_efi_restore sudo sh scripts/install-wifi-sleep-fix.sh remove, reboot
Thunderbolt through sleep lsmod | grep tb_ar_shim; after a sleep journalctl -k -b | grep tb_ar_shim sudo sh scripts/install-thunderbolt-sleep.sh remove
Light sensor systemctl is-active kbd-auto-backlight screen-auto-brightness sudo sh scripts/install-light.sh remove
Trackpad hyprctl configerrors is empty; two-finger scroll is natural sh scripts/install-input.sh remove
Touch ID sudo -k; sudo true asks for your finger sudo sh scripts/install-touchid.sh unpam (the packages: docs/09)
Graphics compression grep -o intel_iommu=igfx_off /proc/cmdline sudo sh scripts/install-power.sh remove, reboot
Desktop extras see docs/10 sh scripts/install-<name>.sh remove

Before you install anything

  1. Back up EFI/APPLE from macOS if the Mac still boots macOS. It holds the Touch Bar firmware (in macOS Terminal: sudo diskutil mount disk0s1, then copy /Volumes/EFI/EFI/APPLE to a USB stick). If you already wiped it, docs/04-touchbar.md rebuilds it without macOS.
  2. Use a USB stick written in raw (DD) mode (balenaEtcher, or Rufus in "DD image" mode). A stick made in Rufus's ISO mode will not boot on a Mac. See docs/01-install.md.
  3. You need a USB keyboard and mouse for the first minutes: the SPI keyboard and trackpad drivers are installed by the installer, and the live image may not have them.

Layout

README.md              this file
docs/                  one page per problem: what is wrong, why, the fix, how to check it
scripts/               setup.sh (all of it), the installers it runs and the small services (all safe to run again)
files/                 the data they install: the Wi-Fi NVRAM, system units, config
brcmfmac-apple-resume/ the Wi-Fi driver patch and its DKMS package (built per kernel from the upstream source)
snd-hda-macbookpro/    the patches for the community sound driver (the internal mic)
t1bridge-renderer/     the patch for t1bridge's Touch Bar renderer (sliders, no polling)
docs/99-log.md         the full trail of what was tried and what each test showed

Credit

This builds on other people's work, linked where it is used: the CS8409 driver (davidjo/snd_hda_macbookpro), the T1 firmware regeneration (niconistal/t1-revive), the T1 driver and Touch ID (standardagents/t1bridge), the workspace overview (itsmoorgrove/omarchy-overview), the dock (nwg-piotr/nwg-dock-hyprland), the Wi-Fi NVRAM (t1-revive's, with values from MikeRatcliffe's gist and nohzafk/omarchy-macbookpro-t1) and the state-of-Linux pages (Dunedan/mbp-2016-linux, xtocdra/macbookpro13-2).

Not affiliated with Apple, Omarchy or the projects above. Use at your own risk: these scripts write to system directories, a firmware step talks to Apple's servers, and the Wi-Fi fix replaces a kernel driver. The sound, Touch Bar and overview steps download and run the current code of those upstream projects (as root for sound and Touch Bar): read it there if you want to know exactly what runs.

Licence

MIT (LICENSE), except the driver patch in brcmfmac-apple-resume/, which changes the Linux brcmfmac driver and is under the ISC licence, like the file it changes (pcie.c). Issues and pull requests are welcome, especially reports from the other T1 models.

About

Omarchy (Arch + Hyprland) on the 2016/2017 Touch Bar MacBook Pro (A1706, Apple T1): sound, Touch Bar, Touch ID, 5 GHz Wi-Fi and Bluetooth that survive sleep (brcmfmac patch, DKMS), s2idle, ambient light sensor

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages