Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ place, see [docs/upgrade-to-quattro.md](docs/upgrade-to-quattro.md).
## Before you begin

- A recent backup of macOS (Time Machine or similar).
- An Apple Silicon Mac (M1/M2 family). Verify compatibility: https://asahilinux.org/fedora/#device-support
- An Apple Silicon Mac. M1 and M2 families are supported by Asahi: https://asahilinux.org/fedora/#device-support
- **M3 family (M3, M3 Pro, M3 Max, M3 Ultra): experimental.** Asahi boots it but has released no display or GPU driver, so the desktop renders in software with no brightness control and no external displays. The stock installer refuses M3; step 1 below has an M3 variant. Read [docs/apple-m3.md](docs/apple-m3.md) first.
- At least 50 GB free on the internal SSD (100 GB recommended).
- Internet access.

Expand All @@ -29,6 +30,12 @@ place, see [docs/upgrade-to-quattro.md](docs/upgrade-to-quattro.md).
curl https://asahi-alarm.org/installer-bootstrap.sh | sh
```

On an **M3-family Mac** run this instead. It uses the same Asahi Alarm images, swaps in Asahi's own installer package when Asahi Alarm's does not list M3 yet, adds the one line of installer data the M3 needs (firmware 14.8.3), and turns on the expert-mode question; answer yes to it:

```bash
curl -fsSL https://raw.githubusercontent.com/omarchy-mac/omarchy-mac/quattro/bin/omarchy-mac-asahi-install | bash
```

Choose `Asahi Alarm Minimal (BTRFS)` and allocate at least 50 GB for Linux.
The plain `Asahi Alarm Minimal` (ext4) works too — the setup below converts
it — but the BTRFS image already has the right shape.
Expand Down Expand Up @@ -199,6 +206,7 @@ Consider supporting the project: [![Buy Me A Coffee](https://img.shields.io/badg

- The Omarchy manual — [manual/](manual/)
- Btrfs snapshots and disk encryption — [docs/btrfs.md](docs/btrfs.md)
- M3-family Macs: what works, installing, trying newer kernels — [docs/apple-m3.md](docs/apple-m3.md)
- Upgrading from 3.x to Quattro — [docs/upgrade-to-quattro.md](docs/upgrade-to-quattro.md)

---
Expand Down
146 changes: 146 additions & 0 deletions bin/omarchy-hw-apple-soc
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
#!/bin/bash

# omarchy:summary=Identify the Apple Silicon generation and whether its GPU driver is bound
# omarchy:args=[--gen|--key|--codename|--is <m1|m2|m3|m4|variant>|--gpu]
# omarchy:examples=omarchy hw apple-soc | omarchy hw apple-soc --key | omarchy hw apple-soc --is m3 | omarchy hw apple-soc --gpu
# omarchy:hidden=true

# One SoC interface. omarchy-hw-apple remains the boolean "any Apple Silicon"
# check. This command is the generation table: do not add a second one.
# --gen prints m1, m2, m3, or m4. --key prints the variant (m3-ultra for
# t6032) so that mapping is part of the command, not only a comment. --gpu
# asks whether the Asahi GPU driver has bound, which is independent of the
# marketing name and is what software rendering keys off.
#
# Confirmed ids, cited where the claim is made:
# M1 through base M4, including T6031/T6034 as M3 Max, follow
# AsahiLinux/docs docs/hw/soc/soc-codenames.md at 715664a269937fe83293f46bbbeaae6094cb504e.
# T8132 is also the compatible in AsahiLinux/linux t8132-j713.dts
# (MacBook Air M4) at fbf2e630a95d1a084220f8dcea54aa85065481bb.
# T6032 is not in that soc-codenames pin. It is M3 Ultra in
# AsahiLinux/linux Documentation/devicetree/bindings/arm/apple.yaml at
# f3a01f769afda404c73f45090ee6190b8486dcbe (apple,j575d / apple,t6032,
# Mac Studio M3 Ultra 2025) and in t6032-j575d.dts at
# 44ca2144b29d84b4d1b94e372e408998607b5733.
# T6040 and T6041 are named M4 Pro and M4 Max in the same soc-codenames pin,
# but no merged root DTS confirms them (AsahiLinux/linux#577 is an unmerged
# skeleton). They exit unconfirmed-compatible, the same refusal as
# omarchy-mac#326. T6050 is M5 Pro/Max in that pin, not an M4 id, and is
# not claimed here.
#
# With no flag this prints the generation and exits 0, or exits 1 when this
# is not a confirmed Apple Silicon generation. Callers treat that 1 as
# "not a generation this tree will name."

compatible="${OMARCHY_APPLE_COMPATIBLE:-/proc/device-tree/compatible}"
drm_path="${OMARCHY_DRM_SYSFS_PATH:-/sys/class/drm}"

# Sets soc_key, soc_gen, and soc_reason for one SoC id. soc_reason is
# unconfirmed-compatible for ids the marketing table names but a root device
# tree has not confirmed. Returns 1 for an id this table does not know.
remember_soc() {
soc_reason=""
case $1 in
t8103) soc_key=m1; soc_gen=m1 ;;
t6000) soc_key=m1-pro; soc_gen=m1 ;;
t6001) soc_key=m1-max; soc_gen=m1 ;;
t6002) soc_key=m1-ultra; soc_gen=m1 ;;
t8112) soc_key=m2; soc_gen=m2 ;;
t6020) soc_key=m2-pro; soc_gen=m2 ;;
t6021) soc_key=m2-max; soc_gen=m2 ;;
t6022) soc_key=m2-ultra; soc_gen=m2 ;;
t8122) soc_key=m3; soc_gen=m3 ;;
t6030) soc_key=m3-pro; soc_gen=m3 ;;
t6031 | t6034) soc_key=m3-max; soc_gen=m3 ;;
t6032) soc_key=m3-ultra; soc_gen=m3 ;;
t8132) soc_key=m4; soc_gen=m4 ;;
t6040 | t6041) soc_reason=unconfirmed-compatible ;;
*) return 1 ;;
esac
}

# The compatible file is NUL-separated strings; read them one at a time.
read_compatible() {
[[ -f $compatible ]] || return 1
tr '\0' '\n' <"$compatible"
}

detect() {
local entry soc
gen=""
key=""
codename=""
reason=""
while read -r entry; do
case $entry in
apple,arm-platform) ;;
apple,*)
soc=${entry#apple,}
if remember_soc "$soc"; then
if [[ -n $soc_reason ]]; then
reason=$soc_reason
elif [[ -z $gen ]]; then
key=$soc_key
gen=$soc_gen
reason=""
fi
continue
fi
# Not a SoC id, so it is the machine codename (apple,j516s).
[[ -n $codename ]] || codename=$soc
;;
esac
done < <(read_compatible)
[[ -n $gen ]]
}

reject_unconfirmed() {
if [[ ${reason:-} == "unconfirmed-compatible" ]]; then
printf '%s\n' "$reason" >&2
fi
exit 1
}

# The GPU driver registers as "asahi" on the platform bus and exposes the DRM
# render node through it. Either sysfs view is enough; both are checked so a
# kernel that renamed one still answers.
gpu_bound() {
local card driver
shopt -s nullglob
for card in "$drm_path"/card[0-9]*; do
driver=$(readlink -f "$card/device/driver" 2>/dev/null) || continue
[[ ${driver##*/} == "asahi" ]] && return 0
done
for card in "${OMARCHY_PLATFORM_DRIVERS_PATH:-/sys/bus/platform/drivers}"/asahi/*.gpu; do
[[ -e $card ]] && return 0
done
return 1
}

case ${1:-} in
--gpu)
detect || exit 1
gpu_bound
;;
--is)
[[ -n ${2:-} ]] || { echo "usage: omarchy-hw-apple-soc --is <m1|m2|m3|m4|variant>" >&2; exit 2; }
detect || reject_unconfirmed
[[ $gen == "$2" || $key == "$2" ]]
;;
--codename)
detect || reject_unconfirmed
echo "$codename"
;;
--key)
detect || reject_unconfirmed
echo "$key"
;;
"" | --gen)
detect || reject_unconfirmed
echo "$gen"
;;
*)
echo "usage: omarchy-hw-apple-soc [--gen|--key|--codename|--is <gen>|--gpu]" >&2
exit 2
;;
esac
Loading
Loading