├── .gitignore
├── theme
├── assets
│ ├── images
│ │ └── icon.png
│ ├── fonts
│ │ ├── roboto-v20-latin-700.eot
│ │ ├── roboto-v20-latin-700.ttf
│ │ ├── roboto-v20-latin-700.woff
│ │ ├── roboto-v20-latin-700.woff2
│ │ ├── roboto-v20-latin-italic.eot
│ │ ├── roboto-v20-latin-italic.ttf
│ │ ├── roboto-v20-latin-italic.woff
│ │ ├── roboto-v20-latin-regular.eot
│ │ ├── roboto-v20-latin-regular.ttf
│ │ ├── roboto-v20-latin-italic.woff2
│ │ ├── roboto-v20-latin-regular.woff
│ │ ├── roboto-v20-latin-regular.woff2
│ │ ├── roboto-mono-v11-latin-regular.eot
│ │ ├── roboto-mono-v11-latin-regular.ttf
│ │ ├── roboto-mono-v11-latin-regular.woff
│ │ └── roboto-mono-v11-latin-regular.woff2
│ └── stylesheets
│ │ ├── layout.css
│ │ ├── colors.css
│ │ └── fonts.css
└── main.html
├── requirements.txt
├── README.md
├── docs
├── distributions
│ ├── manjaro
│ │ ├── home.md
│ │ ├── deprecation.md
│ │ ├── faq.md
│ │ └── installation.md
│ ├── fedora
│ │ ├── home.md
│ │ ├── faq.md
│ │ └── installation.md
│ ├── ubuntu
│ │ ├── home.md
│ │ ├── faq.md
│ │ └── installation.md
│ ├── overview.md
│ ├── arch
│ │ ├── faq.md
│ │ └── installation.md
│ ├── nixos
│ │ ├── home.md
│ │ ├── faq.md
│ │ └── installation.md
│ ├── endeavouros
│ │ └── installation.md
│ ├── gentoo
│ │ └── installation.md
│ └── debian
│ │ └── installation.md
├── tools
│ ├── get-apple-firmware.service
│ ├── touchbar.sh
│ ├── efi.sh
│ └── distro-metadata.json
├── guides
│ ├── uninstall.md
│ ├── fan.md
│ ├── hybrid-graphics.md
│ ├── audio-config.md
│ ├── startup-manager.md
│ ├── kernel.md
│ ├── preinstall.md
│ ├── windows.md
│ ├── refind.md
│ ├── postinstall.md
│ └── wifi-bluetooth.md
├── notable-contributors.md
├── contribute.md
├── state.md
├── roadmap.md
└── index.md
├── .github
├── workflows
│ ├── lint.yml
│ └── deploy.yml
└── dependabot.yml
├── redirs
├── dkms
│ └── index.html
└── wifi
│ └── index.html
├── .prettierrc.json
├── .markdownlint.json
├── mkdocs.yml
└── LICENSE
/.gitignore:
--------------------------------------------------------------------------------
1 | # mkdocs
2 | build/
3 | .DS_Store
--------------------------------------------------------------------------------
/theme/assets/images/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/t2linux/wiki/HEAD/theme/assets/images/icon.png
--------------------------------------------------------------------------------
/theme/assets/fonts/roboto-v20-latin-700.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/t2linux/wiki/HEAD/theme/assets/fonts/roboto-v20-latin-700.eot
--------------------------------------------------------------------------------
/theme/assets/fonts/roboto-v20-latin-700.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/t2linux/wiki/HEAD/theme/assets/fonts/roboto-v20-latin-700.ttf
--------------------------------------------------------------------------------
/theme/assets/fonts/roboto-v20-latin-700.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/t2linux/wiki/HEAD/theme/assets/fonts/roboto-v20-latin-700.woff
--------------------------------------------------------------------------------
/theme/assets/fonts/roboto-v20-latin-700.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/t2linux/wiki/HEAD/theme/assets/fonts/roboto-v20-latin-700.woff2
--------------------------------------------------------------------------------
/theme/assets/fonts/roboto-v20-latin-italic.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/t2linux/wiki/HEAD/theme/assets/fonts/roboto-v20-latin-italic.eot
--------------------------------------------------------------------------------
/theme/assets/fonts/roboto-v20-latin-italic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/t2linux/wiki/HEAD/theme/assets/fonts/roboto-v20-latin-italic.ttf
--------------------------------------------------------------------------------
/theme/assets/fonts/roboto-v20-latin-italic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/t2linux/wiki/HEAD/theme/assets/fonts/roboto-v20-latin-italic.woff
--------------------------------------------------------------------------------
/theme/assets/fonts/roboto-v20-latin-regular.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/t2linux/wiki/HEAD/theme/assets/fonts/roboto-v20-latin-regular.eot
--------------------------------------------------------------------------------
/theme/assets/fonts/roboto-v20-latin-regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/t2linux/wiki/HEAD/theme/assets/fonts/roboto-v20-latin-regular.ttf
--------------------------------------------------------------------------------
/theme/assets/fonts/roboto-v20-latin-italic.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/t2linux/wiki/HEAD/theme/assets/fonts/roboto-v20-latin-italic.woff2
--------------------------------------------------------------------------------
/theme/assets/fonts/roboto-v20-latin-regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/t2linux/wiki/HEAD/theme/assets/fonts/roboto-v20-latin-regular.woff
--------------------------------------------------------------------------------
/theme/assets/fonts/roboto-v20-latin-regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/t2linux/wiki/HEAD/theme/assets/fonts/roboto-v20-latin-regular.woff2
--------------------------------------------------------------------------------
/theme/assets/fonts/roboto-mono-v11-latin-regular.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/t2linux/wiki/HEAD/theme/assets/fonts/roboto-mono-v11-latin-regular.eot
--------------------------------------------------------------------------------
/theme/assets/fonts/roboto-mono-v11-latin-regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/t2linux/wiki/HEAD/theme/assets/fonts/roboto-mono-v11-latin-regular.ttf
--------------------------------------------------------------------------------
/theme/assets/fonts/roboto-mono-v11-latin-regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/t2linux/wiki/HEAD/theme/assets/fonts/roboto-mono-v11-latin-regular.woff
--------------------------------------------------------------------------------
/theme/assets/fonts/roboto-mono-v11-latin-regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/t2linux/wiki/HEAD/theme/assets/fonts/roboto-mono-v11-latin-regular.woff2
--------------------------------------------------------------------------------
/requirements.txt:
--------------------------------------------------------------------------------
1 | # This file contains the direct dependencies required for building the docs
2 | # To install them all run 'pip install -r requirements.txt' in the same directory
3 |
4 | zensical == 0.0.14
5 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Repository for wiki.t2linux.org
2 |
3 | Click [here](https://wiki.t2linux.org) to get to the wiki
4 |
5 | Mkdocs code partly taken from [codeoverflow-org/nodecg-io-docs](https://github.com/codeoverflow-org/nodecg-io-docs)
--------------------------------------------------------------------------------
/theme/main.html:
--------------------------------------------------------------------------------
1 | {% extends "base.html" %}
2 |
3 | {% block announce %}
4 |
9 | Join our Discord Server
10 | {% endblock %}
11 |
--------------------------------------------------------------------------------
/theme/assets/stylesheets/layout.css:
--------------------------------------------------------------------------------
1 | .md-typeset h1 {
2 | margin: 2rem 0 0;
3 | }
4 |
5 | blockquote > p {
6 | border-left: .2rem solid var(--md-default-fg-color--lighter) !important;
7 | padding-left: .6rem !important;
8 | color: rgb(172, 172, 172);
9 | }
10 |
11 | blockquote {
12 | border: none !important;
13 | }
--------------------------------------------------------------------------------
/docs/distributions/manjaro/home.md:
--------------------------------------------------------------------------------
1 | # Deprecation Notice
2 |
3 | Manjaro T2 support is deprecated. See [Deprecation Plan](https://wiki.t2linux.org/distributions/manjaro/deprecation) for more information.
4 |
5 | # Welcome to the Manjaro T2 wiki!
6 |
7 | Click [here](https://wiki.t2linux.org/distributions/manjaro/installation/) to get started.
8 |
--------------------------------------------------------------------------------
/.github/workflows/lint.yml:
--------------------------------------------------------------------------------
1 | name: Lint
2 | on: [pull_request]
3 |
4 | jobs:
5 | build:
6 | runs-on: ubuntu-latest
7 | steps:
8 | - uses: actions/checkout@v6
9 | - uses: xt0rted/markdownlint-problem-matcher@v3
10 | - name: "Run Markdown linter"
11 | uses: docker://avtodev/markdown-lint:v1
12 | with:
13 | args: docs/**/*.md
14 |
--------------------------------------------------------------------------------
/docs/tools/get-apple-firmware.service:
--------------------------------------------------------------------------------
1 | [Unit]
2 | Description=Get Apple WiFi and Bluetooth firmware
3 | ConditionPathExists=!/etc/get_apple_firmware_attempted
4 | ConditionPathExists=/lib/firmware/brcm
5 |
6 | [Service]
7 | Type=oneshot
8 | RemainAfterExit=yes
9 | ExecStart=-/usr/libexec/get-apple-firmware -i get_from_macos
10 | ExecStart=touch /etc/get_apple_firmware_attempted
11 |
12 | [Install]
13 | WantedBy=multi-user.target
14 |
--------------------------------------------------------------------------------
/.github/dependabot.yml:
--------------------------------------------------------------------------------
1 | # https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
2 |
3 | version: 2
4 | updates:
5 | - package-ecosystem: "pip"
6 | directory: "/"
7 | schedule:
8 | interval: "weekly"
9 | commit-message:
10 | prefix: "Dependencies: "
11 | - package-ecosystem: "github-actions"
12 | directory: "/"
13 | schedule:
14 | interval: "weekly"
15 | commit-message:
16 | prefix: "Actions: "
17 |
--------------------------------------------------------------------------------
/theme/assets/stylesheets/colors.css:
--------------------------------------------------------------------------------
1 | :root {
2 | --md-primary-fg-color: #7663E8;
3 | --md-accent-fg-color: #9081e4;
4 | }
5 |
6 | .md-typeset .task-list-control [type="checkbox"]:checked + .task-list-indicator::before {
7 | background: var(--md-primary-fg-color) !important;
8 | }
9 |
10 | .codehilite .gd, .highlight .gd {
11 | background-color: rgb(204, 7, 7) !important;
12 | }
13 |
14 | .codehilite .gi, .highlight .gi {
15 | background-color: rgb(13, 156, 0) !important;
16 | }
--------------------------------------------------------------------------------
/docs/distributions/fedora/home.md:
--------------------------------------------------------------------------------
1 | Welcome to the T2 Fedora wiki!
2 |
3 | Follow [the installation guide](https://wiki.t2linux.org/distributions/fedora/installation/) to get started. If you need help, join the t2linux discord [server](https://discord.com/invite/68MRhQu) server and ask in `#fedora` over there. Alternately, you can open an issue in the github [issue tracker](https://github.com/t2linux/wiki/issues). You can also refer to the [FAQ](https://wiki.t2linux.org/distributions/fedora/faq/) to fix common problems.
4 |
--------------------------------------------------------------------------------
/docs/distributions/ubuntu/home.md:
--------------------------------------------------------------------------------
1 | Welcome to the T2 Ubuntu wiki!
2 |
3 | Follow [the installation guide](https://wiki.t2linux.org/distributions/ubuntu/installation/) to get started. If you need help, join the t2linux discord [server](https://discord.com/invite/68MRhQu) server and ask in `#ubuntu` over there. Alternately, you can open an issue in the GitHub [issue tracker](https://github.com/t2linux/T2-Ubuntu/issues). You can also refer to the [FAQ](https://wiki.t2linux.org/distributions/ubuntu/faq/) to fix common problems.
4 |
--------------------------------------------------------------------------------
/redirs/dkms/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Redirecting...
6 |
7 |
8 |
9 |
10 |
11 | You're being redirected to a new destination.
12 |
13 |
14 |
--------------------------------------------------------------------------------
/redirs/wifi/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Redirecting...
6 |
7 |
8 |
9 |
10 |
11 | You're being redirected to a new destination.
12 |
13 |
14 |
--------------------------------------------------------------------------------
/.prettierrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "arrowParens": "always",
3 | "bracketSpacing": true,
4 | "htmlWhitespaceSensitivity": "css",
5 | "insertPragma": false,
6 | "jsxBracketSameLine": false,
7 | "jsxSingleQuote": false,
8 | "printWidth": 120,
9 | "proseWrap": "preserve",
10 | "quoteProps": "as-needed",
11 | "requirePragma": false,
12 | "semi": true,
13 | "singleQuote": false,
14 | "tabWidth": 4,
15 | "trailingComma": "es5",
16 | "useTabs": false,
17 | "vueIndentScriptAndStyle": false
18 | }
19 |
--------------------------------------------------------------------------------
/.markdownlint.json:
--------------------------------------------------------------------------------
1 | {
2 | "default": true,
3 | "header-style": { "style": "atx" },
4 | "ul-indent": { "indent": 4 },
5 | "no-multiple-blanks": true,
6 | "line-length": false,
7 | "single-h1": false,
8 | "no-trailing-punctuation": false,
9 | "no-inline-html": true,
10 | "no-bare-urls": false,
11 | "no-emphasis-as-header": false,
12 | "fenced-code-language": true,
13 | "first-line-h1": false,
14 | "code-block-style": { "style": "fenced" },
15 | "single-trailing-newline": true,
16 | "no-hard-tabs": true,
17 | "no-trailing-spaces": true,
18 | "list-marker-space": false,
19 | "no-blanks-blockquote": false
20 | }
21 |
--------------------------------------------------------------------------------
/docs/distributions/manjaro/deprecation.md:
--------------------------------------------------------------------------------
1 | # Why is Manjaro T2 deprecated?
2 |
3 | Due to [concerns](https://github.com/arindas/manjarno), Manjaro T2 is deprecated.
4 | If you want to maintain it yourself, come to our Discord and we will help.
5 |
6 | # What distro should I use instead?
7 |
8 | We recommend [EndeavourOS.](https://wiki.t2linux.org/distributions/endeavouros/installation/)
9 |
10 | # What do I do after Manjaro is deprecated?
11 |
12 | No support for installation will be provided starting from 2023. If you want to install Manjaro on your Mac after 2023, you're on your own.
13 |
14 | For kernel for existing installation, until the end of 2023. LTS will be supported longer for those who can't switch for whatever reason.
15 |
--------------------------------------------------------------------------------
/docs/distributions/overview.md:
--------------------------------------------------------------------------------
1 | # Introduction
2 |
3 | This is a landing page for the distribution specific guides contained in this wiki.
4 |
5 | - [Arch Linux](https://wiki.t2linux.org/distributions/arch/installation/)
6 | - [EndeavourOS](https://wiki.t2linux.org/distributions/endeavouros/installation/)
7 | - [Fedora](https://wiki.t2linux.org/distributions/fedora/home/)
8 | - [Gentoo](https://wiki.t2linux.org/distributions/gentoo/installation/)
9 | - [Manjaro](https://wiki.t2linux.org/distributions/manjaro/home/)
10 | - [NixOS](https://wiki.t2linux.org/distributions/nixos/home/)
11 | - [Ubuntu and Linux Mint](https://wiki.t2linux.org/distributions/ubuntu/home/)
12 | - [Debian, Pop!_OS and other similar distros](https://wiki.t2linux.org/distributions/debian/installation/)
13 |
--------------------------------------------------------------------------------
/docs/distributions/arch/faq.md:
--------------------------------------------------------------------------------
1 | # Updating Kernel
2 |
3 | `linux-mbp` is abandoned. Switch to `linux-t2` or `linux-xanmod-edge-t2` now if you're still using `linux-mbp`.
4 |
5 | Add new repositories to `/etc/pacman.conf`, by adding this:
6 |
7 | ```ini
8 | [arch-mact2]
9 | Server = https://mirror.funami.tech/arch-mact2/os/x86_64
10 | SigLevel = Never
11 | ```
12 |
13 | Then install new kernel and supporting packages by running this:
14 | `sudo pacman -Syu linux-t2 apple-t2-audio-config apple-bcm-firmware`
15 |
16 | You can use Xanmod kernel instead by replacing `linux-t2` with `linux-xanmod-t2`. If you need header package, also install `linux-t2-headers` (or `linux-xanmod-t2-headers` if you chose to install Xanmod kernel).
17 |
18 | # Building Kernel
19 |
20 | ```sh
21 | git clone https://github.com/NoaHimesaka1873/linux-t2-arch
22 | cd linux-t2-arch
23 | makepkg -si
24 | ```
25 |
26 | You can instead clone the other repos mentioned under [Updating Kernel](https://wiki.t2linux.org/distributions/arch/faq/#updating-kernel). You may need to change the folder you `cd` into.
27 |
--------------------------------------------------------------------------------
/docs/distributions/nixos/home.md:
--------------------------------------------------------------------------------
1 | # Home
2 |
3 | Welcome to the NixOS on T2 Linux wiki! To get started, head over to [the installation guide](./installation.md).
4 |
5 | If you have any questions, consult the [FAQ](./faq.md) to see if anything there helps. [Our discord server](https://discord.com/invite/68MRhQu) is also open; feel free to ask questions in the `#nixos` channel there.
6 |
7 | ## New to NixOS?
8 |
9 | NixOS is not exactly an easy Linux distribution to use. If you are entirely new to Linux or had no prior experience with Nix, we strongly recommend you choose another distro like [Fedora](../fedora/home.md) first. Should you decide to proceed further, the [Nixpkgs manual](https://nixos.org/manual/nixpkgs/unstable), [Zero-to-Nix](https://zero-to-nix.com/), [NixOS Options Search](https://search.nixos.org/options) and [the official Nix wiki](https://nix.dev) could come in handy.
10 |
11 | Note that since T2 devices require kernel patches, you will need to build the Linux kernel quite often. This can be circumvented by [using a substituter.](faq.md#substituter-setup)
12 |
13 | That said, if you know what you're doing, feel free to help us out! You know where to find us.
14 |
--------------------------------------------------------------------------------
/.github/workflows/deploy.yml:
--------------------------------------------------------------------------------
1 | name: Lint and Publish to wiki.t2linux.org
2 | on:
3 | push:
4 | branches:
5 | - master
6 | permissions:
7 | contents: read
8 | pages: write
9 | id-token: write
10 |
11 | jobs:
12 | lint:
13 | runs-on: ubuntu-latest
14 | steps:
15 | - uses: actions/checkout@v6
16 | - uses: xt0rted/markdownlint-problem-matcher@v3
17 | - name: "Run Markdown linter"
18 | uses: docker://avtodev/markdown-lint:v1
19 | with:
20 | args: docs/**/*.md
21 | deploy:
22 | name: Deploy docs
23 | runs-on: ubuntu-latest
24 | steps:
25 | - uses: actions/configure-pages@v5
26 | - uses: actions/checkout@v6
27 | - uses: actions/setup-python@v6
28 | with:
29 | python-version: 3.x
30 | - run: pip install zensical
31 | - run: zensical build --clean
32 | - run: bash -c "echo 'wiki.t2linux.org' > build/CNAME"
33 | - run: bash -c "cp -r redirs/* build/guides"
34 | - uses: actions/upload-pages-artifact@v4
35 | with:
36 | path: build
37 | - uses: actions/deploy-pages@v4
38 |
--------------------------------------------------------------------------------
/docs/distributions/manjaro/faq.md:
--------------------------------------------------------------------------------
1 | # Deprecation Notice
2 |
3 | Manjaro T2 support is deprecated. See [Deprecation Plan](https://wiki.t2linux.org/distributions/manjaro/deprecation) for more information.
4 |
5 | # Migrating from Pykee's old kernel to new kernel
6 |
7 | Run this in your terminal:
8 |
9 | ```sh
10 | cat << EOF | sudo tee -a /etc/pacman.conf
11 | [manjaro-mact2]
12 | SigLevel = Never
13 | Server = https://mirror.funami.tech/manjaro-mact2/os/x86_64
14 | EOF
15 | sudo pacman --ignore zfs-utils -Syu linux519-t2 linux519-t2-headers apple-bcm-wifi-firmware
16 | ```
17 |
18 | After running this, remove old repository and reboot.
19 |
20 | # Upgrading to newer kernel (recommended)
21 |
22 | Users using older kernel are advised to migrate to newest kernel since newer kernel has more support.
23 |
24 | Join our Discord or enable notifications for [this repository](https://github.com/NoaHimesaka1873/manjaro-kernel-t2) to get pings for new kernel.
25 |
26 | # Installing alongside Windows
27 |
28 | If you want both Manjaro and Windows installed on your system, refer to this guide on [triple booting](https://wiki.t2linux.org/guides/windows/) as you install.
29 |
30 | # Switch Touchbar to Function Keys
31 |
32 | Run this in your terminal:
33 |
34 | ```sh
35 | sudo bash -c "echo 2 > /sys/class/input/*/device/fnmode"
36 | ```
37 |
--------------------------------------------------------------------------------
/docs/tools/touchbar.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | # Copyright (c) 2022 Aditya Garg
3 |
4 | set -euo pipefail
5 |
6 | if [[ `uname -s` != "Linux" ]] ; then
7 | echo "This script is intended to be run from Linux. Aborting!"
8 | exit 1
9 | fi
10 |
11 | echo "Setting up the Touch Bar"
12 | echo -e "# display f* key in touchbar\noptions apple-touchbar fnmode=1" | sudo tee /etc/modprobe.d/apple-tb.conf >/dev/null
13 |
14 | cat << EOF | sudo tee /usr/bin/touchbar >/dev/null
15 | #!/usr/bin/env bash
16 |
17 | set -euo pipefail
18 |
19 | echo "Select Touch Bar mode"
20 | echo
21 | echo "0: Only show F1-F12"
22 | echo "1: Show media and brightness controls, use the fn key to switch to F1-F12"
23 | echo "2: Show F1-F12, use the fn key to switch to media and brightness controls"
24 | echo "3: Only show media and brightness controls"
25 | echo "4: Only show the escape key"
26 | read tb
27 | if [[ \$tb != 0 && \$tb != 1 && \$tb != 2 && \$tb != 3 && \$tb != 4 ]]
28 | then
29 | echo "Invalid input. Aborting!"
30 | exit 1
31 | fi
32 | echo "Changing default mode ..."
33 | echo "# display f* key in touchbar" > /etc/modprobe.d/apple-tb.conf
34 | echo "options apple-touchbar fnmode=\$tb" >> /etc/modprobe.d/apple-tb.conf
35 | bash -c "echo \$tb > /sys/class/input/*/device/fnmode"
36 | echo "Done!"
37 | EOF
38 |
39 | sudo chmod a+x /usr/bin/touchbar
40 | sudo chown root:root /usr/bin/touchbar
41 |
42 | echo "Run \"sudo touchbar\" to change the default Touch Bar mode"
43 |
--------------------------------------------------------------------------------
/docs/distributions/fedora/faq.md:
--------------------------------------------------------------------------------
1 | # Installing alongside Windows
2 |
3 | If you already have Bootcamp installed, you might notice that the boot option for Bootcamp instead boots you into Fedora. This is because GRUB automatically shares with a Windows installation. Follow [this guide on triple booting](https://wiki.t2linux.org/guides/windows/#if-windows-is-installed-first) to get Windows working again.
4 |
5 | # My boot hangs before getting to the installer
6 |
7 | This may be due to differences between USB-C to USB-A adapters. Try a different one if it is not working.
8 |
9 | # My touchbar is blank
10 |
11 | Follow the instructions in the [post-install guide](https://wiki.t2linux.org/guides/postinstall/#setting-up-the-touch-bar). If it still is not working, try updating your macOS instalation.
12 |
13 | # I get an error about the bootloader when installing
14 |
15 | Download the latest ISO, then try again. Make sure you are using the T2 Fedora iso.
16 |
17 | # Major version upgrades are not working
18 |
19 | If you try to upgrade to a new stable release (ex: f42 -> f43), and you reboot into the same version as before, run `sudo touch /usr/lib/clock-epoch`, then try to upgrade again.
20 |
21 | # My Wi-Fi stops working after suspending
22 |
23 | Add this to `/etc/systemd/system-sleep/unload-wifi.sh`:
24 |
25 | ```bash
26 | #!/usr/bin/env bash
27 | if [ "${1}" = "pre" ]; then
28 | systemctl stop NetworkManager
29 | modprobe -r brcmfmac_wcc
30 | modprobe -r brcmfmac
31 | elif [ "${1}" = "post" ]; then
32 | modprobe brcmfmac
33 | systemctl start NetworkManager
34 | fi
35 | ```
36 |
--------------------------------------------------------------------------------
/docs/distributions/fedora/installation.md:
--------------------------------------------------------------------------------
1 | # Download the latest safe release
2 |
3 | Many thanks to [Mike](https://github.com/mikeeq/) for building. You can download a live iso from [here](https://github.com/t2linux/fedora-iso/releases).
4 |
5 | # Hardware Requirements
6 |
7 | - USB-C to USB adapter. Important: different USB-C to USB adapters work differently - if you're stuck before getting to the graphical UI during boot this may be the problem.
8 |
9 | # Install Procedure
10 |
11 | 1. Follow the [Pre-Install](https://wiki.t2linux.org/guides/preinstall) guide.
12 | 2. Click on *Share disk with other operating system*, then select *Reclaim additional space*.
13 | 3. Delete the partition you created using macOS for Linux.
14 | 4. Continue with the rest of the installation.
15 | 5. Once it's finished, you can reboot without your installation media. Hold down Option (⌥) while booting, then select EFI Boot and press enter.
16 | 6. Welcome to Fedora! :)
17 | 7. Wi-Fi should work on first boot, but if it is not you should follow the [Wi-Fi guide](https://wiki.t2linux.org/guides/wifi-bluetooth/).
18 |
19 | ## Installing unsupported spins
20 |
21 | 1. Follow the installation instructions above, but use your custom (vanilla) ISO. You need an external keyboard and mouse. If you do not have a wired internet connection, you need to follow the [Wi-Fi guide](https://wiki.t2linux.org/guides/wifi-bluetooth/) on the live ISO before proceding.
22 | 2. Add our DNF repo: `sudo dnf copr enable sharpenedblade/t2linux`
23 | 3. Install the kernel: `sudo dnf swap --from-repo="copr:copr.fedorainfracloud.org:sharpenedblade:t2linux" kernel kernel`
24 | 4. Install other packages:
25 | - For interactive usage: `sudo dnf install t2linux-release`
26 | - For headless setups: `sudo dnf install t2linux-config t2linux-scripts t2fanrd`
27 |
--------------------------------------------------------------------------------
/docs/distributions/endeavouros/installation.md:
--------------------------------------------------------------------------------
1 | # Installing EndeavourOS on a Mac with the T2 Chip
2 |
3 | You will need:
4 |
5 | - USB drive with at least 4GB
6 | - A way to plug it into your Mac (USB-C isn't USB-A)
7 | - A wired internet connection (i.e. USB-C to Enternet dongle) or Wi-Fi.
8 |
9 | ---
10 |
11 | !!! Warning "Users in NA/EU"
12 | If you're experiencing slow download speed or failure to install, please edit your `/etc/pacman.conf` file and replace old mirror.funami.tech link with `https://github.com/NoaHimesaka1873/arch-mact2-mirror/releases/download/release` instead.
13 |
14 | 1. Follow the [Pre-installation](https://wiki.t2linux.org/guides/preinstall) steps to prepare your Mac for the installation.
15 |
16 | 2. Boot into the ISO and start the Calamares installer
17 |
18 | 1. If you're not connected to the internet, connect to it now. Use included GUI config tool to connect to Wi-Fi.
19 | 2. On the "Welcome" window, choose...
20 |
21 | 1. "Install community editions" if you want to install community edition.
22 | 2. "Start the Installer" if you want to install normal edition.
23 |
24 | 3. If you chose to install normal edition, choose "Online" or "Offline" depending on your needs.
25 |
26 | 3. Follow the installer until Partitions.
27 |
28 | 1. Select "Manual partitioning."
29 | 2. Select "/dev/nvme0n1p1" partition, make sure the "boot" flag is set, and set it to mount under "/efi". If you want to use separate EFI partition, check out [this guide](https://wiki.t2linux.org/guides/windows/#using-seperate-efi-partitions).
30 | 3. Use remaining partition space to your convenience.
31 |
32 | 4. Follow the rest of the installer and reboot.
33 |
34 | 5. You can follow the [Fan guide](https://wiki.t2linux.org/guides/fan/) after rebooting into your install if your fan isn't working or if you want to customize how/when your fan will run.
35 |
36 | 6. You now will be able to select your EndeavourOS install in the macOS Startup Manager by holding option at boot.
37 |
38 | 7. Optionally, enable `bluetooth` daemon if you want to use Bluetooth.
39 |
--------------------------------------------------------------------------------
/docs/guides/uninstall.md:
--------------------------------------------------------------------------------
1 | # Introduction
2 |
3 | This page explains how to remove Linux from your Mac. It shouldn't matter what distro you are using.
4 |
5 | # Removing Linux partitions
6 |
7 | You may want to do this from macOS Recovery as you will be resizing (expanding) your startup disk, although you don't need to.
8 |
9 | 1. In macOS open Disk Utility
10 | 2. Click "View" then "Show all devices"
11 | 3. Select your Apple SSD
12 | 4. Click "Partition". If it suggests adding volumes, don't.
13 | 5. Select your Linux partition, and click `-` to remove it. Your macOS partition should expand to fill the space that Linux was in.
14 | 6. Click apply.
15 | 7. Disk Utility will remove your Linux partition and expand your macOS partition. This may take a while, but **do not interrupt this process**. While it does this, consider the fact that you didn't need admin to remove your Linux partition.
16 |
17 | # Removing the Linux boot-loader
18 |
19 | ## If using a separate EFI partition
20 |
21 | Follow the same steps to remove the seperate EFI partition as you followed to remove the Linux partition.
22 |
23 | ## If using the EFI partition already available in your Mac.
24 |
25 | 1. In macOS run `sudo diskutil mount disk0s1`, which mounts your EFI System Partition.
26 | 2. There will now be an **EFI** disk visible in Finder, open it and go into the **EFI** folder (within the **EFI** disk).
27 | 3. Remove any folders other than **Apple**, **Boot**, or **Microsoft**.
28 | 4. Enter the **Boot** folder and remove `bootx64.efi`.
29 | 5. If you have Windows installed with Bootcamp, Enter **Microsoft** folder and then the **Boot** folder inside the **Microsoft** folder and copy `bootmgfw.efi`. Paste it in that **Boot** folder in the **EFI** folder of the **EFI** disk from where you had deleted `bootx64.efi`. Now rename the newly copied `bootmgfw.efi` to `bootx64.efi`. Be careful not to delete the Windows bootloader.
30 |
31 | # Enable Secure Boot (Optional)
32 |
33 | 1. Boot to macOS Recovery by holding `⌘-R` as you turn your Mac on.
34 | 2. Enable Secure Boot as described [here](https://support.apple.com/en-au/HT208198).
35 |
--------------------------------------------------------------------------------
/docs/distributions/manjaro/installation.md:
--------------------------------------------------------------------------------
1 | # Deprecation Notice
2 |
3 | Manjaro T2 support is deprecated. See [Deprecation Plan](https://wiki.t2linux.org/distributions/manjaro/deprecation) for more information.
4 |
5 | # Download a latest release
6 |
7 | [See releases](https://github.com/NoaHimesaka1873/manjaroiso-t2/releases)
8 |
9 | # Hardware Requirements
10 |
11 | * USB-C to Ethernet cable adapter.
12 | * While you can install Manjaro over WiFi, it would be a lot easier to use an Adapter during the installation process.
13 | * USB-C to USB Adapter
14 | * USB drive
15 |
16 | # Install Procedure
17 |
18 | 1. Follow the [Pre-installation](https://wiki.t2linux.org/guides/preinstall) steps to prepare your Mac for installing Manjaro.
19 | 2. Boot into the ISO.
20 | 3. Scroll down to `Boot x86 64 {Your Edition}` using the arrow keys and press enter.
21 | 4. Open the installer and proceed normally until you arrive at the partitioning stage (the Installer will automatically start if you have used the second set of commands given above).
22 | 5. Click Manual Partitioning.
23 | 6. Click on `/dev/nvme0n1p1`, then press edit at the bottom of the install window, change the mount point to `/boot/efi`, and then click ok.
24 | 7. Usually, the macOS partition is `/dev/nvme0n1p2` (the `Apple APFS` Partition). Ignore this partition.
25 | 8. Delete the partition you created before - this is usually mounted to `/dev/nvme0n1p3`.
26 | 9. These next steps involve partitioning the `/boot`(boot), `/`(Root) and `/home`(Home) partitions of your Linux filesystem. If you know what you're doing, feel free to skip to step 15.
27 |
28 | * Create a `2000 MiB` partition with `ext4` as the file system. Change the mount point to `/boot` and click ok.
29 | * Create a `51200 MiB` partition with `ext4` as the file system. Change the mount point to `/` and click ok.
30 | * Use the remaining disk space to create an `ext4` file system. Change the mount point to `/home`.
31 |
32 | 10. Continue the rest of the setup as normal. Once the setup process is complete, restart your computer. Make sure you remove the install medium once powered off.
33 | 11. Once again, power on your computer whilst holding the Option (⌥) key. Then select EFI Boot.
34 | 12. Welcome to Manjaro :)
35 |
--------------------------------------------------------------------------------
/docs/notable-contributors.md:
--------------------------------------------------------------------------------
1 | # All Notable Contributors
2 |
3 | This page contains all Notable Contributors for the Linux on T2 project.
4 |
5 | If there is someone missing that you think should be on this list, send a PR on the [wiki repository.](https://github.com/t2linux/wiki)
6 |
7 | - aunali1 (Arch Linux and Kernel Module work) [https://github.com/aunali1](https://github.com/aunali1)
8 | - mikroskeem (NixOS and founder of t2linux discord community) [https://github.com/mikroskeem](https://github.com/mikroskeem)
9 | - JPyke3 (Manjaro) [https://github.com/JPyke3](https://github.com/JPyke3)
10 | - marcosfad (Ubuntu) [https://github.com/marcosfad](https://github.com/marcosfad)
11 | - MCMrARM (MacBook Bridge / T2 Linux Driver) [https://github.com/MCMrARM](https://github.com/MCMrARM)
12 | - mikeeq (Fedora) [https://github.com/mikeeq](https://github.com/mikeeq)
13 | - networkException (Wiki maintenance and `mbpfan` fork for T2) [https://github.com/networkException](https://github.com/networkException)
14 | - Redecorating (Arch Linux, Wiki maintenance, Apple GMUX for T2 Macs, Magic Backlight driver and improved the touchbar driver) [https://github.com/Redecorating](https://github.com/Redecorating)
15 | - roadrunner2 (Touchbar and Ambient Light Driver) [https://github.com/roadrunner2](https://github.com/roadrunner2)
16 | - kekrby (Audio, NixOS, Apple GMUX for T2 Macs, Magic Backlight driver and improved the touchbar driver) [https://github.com/kekrby](https://github.com/kekrby)
17 | - soopyc (NixOS) [https://github.com/soopyc](https://github.com/soopyc)
18 | - AdityaGarg8 (Ubuntu and wiki maintenance) [https://github.com/AdityaGarg8](https://github.com/AdityaGarg8)
19 | - EmreTech (Gentoo) [https://github.com/EmreTech](https://github.com/EmreTech)
20 | - T2minator (Tails) [https://github.com/T2minator](https://github.com/T2minator)
21 | - NoaHimesaka1873 (Arch, Manjaro, EndeavourOS and wiki maintenance) [https://github.com/NoaHimesaka1873](https://github.com/NoaHimesaka1873)
22 | - The Asahi Linux Contributors (Wi-Fi and Bluetooth) [https://asahilinux.org/](https://asahilinux.org/)
23 | - lemmyg (Fine audio tuning for MacBook Pro 16 inch 2019) [https://github.com/lemmyg](https://github.com/lemmyg)
24 | - slsrepo (t2archinstall for Arch Linux) [https://github.com/slsrepo/t2archinstall](https://github.com/slsrepo/t2archinstall)
25 |
--------------------------------------------------------------------------------
/docs/guides/fan.md:
--------------------------------------------------------------------------------
1 | # Introduction
2 |
3 | This page is a step by step guide to get fan control working on T2 Macs.
4 |
5 | In some Macs, the fan has been found to work out of the box. In such a case the driver is not required until you want to force a certain speed or do some other configuration which can be done by the help of this driver.
6 |
7 | ## Steps
8 |
9 | 1. Install `t2fanrd`.
10 |
11 | - If you're using Arch based distros:
12 |
13 | 1. Check if you installed Arch using our guide or added our repositories. If you haven't done that, follow [this guide](https://wiki.t2linux.org/distributions/arch/faq/#updating-kernel) first.
14 |
15 | 2. Install the package by running `sudo pacman -S t2fanrd`. (Do note that EndeavourOS Cassini Nova R1 already includes t2fand.)
16 |
17 | - If you're using Debian or Ubuntu based distros:
18 |
19 | 1. If you don't have t2-ubuntu-repo, follow [this](https://github.com/AdityaGarg8/t2-ubuntu-repo#apt-repository-for-t2-macs) first to add the repository.
20 |
21 | 2. Install the package by running `sudo apt install t2fanrd`.
22 |
23 | - If you're using Fedora based distros (it should be installed by default, but you need to enable the service):
24 |
25 | 1. Make sure our COPR repo is enabled: `sudo dnf copr enable sharpenedblade/t2linux`
26 |
27 | 2. Install the package by running `sudo dnf install t2fanrd`
28 |
29 | - If you’re using Nixos with Flakes;
30 |
31 | 1. Add to your flakes inputs.
32 |
33 | 2. Add the `nixosModule` to your output modules.
34 |
35 | 3. Enable the systemd services in your `configuration.nix` and configure the fans.
36 |
37 | - If you're using other distributions:
38 |
39 | You can compile the daemon by following the instructions given in [this repository](https://github.com/GnomedDev/T2FanRD) and add a systemd service.
40 |
41 | 2. Enable daemon by running `sudo systemctl enable --now t2fanrd`.
42 |
43 | 3. Edit the config and restart the daemon by running `sudo systemctl restart t2fanrd` if needed.
44 |
45 | ## Configuration
46 |
47 | The daemons config file can be found at `/etc/t2fand.conf`. You can change the activating temperature and/or fan curve to suit your needs.
48 | For more information, like how fan curves look like, check out [the repository](https://github.com/GnomedDev/T2FanRD#configuration).
49 |
--------------------------------------------------------------------------------
/docs/tools/efi.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | # Copyright (c) 2022 Aditya Garg
3 |
4 | set -euo pipefail
5 |
6 | if [[ `uname -s` != "Linux" ]] ; then
7 | echo "This script is intended to be run from Linux. Aborting!"
8 | exit 1
9 | fi
10 |
11 |
12 | if [[ ${1-default} == default ]] ; then
13 | echo "Please specify the name of the new EFI partition. Aborting!"
14 | exit 1
15 | fi
16 |
17 | if [ $USER != root ]
18 | then
19 | echo "This script is intented to be run as root. You will be asked for your password."
20 | sudo chmod 755 $0
21 | sudo $0 "$1"
22 | exit 0
23 | fi
24 |
25 | echo "Are you sure you want to change your EFI partition to \""$1"\"? (y/N)"
26 | read input
27 | if [[ ($input != y) && ($input != Y) ]]
28 | then
29 | echo "Abort!"
30 | exit 1
31 | fi
32 |
33 | echo "Changing the EFI partition."
34 | # Mount the new partition to /tmp/newefi
35 |
36 | mkdir /tmp/newefi
37 | MOUNTPOINT=$(lsblk -o label,mountpoints | grep -w "$1" | cut -d "/" -f 2-)
38 | OLDUUID=$(lsblk -o mountpoints,uuid | grep -w "/boot/efi" | xargs | cut -d " " -f 2)
39 | NEWUUID=$(lsblk -o uuid,label | grep -w "$1" | xargs | cut -d " " -f 1)
40 | FSTABUUID=$(cat /etc/fstab | grep "${OLDUUID}" | cut -d "=" -f 2 | cut -c 1-9)
41 | if [[ ${OLDUUID} != ${FSTABUUID} ]]
42 | then
43 | echo "Old EFI partition not found in /etc/fstab. Abort!"
44 | exit 1
45 | fi
46 | umount "${MOUNTPOINT}" 2>/dev/null || true
47 | mount UUID="${NEWUUID}" /tmp/newefi
48 |
49 | # Copy files
50 |
51 | echo "Copying Bootloader to new EFI partition."
52 | cp -r /boot/efi/EFI /tmp/newefi
53 | for folder in "/tmp/newefi/EFI/APPLE" \
54 | "/tmp/newefi/EFI/Microsoft"
55 | do
56 | if [[ -d "$folder" ]]
57 | then
58 | rm -r "$folder"
59 | fi
60 | done
61 |
62 | # Remove Linux from old EFI
63 |
64 | echo "Removing Bootloader from old EFI partition."
65 | cd /boot/efi/EFI
66 | shopt -s extglob
67 | rm -r !("APPLE"|"Microsoft")
68 | cd - > /dev/null
69 | if [[ -f /boot/efi/EFI/Microsoft/Boot/bootmgfw.efi ]]
70 | then
71 | echo "Windows installation detected. Restoring Windows Bootloader."
72 | mkdir /boot/efi/EFI/Boot
73 | cp /boot/efi/EFI/Microsoft/Boot/bootmgfw.efi /boot/efi/EFI/Boot/bootx64.efi
74 | fi
75 |
76 | # Update fstab
77 |
78 | echo "Updating /etc/fstab."
79 | sed -i "s/${OLDUUID}/${NEWUUID}/g" /etc/fstab
80 |
81 | # Mount new EFI
82 |
83 | echo "Mounting the new EFI partition."
84 | umount /tmp/newefi
85 | umount /boot/efi
86 | rm -r /tmp/newefi
87 | mount -a
88 |
89 | echo "Success!"
90 |
--------------------------------------------------------------------------------
/docs/contribute.md:
--------------------------------------------------------------------------------
1 | # Contribute
2 |
3 | The T2 project itself currently does not accept financial donations. However, some of the contributors and maintainers of the project do accept donations on their own. You may refer to the [Support our maintainers](https://wiki.t2linux.org/contribute/#support-our-maintainers) section of this page to get the links of the same.
4 |
5 | The best way of donation which we believe is in the form of skill. If you think you have the potential to help us in pushing the project further like fixing bugs, adding new features etc., you are free to do so. For this, you may contact our discord server, where other members of this organization are present.
6 |
7 | ## Contribute to the code
8 |
9 | See "partially working" features at [State](https://wiki.t2linux.org/state/) to get an idea of what's being worked on, and what should be worked on.
10 |
11 | ## Support our maintainers
12 |
13 | Here is the list and links to donate some of our maintainers.
14 |
15 | - [MCMrARM](https://github.com/MCMrARM) - Author of the [apple-bce driver](https://github.com/t2linux/apple-bce-drv). Donate via [Paypal](https://paypal.me/mcmrarm).
16 | - [JPyke3](https://github.com/JPyke3) - Played major role in getting Manjaro working on T2 Macs. Donate via [Patreon](https://patreon.com/pykee) or [On Chain](https://github.com/JPyke3/mbp-manjaro#donations).
17 | - [marcosfad](https://github.com/marcosfad) - Played major role in getting Ubuntu working on T2 Macs. Donate via [Paypal](https://paypal.me/marcosfad) or [GitHub Sponsors](https://github.com/sponsors/marcosfad).
18 | - [NoaHimesaka1873](https://github.com/NoaHimesaka1873) - Currently maintains boot images and kernels for Arch and EndeavourOS. Donate via [GitHub Sponsors](https://github.com/sponsors/NoaHimesaka1873) or [Toss (South Korea residents only)](https://toss.me/yuruverse).
19 | - [Redecorating](https://github.com/Redecorating) - Played a major role in adding support for T2 Macs in the apple-gmux driver, required for hybrid graphics. Also has written T2 related kernel patches and worked on T2 related kernel regressions. Donate via [PayPal](https://paypal.me/redecorating).
20 | - [AdityaGarg8](https://github.com/AdityaGarg8) - Current maintainer of Ubuntu. Has also helped in writing T2 kernel patches and upstreaming various patches. Donate via **GitHub sponsors** ([Link](https://github.com/sponsors/AdityaGarg8)) or **Buy Me a Coffee** ([Link](https://www.buymeacoffee.com/gargadityav)).
21 | - [networkException](https://github.com/networkException) - Wiki creator and maintainer. Donate via [GitHub Sponsors](https://github.com/sponsors/networkException).
22 | - [soopyc](https://github.com/soopyc) - Current maintainer of NixOS. Has helped in reviving its support for T2 Macs. Donate via [GitHub Sponsors](https://github.com/sponsors/soopyc).
23 |
--------------------------------------------------------------------------------
/docs/distributions/ubuntu/faq.md:
--------------------------------------------------------------------------------
1 | # Why does my MacBook turn off in the middle of the Ubuntu installation?
2 |
3 | This seems to happen with certain MacBooks because the GRUB bootloader installer tries accessing the efivars/nvram, which Apple doesn't allow and the installer doesn't know what to do.
4 |
5 | There is a way to stop this. Boot into the installation media with an External USB Keyboard plugged in. Press e when you selected the "Try Ubuntu without installing" option.
6 |
7 | Scroll to the bottom with the arrow keys, and type in ``efi=noruntime``. With the External keyboard, then press CTRL+X or F10 to boot into the Live Media. The installation should work fine now.
8 |
9 | This issue has occured for anyone on the 16,1 and maybe the 16,4.
10 |
11 | # Making the GRUB Menu appear
12 |
13 | The GRUB bootloader by default turns off the GRUB Menu. This means you can't boot into Bootcamp Windows if it's installed. This can be easily fixed after Ubuntu is fully installed.
14 |
15 | In a Terminal in Ubuntu, edit file ``/etc/default/grub`` with any preferred editior (nano/vim) and with root permissions. Change line ``GRUB_TIMEOUT_STYLE`` to ``GRUB_TIMEOUT_STYLE=MENU``. Save the file once you're done.
16 |
17 | We've now changed the GRUB Bootloader settings, but we now need to update GRUB to apply these changes. Type in ``sudo update-grub`` and hit enter. After the command is done, you're finished.
18 |
19 | # Installing alongside Windows
20 |
21 | If you already have Bootcamp installed, you might notice that the boot option for Bootcamp instead boots you into Ubuntu. This is because GRUB automatically shares with a Windows installation. Follow [this guide on triple booting](https://wiki.t2linux.org/guides/windows/#if-windows-is-installed-first) to get Windows working again.
22 |
23 | # Why isn't sound working?
24 |
25 | On **Ubuntu 22.04 or earlier**, PulseAudio is installed by default, which performs really bad with T2 audio configuration files. It is suggested to [switch to PipeWire](https://linuxconfig.org/how-to-install-pipewire-on-ubuntu-linux) for better performance, although its still bad as compared to Ubuntu 22.10, which has native support for PipeWire.
26 |
27 | On **Ubuntu 22.10 or later**, PipeWire is support natively and works just fine with audio configuration files. Still, it's recommended to use the upstream version of PipeWire since it is found to perform better and has more features than the native one. You can run the following commands to use the upstream version:
28 |
29 | ```bash
30 | sudo add-apt-repository ppa:pipewire-debian/pipewire-upstream
31 | sudo apt install pipewire pipewire-audio-client-libraries libpipewire-0.3-modules libspa-0.2-{bluetooth,jack,modules} pipewire{,-{audio-client-libraries,pulse,bin,tests}}
32 | ```
33 |
34 | # How do I upgrade my kernel
35 |
36 | Follow [these](https://github.com/t2linux/T2-Debian-and-Ubuntu-Kernel?tab=readme-ov-file#using-the-apt-repo) instructions.
37 |
--------------------------------------------------------------------------------
/docs/guides/hybrid-graphics.md:
--------------------------------------------------------------------------------
1 | # Introduction
2 |
3 | This page describes how to use the iGPU on MacBookPro's with Hybrid Graphics (2 GPUs). 13 inch MacBooks only have an iGPU, and do not need this. Using the iGPU means you can save power by putting the more powerful AMD dGPU in a low power state when you don't need it.
4 |
5 | This has been tested on the MacBookPro16,1 and the MacBookPro15,1. The 15,3 and 16,4 models are very similar and should work too.
6 |
7 | Make sure you have a t2 kernel of version greater than 6.9.8-1 (you can check this with `uname -r`).
8 |
9 | ## Issues
10 |
11 | If you experience system freezes, then the laptop's fans becoming loud, before the whole computer shuts off (CPU CATERR), or if the amdgpu is making the computer too hot, consider trying:
12 |
13 | 1. Set iGPU as main gpu (instructions below)
14 |
15 | 2. Set AMD GPU Dynamic Power Management from auto to low or high. Low can be safer option to avoid thermal issues or save battery.
16 |
17 | You can test it quickly with: `echo low | sudo tee /sys/bus/pci/drivers/amdgpu/0000:0?:00.0/power_dpm_force_performance_level`
18 |
19 | To apply the low level automatically, create `/etc/udev/rules.d/30-amdgpu-pm.rules` file with the following contents (on NixOS, use `services.udev.extraRules` in your configuration):
20 |
21 | ```plain
22 | SUBSYSTEM=="drm", DRIVERS=="amdgpu", ATTR{device/power_dpm_force_performance_level}="low"
23 | ```
24 |
25 | You can also control the AMD GPU DPM with GUI tools such as [radeon-profile](https://github.com/emerge-e-world/radeon-profile). For GPU intensive tasks like playing games, machine learning or rendering you can try setting the DPM to high instead.
26 |
27 | ## Enabling the iGPU
28 |
29 | 1. Configue apple-gmux to switch to the iGPU at boot
30 |
31 | 1. Create `/etc/modprobe.d/apple-gmux.conf` with the following contents:
32 |
33 | ```plain
34 | # Enable the iGPU by default if present
35 | options apple-gmux force_igd=y
36 | ```
37 |
38 | `glxinfo | grep "OpenGL renderer"` should show an Intel GPU. Running programs with `DRI_PRIME=1` will make them render on your AMD GPU (some things do this automatically). You will get more battery time now as your AMD GPU can be turned off when not needed.
39 |
40 | ### Suspend workaround
41 |
42 | If using the iGPU causes the screen to be black after waking up from suspend, then try one of these workarounds:
43 |
44 | - Add `i915.enable_guc=3` to [your kernel parameters](https://wiki.t2linux.org/guides/postinstall/#add-necessary-kernel-paramaters). If that has a problem, try setting the value to 2 instead of 3.
45 | - Turn the screen off and on after the backlight turns on. For GNOME: type your password then press enter, press Command + L to lock (this should turn off the backlight), then press any key.
46 |
47 | ## Use on Windows
48 |
49 | The iGPU only works on Windows if there's no driver for it installed. Windows likes installing drivers.
50 |
51 | If you want to switch GPU for Windows, use 0xbb's [gpu-switch](https://github.com/0xbb/gpu-switch#windows-810-usage) script.
52 |
53 | ## VFIO GPU passthrough
54 |
55 | Refer to [this gist](https://gist.github.com/Redecorating/956a672e6922e285de83fdd7d9982e5e) for quirks required to pass through the dGPU to a Windows Virtual Machine, while having Linux use the iGPU.
56 |
--------------------------------------------------------------------------------
/theme/assets/stylesheets/fonts.css:
--------------------------------------------------------------------------------
1 | /* roboto-regular - latin */
2 | @font-face {
3 | font-family: "Roboto";
4 | font-style: normal;
5 | font-weight: 400;
6 | src: url("../fonts/roboto-v20-latin-regular.eot"); /* IE9 Compat Modes */
7 | src: local("Roboto"), local("Roboto-Regular"),
8 | url("../fonts/roboto-v20-latin-regular.eot?#iefix") format("embedded-opentype"),
9 | /* IE6-IE8 */ url("../fonts/roboto-v20-latin-regular.woff2") format("woff2"),
10 | /* Super Modern Browsers */ url("../fonts/roboto-v20-latin-regular.woff") format("woff"),
11 | /* Modern Browsers */ url("../fonts/roboto-v20-latin-regular.ttf") format("truetype"),
12 | /* Safari, Android, iOS */ url("../fonts/roboto-v20-latin-regular.svg#Roboto") format("svg"); /* Legacy iOS */
13 | }
14 |
15 | /* roboto-italic - latin */
16 | @font-face {
17 | font-family: "Roboto";
18 | font-style: italic;
19 | font-weight: 400;
20 | src: url("../fonts/roboto-v20-latin-italic.eot"); /* IE9 Compat Modes */
21 | src: local("Roboto Italic"), local("Roboto-Italic"),
22 | url("../fonts/roboto-v20-latin-italic.eot?#iefix") format("embedded-opentype"),
23 | /* IE6-IE8 */ url("../fonts/roboto-v20-latin-italic.woff2") format("woff2"),
24 | /* Super Modern Browsers */ url("../fonts/roboto-v20-latin-italic.woff") format("woff"),
25 | /* Modern Browsers */ url("../fonts/roboto-v20-latin-italic.ttf") format("truetype"),
26 | /* Safari, Android, iOS */ url("../fonts/roboto-v20-latin-italic.svg#Roboto") format("svg"); /* Legacy iOS */
27 | }
28 |
29 | /* roboto-700 - latin */
30 | @font-face {
31 | font-family: "Roboto";
32 | font-style: normal;
33 | font-weight: 700;
34 | src: url("../fonts/roboto-v20-latin-700.eot"); /* IE9 Compat Modes */
35 | src: local("Roboto Bold"), local("Roboto-Bold"),
36 | url("../fonts/roboto-v20-latin-700.eot?#iefix") format("embedded-opentype"),
37 | /* IE6-IE8 */ url("../fonts/roboto-v20-latin-700.woff2") format("woff2"),
38 | /* Super Modern Browsers */ url("../fonts/roboto-v20-latin-700.woff") format("woff"),
39 | /* Modern Browsers */ url("../fonts/roboto-v20-latin-700.ttf") format("truetype"),
40 | /* Safari, Android, iOS */ url("../fonts/roboto-v20-latin-700.svg#Roboto") format("svg"); /* Legacy iOS */
41 | }
42 |
43 | /* roboto-mono-regular - latin */
44 | @font-face {
45 | font-family: "Roboto Mono";
46 | font-style: normal;
47 | font-weight: 400;
48 | src: url("../fonts/roboto-mono-v11-latin-regular.eot"); /* IE9 Compat Modes */
49 | src: local(""), url("../fonts/roboto-mono-v11-latin-regular.eot?#iefix") format("embedded-opentype"),
50 | /* IE6-IE8 */ url("../fonts/roboto-mono-v11-latin-regular.woff2") format("woff2"),
51 | /* Super Modern Browsers */ url("../fonts/roboto-mono-v11-latin-regular.woff") format("woff"),
52 | /* Modern Browsers */ url("../fonts/roboto-mono-v11-latin-regular.ttf") format("truetype"),
53 | /* Safari, Android, iOS */ url("../fonts/roboto-mono-v11-latin-regular.svg#RobotoMono") format("svg"); /* Legacy iOS */
54 | }
55 |
56 | body,
57 | input {
58 | font-family: "Roboto", "Helvetica Neue", Helvetica, Arial, sans-serif;
59 | }
60 |
61 | code,
62 | kbd,
63 | pre {
64 | font-family: "Roboto Mono", "Courier New", Courier, monospace;
65 | }
66 |
--------------------------------------------------------------------------------
/docs/distributions/ubuntu/installation.md:
--------------------------------------------------------------------------------
1 | # Ubuntu and Linux Mint
2 |
3 | ## Download the latest release
4 |
5 | !!! Warning "Blank screen on boot"
6 | **Ubuntu's GRUB** is not booting using the Mac Startup Manager for many users. Thus affected users are advised to [install the rEFInd Boot Manager](https://wiki.t2linux.org/guides/refind/) and boot the kernel using it instead of the Startup Manager.
7 |
8 | Download Links:
9 |
10 | [Ubuntu and its supported flavours](https://github.com/t2linux/T2-Ubuntu/releases/latest)
11 |
12 | [Linux Mint](https://github.com/t2linux/T2-Mint/releases/latest)
13 |
14 | We currently support the following flavours of Ubuntu:
15 |
16 | - Ubuntu
17 | - Kubuntu
18 | - Ubuntu Unity
19 |
20 | ## Hardware Requirements
21 |
22 | - USB-C to USB adapter
23 |
24 | ## Install Procedure
25 |
26 | 1. Follow the [Pre-installation](https://wiki.t2linux.org/guides/preinstall) steps to prepare your Mac for Ubuntu.
27 | 2. Boot into the Live ISO. You should now be in the GRUB boot menu. Select the option which is relevent to you.
28 | 3. Start the installer and install it like normal until you get to the partition option. MAKE SURE YOU CHOOSE MANUAL PARTITIONING (USUALLY DISPLAYED AS "Something else" OPTION IN UBUNTU).
29 | 4. Find the partition you made for Linux when you were following the Pre-installation steps. MAKE SURE TO SELECT THE RIGHT PARTITION OR ELSE YOUR DATA WILL BE LOST. Delete it to make free space. You'll need to make these partitions:
30 |
31 | 1. If you want, you can make seperate partitions for **swap**, `/home`, `/boot` etc as you do in a normal PC.
32 |
33 | 2. The only partition to be made compulsorily is the one mounted at `/` and formatted to **ext4** or **btrfs**.
34 |
35 | 3. Leave EFI boot alone. If you want to use a [separate EFI partition](https://wiki.t2linux.org/guides/windows/#using-seperate-efi-partitions), you can separate it out later after installation as instructed [here](https://wiki.t2linux.org/guides/windows/#seperate-the-efi-partition-after-linux-is-installed).
36 |
37 | 5. Continue the rest of the setup.
38 | 6. Once it's finished, you can reboot without your installation media. Hold down Option (⌥) while booting, then select EFI Boot and press enter.
39 | 7. Welcome to Ubuntu! :)
40 |
41 | ## Setting up Wi-Fi and Bluetooth
42 |
43 | Once you're booted and in your desktop:
44 |
45 | - Run `get-apple-firmware get_from_macos` **if you have macOS installed as well**.
46 | - Run `get-apple-firmware get_from_online` **if you have removed macOS or above method does not work** (Note: This method needs wired internet to work).
47 |
48 | If these methods do not work, follow [this guide](https://wiki.t2linux.org/guides/wifi-bluetooth/) to get firmware for Wi-Fi and Bluetooth.
49 |
50 | ## Configuring the Touch Bar
51 |
52 | If your Mac has a Touch Bar, then you can install the `tiny-dfr` app by running `sudo apt update && sudo apt install tiny-dfr` to set up the Touch Bar. Make sure you restart your Mac after installing the app.
53 |
54 | In order to make changes to the config for `tiny-dfr`, copy `/usr/share/tiny-dfr/config.toml` to `/etc/tiny-dfr/config.toml` and edit `/etc/tiny-dfr/config.toml` by following the instructions given in that file.
55 |
56 | ## Troubleshooting
57 |
58 | If you are facing issues while installing or have post installation issues (E.g.: Wi-Fi, sound etc.), refer to the [FAQ](https://wiki.t2linux.org/distributions/ubuntu/faq/) section first. If it is not able to help you, you may open an issue [here](https://github.com/t2linux/T2-Ubuntu/issues) or contact us on the [Discord server](https://discord.com/invite/68MRhQu).
59 |
--------------------------------------------------------------------------------
/docs/state.md:
--------------------------------------------------------------------------------
1 | # State
2 |
3 | While Linux is usable on all T2 models, some features are limited due to the lack of drivers or similar. This page should give a general overview of what is working and what is not.
4 |
5 | |Feature|Status|Upstream|Notes|Issues/links|
6 | |-|-|-|-|-|
7 | |Internal Drive / SSD|🟢 Working|🟢 Kernel 5.4||[Filesystem notes](#filesystem-notes)|
8 | |Screen, iGPU|🟢 Working|🟡 Partial|||
9 | |USB|🟢 Working|🟢 Yes|||
10 | |Keyboard|🟢 Working|🔴 No||[apple-bce](https://github.com/t2linux/apple-bce-drv)|
11 | |Trackpad|🟢 Working|🔴 No|Works, but isn't as great as on macOS (no force touch or palm rejection).|[apple-bce](https://github.com/t2linux/apple-bce-drv), [Trackpad tuning](https://wiki.t2linux.org/#trackpad-tuning)|
12 | |Wi-Fi|🟢 Working|🟢 Yes|Requires macOS firmware|[Setup guide](https://wiki.t2linux.org/guides/wifi-bluetooth/)|
13 | |Bluetooth|🟡 Partially working|🟢 Yes|Requires macOS firmware only for devices with BCM4377 chip. Also, Bluetooth glitches on devices with BCM4377 Chip if connected to a 2.4 Ghz Wi-Fi connection. Thus, in order to use Bluetooth either turn off your Wi-Fi or use a 5Ghz Wi-Fi connection.|[Setup guide](https://wiki.t2linux.org/guides/wifi-bluetooth/)|
14 | |Camera|🟢 Working|🔴 No||[apple-bce](https://github.com/t2linux/apple-bce-drv)|
15 | |Thunderbolt|🟢 Working|🟢 Yes|If it doesn't work, try replacing `pcie_ports=compat` with `pcie_ports=native` in the kernel parameters via GRUB.||
16 | |Touch Bar|🟢 Working|🔴 No|"Touch Bar Keyboard" mode works OOTB, where only the Function Keys or the Media/Brightness Control Keys are shown. Support for custom graphics on the Touch Bar is being actively developed. The drivers were upstreamed in kernel 6.15, but we still need apple-bce to make it work.|[apple-bce](https://github.com/t2linux/apple-bce-drv), [tiny-dfr](https://github.com/AsahiLinux/tiny-dfr), [apple-ib](https://github.com/t2linux/apple-ib-drv)|
17 | |Suspend|🟡 Partially working|🟢 Yes|A firmware upgrade attached to macOS Sonoma broke suspend. Some users were having difficulty with it even before Sonoma. The issue has something to do with the apple-bce driver, because suspend works when it's disabled.|[#53](https://github.com/t2linux/T2-Ubuntu-Kernel/issues/53)|
18 | |Audio|🟡 Partially working|🔴 No|With proper configuration audio can work, however it is not stable in some older kernels and switching between speakers and when using the microphone. Microphone volume is low in some Macs.|[apple-bce](https://github.com/t2linux/apple-bce-drv)|
19 | |Hybrid Graphics|🟡 Partially working|🟡 Partial|Toggling dGPU power doesn't work.|[Hybrid Graphics](https://wiki.t2linux.org/guides/hybrid-graphics/)|
20 | |AMD GPUs|🟡 Partially working||Changing resolution, using DRI_PRIME and doing various other things can cause crashes, but `echo high \| sudo tee /sys/bus/pci/drivers/amdgpu/0000:??:??.?/power_dpm_force_performance_level` or adding `amdgpu.dpm=0` to the kernel commandline stops these crashes.||
21 | |MacPro7,1|🟡 Partially working||Users have encountered PCIE Address Space issues, with auto remap breaking. A temporary solution may be possible by removing the Infinity Fabric Link (Bridge or Jumper) from the GPU(s).||
22 | |T2 Secure Enclave|🔴 Not working||Used for Touch ID, storing encryption keys on macOS||
23 | |T2 Audio Video Encoder|🔴 Not working||Used for Sidecar on macOS||
24 |
25 | ## Filesystem notes
26 |
27 | - Linux using APFS filesystems: Linux cannot read the internal SSD's macOS APFS parition's Data and System volume (for other APFS volumes, [linux-apfs-rw](https://github.com/linux-apfs/linux-apfs-rw) can be used for reading data, but attempting to write is risky).
28 |
29 | - macOS using Linux filesystems: There are FUSE implementations of some Linux Filesystems that can be used on macOS (but again, most only have experemental write support).
30 |
--------------------------------------------------------------------------------
/docs/distributions/arch/installation.md:
--------------------------------------------------------------------------------
1 | # Installing Arch Linux on a Mac with the T2 Chip
2 |
3 | You will need:
4 |
5 | - USB drive with at least 1GB
6 | - A way to plug it into your Mac (USB-C isn't USB-A)
7 |
8 | ---
9 |
10 | !!! Warning "Users in NA/EU might face slow download speeds from the mirror"
11 | If you're experiencing slow download speed or failure to install, please edit your `/etc/pacman.conf` file and replace old mirror.funami.tech link with `https://github.com/NoaHimesaka1873/arch-mact2-mirror/releases/download/release` instead. You can also checkout the [arch-mirrors mailing list](https://lists.archlinux.org/archives/list/arch-mirrors@lists.archlinux.org/) to get information about latest downtimes for mirror.funami.tech.
12 |
13 | 1. Follow the [Pre-installation](https://wiki.t2linux.org/guides/preinstall) steps.
14 |
15 | 2. Boot into the live ISO.
16 |
17 | 3. Run `t2archinstall` for guided install, or follow the Arch Wiki guide from [here](https://wiki.archlinux.org/title/Installation_guide#Set_the_console_keyboard_layout_and_font) up to "Format the partitions". Note that the step of [Partition the disks](https://wiki.archlinux.org/title/Installation_guide#Partition_the_disks) must be skipped as it has already been done in macOS. If you choose to use `t2archinstall`, you can skip this guide entirely.
18 |
19 | 1. You will need to reformat your partitions, except for the EFI partition. The other partitions will need to reformatted as described in the Arch Wiki Installation guide. For the EFI system partition (mentioned in a note on the Arch Wiki), there will be one at `/dev/nvme0n1p1` and you can use this if you don't intend to install Windows or already have it installed. If you do intend to triple boot, refer to [this guide](https://wiki.t2linux.org/guides/windows/).
20 | 2. Mount the EFI partition that you intend to use for your bootloader on `/mnt/boot`, and your other partitions on `/mnt`, etc.
21 |
22 | 4. Continue following the Arch Wiki's guide until "Install essential packages".
23 |
24 | 5. Install the required packages into your new system.
25 |
26 | - Using pacstrap (more vanilla Arch experience)
27 |
28 | 1. Run `pacstrap /mnt base linux-t2 linux-t2-headers apple-t2-audio-config apple-bcm-firmware linux-firmware iwd grub efibootmgr t2fanrd` (omit the `grub efibootmgr` packages from this if you intend to use systemd-boot as your bootloader).
29 |
30 | 2. Add repository to `/mnt/etc/pacman.conf`, by adding this:
31 |
32 | ```ini
33 | [arch-mact2]
34 | Server = https://mirror.funami.tech/arch-mact2/os/x86_64
35 | SigLevel = Never
36 | ```
37 |
38 | - Using t2strap (easier)
39 |
40 | 1. Run `t2strap /mnt base linux-firmware iwd grub efibootmgr` (omit the `grub efibootmgr` packages from this if you intend to use systemd-boot as your bootloader).
41 |
42 | 6. Continue following the Arch Wiki's guide until you get to installing a bootloader.
43 |
44 | 7. Enable `t2fanrd` by running:
45 |
46 | ```bash
47 | systemctl enable t2fanrd
48 | ```
49 |
50 | 8. Install a bootloader, GRUB is easier, but you can also use systemd-boot. Don't do both.
51 |
52 | - Installing Grub:
53 |
54 | 1. Edit `/etc/default/grub`, you'll need to install a text editor (i.e. `vim` or `nano`) with `pacman -S PACKAGE_NAME` for this step.
55 | 2. On the line with `GRUB_CMDLINE_LINUX="quiet splash"`, add the following kernel parameters: `intel_iommu=on iommu=pt pcie_ports=compat`
56 | 3. Run `grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB --removable`.
57 | 4. Run `grub-mkconfig -o /boot/grub/grub.cfg` to generate configuration file.
58 |
59 | - Installing systemd-boot:
60 |
61 | 1. Follow the Arch wiki's [instructions](https://wiki.archlinux.org/title/Systemd-boot#Installation). You will want `--path=/boot` as an argument to `bootctl` if you mounted your EFI partition there. Also make sure you configure it to boot the `linux-t2` kernel.
62 | 2. Install a text editor (i.e. `pacman -S vim` or `pacman -S nano`), and make the following edit for `.conf` files in `/boot/efi/loader/entries/`.
63 | 3. Add `intel_iommu=on iommu=pt pcie_ports=compat` to the `options` line to add those kernel parameters.
64 |
65 | 9. Exit the `chroot` (Control-d, or `exit`) and reboot. You now will be able to select your Arch install in the macOS Startup Manager by holding option at boot.
66 |
--------------------------------------------------------------------------------
/docs/guides/audio-config.md:
--------------------------------------------------------------------------------
1 | # Introduction
2 |
3 | This page explains how to get the config files for using the T2 audio device, which allows use of the 3.5mm headphone port, the built in speakers, the built in mic and the headphones' mic.
4 |
5 | Firstly, check whether you are using an updated `apple-bce` version by running `sed -n "s/.*\(AppleT2.*\) -.*/\1/p" /proc/asound/cards`. If the output is `AppleT2xN` (where `N` is a number), then this guide can be followed. If it's just `AppleT2`, then either update the driver first or follow the [older version](https://github.com/t2linux/wiki/blob/00e882d0d5afb3102aedd02872426dc5fba789a5/docs/guides/audio-config.md) of this guide.
6 |
7 | If there is no output at all you probably do not have T2 Mac support. Follow the instructions on [how to add support for T2 Macs](https://wiki.t2linux.org/guides/postinstall/).
8 |
9 | # Enable Pass-Through Kernel Parameters
10 |
11 | Cat `cat /proc/cmdline` and ensure that your kernel parameters contain `intel_iommu=on iommu=pt pcie_ports=compat`.
12 |
13 | If not present, you'll have to update your bootup kernel params:
14 |
15 | - edit `/etc/default/grub` and update `GRUB_CMDLINE_LINUX` to include `intel_iommu=on iommu=pt pcie_ports=compat`
16 | - Apply your edits by running `sudo update-grub` on ubuntu or `sudo grub-mkconfig -o /boot/grub/grub.cfg` for other distros
17 | - Note that, `grub`'s command line interface names might differ on different distros, if the commands like `grub-xxx` are not found, try `grub2-xxx` alternatives instead. For example, it should be `sudo grub2-mkconfig ...` instead of `sudo grub-mkconfig ...` on Fedora 36.
18 | - Reboot and ensure `cat /proc/cmdline` contains those params
19 |
20 | !!!note "systemd-boot"
21 | If you use systemd-boot you'll instead edit your boot conf files to add `intel_iommu=on iommu=pt pcie_ports=compat` to the options line. The files to edit will have the `.conf` extension and be in the loader/entries/ folder on your EFI partition. This will most likely be `/boot/efi/loader/entries`
22 |
23 | # Audio Configuration Files
24 |
25 | Simply run the following to set up audio:
26 |
27 | ```bash
28 | sudo git clone https://github.com/kekrby/t2-better-audio.git /tmp/t2-better-audio
29 | cd /tmp/t2-better-audio
30 | ./install.sh
31 | sudo rm -r /tmp/t2-better-audio
32 | ```
33 |
34 | If your distro uses PulseAudio by default, consider switching to PipeWire with rtkit for the best possible experience. You can still use PulseAudio but the experience will not be as smooth as PipeWire, for example you might not be able to select the speakers as the output device when headphones are plugged in.
35 |
36 | !!!note "Switching to headphones automatically"
37 | If you want headphones to be switched to automatically when they are plugged in, you should set them as the default audio sink using the settings app of your DE, `pavucontrol`, `pactl` or `wpctl`.
38 |
39 | # Internal microphones DSP Configuration.
40 |
41 | In order adjust the microphones signal automatically, we can use the following Pipewire filterchain config:
42 |
43 | [Microphones config instructions](https://github.com/lemmyg/t2-apple-audio-dsp/tree/mic)
44 |
45 | # Issues
46 |
47 | - Some people are unable to get audio input to work. You may have to use a separate microphone.
48 |
49 | ## KDE
50 |
51 | The "Audio Volume" dialog / Audio in System Settings allow users to "Raise maximum volume", allowing to go past 100%. This
52 | does not offer a great deal of flexibility, it might work for getting acceptable recordings however.
53 |
54 | ## EasyEffects with PipeWire
55 |
56 | [EasyEffects](https://github.com/wwmm/easyeffects) is a tool to control and modify audio streams when using PipeWire. Compared
57 | to the KDE approach mentioned above using input plugins like "Autogain" offers a lot more fine grain control and higher volume
58 | boosts.
59 |
60 | An EasyEffects preset (tested on MacBook Pro 15,1) is available [here](https://github.com/angelobdev/t2-easyeffects-preset).
61 |
62 | # Speakers
63 |
64 | All of apple's fancy tuning of the speakers is done in macOS, but a similar configuration is currently available for only the MacBook Pro 16 inch 2019.
65 |
66 | ## MacBook Pro 16" 2019
67 |
68 | Currently we have an experimental DSP (Digital Signal Processing) config for MacBook Pro 16" 2019 with 6 speakers.
69 | Note that each model needs specific settings. Do not use it with other models as it could damage the speakers. Also do not expect same sound quality as in macOS.
70 |
71 | [DSP config instructions](https://github.com/lemmyg/t2-apple-audio-dsp/tree/speakers_161)
72 |
--------------------------------------------------------------------------------
/docs/guides/startup-manager.md:
--------------------------------------------------------------------------------
1 | # Introduction
2 |
3 | This guide shall help you perform 2 tasks. Firstly you shall be able to set the correct label for your Linux startup disk on Mac startup manager and replace the `EFI Boot` label, and give it an icon. Secondly you shall be able to make Linux startup disk as the default startup disk in case you wish to do so.
4 |
5 | The steps to perform the above tasks vary as per the way you have installed Linux, and thus check out the guide under the heading that applies to your case.
6 |
7 | # Setting labels
8 |
9 | ## Setting label in case you are using the EFI partition available by default in Mac and are on a dual boot system
10 |
11 | In this case, boot into macOS, open a terminal window and run:
12 |
13 | ```bash
14 | sudo diskutil mount disk0s1
15 | bless --folder /Volumes/EFI/EFI/BOOT --label ""
16 | ```
17 |
18 | Replace `` with your distro's name. E.g.: If you are using Ubuntu, run:
19 |
20 | ```bash
21 | sudo diskutil mount disk0s1
22 | bless --folder /Volumes/EFI/EFI/BOOT --label "Ubuntu"
23 | ```
24 |
25 | ## Setting label in case you are using the same EFI partition for Windows and Linux
26 |
27 | More details about this can be found in the [triple boot guide](https://wiki.t2linux.org/guides/windows/#using-the-same-efi-partition).
28 |
29 | In this case the Windows startup disk is used to boot both Windows and Linux. Thus, it is not recommended to set special labels for Linux as it may cause errors with the Windows startup disk.
30 |
31 | ## Setting label in case you are using a seperate EFI partition for Linux
32 |
33 | More details about this can be found in the [triple boot guide](https://wiki.t2linux.org/guides/windows/#using-seperate-efi-partitions).
34 |
35 | In this case, boot into macOS, open a terminal window and run:
36 |
37 | ```bash
38 | IDENTIFIER=$(diskutil info | grep "Device Identifier" | cut -d: -f2 | xargs)
39 | sudo diskutil mount $IDENTIFIER
40 | bless --folder /Volumes//EFI/BOOT --label ""
41 | ```
42 |
43 | Replace `` with the label you set using in the above triple boot guide and `` with your distro's name. E.g.: If you are using Ubuntu and you set the label to `EFI2`, run:
44 |
45 | ```bash
46 | IDENTIFIER=$(diskutil info EFI2 | grep "Device Identifier" | cut -d: -f2 | xargs)
47 | sudo diskutil mount $IDENTIFIER
48 | bless --folder /Volumes/EFI2/EFI/BOOT --label "Ubuntu"
49 | ```
50 |
51 | # Setting the boot option icons in macOS Startup Manager
52 |
53 | In case you are using the same EFI partition for Windows and Linux, then your Windows startup disk already has an icon. Thus you needn't set any boot icon.
54 |
55 | In other cases, put an `icns` image file with your desired icon in the top directory of the disk that the bootloader of the menu entry is on, and call it `.VolumeIcon.icns`. It will now appear as that disk's boot option's icon.
56 |
57 | # Setting Linux startup disk as the default startup disk
58 |
59 | !!! warning
60 | In case you upgrade macOS to a newer version, the default startup disk gets changed to the macOS startup disk. Thus you will have to follow the instructions to make the Linux startup disk as default every time after you upgrade macOS.
61 |
62 | ## Case of common EFI partition for Windows and Linux
63 |
64 | In this case you will have to set the Windows startup disk as the default startup disk. It is recommended to follow [Apple's documentation](https://support.apple.com/en-in/guide/mac-help/mchlp1034/mac) where you have to follow the **Change your startup disk for every startup** section.
65 |
66 | If this method is not working for you, then follow the instructions given in [Case of seperate EFI partition for Linux as well as case of using the EFI partition available by default in Mac and are on a dual boot system](https://wiki.t2linux.org/guides/startup-manager/#case-of-seperate-efi-partition-for-linux-as-well-as-case-of-using-the-efi-partition-available-by-default-in-mac-and-are-on-a-dual-boot-system) section, where you have to consider the Windows startup disk as the Linux startup disk.
67 |
68 | ## Case of seperate EFI partition for Linux as well as case of using the EFI partition available by default in Mac and are on a dual boot system
69 |
70 | In these cases, start your Mac and press and hold down the Option key. When the startup manager gets displayed, release the option key. Now press and hold the Control key and without releasing the Control key, boot into the Linux startup disk as you usually do. This will make it the default startup disk.
71 |
--------------------------------------------------------------------------------
/docs/distributions/nixos/faq.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | # Frequently Answered Questions
5 |
6 | ## The LiveCD does not boot/only shows a blank screen
7 |
8 | This situation occurred due to regressions in the bootloader, which the wider NixOS community was also affected.
9 | The bug has been fixed. Make sure you are using ISOs tagged at or newer than `6.4.9-2`. Nevertheless, usage of [the latest ISO](https://github.com/t2linux/nixos-t2-iso/releases/latest) is recommended.
10 |
11 | ## In the Live environment, building the kernel/configuration runs out of disk space
12 |
13 | Since `/tmp` is a subdirectory under `/`, which is mounted as a `tmpfs`, it is very easy to run out of space. This may not happen to you, but a solution is to bind mount `/tmp` to a real filesystem.
14 |
15 | ```shell
16 | # sudo -s
17 | # Assuming you have mounted your root partition (/dev/nvme0n1p?) at /mnt
18 | mkdir /mnt/tmp -p
19 | mount --bind /mnt/tmp /tmp
20 | # See mount(8) for more information.
21 | ```
22 |
23 | Setting `TMPDIR` *might* work but your mileage may vary.
24 |
25 | Alternatively, follow [this section](#substituter-setup) to not build the kernel.
26 |
27 | ## Substituter Setup
28 |
29 | There is a public [hydra instance](https://hydra.soopy.moe) acting as a [binary cache/substituter](https://zero-to-nix.com/concepts/caching) run by a community member. Using the substituter will cause Nix to not rebuild the kernel, so long as non-default options like crash dumping have not been enabled.
30 |
31 | ### Installation Environment
32 |
33 | In the installation environment, the hydra cache is not currently used by default. Configure Nix to use the substituter by one of the following methods:
34 |
35 | === "Editing `nix.conf`"
36 | Since you will be installing as root, edit the root user's `nix.conf` located at `/root/.config/nix/nix.conf` to include the following snippet.
37 |
38 | ```shell
39 | # since root is a trusted user, we do not need to add extra-trusted-substituters.
40 | extra-substituters = https://cache.soopy.moe
41 | extra-trusted-public-keys = cache.soopy.moe-1:0RZVsQeR+GOh0VQI9rvnHz55nVXkFardDqfm4+afjPo=
42 | ```
43 |
44 | === "Passing additional flags"
45 | This method is repetitive but is useful if you cannot edit the config file.
46 |
47 | For each `nixos-{rebuild,install}` command, pass in the flags as shown below.
48 |
49 | ```shell
50 | nixos-install --option extra-substituters "https://cache.soopy.moe" --option extra-trusted-public-keys "cache.soopy.moe-1:0RZVsQeR+GOh0VQI9rvnHz55nVXkFardDqfm4+afjPo="
51 | ```
52 |
53 | === "Using flakes"
54 | You can configure Nix via the `nixConfig` top-level attribute in your flake. Installing with this forego the pitfalls with channels. Note that this only apply to operations done with the flake.
55 |
56 | ```nix title="flake.nix" linenums="1" hl_lines="2-5"
57 | {
58 | nixConfig = {
59 | extra-substituters = ["https://cache.soopy.moe"];
60 | extra-trusted-public-keys = ["cache.soopy.moe-1:0RZVsQeR+GOh0VQI9rvnHz55nVXkFardDqfm4+afjPo="];
61 | };
62 | inputs = ...;
63 | outputs = ...;
64 | }
65 | ```
66 |
67 | You may also use the flake template to not have to type everything out. Check [the Configuration section in the Installation Guide](./installation.md#configuration) for more information.
68 |
69 | #### Channels users
70 |
71 | If you are using the legacy setup with channels, you might still be building the kernel even if you have the substituter set up. This is because the ISO's nixpkgs flake input takes precedence over channels.
72 |
73 | A set up with flakes is obviously still recommended since various pitfalls such as this problem would be circumvented. If you for some reason cannot or don't want to use flakes, here are the steps to install with the substituter.
74 |
75 | ```bash
76 | # Ensure you are using nixos-unstable.or the latest stable nixos release.
77 | sudo nix-channel --list
78 | # Update nix channels
79 | sudo nix-channel --update
80 | # Proceed to installation. NIX_PATH ensures we are using the channels revision and not the ISO flake registry's.
81 | NIX_PATH=nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixos nixos-install
82 | ```
83 |
84 | ### NixOS Environment
85 |
86 | Configure Nix to use the substituter by adding a configuration module as shown below.
87 |
88 | You do not have to perform this step if you use the flake template.
89 |
90 | ```nix linenums="1" hl_lines="2-7"
91 | { ... }: {
92 | nix.settings = {
93 | substituters = [ "https://cache.soopy.moe" ];
94 | trusted-substituters = [ "https://cache.soopy.moe" ]; # to allow building as a non-trusted user
95 | trusted-public-keys =
96 | [ "cache.soopy.moe-1:0RZVsQeR+GOh0VQI9rvnHz55nVXkFardDqfm4+afjPo=" ];
97 | };
98 | }
99 | ```
100 |
--------------------------------------------------------------------------------
/docs/distributions/gentoo/installation.md:
--------------------------------------------------------------------------------
1 | # Installing Gentoo Linux on a T2 Mac
2 |
3 | ## Install Procedure
4 |
5 | 1. Follow the [Pre-installation](https://wiki.t2linux.org/guides/preinstall) steps.
6 | 1. Since there is not yet a T2 Gentoo Installation ISO, you will need to use a different ISO. We recommend the [T2-Ubuntu](https://github.com/t2linux/T2-Ubuntu/releases/latest) ISO if you want a graphical environment, or the [T2-Archiso](https://github.com/t2linux/archiso-t2/releases/latest) if you don't want to have to copy Wi-Fi firmware to the livecd.
7 | 2. If you chose the Ubuntu ISO, follow the [Wi-Fi Guide](https://wiki.t2linux.org/guides/wifi-bluetooth/) once booted.
8 |
9 | 2. Connect to the internet using NetworkManager in the Ubuntu ISO, or using `iwctl` in the Arch ISO.
10 |
11 | 3. You will need to reformat your partitions, except for the EFI partition. The other partitions will need to reformatted as described in the [Gentoo Handbook](https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Disks). For the EFI system partition there will be one at `/dev/nvme0n1p1` and you can use this if you don't intend to install Windows or already have it installed. If you do intend to triple boot, refer to [this guide](https://wiki.t2linux.org/guides/windows/).
12 |
13 | 4. Follow the Gentoo Handbook from [Installing stage3](https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Stage) until [Kernel Configuration and Compilation](https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Kernel#Kernel_configuration_and_compilation).
14 |
15 | 5. Setup the T2 Gentoo overlay:
16 |
17 | 1. Install `dev-vcs/git` and `app-eselect/eselect-repository`, then enable and sync the overlay:
18 |
19 | ```bash
20 | emerge -av app-eselect/eselect-repository dev-vcs/git
21 | eselect repository add t2 git https://codeberg.org/vimproved/t2-overlay.git
22 | emerge --sync t2
23 | echo "*/*::t2" >> /etc/portage/package.accept_keywords/t2
24 | ```
25 |
26 | 6. Install the T2 Gentoo kernel:
27 |
28 | 1. The T2 overlay provides a [Distribution Kernel](https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Kernel#Distribution_kernels) for T2 Macs. To install it, run `emerge -av sys-kernel/t2gentoo-kernel`.
29 |
30 | 2. Alternatively, you can use the kernel sources and manually compile. With this method, the update process is not automated, and manual configuration is necessary. However, `sys-kernel/t2gentoo-sources` tends to get new kernel versions faster then `sys-kernel/t2gentoo-kernel`. To install it, run: `emerge -av sys-kernel/t2gentoo-sources`. After installing the kernel sources, run `eselect kernel set 1` to point `/usr/src/linux` to the correct path, then follow the directions in the [Manual Configuration](https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Kernel#Alternative:_Manual_configuration) section of the handbook. If you decide to manually configure your kernel, make sure the following options are set:
31 |
32 | ```bash
33 | CONFIG_APPLE_BCE=m
34 | CONFIG_APPLE_GMUX=m
35 | CONFIG_IRQ_REMAP=y
36 | CONFIG_HID_APPLE_IBRIDGE=m
37 | CONFIG_HID_APPLE=m
38 | CONFIG_HID_APPLE_MAGIC_BACKLIGHT=m
39 | CONFIG_HID_APPLE_TOUCHBAR=m
40 | CONFIG_HID_SENSOR_ALS=m
41 | CONFIG_SND_PCM=m
42 | # For WiFi
43 | CONFIG_BRCMFMAC=m
44 | # For Bluetooth
45 | CONFIG_BT_BCM=m
46 | CONFIG_BT_HCIBCM4377=m
47 | CONFIG_BT_HCIUART_BCM=y
48 | CONFIG_BT_HCIUART=m
49 | ```
50 |
51 | 7. Install Wi-Fi firmware for T2 Macs:
52 |
53 | 1. The T2 overlay provides a package for T2 Wi-Fi firmware. To install it, run:
54 |
55 | ```bash
56 | mkdir -p /etc/portage/package.license
57 | echo "sys-firmware/apple-bcm-firmware all-rights-reserved" >> /etc/portage/package.license/firmware
58 | emerge -av sys-firmware/apple-bcm-firmware
59 | ```
60 |
61 | 8. Follow the Gentoo Handbook from [Configuring the System](https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/System) up to [Configuring the bootloader](https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Bootloader)
62 |
63 | 9. Install the bootloader:
64 | 1. Choose a bootloader (other than LILO) from the [Configuring the bootloader](https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Bootloader) section of the Gentoo Handbook.
65 | 2. Add `intel_iommu=on iommu=pt pcie_ports=compat` to the kernel parameters. Refer to the Gentoo Wiki article for your bootloader of choice for instructions on how to do this.
66 |
67 | 10. Exit the `chroot` (Control-d, or `exit`) and reboot. You should now be able to select Gentoo from the macOS startup manager by holding option at boot. Congratulations, you should now have a working Gentoo installation! For your next steps, read through the rest of the Gentoo Handbook and consider installing a desktop environment such as [GNOME](https://wiki.gentoo.org/wiki/GNOME), [KDE](https://wiki.gentoo.org/wiki/KDE), or [Xfce](https://wiki.gentoo.org/wiki/Xfce).
68 |
--------------------------------------------------------------------------------
/docs/roadmap.md:
--------------------------------------------------------------------------------
1 | # Introduction
2 |
3 | This article is meant to guide users through the wiki by giving an overview over the required steps to
4 | get to a working installation.
5 |
6 | ## Deciding on the Installation
7 |
8 | Using Linux on a T2 Mac comes with compromises as well as advantages compared to macOS. You will need
9 | to decide for yourself if it its worth it.
10 |
11 | Your first consideration should be the risk you are taking. Don't worry, nobody has broken their machine so far by installing
12 | Linux and by following the guides closely you should be able to get everything working even without a lot of knowledge as well.
13 | Still in case something goes wrong we are not responsible for it, we will try our best to help out however.
14 |
15 | ## Can I completely remove macOS?
16 |
17 | While it is technically possible to remove macOS entirely, it is strongly encouraged to dual boot it with Linux because:
18 |
19 | 1. To set up Wi-Fi on Linux, you will need Wi-Fi firmware, which can be legally obtained only from macOS. It is illegal to host the firmware on any website as it is under a non redistributable license.
20 | 2. It acts as a backup in case something goes wrong.
21 | 3. macOS updates often bring along certain firmware updates, which tend to be useful for Linux as well.
22 |
23 | Still if you wish to remove macOS completely, it is recommended to [create a bootable macOS installer](https://support.apple.com/en-us/HT201372) so as to have an option of restoring macOS back.
24 |
25 | You can also use the [Internet Recovery](https://support.apple.com/en-in/HT204904) to reinstall macOS, but this has been quite unreliable and slow for a considerable amount of users, thus making the bootable installer method a better one.
26 |
27 | ## What works on Linux?
28 |
29 | Take a look at the [state article](https://wiki.t2linux.org/state/). It gives a list of roughly what works on Linux and what doesn't.
30 | If a specific feature is not listed at all, there is a chance it actually works.
31 |
32 | ## Choosing a Distribution
33 |
34 | While technically it is not a limitation when installing Linux, different distributions do provide different levels of documentation,
35 | ease of use and polish.
36 |
37 | Arch Linux probably has the most documentation, both officially for the whole project in form of the Arch Wiki and in scope of the
38 | t2linux wiki with a really detailed and up to date install guide. On top of that there is also a work in progress `archinstall` script.
39 | Keep in mind however that the whole process is done in the command line.
40 |
41 | Manjaro has a more guided install experience, with a graphical installer and multiple prebuilt ISOs for different desktop environments. There are 2 versions of the Manjaro ISO built by different people. JPyke3's version, which is not recommended, and NoaHimesaka1873's which is newer and recommended.
42 |
43 | EndeavourOS is an Arch based Linux distribution with a graphical installer. This distribution requires little to no configuration after install.
44 |
45 | Ubuntu also has a graphical installer. Additionally, less post configuration work is required as some kernel modules are getting installed automatically.
46 |
47 | Fedora also has a prebuilt ISO and a graphical installer. Most things work out of the box, but you need to follow the wifi guide.
48 |
49 | NixOS has both prebuilt graphical and command line installers. Support for T2 devices is provided in the form of a `nixos-hardware` module.
50 | Importing the module is the only thing you have to do to get your configuration working on your Mac.
51 |
52 | If you wish to use another distribution, you can install it normally, also follow the steps to [install the kernel yourself manually](https://wiki.t2linux.org/guides/kernel/) and follow the [post installation steps](https://wiki.t2linux.org/roadmap/#configuring-the-installation).
53 |
54 | ## Installing
55 |
56 | Follow the [Pre-installation steps](https://wiki.t2linux.org/guides/preinstall) to prepare your Mac to install Linux and head over to the appropriate guide of the distro of your choice as mentioned in that guide.
57 |
58 | ## Configuring the Installation
59 |
60 | After successfully booting into your new installation, you will need to configure a few things:
61 |
62 | - [Performing a basic setup](https://wiki.t2linux.org/guides/postinstall/)
63 | - [Getting Wi-Fi and Bluetooth to work](https://wiki.t2linux.org/guides/wifi-bluetooth/)
64 | - [Install drivers for the fan (if not working automatically or want to force a certain speed)](https://wiki.t2linux.org/guides/fan/)
65 | - [Configure audio](https://wiki.t2linux.org/guides/audio-config/)
66 | - [Configure the Startup Manager (optional)](https://wiki.t2linux.org/guides/startup-manager/)
67 | - [Install rEFInd (optional)](https://wiki.t2linux.org/guides/refind/)
68 |
69 | You might also want to look into [getting the internal GPU to work](https://wiki.t2linux.org/guides/hybrid-graphics/) if your Mac has two
70 | graphics cards. However, if you don't need it specifically, it's probably best to stick with the dedicated one. If your Mac only has
71 | a single graphics unit, you can ignore this.
72 |
--------------------------------------------------------------------------------
/mkdocs.yml:
--------------------------------------------------------------------------------
1 | # To build the documentation use Zensical
2 |
3 | site_name: t2linux wiki
4 | site_author: the t2linux.org contributors
5 | site_url: https://t2linux.org/
6 | copyright: "© 2021-2025 t2linux.org CC-BY-SA-4.0"
7 |
8 | theme:
9 | palette:
10 | - media: "(prefers-color-scheme)"
11 | toggle:
12 | icon: material/brightness-auto
13 | name: Switch to light mode
14 |
15 | # Palette toggle for light mode
16 | - media: "(prefers-color-scheme: light)"
17 | scheme: default
18 | toggle:
19 | icon: material/brightness-7
20 | name: Switch to dark mode
21 |
22 | # Palette toggle for dark mode
23 | - media: "(prefers-color-scheme: dark)"
24 | scheme: slate
25 | toggle:
26 | icon: material/brightness-4
27 | name: Switch to system preference
28 | name: material
29 | custom_dir: theme
30 | font: false
31 | features:
32 | - tabs
33 | - content.action.edit
34 | - content.tabs.link
35 | - content.code.copy
36 | - navigation.top
37 | favicon: assets/images/icon.png
38 | logo: assets/images/t2linux-logo-large.svg
39 |
40 | docs_dir: docs
41 | site_dir: build
42 |
43 | repo_name: t2linux/wiki
44 | repo_url: https://github.com/t2linux/wiki
45 | edit_uri: https://github.com/t2linux/wiki/edit/master/docs/
46 |
47 | markdown_extensions:
48 | - pymdownx.highlight:
49 | anchor_linenums: true
50 | line_spans: __span
51 | pygments_lang_class: true
52 | - pymdownx.inlinehilite
53 | - pymdownx.snippets
54 | - pymdownx.superfences
55 | - pymdownx.tasklist:
56 | custom_checkbox: true
57 | - pymdownx.tabbed:
58 | alternate_style: true
59 | - toc:
60 | permalink: true
61 | - admonition
62 | - pymdownx.details
63 | - attr_list
64 | - pymdownx.emoji:
65 | emoji_index: !!python/name:material.extensions.emoji.twemoji
66 | emoji_generator: !!python/name:material.extensions.emoji.to_svg
67 |
68 | plugins:
69 | - redirects:
70 | redirect_maps:
71 | 'guides/wifi.md': 'guides/wifi-bluetooth.md'
72 | 'guides/dkms.md': 'guides/postinstall.md'
73 | - search:
74 | lang: en
75 |
76 | nav:
77 | - General:
78 | - Home: index.md
79 | - Device Support and State of Features: state.md
80 | - Installation Roadmap: roadmap.md
81 | - Contribute: contribute.md
82 | - Notable Contributors: notable-contributors.md
83 | - Guides:
84 | - Pre-Install: guides/preinstall.md
85 | - Basic setup: guides/postinstall.md
86 | - Wi-Fi and Bluetooth: guides/wifi-bluetooth.md
87 | - Windows Triple Boot: guides/windows.md
88 | - Hybrid Graphics: guides/hybrid-graphics.md
89 | - Audio: guides/audio-config.md
90 | - Uninstall: guides/uninstall.md
91 | - Fan: guides/fan.md
92 | - Kernel: guides/kernel.md
93 | - Startup Manager: guides/startup-manager.md
94 | - rEFInd: guides/refind.md
95 | - Distributions:
96 | - Overview: distributions/overview.md
97 | - Arch:
98 | - Installation: distributions/arch/installation.md
99 | - FAQ: distributions/arch/faq.md
100 | - EndeavourOS:
101 | - Installation: distributions/endeavouros/installation.md
102 | - Fedora:
103 | - Home: distributions/fedora/home.md
104 | - FAQ: distributions/fedora/faq.md
105 | - Installation: distributions/fedora/installation.md
106 | - Gentoo:
107 | - Installation: distributions/gentoo/installation.md
108 | - Manjaro:
109 | - Deprecation Notice: distributions/manjaro/deprecation.md
110 | - Home: distributions/manjaro/home.md
111 | - FAQ: distributions/manjaro/faq.md
112 | - Installation: distributions/manjaro/installation.md
113 | - NixOS:
114 | - Home: distributions/nixos/home.md
115 | - FAQ: distributions/nixos/faq.md
116 | - Installation: distributions/nixos/installation.md
117 | - Ubuntu and Linux Mint:
118 | - Home: distributions/ubuntu/home.md
119 | - FAQ: distributions/ubuntu/faq.md
120 | - Installation: distributions/ubuntu/installation.md
121 | - Debian, Pop!_OS and other similar distros:
122 | - Installation: distributions/debian/installation.md
123 |
124 | extra_css:
125 | - assets/stylesheets/colors.css
126 | - assets/stylesheets/fonts.css
127 | - assets/stylesheets/layout.css
128 |
129 | extra:
130 | social:
131 | - icon: fontawesome/brands/discord
132 | link: https://discord.com/invite/68MRhQu
133 | - icon: fontawesome/brands/github
134 | link: https://github.com/t2linux
135 |
--------------------------------------------------------------------------------
/docs/tools/distro-metadata.json:
--------------------------------------------------------------------------------
1 | {
2 | "all": [
3 | {
4 | "name": "Arch Linux",
5 | "iso": [
6 | "https://github.com/t2linux/archiso-t2/releases/download/2024.04.09/archlinux-t2-2024.04.09-t2-x86_64.iso"
7 | ]
8 | },
9 | {
10 | "name": "EndeavourOS",
11 | "iso": [
12 | "https://nightly.link/t2linux/EndeavourOS-ISO-t2/actions/runs/8866649470/built-iso.zip"
13 | ],
14 | "iso_compression": "zip"
15 | },
16 | {
17 | "name": "Fedora Workstation",
18 | "iso": [
19 | "https://github.com/t2linux/fedora-iso/releases/download/f40.0/t2linux-fedora-live-workstation-40.iso"
20 | ]
21 | },
22 | {
23 | "name": "Fedora KDE",
24 | "iso": [
25 | "https://github.com/t2linux/fedora-iso/releases/download/f40.0/t2linux-fedora-live-kde-40.iso.00",
26 | "https://github.com/t2linux/fedora-iso/releases/download/f40.0/t2linux-fedora-live-kde-40.iso.01"
27 | ]
28 | },
29 | {
30 | "name": "Fedora Sway",
31 | "iso": [
32 | "https://github.com/t2linux/fedora-iso/releases/download/f40.0/t2linux-fedora-live-sway-40.iso"
33 | ]
34 | },
35 | {
36 | "name": "Ubuntu 24.04 - Noble Numbat",
37 | "iso": [
38 | "https://github.com/t2linux/T2-Ubuntu/releases/download/v6.17.9-1/ubuntu-24.04-6.17.9-t2-noble.iso.00",
39 | "https://github.com/t2linux/T2-Ubuntu/releases/download/v6.17.9-1/ubuntu-24.04-6.17.9-t2-noble.iso.01",
40 | "https://github.com/t2linux/T2-Ubuntu/releases/download/v6.17.9-1/ubuntu-24.04-6.17.9-t2-noble.iso.02"
41 | ]
42 | },
43 | {
44 | "name": "Ubuntu 25.10 - Questing Quokka",
45 | "iso": [
46 | "https://github.com/t2linux/T2-Ubuntu/releases/download/v6.17.9-1/ubuntu-25.10-6.17.9-t2-questing.iso.00",
47 | "https://github.com/t2linux/T2-Ubuntu/releases/download/v6.17.9-1/ubuntu-25.10-6.17.9-t2-questing.iso.01",
48 | "https://github.com/t2linux/T2-Ubuntu/releases/download/v6.17.9-1/ubuntu-25.10-6.17.9-t2-questing.iso.02"
49 | ]
50 | },
51 | {
52 | "name": "Kubuntu 24.04 - Noble Numbat",
53 | "iso": [
54 | "https://github.com/t2linux/T2-Ubuntu/releases/download/v6.17.9-1/kubuntu-24.04-6.17.9-t2-noble.iso.00",
55 | "https://github.com/t2linux/T2-Ubuntu/releases/download/v6.17.9-1/kubuntu-24.04-6.17.9-t2-noble.iso.01",
56 | "https://github.com/t2linux/T2-Ubuntu/releases/download/v6.17.9-1/kubuntu-24.04-6.17.9-t2-noble.iso.02"
57 | ]
58 | },
59 | {
60 | "name": "Kubuntu 25.10 - Questing Quokka",
61 | "iso": [
62 | "https://github.com/t2linux/T2-Ubuntu/releases/download/v6.17.9-1/kubuntu-25.10-6.17.9-t2-questing.iso.00",
63 | "https://github.com/t2linux/T2-Ubuntu/releases/download/v6.17.9-1/kubuntu-25.10-6.17.9-t2-questing.iso.01",
64 | "https://github.com/t2linux/T2-Ubuntu/releases/download/v6.17.9-1/kubuntu-25.10-6.17.9-t2-questing.iso.02"
65 | ]
66 | },
67 | {
68 | "name": "Ubuntu Unity 24.04 - Noble Numbat",
69 | "iso": [
70 | "https://github.com/t2linux/T2-Ubuntu/releases/download/v6.17.9-1/ubuntu-unity-24.04-6.17.9-t2-noble.iso.00",
71 | "https://github.com/t2linux/T2-Ubuntu/releases/download/v6.17.9-1/ubuntu-unity-24.04-6.17.9-t2-noble.iso.01",
72 | "https://github.com/t2linux/T2-Ubuntu/releases/download/v6.17.9-1/ubuntu-unity-24.04-6.17.9-t2-noble.iso.02"
73 | ]
74 | },
75 | {
76 | "name": "Ubuntu Unity 25.10 - Questing Quokka",
77 | "iso": [
78 | "https://github.com/t2linux/T2-Ubuntu/releases/download/v6.16.6-1/ubuntu-unity-25.10-6.16.6-t2-questing.iso.00",
79 | "https://github.com/t2linux/T2-Ubuntu/releases/download/v6.16.6-1/ubuntu-unity-25.10-6.16.6-t2-questing.iso.01",
80 | "https://github.com/t2linux/T2-Ubuntu/releases/download/v6.16.6-1/ubuntu-unity-25.10-6.16.6-t2-questing.iso.02"
81 | ]
82 | },
83 | {
84 | "name": "Linux Mint - Cinnamon",
85 | "iso": [
86 | "https://github.com/t2linux/T2-Mint/releases/download/v6.17.8-1/linuxmint-22.2-cinnamon-6.17.8-t2-jammy.iso.00",
87 | "https://github.com/t2linux/T2-Mint/releases/download/v6.17.8-1/linuxmint-22.2-cinnamon-6.17.8-t2-jammy.iso.01"
88 | ]
89 | },
90 | {
91 | "name": "Linux Mint - Mate",
92 | "iso": [
93 | "https://github.com/t2linux/T2-Mint/releases/download/v6.17.8-1/linuxmint-22.2-mate-6.17.8-t2-jammy.iso.00",
94 | "https://github.com/t2linux/T2-Mint/releases/download/v6.17.8-1/linuxmint-22.2-mate-6.17.8-t2-jammy.iso.01"
95 | ]
96 | },
97 | {
98 | "name": "Linux Mint - XFCE",
99 | "iso": [
100 | "https://github.com/t2linux/T2-Mint/releases/download/v6.17.8-1/linuxmint-22.2-xfce-6.17.8-t2-jammy.iso.00",
101 | "https://github.com/t2linux/T2-Mint/releases/download/v6.17.8-1/linuxmint-22.2-xfce-6.17.8-t2-jammy.iso.01"
102 | ]
103 | },
104 | {
105 | "name": "NixOS Gnome",
106 | "iso": [
107 | "https://github.com/t2linux/nixos-t2-iso/releases/download/v6.10.3-2/nixos-t2-iso-gnome.iso.part-00",
108 | "https://github.com/t2linux/nixos-t2-iso/releases/download/v6.10.3-2/nixos-t2-iso-gnome.iso.part-01"
109 | ]
110 | },
111 | {
112 | "name": "NixOS Minimal",
113 | "iso": [
114 | "https://github.com/t2linux/nixos-t2-iso/releases/download/v6.10.3-2/nixos-t2-iso-minimal.iso"
115 | ]
116 | }
117 | ]
118 | }
--------------------------------------------------------------------------------
/docs/distributions/debian/installation.md:
--------------------------------------------------------------------------------
1 | # Introduction
2 |
3 | This guide shall help you in installing a Debian or Ubuntu based Linux distro, which is not available as a modified ISO with T2 support.
4 |
5 | Some popular distros include:
6 |
7 | 1. [Pop!_OS](https://pop.system76.com/)
8 | 2. [elementary OS](https://elementary.io/)
9 | 3. [Debian](https://www.debian.org/)
10 | 4. [Zorin OS](https://zorin.com/)
11 |
12 | # Hardware Requirements
13 |
14 | * USB-C to USB adapter
15 | * Wired internet connection (Ethernet/USB tethering) or Wi-Fi adapter compatible with Linux
16 | * External keyboard and mouse
17 |
18 | # Install Procedure
19 |
20 | !!! Warning "Installation fails when installing the bootloader (Eg: GRUB)"
21 | It is possible that during installation, when the installer is installing the bootloader (GRUB in most cases), the installation may fail. This is because the distro's ISO is using an old Linux kernel which doesn't support writing to the NVRAM of T2 Macs. In such a case, boot into the ISO again. When the initial menu gets displayed having options to try/install the distro, press "e" on the option you otherwise would have chosen to install. This will open the command line. Add `efi=noruntime` to the command line and press "F10" to boot. This should fix the issue.
22 |
23 | !!! Warning "Pop!_OS"
24 | Due to a bug in Pop!_OS installer, the partition sizes shown are incorrect during manual partitioning step. As a workaround, you may follow the instructions given in this [GitHub issue](https://github.com/elementary/installer/issues/620#issuecomment-1456149153) in the live ISO environment to fix the installer and then start the installation.
25 |
26 | 1. Follow the [Pre-installation](https://wiki.t2linux.org/guides/preinstall) steps to prepare your Mac for installation.
27 | 2. Boot into the Live ISO. You should now be in the GRUB boot menu. Select the option which is relevant to you.
28 | 3. Start the installer and install it like normal until you get an option to manually specify partitions.
29 | 4. Find the partition you made for Linux when you were following the Pre-installation steps. MAKE SURE TO SELECT THE RIGHT PARTITION OR ELSE YOUR DATA WILL BE LOST. Delete it to make free space. You'll need to make these partitions:
30 |
31 | 1. If you want, you can make separate partitions for **swap**, `/home`, `/boot` etc as you do in a normal PC.
32 |
33 | 2. The partition to be made compulsorily is the one mounted at `/` and formatted to **ext4** or **btrfs**.
34 |
35 | 3. If the installer used by your distro is `ubiquity`, which is the one used in Ubuntu, Linux Mint etc., then you can leave EFI Boot alone. If you are using a [separate EFI partition](https://wiki.t2linux.org/guides/windows/#using-seperate-efi-partitions), then you shall have to separate it out after installation by following [this guide](https://wiki.t2linux.org/guides/windows/#seperate-the-efi-partition-after-linux-is-installed).
36 |
37 | For other installers, you need to mount `nvme0n1p1`, or your [separate EFI partition](https://wiki.t2linux.org/guides/windows/#using-seperate-efi-partitions) (whatever case applies to you) at `/boot/efi`. If the installer supports the "boot" flag, set it as well for your EFI partition.
38 |
39 | 5. Continue the rest of the setup.
40 | 6. Once it's finished, you can reboot without your installation media. Hold down Option (⌥) while booting, then select EFI Boot and press enter.
41 |
42 | # Adding T2 support
43 |
44 | After installation, we need to install a kernel having patches to support the T2 Macs for the internal keyboard, trackpad, touchbar, audio, Wi-Fi etc. to work. In order to do so:
45 |
46 | 1. Boot into your new installation.
47 |
48 | 2. Connect to the internet using Ethernet/USB tethering/external Wi-Fi adapter.
49 |
50 | 3. Add the **t2-ubuntu-repo** apt repo by following the instructions given [here](https://github.com/AdityaGarg8/t2-ubuntu-repo?tab=readme-ov-file#apt-repository-for-t2-macs).
51 |
52 | 4. Now install the T2 kernel and audio configuration files by running:
53 |
54 | ```bash
55 | sudo apt install linux-t2 apple-t2-audio-config
56 | ```
57 |
58 | **Note:** If your distro is using PulseAudio by default, consider switching to PipeWire as mentioned in the [audio guide](https://wiki.t2linux.org/guides/audio-config/#audio-configuration-files).
59 |
60 | 5. Follow the [Wi-Fi guide](https://wiki.t2linux.org/guides/wifi-bluetooth/) to get internal Wi-Fi working.
61 |
62 | 6. If your Mac has a Touch Bar, and you want to configure the buttons instead of the default config, install `tiny-dfr` by running:
63 |
64 | ```bash
65 | sudo apt install tiny-dfr
66 | ```
67 |
68 | **Note:** Make sure you restart your Mac after installing `tiny-dfr`. In order to make changes to the config for `tiny-dfr`, copy `/usr/share/tiny-dfr/config.toml` to `/etc/tiny-dfr/config.toml` and edit `/etc/tiny-dfr/config.toml` by following the instructions given in that file.
69 |
70 | 7. Lastly, add `intel_iommu=on iommu=pt pcie_ports=native` kernel parameters using your Bootloader.
71 |
72 | # Basic set up
73 |
74 | After installing the new kernel, follow the [Basic setup](https://wiki.t2linux.org/guides/postinstall/) guide. You shall mainly have to follow the [Add necessary kernel parameters](https://wiki.t2linux.org/guides/postinstall/#add-necessary-kernel-paramaters) and [Make modules load on boot](https://wiki.t2linux.org/guides/postinstall/#make-modules-load-on-boot) sections. If using disk encryption (LUKS), then follow the [Make modules load on early boot](https://wiki.t2linux.org/guides/postinstall/#make-modules-load-on-early-boot) section as well. Rest have been set up automatically by the kernel upgrade script.
75 |
--------------------------------------------------------------------------------
/docs/index.md:
--------------------------------------------------------------------------------
1 | # Introduction
2 |
3 | Welcome to the t2linux wiki!
4 |
5 | This wiki contains knowledge about running Linux on Macs with the T2 chip.
6 | A list of those devices can be found [on Apple's website](https://support.apple.com/en-us/HT208862).
7 |
8 | # Getting started
9 |
10 | To get started with an installation, refer to the [roadmap](https://wiki.t2linux.org/roadmap).
11 |
12 | # Contact us
13 |
14 | You may contact us on the [Linux on T2 Macs (2018+) Discord Server](https://discord.com/invite/68MRhQu), where you can find most of the people involved.
15 |
16 | # Contribute
17 |
18 | Visit the [Contribute page](https://wiki.t2linux.org/contribute/) for more details.
19 |
20 | # Notable Resources
21 |
22 | ## Distributions
23 |
24 | Different distributions are maintained by different people in their own repositories.
25 | If the distribution you want to use has a guide [here](https://wiki.t2linux.org/distributions/overview/), it's recommended to follow it instead of the instructions given in one of the repositories or otherwise official documentation by distribution vendor, as it considers T2 support.
26 |
27 | - Arch
28 | - EndeavourOS
29 | - Fedora
30 | - Ubuntu & Kubuntu
31 | - Linux Mint
32 | - NixOS
33 |
34 | ## Kernel Modules
35 |
36 | Support for hardware is cross distro besides patches to the distribution specific kernel.
37 | The following repos contain kernel modules for said support:
38 |
39 | - MacBook Bridge / T2 Linux Driver [https://github.com/t2linux/apple-bce-drv](https://github.com/t2linux/apple-bce-drv)
40 | - Touchbar and Ambient Light [https://github.com/t2linux/apple-ib-drv](https://github.com/t2linux/apple-ib-drv) (Upstreamed in kernel 6.15)
41 |
42 | Instead of installing these modules manually, it is suggested to follow the [distro specific guides](https://wiki.t2linux.org/distributions/overview/) since they are pre-installed in our distro specific ISOs.
43 |
44 | ## Guides and similar
45 |
46 | !!! Warning "The following guides are third party"
47 | These guides/configurations aren't supported by t2linux maintainers. Use at your own risk. If you are using one of the distributions listed above, you should follow their install guides rather than the ones listed under this section. However, they might still be important to gain a better general picture or to help with specific issues.
48 |
49 | - List of Mac Model Identifiers on [everymac.com](https://everymac.com/systems/by_capability/mac-specs-by-machine-model-machine-id.html)
50 | - Using Luks with the integrated keyboard [https://github.com/DimitriDokuchaev/GrubLuksUnlock](https://github.com/DimitriDokuchaev/GrubLuksUnlock)
51 | - Adding macOS-like screenshot shortcuts to KDE Plasma [https://gist.github.com/networkException/5a68299accc1872749c86301c1449690](https://gist.github.com/networkException/5a68299accc1872749c86301c1449690)
52 | - Disable thermal throttling (better performance but higher temperatures) [https://github.com/yyearth/turnoff-BD-PROCHOT](https://github.com/yyearth/turnoff-BD-PROCHOT)
53 | - Install a distribution in a virtual machine and copy it to bare metal afterwards [https://gist.github.com/Redecorating/c876a4c3b24e47d79c1f921495f62213](https://gist.github.com/Redecorating/c876a4c3b24e47d79c1f921495f62213) (using Pop!_OS as an example)
54 | - Get SMART information of your Apple Internal SSD using Linux [https://gist.github.com/AdityaGarg8/b03e57826213019fbffa747e1c724cac](https://gist.github.com/AdityaGarg8/b03e57826213019fbffa747e1c724cac)
55 | - Keyboard related issues [https://wiki.archlinux.org/title/Apple_Keyboard](https://wiki.archlinux.org/title/Apple_Keyboard)
56 | - Get silent boot experience similar to macOS and Windows on [Ubuntu](https://gist.github.com/AdityaGarg8/a39063f0d8c39572f03f55cbe02f9beb) and [Arch Linux](https://wiki.archlinux.org/title/silent_boot).
57 |
58 | ### Trackpad tuning
59 |
60 | - Wayland
61 | - libinput tuning is typically applied by distribution maintainers rather than end users. You can test changes on your own, see [debugging touchpad pressure](https://wayland.freedesktop.org/libinput/doc/latest/touchpad-pressure-debugging.html) and [palm detection](https://wayland.freedesktop.org/libinput/doc/latest/palm-detection.html) guides. If you get a configuration that works well, please notify the t2linux maintainers.
62 | - Xorg **(deprecated, use Wayland instead if possible)**
63 | - Implement macOS-like Keyboard and trackpad experience on Gnome Xorg. Read the top comments of each file in the links given below to understand requirements, additional tools and usage.
64 | - [Synaptics Config](https://gist.github.com/smileBeda/f0452f0d7f1f6d8aa772603411f7876f) (for general trackpad behaviour using Synaptics)
65 | - [Fusuma Config](https://gist.github.com/smileBeda/74a52fe7cb0901da9e67ae4e39966982) (for additional gestures commands using Fusuma)
66 |
67 | ### Outdated
68 |
69 | - State of Linux on the MacBook Pro (technical documentation) [https://github.com/Dunedan/mbp-2016-linux](https://github.com/Dunedan/mbp-2016-linux)
70 | - Arch on 2018 MacBook Pro [https://gist.github.com/TRPB/437f663b545d23cc8a2073253c774be3](https://gist.github.com/TRPB/437f663b545d23cc8a2073253c774be3)
71 | - Ubuntu on 16 inch, 2019 MacBook Pro [https://gist.github.com/gbrow004/096f845c8fe8d03ef9009fbb87b781a4](https://gist.github.com/gbrow004/096f845c8fe8d03ef9009fbb87b781a4)
72 |
73 | # Notable Contributors
74 |
75 | Check out the list of all Notable Contributors [here](https://wiki.t2linux.org/notable-contributors).
76 |
--------------------------------------------------------------------------------
/docs/guides/kernel.md:
--------------------------------------------------------------------------------
1 | # Kernel
2 |
3 | This page explains how to compile a Linux kernel with patches for T2 hardware support and with apple-bce + apple-ibridge included. If you have issues, make sure you are running the commands here with `bash`.
4 |
5 | If your distro is not one of the distros with documentation on this Wiki, you may not need to compile a kernel yourself to get support for T2 hardware. Debian based systems can use the same kernel as described in the Ubuntu section, Arch based systems can use the same kernel as described in the Arch section, etc.
6 |
7 | ## Requirements
8 |
9 | - You will need some packages to build the kernel:
10 |
11 | - Arch based systems: `sudo pacman --needed -S bc kmod libelf pahole cpio perl tar xz git`
12 | - Debian based systems: `sudo apt install autoconf bc bison build-essential cpio curl debhelper dkms dwarves fakeroot flex gawk git kernel-wedge libcap-dev libelf-dev libiberty-dev libncurses-dev libpci-dev libssl-dev libudev-dev openssl python3 rsync wget xz-utils zstd`
13 | - For other distros you will need the equivalent of these, but if you miss something you'll most likely get an error saying what's missing, and you can then install it and re-run `make` to continue where you left off.
14 |
15 | - You will need about 20GB of disk space to compile the kernel. If you have a large amount of ram, you could use tmpfs to store build files in ram.
16 |
17 | ## Building kernel
18 |
19 | ### Getting kernel source and applying patches
20 |
21 | !!! Hint
22 | The kernel source will be downloaded with HTTP**S**, but if you would like to be extra careful and verify the kernel source code with `gpg`, please refer to [this page](https://kernel.org/signature.html#using-gnupg-to-verify-kernel-signature).
23 |
24 | ```bash
25 | mkdir build && cd build
26 | git clone --depth=1 https://github.com/t2linux/linux-t2-patches patches
27 |
28 | pkgver=$(curl -sL https://github.com/t2linux/T2-Ubuntu-Kernel/releases/latest/ | grep "Release" | awk -F " " '{print $2}' | cut -d "v" -f 2 | cut -d "-" -f 1)
29 | _srcname=linux-${pkgver}
30 | wget https://www.kernel.org/pub/linux/kernel/v${pkgver//.*}.x/linux-${pkgver}.tar.xz
31 | tar xf $_srcname.tar.xz
32 | cd $_srcname
33 |
34 | for patch in ../patches/*.patch; do
35 | patch -Np1 < $patch
36 | done
37 | ```
38 |
39 | ### Setting kernel configuration
40 |
41 | !!! Info "Using config from lower kernel versions"
42 | We will use the config of the kernel that is currently running. If your running kernel is an older longterm/stable kernel, it's possible that some of the default choices for new options added to the kernel might not be what you want. You can replace `make olddefconfig` in the code block below with `make oldconfig` if you want to manually set new options. You can always later use `make menuconfig` to change kernel config options if you have issues.
43 |
44 | Extract the current kernel configuration:
45 |
46 | 1. For **Arch Linux and its derivatives**, run:
47 |
48 | ```bash
49 | zcat /proc/config.gz > .config
50 | ```
51 |
52 | 2. For **Debian and Ubuntu**, run:
53 |
54 | ```bash
55 | cp /boot/config-$(uname -r) ./.config
56 | ```
57 |
58 | Then add T2 drivers by running:
59 |
60 | ```bash
61 | make olddefconfig
62 | scripts/config --module CONFIG_BT_HCIBCM4377
63 | scripts/config --module CONFIG_HID_APPLETB_BL
64 | scripts/config --module CONFIG_HID_APPLETB_KBD
65 | scripts/config --module CONFIG_DRM_APPLETBDRM
66 | scripts/config --module CONFIG_APPLE_BCE
67 | scripts/config --module CONFIG_APFS_FS
68 | ```
69 |
70 | ### Building
71 |
72 | This may take 2-3 hours to build depending on your CPU and the kernel config.
73 |
74 | !!! Info "Incremental builds"
75 | If you `control-c` to stop the build process, you may continue where you left off by running `make` again. If you build the kernel, and realise you want to make more changes to the code or config, re-running `make` will only rebuild bits that you changed.
76 |
77 | ```bash
78 | make -j$(nproc)
79 | ```
80 |
81 | ## Installing
82 |
83 | ```bash
84 | export MAKEFLAGS=-j$(nproc)
85 |
86 | sudo make modules_install
87 | sudo make install
88 | ```
89 |
90 | If `sudo make install` said "Cannot find LILO.", that's fine.
91 |
92 | Look at the output from `sudo make install`. If it mentioned creating an initramfs or an initrd, a script provided by your distro has done the next step for you. The same goes for if it mentions updating grub or systemd-boot or bootloader config. This distro script would be at `/sbin/updatekernel`.
93 |
94 | ### Initramfs/Initrd
95 |
96 | Next we must create an initramfs/initrd (Initial RAM Filesystem / Initial RAM Disk). As mentioned in the previous step, this may have been automatically done for you.
97 |
98 | For most arch based systems:
99 |
100 | ```bash
101 | sudo mkinitcpio -k /boot/vmlinuz -c /etc/mkinitcpio.conf -g /boot/initramfs.img
102 | ```
103 |
104 | For other distros, refer to your distro's documentation if this wasn't done by `make install` earlier.
105 |
106 | ### Adding new kernel to bootloader config
107 |
108 | Again, `sudo make install` may have done this for you.
109 |
110 | #### Grub
111 |
112 | 1. Edit `/etc/default/grub` and set `GRUB_TIMEOUT=3` (You can pick a different amount of seconds), and `GRUB_TIMEOUT_STYLE=menu`
113 | 2. `sudo grub-mkconfig -o /boot/grub/grub.cfg`
114 |
115 | #### Systemd-boot
116 |
117 | 1. Make a copy of any `.conf` file in `/boot/loader/entries/` and name it something like `linux.conf`
118 | 2. Edit the file you just created and change the `linux` and `initrd` lines like this, but leave any `initrd` lines with `ucode`. Also change the title to something different.
119 |
120 | ```plain
121 | title Linux Custom
122 | linux /vmlinuz
123 | initrd /initramfs.img
124 | ```
125 |
126 | 3. Edit `/boot/loader/loader.conf` and make sure the timeout is 1 or higher, and if you want you can change the default to the name of the file you created in step 1.
127 |
128 | ## Rebooting
129 |
130 | When you reboot, you should either now have the new kernel as the default, or be able to select it with up and down arrow keys and enter. You can check `uname -r` to see the kernel version that you are currently running.
131 |
132 | !!! Hint
133 | You also can use `kexec` to start the new kernel without a full reboot which is quicker if you are rebuilding the kernel repeatedly. `sudo kexec -l /boot/vmlinuz --initrd=/boot/initramfs.img --reuse-cmdline && systemctl kexec`
134 |
--------------------------------------------------------------------------------
/docs/guides/preinstall.md:
--------------------------------------------------------------------------------
1 | # Pre install steps
2 |
3 | These steps are common to most distros. Please refer to both this page and this wiki's install page for your distro.
4 |
5 | ## Partition with Disk Utility
6 |
7 | In macOS Disk Utility you need to create your Linux partition:
8 |
9 | 1. Open Disk Utility
10 | 2. Choose the volume you want to partition for Linux
11 | 3. Press in the top-right "Partition"
12 | 4. Under the blue pie chart press "+" button
13 | 5. When prompted be sure to select **"Add Partition"** and **NOT "Volume"**, you want a partition.
14 | 6. **Name:** choose a name for the partition, e.g. Linux
15 | 7. **Format:** choose whatever format there is - exFAT or another - it doesn't really matter (during the Linux installation you must erase your created partition anyway). Although its best to avoid APFS just because it may confuse you while differentiating between macOS and Linux partition while installing Linux.
16 | 8. **Size:** pick the **desired amount of space** for Linux, because you will **not be able** to change it.
17 | 9. If you want separate partitions for `/home`, `/boot` etc., create them as well (if you are a beginner and you don't understand this point, you may just skip it).
18 |
19 | !!! Note "Triple booting with Linux and Windows"
20 | Refer to [this guide](https://wiki.t2linux.org/guides/windows/) to make sure you will be able to boot both Windows and Linux.
21 |
22 | ## Create Linux installation USB
23 |
24 | ### Selecting an ISO
25 |
26 | Listed below are the currently available installer ISOs for download:
27 |
28 | | Linux Distribution | Download ISO with T2 support |
29 | | ----------------------- | ---------------------------- |
30 | | Arch Linux | |
31 | | CachyOS | |
32 | | EndeavourOS | |
33 | | Fedora | |
34 | | Gentoo | Please refer to this [page](https://wiki.t2linux.org/distributions/gentoo/installation/) |
35 | | NixOS | |
36 | | Ubuntu & its flavours | |
37 | | Linux Mint | |
38 |
39 | #### Other distributions
40 |
41 | If you are a beginner we **highly recommend** to choose one of the distros above.
42 |
43 | In case you wish to proceed manually, you can download the official ISO from the distro website, but you will have to use an external USB keyboard and mouse for the install process. Additionally, you may require a wired internet connection with a USB adapter. Note that if you later have issues with installing the bootloader (e.g.: GRUB), try booting the ISO with the `efi=noruntime` kernel parameter.
44 |
45 | Please, refer to this guide: [Basic setup](https://wiki.t2linux.org/guides/postinstall/).
46 |
47 | You can also find detailed info for unsupported debian-based distros [here](https://wiki.t2linux.org/distributions/debian/installation/).
48 |
49 | ### Copying the ISO to the USB
50 |
51 | User-friendly applications for copying the Linux install image to your USB include:
52 |
53 | - [USBImager](https://gitlab.com/bztsrc/usbimager/)
54 | - [balenaEtcher](https://www.balena.io/etcher/) (does collect analytics data)
55 |
56 | Or you can use `dd` in macOS Terminal:
57 |
58 | 1. Insert your USB drive.
59 | 2. Open macOS Terminal.
60 | 3. Run `diskutil list` to list all the drives.
61 | 4. Look up for your USB thumb which appears as an **external, physical** drive labelled `/dev/diskX` where `X` is a single number (e.g. /dev/disk**2**).
62 | 5. Run `sudo diskutil unmountDisk /dev/diskX` to unmount the disk.
63 | 6. Run `sudo dd if=path/to/linux.iso of=/dev/rdiskX bs=1m` to start writing. To fetch the iso path easily you can just drag and drop the .iso into the Terminal.
64 | 7. Now you may press `control-T` to make it show how many KBs it has written so far.
65 |
66 | ## Disable Secure Boot
67 |
68 | Now that you have completed the first part of the Wi-Fi firmware in macOS, you can proceed with the disabling of the secure boot.
69 | Apple's Secure Boot implementation does not allow booting anything other than macOS or Windows when it is enabled (not even shim signed GRUB).
70 | We need to disable it:
71 |
72 | 1. Turn off your Mac
73 | 2. Turn it on and press and hold `Command-R` until the black screen flashes
74 | 3. Your Mac will boot in the macOS Recovery
75 | 4. Select your user and enter your password
76 | 5. Now, from the menu bar choose Utilities > Startup Security Utility
77 | 6. Enter again the password
78 | 7. Once in Startup Security Utility:
79 |
80 | - set Secure Boot to **No Security**
81 | - set Allow Boot Media to **Allow booting from external or removable media**
82 |
83 | Now you are able to boot from a Linux install ISO.
84 |
85 | !!! Note "Keeping your Mac secure while Secure Boot is off"
86 | If you are worried about the reduced security, in Startup Security Utility you can select "Turn On Firmware Password" to require entering a password to boot anything other than the default OS. Additionally, after installing Linux on the internal SSD, you will have the option to reselect "Disallow booting from external or removable media" in the Startup Security Utility.
87 |
88 | ## Booting your Linux install USB
89 |
90 | 1. Ensure the Linux Installation USB you created is plugged into your Mac.
91 | 2. Reboot while holding down the option (⌥) key, this will put you in macOS Startup Manager.
92 | 3. Select the orange EFI option with arrow keys and press return/enter on it. If there are two, try the one to the very right first (the last one).
93 | 4. The installation may start right away or you may be put into a Bootloader Menu where it may select a default option e.g. "Try or Install Ubuntu", but you can use arrow keys to select a different option. If you are unsure, check if there is any additional advice on your distro's installation page on this wiki.
94 |
95 | !!! Warning "A software update is required to use this startup disk"
96 | If you see this message when trying to boot Linux, Apple may be enforcing Secure Boot. Make sure you have [disabled Secure Boot](#disable-secure-boot). If there were two orange "EFI Boot" entries in Startup Manager, try selecting the other one. This may occur when booting Linux from a partition formatted as APFS or "macOS Extended" (also known as "hfs+"), even when Secure Boot is completely disabled.
97 |
98 | ## Follow distro specific steps
99 |
100 | !!! Warning "Automatic Partitioning"
101 | The installers of many distros provide options like "Automatic Partitioning" when installing Linux. You always have to select the option that allows "Manual Partitioning". **Do not** select "Automatic Partitioning" as it shall remove macOS as well. During manual partitioning make sure that you mount `/dev/nvme0n1p1` or your [separate EFI partition](https://wiki.t2linux.org/guides/windows/#using-seperate-efi-partitions) (whatever applies to your case) at `/boot/efi` and the partition you created for Linux at `/`. If you want separate partitions for `/home`, `/boot` etc., make sure you have created them before as well and mount them accordingly during manual partitioning.
102 |
103 | This wiki provides a set of [guides for different distributions](https://wiki.t2linux.org/distributions/overview/). If the distribution you want to use is present there, it's recommended to follow it instead of the official documentation by distribution vendor, as it considers T2 support.
104 |
--------------------------------------------------------------------------------
/docs/guides/windows.md:
--------------------------------------------------------------------------------
1 | # Introduction
2 |
3 | This page is a guide on getting Windows and Linux both installed. Secure Boot Must be disabled from macOS recovery. If you want to be able to choose from macOS, Windows, or Linux in the Startup Manager (the menu you get by holding ⌥ key), goto 'Using seperate EFI partitions'. If you just want to select between Linux and Windows in the GRUB bootloader, goto 'Using the same EFI partition'.
4 |
5 | The simplist way to triple boot is to install Windows first, and install Linux on the same EFI partition, so that the Windows option in Startup Manager will let you pick Linux or Windows. To do that, follow the first set of instructions here.
6 |
7 | # Using the same EFI partition
8 |
9 | ## If Windows is installed first
10 |
11 | 1. Install [Linux normally](https://wiki.t2linux.org/guides/preinstall/) (this is probably done for you if you are using an installer specific to T2 Macs). During installation, Put your bootloader on `/dev/nvme0n1p1`, which should be set to mount at `/boot/efi`. Once it installs the bootloader, the Windows entry in startup manager will boot Linux.
12 |
13 | 2. Fix blank screen issue that may occur when booting Windows (Credits to gbrow004 for documenting this fix on his [Gist](https://gist.github.com/gbrow004/096f845c8fe8d03ef9009fbb87b781a4#fixing-bootcampwindows)):
14 |
15 | 1. Open a terminal and type in ``sudo gdisk /dev/nvme0n1``.
16 | 2. Press `x` for expert mode
17 | 3. Press `n` to create a protective MBR
18 | 4. Press `w` to write the partition and `y` to confirm
19 | 5. If gdisk doesn't quit, press `q` to exit the command
20 |
21 | !!! info
22 | Currently, this issue has been observed only with Ubuntu. If you are not facing this issue, you can safely skip this step.
23 |
24 | 3. Enable the GRUB menu so that you'll have time to pick Windows:
25 |
26 | 1. Boot into your Linux install by selecting the Windows option in startup manager.
27 | 2. Edit `/etc/default/grub` with any preferred editior (nano/vim/) and with `sudo`. Change line `GRUB_TIMEOUT_STYLE` to `GRUB_TIMEOUT_STYLE=MENU`. If you are using `nano`, save the file by doing CTRL+X, Y, then enter.
28 | 3. We've now changed the GRUB Bootloader settings, but we now need to update GRUB to apply these changes. Type in `sudo update-grub` (For Ubuntu) or `sudo grub-mkconfig -o /boot/grub/grub.cfg` (For Arch based distros) and hit enter. After the command is done, you're finished.
29 |
30 | !!! note "Using bootloaders other than GRUB"
31 | In case you are using some other bootloader, like systemd-boot, consult the documentation for the same.
32 |
33 | 4. You should now be able to boot either Windows or Linux from the GRUB bootloader.
34 |
35 | ## If Linux is installed first
36 |
37 | 1. Make sure that your Linux partitions are not labled as `Microsoft Basic Data`, if they are, Bootcamp Assistant will think Windows is already installed. To fix this, go to Linux and do `sudo cfdisk /dev/nvme0n1` and change the type of your Linux partitions to `Linux Filesystem`.
38 | 2. Install Windows normaly with Bootcamp. Windows will replace your Linux boot option.
39 | 3. Boot into macOS.
40 | 4. `sudo diskutil mount disk0s1`
41 | 5. Go to `/Volumes/EFI/efi`
42 | 6. In this folder there will be a `Microsoft` folder, an `Apple` folder, one with your distro's name or just `GRUB`, and one called `Boot`. The `Boot` folder will have a file named `bootx64.efi`, rename this to `windows_bootx64.efi`
43 | 7. Copy the `grubx64.efi` file in your distro's folder to `/Volumes/EFI/efi/Boot/bootx64.efi`. The the Windows option in Startup Manager will now boot Linux.
44 | 8. Fix blank screen issue that may occur when booting Windows (Credits to gbrow004 for documenting this fix on his [Gist](https://gist.github.com/gbrow004/096f845c8fe8d03ef9009fbb87b781a4#fixing-bootcampwindows)).
45 |
46 | 1. In Linux, open a terminal and type in ``sudo gdisk /dev/nvme0n1``.
47 | 2. Press `x` for expert mode
48 | 3. Press `n` to create a protective MBR
49 | 4. Press `w` to write the partition and `y` to confirm
50 | 5. If gdisk doesn't quit, press `q` to exit the command
51 |
52 | 9. Enable the GRUB menu so that you'll have time to pick Windows
53 |
54 | 1. Boot into your Linux install by selecting the Windows option in startup manager.
55 | 2. Edit ``/etc/default/grub`` with any preferred editior (nano/vim/) and with sudo. Change line ``GRUB_TIMEOUT_STYLE`` to ``GRUB_TIMEOUT_STYLE=MENU``. If you are using `nano`, save the file by doing CTRL+X, Y, then enter.
56 | 3. We've now changed the GRUB Bootloader settings, but we now need to update GRUB to apply these changes. Type in ``sudo update-grub`` and hit enter. After the command is done, you're finished.
57 |
58 | 10. You should now be able to boot either Windows or Linux from the GRUB bootloader.
59 |
60 | It may be possible to skip steps 5-8 by doing the following command in macOS: `sudo sh -c "bless --mount /Volumes/EFI --setBoot --file /Volumes/EFI/efi/$(ls /Volumes/EFI/efi|grep -i -e microsoft -e boot -e apple -v)/grubx64.efi --shortform"` This might not prevent step 8 from being needed.
61 |
62 | # Using seperate EFI partitions
63 |
64 | ## Installing Linux (With or without Windows already installed)
65 |
66 | ### In macOS
67 |
68 | Create partitions with Disk Utility:
69 |
70 | - Make a 500Mb FAT32 partition, call it something like `EFI2`. Make sure you do not use `EFI` as the label.
71 | - Create your main partition(s) for Linux, make them macOS Extended/HFS+ to stop Bootcamp Installer from thinking they are Windows. These will be erased and reformatted by your installer.
72 |
73 | ### In your distro's installer
74 |
75 | If you are using an interactive installer:
76 |
77 | 1. Set the `EFI2` partition to be mounted at `/boot/efi` and set it as "ESP"/"Boot"/"EFI System Partition". Don't use the partition labeled `EFI` located at `/dev/nvme0n1p1`, to avoid breaking the Windows bootloader stored there. Ensure that `/dev/nvme0n1p1` wasn't set by default to be used as the "EFI System Partition".
78 |
79 | !!! info "Ubuntu"
80 | On Ubuntu since the installer doesn't support seperate EFI partitions, install normally to the Windows EFI partition and follow [this section](https://wiki.t2linux.org/guides/windows/#seperate-the-efi-partition-after-linux-is-installed) to seperate out the partition.
81 |
82 | 2. Your main partition that were formatted as macOS Extended/HFS+ can be mounted at `/`.
83 |
84 | 3. If it fails to install the bootloader, open a terminal:
85 |
86 | 1. Use `lsblk` or `mount` to find where your install's root partition is installed
87 | 2. `chroot $that_partitions_mount_point_here`
88 | 3. `grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB --no-nvram --removable`
89 |
90 | 4. There will now be an `EFI Boot` option in the macOS Startup Manager (The menu you get by holding option at boot) which will boot Linux.
91 |
92 | If you are doing it manually:
93 |
94 | 1. Format the main Linux partition(s) as ext4, btrfs, or whatever you intend to use.
95 | 2. Mount your partitions, put the `EFI2` one at `/boot/efi` within your chroot.
96 | 3. Install normally up until you install your bootloader, but don't forget to get a patched kernel and the correct dkms modules
97 | 4. Within your chroot, do `grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB --no-nvram --removable`
98 | 5. There will now be an `EFI Boot` option in the macOS Startup Manager (The menu you get by holding option at boot) which will boot Linux.
99 |
100 | ## Installing Windows when Linux is installed
101 |
102 | 1. If there are partitions labeled as `Microsoft Basic Data`, Bootcamp Assistant will think you have Windows installed. Use `sudo cfdisk /dev/nvme0n1` to change your Linux partitions to `Linux Filesystem` or whatever is appropriate.
103 | 2. If your second EFI partition is labeled as `EFI System`, you'll need to use `cfdisk` again to make it not that, as the Windows installer fails if there are two.
104 | 3. Bootcamp should install Windows normally. If you put your Linux bootloader on `/dev/nvme0n1p1`, Windows will replace it, and that's why a second EFI partition is ideal.
105 |
106 | ## Seperate the EFI partition after Linux is installed
107 |
108 | In case you have installed Linux to the same EFI partition as used by Windows, and now want to seperate it out, then:
109 |
110 | 1. Using disk utility, make a 500Mb FAT32 partition, call it something like `EFI2`. Make sure you do not use `EFI` as the label.
111 | 2. Download [this script](https://wiki.t2linux.org/tools/efi.sh).
112 | 3. Run this script using `bash /path/to/script ` in Linux. E.g.: If your seperate partition has the name `EFI2`, and script is in your Downloads folder, run `bash $HOME/Downloads/efi.sh EFI2`.
113 |
--------------------------------------------------------------------------------
/docs/guides/refind.md:
--------------------------------------------------------------------------------
1 | # Introduction
2 |
3 | This guide shall help you install the rEFInd Boot Manager in your T2 Mac in the safest possible way. Though there are various options to get rEFInd on your Mac, it is recommended to follow the instructions given below unless you know what you are doing.
4 |
5 | # Installation
6 |
7 | All steps given here have to be performed on **macOS**. You will also need to have [secure boot disabled](https://support.apple.com/en-us/HT208198).
8 |
9 | 1. With the help of disk utility, create a 100-200MB `MS-DOS FAT` partition and label it as `REFIND`.
10 |
11 | 2. Get a **binary zip file** of rEFInd from [here](https://www.rodsbooks.com/refind/getting.html).
12 |
13 | 3. The binary zip file of rEFInd shall be available in the downloads folder by the name of `refind-bin-.zip`, where `` represents the version of rEFInd you have downloaded, e.g.: if you have downloaded `0.13.2` version, it will be available as `refind-bin-0.13.2.zip`.
14 |
15 | 4. Now run the following in the terminal:
16 |
17 | ```bash
18 | IDENTIFIER=$(diskutil info REFIND | grep "Device Identifier" | cut -d: -f2 | xargs)
19 | cd ~/Downloads
20 | unzip refind-bin*
21 | rm refind-bin*.zip
22 | cd refind-bin*
23 | xattr -rd com.apple.quarantine .
24 | sed -i '' "s/sed -i 's/sed -i '' 's/g" refind-install
25 | diskutil unmount $IDENTIFIER
26 | sudo ./refind-install --usedefault /dev/$IDENTIFIER
27 | diskutil unmount $IDENTIFIER
28 | diskutil mount $IDENTIFIER
29 | sudo rmdir /tmp/refind_install
30 | rm -r ~/Downloads/refind-bin*
31 | ```
32 |
33 | 5. Now run:
34 |
35 | ```bash
36 | bless --folder /Volumes/REFIND/EFI/BOOT --label rEFInd
37 | ```
38 |
39 | This will change the label in the Mac Startup Manager for rEFInd from `EFI Boot` to `rEFInd`.
40 |
41 | # Configuration
42 |
43 | Though rEFInd has many configuration options, some basic configuration is required for a smoother experience on T2 Macs.
44 |
45 | ## Removing BIOS entries
46 |
47 | Macs with T2 chip cannot BIOS boot. So it is advised to remove the BIOS entries. For that, open finder, and then open the `REFIND` volume. Add the line given below at the end of `EFI/BOOT/refind.conf` file by editing it with a text editor.
48 |
49 | ```plain
50 | scanfor internal,external,optical,manual
51 | ```
52 |
53 | In case you face the error saying **The document “refind.conf” could not be saved.**, copy the `refind.conf` file to any place in your home directory (Downloads folder for example) and do the editing over there. After editing replace the `refind.conf` file in the `REFIND` volume with the newly edited file.
54 |
55 | ## Hiding text on booting an OS using rEFInd (Optional)
56 |
57 | In case you boot an OS other than macOS using rEFInd, it shows some debug text while booting it. In order to get a smooth boot experience similar to the Mac Startup Manager, add the following line to `EFI/BOOT/refind.conf`, just as you did to remove BIOS entries.
58 |
59 | ```plain
60 | use_graphics_for osx,linux,windows,grub
61 | ```
62 |
63 | ## Preventing use of NVRAM (Likely to have been enabled already)
64 |
65 | Preventing use of NVRAM is must as T2 doesn’t like someone to touch the NVRAM. In latest editions of rEFInd, preventing use of NVRAM is enabled by default. You may confirm this by checking presence of `use_nvram false` line somewhere in the middle of the `refind.conf` file (the one mentioned in above instructions). Make sure it is not commented (doesn’t have a `#` before the line). If it is then remove the `#`.
66 |
67 | In case the line is missing, add it at the end of `refind.conf` file.
68 |
69 | In case the line `use_nvram true` is present instead, change `true` to `false`.
70 |
71 | # Making rEFInd default at startup
72 |
73 | After correctly installing and configuring rEFInd, we need to make it boot by default on every startup. In order to do so, restart your Mac and press and hold down the **Option (Alt)** key. When the startup manager gets displayed, release the Option key. Now press and hold the **Control** key and without releasing the Control key, boot into the **rEFInd startup disk**. Now on every startup, rEFInd will get displayed by default.
74 |
75 | !!! warning
76 | This step has to be performed every time you update macOS to a newer version, as this makes the macOS startup disk as the default startup disk.
77 |
78 | # Fixing blank screen on booting macOS using rEFInd
79 |
80 | Sometimes, while booting into macOS using rEFInd, users get stuck at a blank screen. This bug is observed only if you have performed a force/unsafe shutdown by pressing and holding the power button in the previous boot. Some users have also faced it in the first macOS boot using rEFInd on new rEFInd installations. In order to fix it, turn off your Mac and restart while holding down the **Option (Alt)** key. Release the Option key when the Mac Startup Manager gets displayed. Boot into macOS using the Mac Startup Manager. This shall fix the bug for subsequent boots.
81 |
82 | # Using rEFInd as a replacement for GRUB, systemd-boot etc.
83 |
84 | By default, rEFInd boots Linux indirectly by booting GRUB, systemd-boot etc. But we can also boot linux directly by using rEFInd. This can be useful in situations where other bootloaders are causing issues. In order to do so, follow the following steps:
85 |
86 | 1. Boot into Linux using the bootloader currently in use. If the bootloader is facing issues, you may also chroot into the installation using your distro's ISO and run the commands within the chroot.
87 |
88 | 2. Get a **binary zip file** of rEFInd from [here](https://www.rodsbooks.com/refind/getting.html).
89 |
90 | 3. The binary zip file of rEFInd shall be available in the downloads folder by the name of `refind-bin-.zip`, where `` represents the version of rEFInd you have downloaded, e.g.: If you have downloaded `0.13.2` version, it will be available as `refind-bin-0.13.2.zip`.
91 |
92 | 4. Move the zip into the `/boot` folder. If you are chrooting, the move the zip into the `/boot` folder of the **chroot**.
93 |
94 | 5. Now run:
95 |
96 | ```bash
97 | cd /boot
98 | sudo unzip refind-bin*
99 | sudo rm refind-bin*.zip
100 | cd refind-bin*
101 | sudo ./mkrlconf
102 | sudo sed -i 's/"Boot to single-user mode"/#"Boot to single-user mode"/g' /boot/refind_linux.conf
103 | sudo sed -i 's/"Boot with minimal options"/#"Boot with minimal options"/g' /boot/refind_linux.conf
104 | sudo rm -r /boot/refind-bin*
105 | ```
106 |
107 | 6. A file named `refind_linux.conf` shall be made in your **/boot** folder of your installation. A sample of this is given below.
108 |
109 | ```conf
110 | "Boot with standard options" "ro root=UUID=631c326a-fb48-46ba-b4aa-6dd2033fbb5e"
111 | #"Boot to single-user mode" "ro root=UUID=631c326a-fb48-46ba-b4aa-6dd2033fbb5e single"
112 | #"Boot with minimal options" "ro root=UUID=631c326a-fb48-46ba-b4aa-6dd2033fbb5e"
113 | ```
114 |
115 | !!! note "Chroot"
116 | If you have run the in step 5 commands within a chroot, the `ro root=UUID=631c326a-fb48-46ba-b4aa-6dd2033fbb5e` shall likely to be missing. In this case, manually edit the `refind_linux.conf` file in the `/boot` folder of your **chroot** to look like the sample and replace the **UUID** (`631c326a-fb48-46ba-b4aa-6dd2033fbb5e` in the sample) with the one of the partition in which your Linux is installed. You can get the UUID from `/etc/fstab` file of your **chroot** or using a disk utility software.
117 |
118 | 7. On the line with `"Boot with standard options"`, add the `intel_iommu=on iommu=pt pcie_ports=compat quiet splash` parameters. It is possible that some parameters are already added. In such case, add only the missing parameters. If you don't want a silent boot, you may omit out the `quiet splash` parameter. Finally, the `refind_linux.conf` file should look something like this.
119 |
120 | ```conf
121 | "Boot with standard options" "ro root=UUID=631c326a-fb48-46ba-b4aa-6dd2033fbb5e intel_iommu=on iommu=pt pcie_ports=compat quiet splash"
122 | #"Boot to single-user mode" "ro root=UUID=631c326a-fb48-46ba-b4aa-6dd2033fbb5e single"
123 | #"Boot with minimal options" "ro root=UUID=631c326a-fb48-46ba-b4aa-6dd2033fbb5e"
124 | ```
125 |
126 | 8. Now, when you shall be in rEFInd, it should show an entry with the path of the image of your kernel and shall most probably have the icon of the Linux Penguin. That entry shall be the one which shall boot Linux directly using rEFInd.
127 |
128 | 9. If you want to use your distro's icon instead of Linux Penguin one, you may label the volume containing your kernel with the name of your distro. Following are some examples of commands for various filesystems, taking the distro as **Ubuntu** and partition in which kernel is in as `/dev/nvme0n1p3`.
129 |
130 | 1. ext2, ext3 or ext4:
131 |
132 | ```bash
133 | sudo tune2fs -L "Ubuntu" /dev/nvme0n1p3
134 | ```
135 |
136 | 2. btrfs:
137 |
138 | ```bash
139 | MOUNTPOINT=$(findmnt -n -o TARGET /dev/nvme0n1p3)
140 | sudo btrfs filesystem label $MOUNTPOINT "Ubuntu"
141 | ```
142 |
143 | More ways to set custom icons are described [here](https://www.rodsbooks.com/refind/configfile.html#icons).
144 |
145 | # Uninstalling rEFInd
146 |
147 | In case you wish to uninstall rEFInd, boot into **macOS** and follow the steps below:
148 |
149 | 1. Open the Disk Utility
150 | 2. Select the partition on which macOS is installed (it generally has the label `Macintosh HD` until you have renamed it manually).
151 | 3. Click on **Partition**.
152 | 4. Select the `REFIND` partition and click `-` to remove it. Your macOS partition should expand to fill the space that rEFInd was in.
153 | 5. Click on **Apply**. Disk Utility will remove the `REFIND` partition and expand your macOS partition. This may take a while, but **do not interrupt this process**.
154 | 6. Change the default startup disk to the OS you wish to be boot by default.
155 |
156 | If the OS you wish is **macOS** or **Windows**, follow [Apple's documentation](https://support.apple.com/en-in/guide/mac-help/mchlp1034/mac) where you have to follow the **Change your startup disk for every startup** section.
157 |
158 | If the OS you wish is **Linux**, follow the [Startup Manager Guide](https://wiki.t2linux.org/guides/startup-manager/#setting-linux-startup-disk-as-the-default-startup-disk).
159 |
160 | # References and External links
161 |
162 | [Reference](https://apple.stackexchange.com/questions/402289/refind-installation-wont-boot-due-to-t2-security-despite-t2-security-being-dis) - This guide has been inspired from here.
163 |
164 | [rEFInd](https://www.rodsbooks.com/refind/) - Official website of rEFInd.
165 |
166 | [Theming rEFInd](https://www.rodsbooks.com/refind/themes.html) - Useful guide to set custom themes for rEFInd.
167 |
--------------------------------------------------------------------------------
/docs/guides/postinstall.md:
--------------------------------------------------------------------------------
1 | # Introduction
2 |
3 | This page explains how to perform a basic set up after installing Linux on a T2 Mac.
4 |
5 | ## Do you need to do this?
6 |
7 | This guide is mainly relevent in the following cases :
8 |
9 | 1. If you have installed Linux using an official ISO, instead of a T2 ISO.
10 | 2. The [Make modules load on early boot](#make-modules-load-on-early-boot) section is relevant for those who wish to encrypt their disk drives using LUKS or some other similar software.
11 | 3. If some functionality related to T2 Macs is broken, then you can consider following this guide.
12 |
13 | In rest cases, you probably won't need to follow this guide.
14 |
15 | If you have used a T2 ISO, **make sure you have followed the [distro specific guide](https://wiki.t2linux.org/distributions/overview/) for your distro before continuing further.**
16 |
17 | ## Installing a kernel for T2 support
18 |
19 | Installing a kernel with support for T2 Macs is required in order to get the Keyboard, Trackpad, Touch Bar, Audio, Fan and Wi-Fi working.
20 |
21 | Many distro maintainers provide compiled kernels which can be installed on your Linux installation. Following are the links to the repos providing such kernels:
22 |
23 | | Linux Distribution | Kernel with T2 support |
24 | | -------------------- | ---------------------- |
25 | | Arch based distros | |
26 | | Fedora | |
27 | | Gentoo | |
28 | | Manjaro | |
29 | | NixOS | |
30 | | Ubuntu based distros | |
31 | | Debian based distros | |
32 | | Debian based distros | |
33 |
34 | If compiled kernels for your distro are not available, then you shall have to compile a kernel on your own. You can follow the [Kernel](https://wiki.t2linux.org/guides/kernel/) guide for help.
35 |
36 | ## Add necessary kernel paramaters
37 |
38 | Using your bootloader, add the `intel_iommu=on iommu=pt pcie_ports=compat` kernel parameters. For example in GRUB:
39 |
40 | 1. Edit `/etc/default/grub`.
41 | 2. On the line with `GRUB_CMDLINE_LINUX="quiet splash"`, add the following kernel parameters: `intel_iommu=on iommu=pt pcie_ports=compat`.
42 | 3. Run `sudo grub-mkconfig -o /boot/grub/grub.cfg` if you are on a non-debian based distro. If using Debian or Ubuntu based distro, run `sudo update-grub`.
43 |
44 | ## Make modules load on boot
45 |
46 | Simply run the following:
47 |
48 | ```sh
49 | echo apple-bce | sudo tee /etc/modules-load.d/t2.conf
50 | ```
51 |
52 | ## Make modules load on early boot
53 |
54 | Having the `apple-bce` module loaded early allows the use of the keyboard for decrypting encrypted volumes (LUKS).
55 | It also is useful when boot doesn't work, and the keyboard is required for debugging.
56 | To do this, one must ensure the `apple-bce` module *as well as its dependent modules* are included in the initial ram disk.
57 | You can get the list of dependent modules by running `modinfo -F depends apple-bce`
58 | The steps to be followed vary depending upon the initramfs module loading mechanism used by your distro. Some examples are given as follows:
59 |
60 | - On systems with `initramfs-tools` (all debian-based distros):
61 |
62 | 1. Run `sudo su` to open a shell as root.
63 |
64 | 2. Run the following over there:
65 |
66 | ```sh
67 | cat <> /etc/initramfs-tools/modules
68 | # Required modules for getting the built-in apple keyboard to work:
69 | snd
70 | snd_pcm
71 | apple-bce
72 | EOF
73 | update-initramfs -u
74 | ```
75 |
76 | - On systems with mkinitcpio (Commonly used on Arch):
77 |
78 | 1. Edit the `/etc/mkinitcpio.conf` file.
79 |
80 | 2. Ensure that the file has the following:
81 |
82 | ```sh
83 | MODULES="apple-bce"
84 | ```
85 |
86 | 3. Run `sudo mkinitcpio -P`.
87 |
88 | - On systems with `dracut` (Commonly used on EndeavourOS and Fedora):
89 |
90 | 1. Run the following to create a dracut configuration file which loads the apple-bce module on early boot:
91 |
92 | ```sh
93 | echo "force_drivers+=\" apple-bce \"" | sudo tee /etc/dracut.conf.d/t2linux-modules.conf
94 | ```
95 |
96 | 2. Run `sudo dracut --force` to regenerate the initramfs with this change.
97 |
98 | - On systems with other initramfs/initrd generation systems:
99 |
100 | In this case, refer to the documentation of the same and ensure the kernel module `apple-bce` is loaded early.
101 |
102 | ## Adding support for customisable Touch Bar
103 |
104 | By default the Touch Bar works in the same mode which Windows Bootcamp uses on Linux. If you want to customise it, you can install `tiny-dfr` on your distro.
105 |
106 | If you are using an Ubuntu or Debian based distro:
107 |
108 | 1. Add the apt repo for T2 Macs from [here](https://github.com/AdityaGarg8/t2-ubuntu-repo#apt-repository-for-t2-macs).
109 | 2. Install `tiny-dfr` by running `sudo apt install tiny-dfr`.
110 | 3. Restart your Mac.
111 |
112 | If you are using Arch Linux or EndeavourOS:
113 |
114 | 1. Install `tiny-dfr` by running `sudo pacman -Syu tiny-dfr`.
115 | 2. Restart your Mac.
116 |
117 | If you are using Fedora:
118 |
119 | 1. Install tiny-dfr with `sudo dnf install rust-tiny-dfr`.
120 | 2. Restart your mac
121 |
122 | For other distros:
123 |
124 | - Compile [`tiny-dfr`](https://github.com/AsahiLinux/tiny-dfr) yourself if your distro don't have that packaged yet.
125 |
126 | In order to make changes to the config for `tiny-dfr`, copy `/usr/share/tiny-dfr/config.toml` to `/etc/tiny-dfr/config.toml` and edit `/etc/tiny-dfr/config.toml` by following the instructions given in that file.
127 |
128 | ## Change default touchbar mode without tiny-dfr
129 |
130 | Run the following command, replacing `1` with the number corresponding to the desired touchbar mode.
131 |
132 | |Number|Default |Fn |
133 | |------|----------|---------|
134 | |0 |Escape key|Ignore |
135 | |1 |Function |Media |
136 | |2 |Media |Function |
137 |
138 | ```bash
139 | cat < hid_appletb_bl -> hid_appletb_kbd) is required to properly reinitialize the Touch Bar device after resume.
247 | - If you use tiny-dfr for Touch Bar customization, the tiny-dfr service needs to be stopped before suspend and started after resume, and appletbdrm module is required.
248 |
249 | The script below includes all cases with commented sections. Uncomment the relevant sections based on your model and requirements. The loading order of modules is important for proper device initialization after resume.
250 |
251 | 1. Create and edit this file: `/etc/elogind/system-sleep/apple-bce-handler`
252 |
253 | ```bash
254 | #!/bin/bash
255 | case $1/$2 in
256 | pre/*)
257 | # Required for all T2 models
258 | rmmod -f apple_bce
259 |
260 | # Uncomment the following if using tiny dfr for touchbar
261 | #/etc/init.d/tiny-dfr stop
262 | #modprobe -r appletbdrm
263 |
264 | # Uncomment the following for models with touchbar, irrespective of whether using tiny-dfr
265 | #modprobe -r hid_appletb_kbd
266 | #modprobe -r hid_appletb_bl
267 | ;;
268 |
269 | post/*)
270 | # Required for all T2 models
271 | sleep 4
272 | modprobe apple_bce
273 |
274 | # Uncomment the following for models with touchbar, irrespective of whether using tiny-dfr
275 | #sleep 4
276 | #modprobe hid_appletb_bl
277 | #sleep 2
278 | #modprobe hid_appletb_kbd
279 |
280 | # Uncomment the following if using tiny dfr for touchbar
281 | #sleep 2
282 | #modprobe appletbdrm
283 | #sleep 3
284 | #/etc/init.d/tiny-dfr start
285 | ;;
286 | esac
287 | ```
288 |
289 | 2. Make the script executable:
290 |
291 | ```bash
292 | chmod +x /etc/elogind/system-sleep/apple-bce-handler
293 | ```
294 |
295 | !!! note
296 | Make sure you have CONFIG_MODULE_FORCE_UNLOAD=y in the kernel config.
297 |
--------------------------------------------------------------------------------
/docs/guides/wifi-bluetooth.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | # Introduction
4 |
5 | This page is a step by step guide to get Wi-Fi and Bluetooth working on T2 Macs, as well as **iMac19,1** and **iMac19,2**, which are not T2 Macs. This guide does not apply to other Intel-based Macs.
6 |
7 | !!! Bug "Unable to connect to Wi-Fi even after entering correct password"
8 | Due to a [regression](https://lists.infradead.org/pipermail/hostap/2024-August/042893.html) since **wpa_supplicant 2.11**, Wi-Fi on broadcom chips is broken, thus affecting the T2 Macs as well. Please use [iwd](https://wiki.archlinux.org/title/NetworkManager#Using_iwd_as_the_Wi-Fi_backend) as a backend or **disable offloading** by adding `brcmfmac.feature_disable=0x82000` to your kernel parameters until the issue is resolved. Currently, only Arch Linux and EndeavourOS are affected.
9 |
10 | !!! Warning "Do not use `broadcom-wl`"
11 | We have received a lot of complaints about Wi-Fi not working, and such users have been found to be using `broadcom-wl` driver instead of the stock `brcmfmac` driver. We would like to clarify that `broadcom-wl` is NOT the driver to be used for the Macs supported by us. `brcmfmac` is the only driver that supports these Macs and it is a part of the Linux kernel.
12 |
13 | !!! Warning "Arch/EndeavourOS"
14 | If you're running Arch or EndeavourOS and have `apple-bcm-firmware` installed, you do not need to follow this guide further. The only exception here is if you are using iMac 19,1, iMac 19,2 or iMacPro1,1. If you have one of these Macs, you have to follow this guide.
15 |
16 | !!! Warning "NixOS"
17 | NixOS users please first read the [distribution specific guide on firmware](../distributions/nixos/installation.md#wi-fi-and-bluetooth-setup) before following instructions on this page.
18 |
19 | ## Setting up
20 |
21 | We now use a script which can help you set up Wi-Fi and Bluetooth. Click [here](../tools/firmware.sh) to download the script.
22 |
23 | There are 5 methods supported by this script to get firmware for Linux, named as **Method 1-5** in this guide. Details of each method are given in the [On macOS](#on-macos) and [On Linux](#on-linux) section. **You have to choose any one of the five methods to get firmware as per your choice.**
24 |
25 | **Method 1-3** require macOS installed on your Mac. The initial steps of these methods are to be followed on macOS, and later steps have to be followed on Linux. Thus, if you choose one of these methods, you first need to follow the [On macOS](#on-macos) section and then proceed to the [On Linux](#on-linux) section.
26 |
27 | **Method 4** also requires macOS, but doesn't have any step to be followed on macOS. So you can directly follow the [On Linux](#on-linux) section if you choose it.
28 |
29 | **Method 5** does not require macOS, so you can directly follow the [On Linux](#on-linux) section if you choose it.
30 |
31 | !!! Tip "macOS Removed after installing Linux"
32 | In case you have removed macOS after installing Linux, and need the firmware, **Method 5** is the only option for you.
33 |
34 | !!! Warning "iMac 19,1, iMac 19,2 and iMacPro1,1"
35 | If you are a user of **iMac 19,1**, **iMac 19,2** or **iMacPro1,1**, Method 4 and 5 will not work for your model. So, you must choose a method out of Method 1-3 only.
36 |
37 | ### On macOS
38 |
39 | Run the script on the macOS terminal. After you run the script, it will ask you to choose between 3 methods to move firmware to Linux:
40 |
41 | === ":fontawesome-brands-apple: Method 1"
42 | **Method 1: Copy the firmware to the EFI partition and run the same script on Linux to retrieve it**
43 |
44 | If you choose this method, unlike **Method 2** and **Method 3**, you need not have any specific dependency already installed on your Mac. So if you don't want to install any additional software on macOS, this method is the only option for you.
45 |
46 | In this method, the script will copy the firmware to your **EFI** partition.
47 |
48 | To retrieve the firmware from **EFI** partition in Linux, you shall have to run the same script on Linux. You have 2 options do so, described in detail in [On Linux](#on-linux) section.
49 |
50 | === ":fontawesome-brands-apple: Method 2"
51 | **Method 2: Create a tarball of the firmware and extract it to Linux**
52 |
53 | If you choose this method, the script will install the following dependencies, if missing, on macOS:
54 |
55 | 1. **python3** - Renames the firmware and creates the tarball.
56 |
57 | The script shall automatically detect if any dependency is missing, and if required, will give you the option of installing it. So you need not worry about having missing dependencies.
58 |
59 | Once the script confirms that you have the necessary dependencies installed, it shall create a tarball of the firmware by the name of `firmware.tar` in your **Downloads** folder.
60 |
61 | Now you have to extract the firmware in the tarball to Linux. The procedure has been described in detail in [On Linux](#on-linux) section.
62 |
63 | === ":fontawesome-brands-apple: Method 3"
64 | **Method 3: Create a Linux specific package which can be installed using a package manager**
65 |
66 | If you choose this method, the script will install the following dependencies, if missing, on macOS:
67 |
68 | 1. **python3** - Renames the firmware.
69 | 2. **dpkg** - Creates a package that can be installed on Linux using `apt`.
70 | 3. **rpm** - Creates a package that can be installed on Linux using `dnf`.
71 | 4. **makepkg** - Creates a package that can be installed on Linux using `pacman`.
72 | 5. **coreutils** - Additional requirement of **makepkg**.
73 |
74 | The script shall automatically detect if any dependency is missing, and if required, will give you the option of installing it. So you need not worry about having missing dependencies.
75 |
76 | Once the script confirms that you have the necessary dependencies installed, it shall create a package of the firmware which can be installed by `apt`, `dnf` or `pacman`, depending on the option you chose while running the script. The package shall be saved in your **Downloads** folder.
77 |
78 | Now you have to install the package in Linux using your package manager. The procedure has been described in detail in [On Linux](#on-linux) section.
79 |
80 | ### On Linux
81 |
82 | Once you have run the script on macOS, depending on the method you chose, the steps to be followed on Linux are described below:
83 |
84 | === ":fontawesome-brands-linux: Method 1"
85 | **Method 1: Copy the firmware to the EFI partition and run the same script on Linux to retrieve it**
86 |
87 | Now we need to retrieve the firmware from the **EFI** partition. You further have 2 options to do so:
88 |
89 | === "Option 1"
90 |
91 | In this option, you have to run the firmware script on Linux. You run it with:
92 |
93 | ```bash
94 | bash /path/to/firmware.sh
95 | ```
96 |
97 | After you run the script, you have to choose the **"Retrieve the firmware from the EFI partition"** option. After choosing that option, the script will install the firmware on Linux.
98 |
99 | !!! note
100 |
101 | Replace `/path/to/firmware.sh` with the actual path of the script. For example, if the script is in the Downloads folder in Linux, command to be run would be `bash $HOME/Downloads/firmware.sh`
102 |
103 | === "Option 2"
104 |
105 | In this option, you simply have to run the following commands in Linux:
106 |
107 | ```bash
108 | sudo mkdir -p /tmp/apple-wifi-efi
109 | sudo mount /dev/nvme0n1p1 /tmp/apple-wifi-efi
110 | bash /tmp/apple-wifi-efi/firmware.sh
111 | sudo umount /tmp/apple-wifi-efi
112 | ```
113 |
114 | After you run the above commands, you have to choose the **"Retrieve the firmware from the EFI partition"** option. After choosing that option, the script will install the firmware on Linux.
115 |
116 | This option shall be useful if you are unable to copy the script to Linux.
117 |
118 | === ":fontawesome-brands-linux: Method 2"
119 | **Method 2: Create a tarball of the firmware and extract it to Linux**
120 |
121 | Now we shall extract the tarball of the firmware which was saved in the **Downloads** folder in macOS as `firmware.tar`. In order to do so, copy `firmware.tar` to Linux and extract the firmware to `/lib/firmware/brcm` by running:
122 |
123 | ```bash
124 | sudo tar -v -xC /lib/firmware/brcm -f /path/to/firmware.tar
125 | ```
126 |
127 | !!! note
128 |
129 | Replace `/path/to/firmware.tar` with the actual path of the tarball. For example, if `firmware.tar` is copied to the Downloads folder in Linux, command to be run would be `sudo tar -v -xC /lib/firmware/brcm -f $HOME/Downloads/firmware.tar`
130 |
131 | Then reload the Wi-Fi and Bluetooth drivers by running:
132 |
133 | ```bash
134 | sudo modprobe -r brcmfmac_wcc
135 | sudo modprobe -r brcmfmac
136 | sudo modprobe brcmfmac
137 | sudo modprobe -r hci_bcm4377
138 | sudo modprobe hci_bcm4377
139 | ```
140 |
141 | === ":fontawesome-brands-linux: Method 3"
142 | **Method 3: Create a Linux specific package which can be installed using a package manager**
143 |
144 | Now we have to install the firmware package which was saved in the **Downloads** folder in macOS. Copy the package to Linux and follow the instructions below, depending on whether you use `apt`, `dnf` or `rpm`:
145 |
146 | === "apt"
147 |
148 | This package manager is found in Ubuntu, Debian and other similar distros.
149 |
150 | To install using `apt`, run:
151 |
152 | ```bash
153 | sudo apt install /path/to/firmware_package.deb
154 | ```
155 |
156 | !!! note
157 |
158 | Replace `/path/to/firmware_package.deb` with the actual path of the package. For example, if `apple-firmware_14.5-1_all.deb` was created in macOS and has been copied to the Downloads folder in Linux, command to be run would be `sudo apt install $HOME/Downloads/apple-firmware_14.5-1_all.deb`
159 |
160 | === "dnf"
161 |
162 | This package manager is found in Fedora.
163 |
164 | To install using `dnf`, run:
165 |
166 | ```bash
167 | sudo dnf install --disablerepo=* /path/to/firmware_package.rpm
168 | ```
169 |
170 | !!! note
171 |
172 | Replace `/path/to/firmware_package.rpm` with the actual path of the package. For example, if `apple-firmware-14.5-1.noarch.rpm` was created in macOS and has been copied to the Downloads folder in Linux, command to be run would be `sudo dnf install --disablerepo=* $HOME/Downloads/apple-firmware-14.5-1.noarch.rpm`
173 |
174 | === "pacman"
175 |
176 | This package manager is found in Arch Linux, EndeavourOS, Manjaro and other similar distros.
177 |
178 | To install using `pacman`, run:
179 |
180 | ```bash
181 | sudo pacman -U /path/to/firmware_package.pkg.tar.zst
182 | ```
183 |
184 | !!! note
185 |
186 | Replace `/path/to/firmware_package.pkg.tar.zst` with the actual path of the package. For example, if `apple-firmware-14.5-1-any.pkg.tar.zst` was created in macOS and has been copied to the Downloads folder in Linux, command to be run would be `sudo pacman -U $HOME/Downloads/apple-firmware-14.5-1-any.pkg.tar.zst`
187 |
188 | === ":fontawesome-brands-linux: Method 4"
189 | **Method 4: Retrieve the firmware directly from macOS**
190 |
191 | !!! warning "Internet connection may be required for **Method 4**"
192 |
193 | **Method 4** needs certain dependencies to work. If they are missing, you need to have an active internet connection on Linux to download and install them. You can use Ethernet, USB tethering or an external Wi-Fi adapter to get internet. If you are using a customised ISO made for T2 Macs, then most likely those dependencies shall be shipped alongwith the ISO, so in that case internet shall not be required.
194 |
195 | This method does not have any steps to be followed on macOS. So, you have to run the script directly on Linux. After you run the script on Linux, you have to choose the **"Retrieve the firmware directly from macOS**" option.
196 |
197 | If you choose this method, the script will install the following dependencies, if missing, on Linux:
198 |
199 | 1. **APFS driver for Linux** - Enables mounting and reading of the partition which has macOS to obtain firmware from there. The source code of the driver which shall be installed by the script is obtained from [here](https://github.com/linux-apfs/linux-apfs-rw).
200 |
201 | The script shall automatically detect if any dependency is missing, and if required, will give you the option of installing it. So you need not worry about having missing dependencies.
202 |
203 | Once the script confirms that you have the necessary dependencies installed, it shall automatically install the firmware.
204 |
205 | === ":fontawesome-brands-linux: Method 5"
206 | **Method 5: Download a macOS Recovery Image from Apple and extract the firmware from there**
207 |
208 | !!! warning "Internet connection is required for **Method 5**"
209 |
210 | **Method 5** downloads a macOS Recovery image from Apple. So you need to have an active internet connection on Linux. You can use Ethernet, USB tethering or an external Wi-Fi adapter to get internet.
211 |
212 | This method does not have any steps to be followed on macOS. So, you have to run the script directly on Linux. After you run the script on Linux, you have to choose the **"Download a macOS Recovery Image from Apple and extract the firmware from there**" option.
213 |
214 | If you choose this method, the script will install the following dependencies, if missing, on Linux:
215 |
216 | 1. **curl** - Downloads a [python script](https://github.com/kholia/OSX-KVM/blob/master/fetch-macOS-v2.py) which is used to download the macOS Recovery image from Apple. **You do not need to manually download the python script. It's link has been shared solely for the purpose of sharing the source code being used.**
217 | 2. **dmg2img** - Converts the downloaded macOS Recovery Image to a Linux readable format.
218 |
219 | The script shall automatically detect if any dependency is missing, and if required, will give you the option of installing it. So you need not worry about having missing dependencies.
220 |
221 | Once the script confirms that you have the necessary dependencies installed, it shall give you the option to choose which macOS version you wish to download. You must choose a version between **macOS Monterey and macOS Sonoma** in order to get complete firmware files. After you choose the desired macOS version, the script should do the rest of the work itself.
222 |
223 | ## Testing Firmware
224 |
225 | You can check the logs to confirm correct loading of the firmware using `sudo journalctl -k --grep=brcmfmac`, the output should look similar to this:
226 |
227 | ```log
228 | Dec 24 22:34:19 hostname kernel: usbcore: registered new interface driver brcmfmac
229 | Dec 24 22:34:19 hostname kernel: brcmfmac 0000:01:00.0: enabling device (0000 -> 0002)
230 | Dec 24 22:34:20 hostname kernel: brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4377b3-pcie for chip BCM4377/4
231 | Dec 24 22:34:20 hostname kernel: brcmfmac 0000:01:00.0: Direct firmware load for brcm/brcmfmac4377b3-pcie.apple,tahiti-SPPR-m-3.1-X0.bin failed with error -2
232 | Dec 24 22:34:20 hostname kernel: brcmfmac 0000:01:00.0: Direct firmware load for brcm/brcmfmac4377b3-pcie.apple,tahiti-SPPR-m-3.1.bin failed with error -2
233 | Dec 24 22:34:20 hostname kernel: brcmfmac 0000:01:00.0: Direct firmware load for brcm/brcmfmac4377b3-pcie.apple,tahiti-SPPR-m.bin failed with error -2
234 | Dec 24 22:34:20 hostname kernel: brcmfmac 0000:01:00.0: Direct firmware load for brcm/brcmfmac4377b3-pcie.apple,tahiti-SPPR.bin failed with error -2
235 | Dec 24 22:34:20 hostname kernel: brcmfmac 0000:01:00.0: Direct firmware load for brcm/brcmfmac4377b3-pcie.apple,tahiti-X0.bin failed with error -2
236 | Dec 24 22:34:20 hostname kernel: brcmfmac: brcmf_c_process_txcap_blob: TxCap blob found, loading
237 | Dec 24 22:34:20 hostname kernel: brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4377/4 wl0: Jul 16 2021 18:25:13 version 16.20.328.0.3.6.105 FWID 01-30be2b3a
238 | Dec 24 22:34:20 hostname kernel: brcmfmac 0000:01:00.0 wlp1s0f0: renamed from wlan0
239 | ```
240 |
--------------------------------------------------------------------------------
/docs/distributions/nixos/installation.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | # NixOS Installation Guide
5 |
6 | You will need:
7 |
8 | - A Mac device with a T2 chip
9 | - A spare USB stick or other reasonably large storage medium (>2G recommended)
10 | - Some experience with the command line
11 | - Sufficient mental energy to find and fix errors
12 |
13 | ## Installation Steps
14 |
15 | ### Preparation
16 |
17 | Follow the [Pre-Installation guide](../../guides/preinstall.md). If you intend to use Wi-Fi or Bluetooth, additional steps will need to be done. Check the [Wi-Fi pre-installation setup section](#pre-installation-steps) below for instructions, then come back.
18 |
19 | Note that you may not be able to complete some steps like [Partitioning](#partitioning) without first completing the pre-installation guide.
20 |
21 | ### Partitioning
22 |
23 | After booting to the live environment, partition the disk (usually `/dev/nvme0n1`) using `cfdisk` or other tools of your preference.
24 | If you have followed the pre-installation guide, there should be another partition created just for Linux.
25 |
26 | 1. List the current partitions, e.g. with `fdisk -l` or `lsblk`. (Under normal circumstances, you will see 3 partitions under `nvme0n1`.)
27 | 2. Make sure to NOT delete the EFI partition. That is the one with a size of `300M`. If `fdisk -l` was used to list the partitions in the previous step, this partition's `TYPE` shows `EFI System`. (Under normal circumstances that should be `nvme0n1p1`.)
28 | 3. Make sure to NOT delete the macOS partition. To identify it you should remember the size you allocated to it during the Pre-Installation steps. (Under normal circumstances that should be `nvme0n1p2`.)
29 | 4. Remove the partition that you created for Linux during the Pre-Installation steps. You can recognize it by the size you allocated for it before. (Under normal circumstances that should be `nvme0n1p3`.)
30 | 5. Allocate new partitions accordingly to your needs - there are no hard rules. See the [NixOS Installation Manual](https://nixos.org/manual/nixos/stable/#sec-installation-manual-partitioning-UEFI) for examples.
31 | 6. Format the newly provisioned partitions with `mkfs.` commands and `mkswap` a swap partition (if any).
32 | 7. Mount the partitions under `/mnt`, and create directories as necessary. Then, enable the swap partition by using `swapon`. You should finally have something that looks similar to this:
33 |
34 | ```console
35 | $ lsblk
36 | NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
37 | loop0 7:0 0 972.5M 0 loop /nix/.ro-store
38 | sda 8:0 1 14.5G 0 disk
39 | ├─sda1 8:1 1 1021M 0 part
40 | └─sda2 8:2 1 3M 0 part
41 | nvme0n1 259:0 0 465.9G 0 disk
42 | ├─nvme0n1p1 259:1 0 300M 0 part /mnt/boot # EFI partition
43 | ├─nvme0n1p2 259:2 0 83.9G 0 part # APFS/macOS partition
44 | ├─nvme0n1p3 259:3 0 1G 0 part /mnt/macos_share # optional
45 | ├─nvme0n1p4 259:4 0 8G 0 part [SWAP] # Swap Partition
46 | └─nvme0n1p5 259:5 0 372.8G 0 part /mnt # Linux Partition
47 | ```
48 |
49 | This is just an example and does not have to be done this way.
50 |
51 | !!! tip
52 | You might want to leave a little part of your disk as a FAT32 partition to be able to transfer files easily between MacOS and Linux. You would not have the chance to do so later, so do it now if needed.
53 |
54 | ### Internet Setup
55 |
56 | If you wish to use Ethernet, no additional actions should be needed apart from an adapter.
57 |
58 | If you wish to use Wi-Fi, follow the [Imperative firmware setup section](#imperative-setup) and come back.
59 |
60 | ### Configuration
61 |
62 | Before doing anything else in this section, make sure partitions are **created and mounted** to `/mnt`. Check that with tools like `lsblk` and `findmnt -R /mnt`.
63 |
64 | Generate a configuration with the following command:
65 |
66 | sudo nixos-generate-config --root /mnt
67 |
68 | This will generate `configuration.nix` and `hardware-configuration.nix`. The former contains some default settings to get you started while the latter contain filesystems mounted at `/mnt` during generation.
69 |
70 | You might want to also configure a display manager and a desktop environment. Check out available options at the [NixOS Options Search](https://search.nixos.org/options), and simply edit `configuration.nix` before installation.
71 |
72 | === "Legacy Method"
73 | Edit `/mnt/etc/nixos/configuration.nix`
74 |
75 | * Add the following snippet to the nixos config's `imports`
76 | ```nix title="configuration.nix" linenums="1" hl_lines="4"
77 | # Keep the generated configuration.nix! You need that, so just merge options here into that one.
78 | {...}: {
79 | imports = [
80 | "${builtins.fetchGit { url = "https://github.com/NixOS/nixos-hardware.git"; }}/apple/t2"
81 | ];
82 | }
83 | ```
84 |
85 | === "Flakes"
86 | Nix flakes is a new system that is designed to replace Nix channels and to improve reproducibility. It is still in an experimental stage and is locked behind a number of feature flags.
87 |
88 | Flakes support in the ISO is enabled since the v6.4.9-3 ISO. You can validate if you're using that by running `nix run nixpkgs#hello`. If it outputs "Hello, world!", you can continue without modifying commands. If it errors, you are not.
89 |
90 | To use flakes, pass `--extra-experimental-features "flakes nix-command"` to nix commands in the live environment. Legacy Nix commands with hyphens (`-`, i.e. `nixos-rebuild`, `nix-store`) in them generally do not require and won't recognize the flag.
91 |
92 | Below are the setup steps. Adapt the locations as needed.
93 |
94 | === "Template"
95 | There is a flake template which should do most of the boilerplating work for you. This will also use the [substituter](./faq.md#substituter-setup) by default.
96 |
97 | ```shell
98 | # 0. If you haven't run nixos-generate-config, do it now. See above for steps.
99 | # 1. Change directory to /mnt/etc/nixos.
100 | # This will be where you store your flake, but you can move it later.
101 | cd /mnt/etc/nixos
102 |
103 | # 2. Initialize the flake directory with the template.
104 | # Accept *both* settings if you would like to use the substituter.
105 | nix flake init -t github:soopyc/nixos-t2-flake
106 |
107 | # 3. Edit flake.nix, delete the section as specified.
108 | # Also, rename yourHostname to something else.
109 | $EDITOR flake.nix
110 |
111 | # 4. Update the flake.lock
112 | nix flake update
113 | ```
114 |
115 | === "Manual"
116 | 0. You should have run `nixos-generate-config`. If not, [do that](#configuration).
117 | * Create a new file at `/mnt/etc/nixos/flake.nix`, or use `nix flake init` while being in `/mnt/etc/nixos`
118 | * Add a flake input: `github:NixOS/nixos-hardware`
119 | * Add the apple-t2 NixOS module from `nixos-hardware` to your NixOS config.
120 | * For reasons stated above, add "flakes" and "nix-command" to nix's `experimental-features`.
121 | * Add a nixosConfigurations output, in which add a new attribute with any valid name. The common standard is to use the hostname. This will be used to activate your system.
122 | * Set the value of the attribute as a call to the lib.nixosSystem function (from the nixpkgs input) with a new attribute set, which contains the items outlined in the example below.
123 |
124 | !!! quote "Example Configuration"
125 |
126 | ```nix title="flake.nix" linenums="1"
127 | {
128 | inputs = {
129 | nixpkgs.url = "nixpkgs/nixos-unstable";
130 | nixos-hardware.url = "github:nixos/nixos-hardware";
131 | };
132 | outputs = {nixpkgs, nixos-hardware, ...}: {
133 | nixosConfigurations.replaceThisWithAnything = nixpkgs.lib.nixosSystem {
134 | system = "x86_64-linux";
135 | modules = [
136 | ./configuration.nix
137 | nixos-hardware.nixosModules.apple-t2
138 | ];
139 | };
140 | };
141 | }
142 | ```
143 |
144 | ```nix title="configuration.nix (snippet)" linenums="1"
145 | # Keep the generated configuration.nix! You need that, so just merge options here into that one.
146 | {...}: [
147 | imports = [./hardware-configuration.nix]; # this should already be present
148 | nix.settings.experimental-features = [
149 | "nix-command"
150 | "flakes"
151 | ];
152 | ]
153 | ```
154 |
155 | !!! tip
156 | You do not need to keep your flake at `/etc/nixos` if you use this approach. You may safely copy the entire `/etc/nixos` directory to your home directory with whatever name you like. Then, [re]building the system is easy as running
157 |
158 | nixos-rebuild build --flake .# # when building
159 | sudo nixos-rebuild switch --flake .# # when switching
160 |
161 | within the flake directory.
162 |
163 | It is recommended to make the flake a git repo. Do so inside the flake with `git init`.
164 |
165 | Then add a bootloader, `systemd-boot` works quite well and is recommended. `GRUB` is also available, but its usability has not been tested.
166 |
167 |
168 | === "systemd-boot"
169 | ```nix title="configuration.nix" linenums="1"
170 | {...}: {
171 | boot.loader = {
172 | efi.efiSysMountPoint = "/boot"; # make sure to change this to your EFI partition!
173 | systemd-boot.enable = true;
174 | };
175 | }
176 | ```
177 |
178 | === "GRUB"
179 | ```nix title="configuration.nix" linenums="1"
180 | {...}: {
181 | boot.loader = {
182 | efi.efiSysMountPoint = "/boot"; # make sure to change this to your EFI partition!
183 | grub = {
184 | efiInstallAsRemovable = true;
185 | efiSupport = true;
186 | device = "nodev";
187 | };
188 | };
189 | }
190 | ```
191 |
192 | If you want to use Wi-Fi and/or Bluetooth after installation, now is the time to [set up the firmware declaratively.](#declarative-setup)
193 |
194 | ### Installation
195 |
196 | === "Legacy Method"
197 | Simply run `sudo nixos-install` and hope that it works.
198 |
199 | === "Flakes"
200 | Within your flake, run `sudo nixos-install --flake .#`, where `` is the `nixosConfiguration` attribute name defined above.
201 |
202 | With the manual setup example, the command would be as thus.
203 |
204 | sudo nixos-install --flake .#replaceThisWithAnything
205 |
206 | Finally, reboot and the installation is complete! If it did not work out as expected, feel free to ask in our Discord server. Provide as much detail as possible about what's not working so less time is wasted for all participants.
207 |
208 | To change the system configuration after installation, simply edit `configuration.nix` and run `sudo nixos-rebuild switch`.
209 |
210 | If you would like to organize your configuration a little better, check out other people's configuration or read the [Nix manuals](https://nixos.org/learn).
211 |
212 | ---
213 |
214 | ## Wi-Fi and Bluetooth setup
215 |
216 | ### Pre-Installation Steps
217 |
218 | Choose a method below and carefully read the notes. Afterwards, follow the [Wi-Fi and Bluetooth Guide](../../guides/wifi-bluetooth.md#setting-up) (firmware guide) and come back.
219 |
220 | The methods outlined below corresponds to the ones listed in the guide.
221 |
222 | !!! question "What is `get-apple-firmware`?"
223 | This is the firmware script packaged as a runnable command in the ISO.
224 |
225 | For simplicity, this guide assumes you are using the latest ISO version while following the steps. If you are not in the Live environment or are not using a recent enough ISO, download the script yourself and replace every instance of `get-apple-firmware` with the location of your firmware script.
226 |
227 | === ":fontawesome-solid-check: Method 1"
228 | Method 1 requires you to run the firmware script twice, both in macOS and Linux.
229 |
230 | While this method is easier to set up than Method 2, it does not necessarily mean it is simpler to maintain.
231 |
232 | === ":fontawesome-solid-check: Method 2"
233 | This method creates a tarball with the renamed firmware files on macOS. No scripts will need to be run on Linux. This method is more robust than Method 1, but requires some manual configuration.
234 |
235 | === ":fontawesome-solid-ban: Method 3"
236 | !!! danger
237 | This method is not supported on NixOS as the distribution does not use a conventional package format. A similar setup can be done by following the [Declarative Setup](#declarative-setup) section, but you will need to follow some other method first.
238 |
239 | === ":fontawesome-solid-check: Method 4"
240 | This method obtains the firmware directly from the recovery image in the macOS partition. If you use a supported ISO version (see below), networking is not required.
241 |
242 | !!! warning
243 | If you have removed macOS, this method would not be useful to you.
244 |
245 | === ":fontawesome-solid-check: Method 5"
246 | This method is similar to Method 1, but instead of requiring macOS to be installed, the firmware files are extracted from recovery images downloaded directly from Apple. This is useful if you have removed macOS or the partition is not accessible for any reason.
247 |
248 | Note that a ~650MB recovery image will be downloaded on each invocation of this method. Make sure you are not on a metered connection before proceeding.
249 |
250 | ### Imperative Setup
251 |
252 | The imperative setup is useful for temporary situations like the installation environment.
253 |
254 | For long-term usage, imperative setups are **not recommended**. It is suggested to move to a [declarative setup](#declarative-setup) after installation or during configuration.
255 |
256 | === "Method 1"
257 | The following commands should get you up and running. Note that `/lib/firmware/brcm` must be manually created because NixOS does not come with that.
258 |
259 | ```shell
260 | sudo mkdir -p /lib/firmware/brcm
261 | sudo get-apple-firmware
262 | ```
263 |
264 | === "Method 2"
265 | 1. Copy the firmware package tarball to somewhere accessible.
266 | 2. Create the directory tree `/lib/firmware/brcm`.
267 | 3. Unpack the firmware package tarball at that specific directory.
268 | 4. Reload kernel modules to load the firmware.
269 |
270 | ```shell
271 | # Run everything here with sudo or as root.
272 | # Create the required directory tree
273 | mkdir -p /lib/firmware/brcm
274 | # Extract the firmware files
275 | tar -xf /path/to/your/firmware.tar -C /lib/firmware/brcm
276 | # Reload modules so the firmware changes take effect.
277 | modprobe -r brcmfmac_wcc; modprobe -r brcmfmac; modprobe brcmfmac; modprobe -r hci_bcm4377; modprobe hci_bcm4377
278 | ```
279 |
280 | === "Method 4"
281 | This method requires at least v6.9.3 of the ISO, or the `linux-apfs-rw` kernel module installed. It is recommended to use the latest ISO wherever possible.
282 |
283 | ??? question "How to install `linux-apfs-rw` on an existing system?"
284 | If you use the latest `nixos-hardware`, this module is already included in the patches and no further steps are needed.
285 |
286 | If you are not using the latest `nixos-hardware` revision, this package is included in nixpkgs. To make it available, modify your configuration to include the following.
287 |
288 | ```nix linenums="1" title="configuration.nix" hl_lines="2-5"
289 | {pkgs, ...}: {
290 | boot.extraModulePackages = [
291 | # change linux_6_9 to your kernel version
292 | linuxKernel.packages.linux_6_9.apfs
293 | ];
294 | }
295 | ```
296 |
297 | This method is relatively simpler than the others if you still have macOS installed.
298 |
299 | ```shell
300 | # Create the required directory tree.
301 | sudo mkdir -p /lib/firmware/brcm
302 | # Run the firmware script.
303 | sudo get-apple-firmware # pick the option "retrieve the firmware directly from macOS."
304 | ```
305 |
306 | === "Method 5"
307 | This method requires an existing Internet connection, as extra dependencies are required to run the script and to download the recovery image.
308 |
309 | ```shell
310 | # Create the required directory tree.
311 | sudo mkdir -p /lib/firmware/brcm
312 | # Run the script with required dependencies.
313 | sudo nix shell nixpkgs#{dmg2img,curl} -c get-apple-firmware
314 | # OR:
315 | # sudo nix shell nixpkgs#{dmg2img,curl} -c bash /path/to/firmware.sh
316 | ```
317 |
318 | Then run `systemctl start wpa_supplicant` and then connect to internet using `wpa_cli`. Consult documentations such as the [Arch Linux wiki](https://wiki.archlinux.org/title/Wpa_supplicant#Connecting_with_wpa_cli) for command usage.
319 |
320 | ---
321 |
322 | ### Declarative Setup
323 |
324 | The declarative setup is suitable for long-term use after you have installed NixOS.
325 |
326 | === "Method 1"
327 | First follow the steps in the [imperative setup.](#imperative-setup) The firmware files should then be located in `/lib/firmware/brcm`.
328 |
329 | Afterwards, copy `/lib/firmware` to your configuration directory.
330 |
331 | Finally add the following snippet to your configuration. Use your logic to edit the source directory.
332 |
333 | ```nix linenums="1" hl_lines="2-11" title="configuration.nix"
334 | {pkgs, ...}: {
335 | hardware.firmware = [
336 | (pkgs.stdenvNoCC.mkDerivation (final: {
337 | name = "brcm-firmware";
338 | src = ./firmware/brcm;
339 | installPhase = ''
340 | mkdir -p $out/lib/firmware/brcm
341 | cp ${final.src}/* "$out/lib/firmware/brcm"
342 | '';
343 | }))
344 | ];
345 | }
346 | ```
347 |
348 | === "Method 2"
349 | Copy the firmware tarball to your configuration directory, then add the following snippet.
350 |
351 | ```nix linenums="1" hl_lines="2-14" title="configuration.nix"
352 | {pkgs, ...}: {
353 | hardware.firmware = [
354 | (pkgs.stdenvNoCC.mkDerivation (final: {
355 | name = "brcm-firmware";
356 | src = ./firmware.tar;
357 |
358 | dontUnpack = true;
359 | installPhase = ''
360 | mkdir -p $out/lib/firmware/brcm
361 | tar -xf ${final.src} -C $out/lib/firmware/brcm
362 | '';
363 | }))
364 | ];
365 | }
366 | ```
367 |
368 | === "Method 4"
369 | The declarative setup for this method is exactly the same as in Method 1. Please first follow the above imperative setup guide, then select Method 1 and follow those instructions.
370 |
371 | === "Method 5"
372 | The declarative setup for this method is exactly the same as in Method 1. Please first follow the above imperative setup guide, then select Method 1 and follow those instructions.
373 |
374 | #### NixOS Module
375 |
376 | We are working on it, which should allow you to set up Wi-Fi and Bluetooth by just specifying a tarball.
377 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Attribution-ShareAlike 4.0 International
2 |
3 | =======================================================================
4 |
5 | Creative Commons Corporation ("Creative Commons") is not a law firm and
6 | does not provide legal services or legal advice. Distribution of
7 | Creative Commons public licenses does not create a lawyer-client or
8 | other relationship. Creative Commons makes its licenses and related
9 | information available on an "as-is" basis. Creative Commons gives no
10 | warranties regarding its licenses, any material licensed under their
11 | terms and conditions, or any related information. Creative Commons
12 | disclaims all liability for damages resulting from their use to the
13 | fullest extent possible.
14 |
15 | Using Creative Commons Public Licenses
16 |
17 | Creative Commons public licenses provide a standard set of terms and
18 | conditions that creators and other rights holders may use to share
19 | original works of authorship and other material subject to copyright
20 | and certain other rights specified in the public license below. The
21 | following considerations are for informational purposes only, are not
22 | exhaustive, and do not form part of our licenses.
23 |
24 | Considerations for licensors: Our public licenses are
25 | intended for use by those authorized to give the public
26 | permission to use material in ways otherwise restricted by
27 | copyright and certain other rights. Our licenses are
28 | irrevocable. Licensors should read and understand the terms
29 | and conditions of the license they choose before applying it.
30 | Licensors should also secure all rights necessary before
31 | applying our licenses so that the public can reuse the
32 | material as expected. Licensors should clearly mark any
33 | material not subject to the license. This includes other CC-
34 | licensed material, or material used under an exception or
35 | limitation to copyright. More considerations for licensors:
36 | wiki.creativecommons.org/Considerations_for_licensors
37 |
38 | Considerations for the public: By using one of our public
39 | licenses, a licensor grants the public permission to use the
40 | licensed material under specified terms and conditions. If
41 | the licensor's permission is not necessary for any reason--for
42 | example, because of any applicable exception or limitation to
43 | copyright--then that use is not regulated by the license. Our
44 | licenses grant only permissions under copyright and certain
45 | other rights that a licensor has authority to grant. Use of
46 | the licensed material may still be restricted for other
47 | reasons, including because others have copyright or other
48 | rights in the material. A licensor may make special requests,
49 | such as asking that all changes be marked or described.
50 | Although not required by our licenses, you are encouraged to
51 | respect those requests where reasonable. More considerations
52 | for the public:
53 | wiki.creativecommons.org/Considerations_for_licensees
54 |
55 | =======================================================================
56 |
57 | Creative Commons Attribution-ShareAlike 4.0 International Public
58 | License
59 |
60 | By exercising the Licensed Rights (defined below), You accept and agree
61 | to be bound by the terms and conditions of this Creative Commons
62 | Attribution-ShareAlike 4.0 International Public License ("Public
63 | License"). To the extent this Public License may be interpreted as a
64 | contract, You are granted the Licensed Rights in consideration of Your
65 | acceptance of these terms and conditions, and the Licensor grants You
66 | such rights in consideration of benefits the Licensor receives from
67 | making the Licensed Material available under these terms and
68 | conditions.
69 |
70 |
71 | Section 1 -- Definitions.
72 |
73 | a. Adapted Material means material subject to Copyright and Similar
74 | Rights that is derived from or based upon the Licensed Material
75 | and in which the Licensed Material is translated, altered,
76 | arranged, transformed, or otherwise modified in a manner requiring
77 | permission under the Copyright and Similar Rights held by the
78 | Licensor. For purposes of this Public License, where the Licensed
79 | Material is a musical work, performance, or sound recording,
80 | Adapted Material is always produced where the Licensed Material is
81 | synched in timed relation with a moving image.
82 |
83 | b. Adapter's License means the license You apply to Your Copyright
84 | and Similar Rights in Your contributions to Adapted Material in
85 | accordance with the terms and conditions of this Public License.
86 |
87 | c. BY-SA Compatible License means a license listed at
88 | creativecommons.org/compatiblelicenses, approved by Creative
89 | Commons as essentially the equivalent of this Public License.
90 |
91 | d. Copyright and Similar Rights means copyright and/or similar rights
92 | closely related to copyright including, without limitation,
93 | performance, broadcast, sound recording, and Sui Generis Database
94 | Rights, without regard to how the rights are labeled or
95 | categorized. For purposes of this Public License, the rights
96 | specified in Section 2(b)(1)-(2) are not Copyright and Similar
97 | Rights.
98 |
99 | e. Effective Technological Measures means those measures that, in the
100 | absence of proper authority, may not be circumvented under laws
101 | fulfilling obligations under Article 11 of the WIPO Copyright
102 | Treaty adopted on December 20, 1996, and/or similar international
103 | agreements.
104 |
105 | f. Exceptions and Limitations means fair use, fair dealing, and/or
106 | any other exception or limitation to Copyright and Similar Rights
107 | that applies to Your use of the Licensed Material.
108 |
109 | g. License Elements means the license attributes listed in the name
110 | of a Creative Commons Public License. The License Elements of this
111 | Public License are Attribution and ShareAlike.
112 |
113 | h. Licensed Material means the artistic or literary work, database,
114 | or other material to which the Licensor applied this Public
115 | License.
116 |
117 | i. Licensed Rights means the rights granted to You subject to the
118 | terms and conditions of this Public License, which are limited to
119 | all Copyright and Similar Rights that apply to Your use of the
120 | Licensed Material and that the Licensor has authority to license.
121 |
122 | j. Licensor means the individual(s) or entity(ies) granting rights
123 | under this Public License.
124 |
125 | k. Share means to provide material to the public by any means or
126 | process that requires permission under the Licensed Rights, such
127 | as reproduction, public display, public performance, distribution,
128 | dissemination, communication, or importation, and to make material
129 | available to the public including in ways that members of the
130 | public may access the material from a place and at a time
131 | individually chosen by them.
132 |
133 | l. Sui Generis Database Rights means rights other than copyright
134 | resulting from Directive 96/9/EC of the European Parliament and of
135 | the Council of 11 March 1996 on the legal protection of databases,
136 | as amended and/or succeeded, as well as other essentially
137 | equivalent rights anywhere in the world.
138 |
139 | m. You means the individual or entity exercising the Licensed Rights
140 | under this Public License. Your has a corresponding meaning.
141 |
142 |
143 | Section 2 -- Scope.
144 |
145 | a. License grant.
146 |
147 | 1. Subject to the terms and conditions of this Public License,
148 | the Licensor hereby grants You a worldwide, royalty-free,
149 | non-sublicensable, non-exclusive, irrevocable license to
150 | exercise the Licensed Rights in the Licensed Material to:
151 |
152 | a. reproduce and Share the Licensed Material, in whole or
153 | in part; and
154 |
155 | b. produce, reproduce, and Share Adapted Material.
156 |
157 | 2. Exceptions and Limitations. For the avoidance of doubt, where
158 | Exceptions and Limitations apply to Your use, this Public
159 | License does not apply, and You do not need to comply with
160 | its terms and conditions.
161 |
162 | 3. Term. The term of this Public License is specified in Section
163 | 6(a).
164 |
165 | 4. Media and formats; technical modifications allowed. The
166 | Licensor authorizes You to exercise the Licensed Rights in
167 | all media and formats whether now known or hereafter created,
168 | and to make technical modifications necessary to do so. The
169 | Licensor waives and/or agrees not to assert any right or
170 | authority to forbid You from making technical modifications
171 | necessary to exercise the Licensed Rights, including
172 | technical modifications necessary to circumvent Effective
173 | Technological Measures. For purposes of this Public License,
174 | simply making modifications authorized by this Section 2(a)
175 | (4) never produces Adapted Material.
176 |
177 | 5. Downstream recipients.
178 |
179 | a. Offer from the Licensor -- Licensed Material. Every
180 | recipient of the Licensed Material automatically
181 | receives an offer from the Licensor to exercise the
182 | Licensed Rights under the terms and conditions of this
183 | Public License.
184 |
185 | b. Additional offer from the Licensor -- Adapted Material.
186 | Every recipient of Adapted Material from You
187 | automatically receives an offer from the Licensor to
188 | exercise the Licensed Rights in the Adapted Material
189 | under the conditions of the Adapter's License You apply.
190 |
191 | c. No downstream restrictions. You may not offer or impose
192 | any additional or different terms or conditions on, or
193 | apply any Effective Technological Measures to, the
194 | Licensed Material if doing so restricts exercise of the
195 | Licensed Rights by any recipient of the Licensed
196 | Material.
197 |
198 | 6. No endorsement. Nothing in this Public License constitutes or
199 | may be construed as permission to assert or imply that You
200 | are, or that Your use of the Licensed Material is, connected
201 | with, or sponsored, endorsed, or granted official status by,
202 | the Licensor or others designated to receive attribution as
203 | provided in Section 3(a)(1)(A)(i).
204 |
205 | b. Other rights.
206 |
207 | 1. Moral rights, such as the right of integrity, are not
208 | licensed under this Public License, nor are publicity,
209 | privacy, and/or other similar personality rights; however, to
210 | the extent possible, the Licensor waives and/or agrees not to
211 | assert any such rights held by the Licensor to the limited
212 | extent necessary to allow You to exercise the Licensed
213 | Rights, but not otherwise.
214 |
215 | 2. Patent and trademark rights are not licensed under this
216 | Public License.
217 |
218 | 3. To the extent possible, the Licensor waives any right to
219 | collect royalties from You for the exercise of the Licensed
220 | Rights, whether directly or through a collecting society
221 | under any voluntary or waivable statutory or compulsory
222 | licensing scheme. In all other cases the Licensor expressly
223 | reserves any right to collect such royalties.
224 |
225 |
226 | Section 3 -- License Conditions.
227 |
228 | Your exercise of the Licensed Rights is expressly made subject to the
229 | following conditions.
230 |
231 | a. Attribution.
232 |
233 | 1. If You Share the Licensed Material (including in modified
234 | form), You must:
235 |
236 | a. retain the following if it is supplied by the Licensor
237 | with the Licensed Material:
238 |
239 | i. identification of the creator(s) of the Licensed
240 | Material and any others designated to receive
241 | attribution, in any reasonable manner requested by
242 | the Licensor (including by pseudonym if
243 | designated);
244 |
245 | ii. a copyright notice;
246 |
247 | iii. a notice that refers to this Public License;
248 |
249 | iv. a notice that refers to the disclaimer of
250 | warranties;
251 |
252 | v. a URI or hyperlink to the Licensed Material to the
253 | extent reasonably practicable;
254 |
255 | b. indicate if You modified the Licensed Material and
256 | retain an indication of any previous modifications; and
257 |
258 | c. indicate the Licensed Material is licensed under this
259 | Public License, and include the text of, or the URI or
260 | hyperlink to, this Public License.
261 |
262 | 2. You may satisfy the conditions in Section 3(a)(1) in any
263 | reasonable manner based on the medium, means, and context in
264 | which You Share the Licensed Material. For example, it may be
265 | reasonable to satisfy the conditions by providing a URI or
266 | hyperlink to a resource that includes the required
267 | information.
268 |
269 | 3. If requested by the Licensor, You must remove any of the
270 | information required by Section 3(a)(1)(A) to the extent
271 | reasonably practicable.
272 |
273 | b. ShareAlike.
274 |
275 | In addition to the conditions in Section 3(a), if You Share
276 | Adapted Material You produce, the following conditions also apply.
277 |
278 | 1. The Adapter's License You apply must be a Creative Commons
279 | license with the same License Elements, this version or
280 | later, or a BY-SA Compatible License.
281 |
282 | 2. You must include the text of, or the URI or hyperlink to, the
283 | Adapter's License You apply. You may satisfy this condition
284 | in any reasonable manner based on the medium, means, and
285 | context in which You Share Adapted Material.
286 |
287 | 3. You may not offer or impose any additional or different terms
288 | or conditions on, or apply any Effective Technological
289 | Measures to, Adapted Material that restrict exercise of the
290 | rights granted under the Adapter's License You apply.
291 |
292 |
293 | Section 4 -- Sui Generis Database Rights.
294 |
295 | Where the Licensed Rights include Sui Generis Database Rights that
296 | apply to Your use of the Licensed Material:
297 |
298 | a. for the avoidance of doubt, Section 2(a)(1) grants You the right
299 | to extract, reuse, reproduce, and Share all or a substantial
300 | portion of the contents of the database;
301 |
302 | b. if You include all or a substantial portion of the database
303 | contents in a database in which You have Sui Generis Database
304 | Rights, then the database in which You have Sui Generis Database
305 | Rights (but not its individual contents) is Adapted Material,
306 |
307 | including for purposes of Section 3(b); and
308 | c. You must comply with the conditions in Section 3(a) if You Share
309 | all or a substantial portion of the contents of the database.
310 |
311 | For the avoidance of doubt, this Section 4 supplements and does not
312 | replace Your obligations under this Public License where the Licensed
313 | Rights include other Copyright and Similar Rights.
314 |
315 |
316 | Section 5 -- Disclaimer of Warranties and Limitation of Liability.
317 |
318 | a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
319 | EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
320 | AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
321 | ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
322 | IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
323 | WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
324 | PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
325 | ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
326 | KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
327 | ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
328 |
329 | b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
330 | TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
331 | NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
332 | INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
333 | COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
334 | USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
335 | ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
336 | DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
337 | IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
338 |
339 | c. The disclaimer of warranties and limitation of liability provided
340 | above shall be interpreted in a manner that, to the extent
341 | possible, most closely approximates an absolute disclaimer and
342 | waiver of all liability.
343 |
344 |
345 | Section 6 -- Term and Termination.
346 |
347 | a. This Public License applies for the term of the Copyright and
348 | Similar Rights licensed here. However, if You fail to comply with
349 | this Public License, then Your rights under this Public License
350 | terminate automatically.
351 |
352 | b. Where Your right to use the Licensed Material has terminated under
353 | Section 6(a), it reinstates:
354 |
355 | 1. automatically as of the date the violation is cured, provided
356 | it is cured within 30 days of Your discovery of the
357 | violation; or
358 |
359 | 2. upon express reinstatement by the Licensor.
360 |
361 | For the avoidance of doubt, this Section 6(b) does not affect any
362 | right the Licensor may have to seek remedies for Your violations
363 | of this Public License.
364 |
365 | c. For the avoidance of doubt, the Licensor may also offer the
366 | Licensed Material under separate terms or conditions or stop
367 | distributing the Licensed Material at any time; however, doing so
368 | will not terminate this Public License.
369 |
370 | d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
371 | License.
372 |
373 |
374 | Section 7 -- Other Terms and Conditions.
375 |
376 | a. The Licensor shall not be bound by any additional or different
377 | terms or conditions communicated by You unless expressly agreed.
378 |
379 | b. Any arrangements, understandings, or agreements regarding the
380 | Licensed Material not stated herein are separate from and
381 | independent of the terms and conditions of this Public License.
382 |
383 |
384 | Section 8 -- Interpretation.
385 |
386 | a. For the avoidance of doubt, this Public License does not, and
387 | shall not be interpreted to, reduce, limit, restrict, or impose
388 | conditions on any use of the Licensed Material that could lawfully
389 | be made without permission under this Public License.
390 |
391 | b. To the extent possible, if any provision of this Public License is
392 | deemed unenforceable, it shall be automatically reformed to the
393 | minimum extent necessary to make it enforceable. If the provision
394 | cannot be reformed, it shall be severed from this Public License
395 | without affecting the enforceability of the remaining terms and
396 | conditions.
397 |
398 | c. No term or condition of this Public License will be waived and no
399 | failure to comply consented to unless expressly agreed to by the
400 | Licensor.
401 |
402 | d. Nothing in this Public License constitutes or may be interpreted
403 | as a limitation upon, or waiver of, any privileges and immunities
404 | that apply to the Licensor or You, including from the legal
405 | processes of any jurisdiction or authority.
406 |
407 |
408 | =======================================================================
409 |
410 | Creative Commons is not a party to its public
411 | licenses. Notwithstanding, Creative Commons may elect to apply one of
412 | its public licenses to material it publishes and in those instances
413 | will be considered the “Licensor.” The text of the Creative Commons
414 | public licenses is dedicated to the public domain under the CC0 Public
415 | Domain Dedication. Except for the limited purpose of indicating that
416 | material is shared under a Creative Commons public license or as
417 | otherwise permitted by the Creative Commons policies published at
418 | creativecommons.org/policies, Creative Commons does not authorize the
419 | use of the trademark "Creative Commons" or any other trademark or logo
420 | of Creative Commons without its prior written consent including,
421 | without limitation, in connection with any unauthorized modifications
422 | to any of its public licenses or any other arrangements,
423 | understandings, or agreements concerning use of licensed material. For
424 | the avoidance of doubt, this paragraph does not form part of the
425 | public licenses.
426 |
427 | Creative Commons may be contacted at creativecommons.org.
428 |
--------------------------------------------------------------------------------