Apple

Mac – ArchWiki

Par Maximus , le 8 juin 2019 - 26 minutes de lecture

L’installation d’Arch Linux sur un MacBook (12 "/ Air / Pro) ou un iMac est assez similaire à son installation sur n’importe quel autre ordinateur. Toutefois, en raison de la configuration matérielle spécifique d’un Mac, certaines divergences et considérations spéciales justifient Pour plus d’informations générales, consultez le Guide d’installation et UEFI, qui contient des instructions d’installation pouvant être utilisées sur tout ordinateur Apple dont le matériel est pris en charge par le noyau Linux. Reportez-vous aux pages 'connexes' (en haut). à droite de cette page) pour obtenir des conseils et des solutions de dépannage spécifiques à un modèle.

Vue d'ensemble

Plus précisément, la procédure d'installation d'Arch Linux sur un MacBook est la suivante:

  1. Mises à jour du firmware: Il est toujours utile de démarrer à partir d’une installation propre, sauvegardée et à jour de OS X.
  2. Cloison: Redimensionnement ou suppression de la partition OS X pour créer des partitions pour Arch Linux.
  3. Configuration du chargeur de démarrage: S'assurer que la nouvelle partition est amorçable.
  4. Installer Arch Linux: En train d’installer Arch Linux.
  5. Post-installation: Configuration spécifique au MacBook.

Mises à jour du firmware

Avant de procéder à l'installation d'Arch Linux, il est important de vous assurer que les dernières mises à jour de microprogramme pour votre MacBook sont installées. Cette procédure nécessite OS X.
Sous OS X, ouvrez l'App Store et recherchez les mises à jour. Si votre mac trouve et installe des mises à jour, assurez-vous de redémarrer votre ordinateur, puis vérifiez à nouveau les mises à jour pour vous assurer que vous avez tout installé.

Remarque: Si vous avez désinstallé OS X ou si vous souhaitez le réinstaller, Apple dispose d'excellentes instructions.

Il est conseillé de garder OS X installé, car les mises à jour du microprogramme des MacBook ne peuvent être installées qu’avec OS X. Toutefois, si vous envisagez de supprimer complètement OS X, effectuez des sauvegardes de ces fichiers, dont vous aurez besoin sous Linux pour ajuster le profil de couleur:

/ Bibliothèque / ColorSync / Profils / Affichages / *

Continuer vers #Partitions

Des partitions

La partition du disque de stockage ne diffère pas de tout autre PC ou ordinateur portable. Toutefois, si vous prévoyez de conserver OS X pour un double démarrage, vous devez considérer que, par défaut, le lecteur d'un MacBook est formaté à l'aide de la technologie GPT et contient au moins 3 partitions:

  • EFI: la partition système EFI d'environ 200 Mo.
  • OS X: la partition principale contenant votre installation OS X. Il est formaté avec HFS +.
  • Récupération: Une partition de récupération présente dans presque tous les MacBooks exécutant OS X 10.7 ou plus récent. Il est généralement masqué sous OS X mais peut être visualisé à l'aide d'outils de partitionnement.

La manière de partitionner dépend du nombre de systèmes d'exploitation que vous souhaitez installer. Les options suivantes seront expliquées:

Arch Linux uniquement

Cette situation est la plus facile à gérer. Le partitionnement est identique à tout autre matériel sur lequel Arch Linux peut être installé. Veuillez vous reporter au guide d'installation standard pour plus de détails.

Remarque: Il est conseillé de désactiver le son de démarrage du MacBook avant de procéder au partitionnement. Démarrez simplement dans OS X, coupez le son de votre système et redémarrez à nouveau sur le support d'installation Arch Linux. N'oubliez pas que le volume du son de démarrage ne peut être modifié de manière fiable que sous OS X.

Si vous souhaitez configurer votre système de manière à ce que le cryptage intégral du disque soit activé, veuillez consulter la page Dm-crypt / Cryptage de tout un système pour plus de détails.

Un exemple pour un partitionnement très basique, qui ne considère pas un séparé /maison partition, ni chiffrement, ni LVM, est la suivante:

étiquette du type de taille du point de montage de la partition
/ dev / sda1 / boot 200MiB vfat EFI
/ dev / sda2 / swap ajuste le swap
/ dev / sda3 / reste la racine ext4

Arch Linux avec OS X ou d'autres systèmes d'exploitation

Vous devez partitionner votre disque dur tout en conservant les partitions utilisées pour OS X / Windows. Si vous souhaitez conserver OS X, le moyen le plus simple consiste à utiliser les outils de partitionnement sous OS X, puis à utiliser les outils Arch Linux.

Attention: Si votre partition OS X est cryptée avec FileVault 2, vous doit désactiver le cryptage du disque avant de continuer. Une fois la partition OS X redimensionnée, FileVault 2 peut être réactivé.

Procédure:

  • Sous OS X, exécutez Utilitaire de disque.app (situé dans / Applications / Utilitaires)
  • Sélectionnez le lecteur à partitionner dans la colonne de gauche (pas les partitions!). Clique sur le Cloison bouton.
  • Ajoutez une nouvelle partition en appuyant sur le bouton + bouton et choisissez l’espace que vous souhaitez laisser pour OS X et celui de la nouvelle partition. Gardez à l'esprit que la nouvelle partition sera formatée dans Arch Linux, vous pourrez donc choisir le type de partition de votre choix.
  • Si ce qui précède s'est terminé avec succès, vous pouvez continuer. Sinon, vous devrez peut-être commencer par réparer vos partitions à partir de OS X.
  • Démarrez le support d’installation Arch ou LiveUSB en maintenant la touche enfoncée. Alt au démarrage. Continuez avec #Installation.

Il est possible de redimensionner la partition nouvellement créée à partir du support d'installation Arch, ou de la supprimer afin de procéder à la création d'autres partitions (par exemple, swap).

Pointe: Au lieu d'encombrer votre disque avec une partition différente, il est possible d'utiliser un fichier d'échange au lieu d'une partition dédiée. Une autre solution peut être de configurer LVM afin d’utiliser la partition nouvellement créée en tant que conteneur. Veuillez vous référer aux articles liés.

Option 1: EFI

  • Supprimer la partition que vous avez créée Utilitaire de disque.app et créez les partitions nécessaires pour Arch Linux. OS X aime voir un espace de 128 Mo après les partitions. Ainsi, lorsque vous créez la première partition après la dernière partition OS X, saisissez + 128M quand cgdisk demande le premier secteur de la partition. Plus d'informations sur la politique de partitionnement d'Apple peuvent être lues ici. Un exemple simple (pas de LVM, crypto):
Remarque:

  • La partition d'échange est facultative sur les machines disposant de 4 Go de RAM ou plus. UNE fichier d'échange peut être créé plus tard.
  • L’option de démarrage double la plus simple consiste à installer rEFInd à partir de OS X, dans son répertoire racine (par défaut pour install.sh). Ensuite, copiez le dossier du pilote depuis l’archive d’installation dans le nouvel emplacement rEFInd et décommentez les lignes. "scan_all_linux_kernels" et "also_scan_dirs" options dans refind.conf. La configuration des options de démarrage peut ensuite être effectuée à partir d’un refind_linux.conf dans Arch's /démarrage annuaire.
  • Si vous voulez pouvoir démarrer GRUB à partir du chargeur de démarrage Apple, vous pouvez créer une petite partition hfs + (pour plus de commodité, utilisez OS X pour le formater de manière appropriée. Utilitaire de disque.app ensuite). Suivez la procédure d’installation de GRUB EFI et montez votre / boot / efi répertoire de la partition hfs + que vous avez créée. Enfin, terminez à nouveau dans OS X en bénissant la partition. Ceci définira GRUB comme option de démarrage par défaut (maintenir alt au démarrage ouvre toujours l’écran des options de démarrage du Mac. Voir http://mjg59.dreamwidth.org/7468.html).,
  • La partition EFI d'OS X peut être partagée avec Arch Linux, rendant la création d'une partition EFI supplémentaire dédiée à Arch totalement optionnelle.
Remarque: Pour plus d'informations sur le partitionnement, voir Partitionnement
étiquette du type de taille du point de montage de la partition
/ dev / sda1 / boot / efi 200MiB vfat EFI
/ dev / sda2 -? hfs + OS X
/ dev / sda3 -? hfs + récupération
/ dev / sda4 - 100 Mo hfs + Boot Arch Linux à partir du chargeur d'amorçage Apple (facultatif)
/ dev / sda5 / boot Boot de démarrage 100MiB
/ dev / sda6 -? swap swap (optionnel)
/ dev / sda7 / 15-20GiB racine ext4
/ dev / sda8 / home restante ext4 maison

Option 2: compatibilité du BIOS

  • Supprimez la partition d'espace vide et partitionnez l'espace comme vous le feriez pour toute autre installation. Notez que le MBR est limité à 4 partitions principales (y compris la partition efi). Cela laisse 2 partitions primaires pour Arch. Une stratégie consiste à avoir une partition système et une partition principale et à utiliser un fichier d'échange (je n'ai pas essayé d'utiliser des partitions logiques). Une autre consiste à dédier une partition à une partition partagée (voir ci-dessous).
  • Ensuite, créez de nouveaux systèmes de fichiers sur les partitions qui en ont besoin, en particulier la partition qui contiendra /démarrage. Si vous ne savez pas comment faire cela en utilisant mkfs.ext2 (ou autre chose), cours / arch / setup et travaillez jusqu’à ce que vous arriviez à préparer le disque dur et à utiliser le "Configurer manuellement les périphériques en mode bloc …" option, puis quittez le programme d'installation. Cela est nécessaire pour que rEFIt définisse le type de partition approprié dans le MBR à l'étape suivante (sans système de fichiers existant, il semble ignorer le type de partition défini par parted), sans quoi GRUB refusera de l'installer sur la partition appropriée.
  • À ce stade, vous devez redémarrer votre ordinateur et demander à correct de corriger les tables de partition sur votre disque dur. (Si vous ne le faites pas, vous devrez peut-être réinstaller GRUB ultérieurement pour que votre Mac reconnaisse la partition Linux.) Lorsque vous êtes dans le menu reFIt, sélectionnez mettre à jour la table de partition, puis appuyez y. Redémarrer.

Triple démarrage sous OS X, Windows XP et Arch Linux

Cela ne fonctionnera peut-être pas pour tout le monde, mais il a été testé avec succès sur un MacBook depuis fin 2009.

Le moyen le plus simple de partitionner votre disque dur, afin que tous ces systèmes d'exploitation puissent coexister, consiste à utiliser l'utilitaire de disque sous OS X, à utiliser le formateur sous Windows XP, à installer XP et à terminer avec les outils Arch Linux.

Attention: Il est vivement recommandé de ne tenter cette opération qu'après une nouvelle installation d'OS X. L'utilisation de ces méthodes sur un système pré-existant peut donner des résultats non souhaités. Avant de commencer, sauvegardez au moins vos affaires avec timemachine ou clonezilla.

Procédure:

  • Sous OS X, exécutez Utilitaire de disque (situé dans / Applications / Utilitaires).
  • Sélectionnez le lecteur à partitionner dans la colonne de gauche (pas les partitions!). Clique sur le cloison onglet à droite.
  • Sélectionnez le volume à redimensionner dans le menu schéma de volume.
  • Décidez de combien d’espace vous souhaitez disposer pour votre partition OS X, de XP et de Linux. N'oubliez pas qu'une installation typique d'OS X nécessite environ 15-20 Gio et environ de XP, en fonction du nombre d'applications logicielles et de fichiers. Quelque chose comme OS X 200 Go, XP 25 Go, Arch 25 Go devrait aller.
  • Mettez vos décisions en action en appuyant sur le bouton + et en ajoutant les nouvelles partitions, étiquetez-les comme vous le souhaitez et assurez-vous que votre partition XP est la dernière sur le disque et est formatée pour FAT32. Il est probablement préférable d’archiver Arch au format HFS afin de ne pas vous embrouiller plus tard, il sera reformaté de toute façon.

Donc, en termes de Linux, vos partitions seront quelque chose comme:

  • sda (disque)
  • sda1 (partition de démarrage Mac – vous ne pouvez pas voir celui-ci dans OS X)
  • sda2 (installation de OS X sous HFS +)
  • sda3 (Arch installer temporairement dans HFS)
  • sda4 (installation de XP en FAT32)
  • Enfin, cliquez sur appliquer. Cela créera une nouvelle partition en dehors de l'espace vide.

Remarque: En utilisant cette méthode, il est possible que vous ne puissiez pas avoir une partition partagée entre OS X et Arch Linux, car le Mac n'autorisera que 4 partitions actives. Vous pourrez toutefois monter une partition HFS dans Arch pour une solution de contournement. Il existe d'autres solutions de contournement possibles également.

  • Si ce qui précède s'est terminé avec succès, vous pouvez continuer. Sinon, vous devrez peut-être commencer par réparer vos partitions à partir de OS X.
  • Vous n'aurez pas besoin de camp d'entraînement de cette façon, le programme rEFIt est beaucoup plus flexible (mais pas aussi flexible que GRUB). Téléchargez et installez rEFIt [1]
  • Allez dans un terminal sous OS X et effectuez les opérations suivantes, cela activera le gestionnaire de démarrage rEFIt.
cd / efi / refit
./enable.sh
  • Redémarrez pour vérifier que le reFIt fonctionne, il devrait apparaître au démarrage. Lorsque cela se produit, allez dans le gestionnaire de partition REFIt et acceptez les modifications.
  • Placez votre CD d’installation XP et démarrez-le avec rEFIt – Il se peut que vous deviez redémarrer plusieurs fois jusqu’à ce qu’il soit reconnu par le chargeur de démarrage. Installez XP et une fois installé, utilisez le CD d’installation d’OS X pour que vos pilotes fonctionnent correctement sous XP.
    • Remarque: lors de l’installation de XP, assurez-vous de sélectionner votre partition XP et de la reformater dans le programme d’installation de XP. Si vous ne reformatez pas, cela ne fonctionnera pas.
  • Démarrez le CD d’installation Arch, connectez-vous en tant que root et exécutez # / arch / setup.
  • Suivez l’installation normalement, mais notez que vous devrez indiquer à cet installateur d’archive de monter sda3 en tant que partition racine et de la formater en tant qu’ext3; il n’y aura ni partition / boot ni swap, ignorez donc ces avertissements.
  • À ce stade, si vous effectuez un double démarrage, vous devez redémarrer votre ordinateur et demander à correct de réparer les tables de partitions sur votre disque dur. (Si vous ne le faites pas, vous devrez peut-être réinstaller GRUB ultérieurement pour que votre Mac reconnaisse la partition Linux.) Lorsque vous êtes dans le menu reFIt, sélectionnez mettre à jour la table de partition, puis appuyez sur Y.
# redémarrer

Configuration du chargeur de démarrage

Utilisation du chargeur de démarrage Apple natif avec systemd-boot (recommandé)

Le chargeur d'amorçage EFI natif d'Apple lit .efi fichiers situés dans la partition système EFI à /EFI/BOOT/BOOTX64.EFI. Heureusement, il s'agit également de l'emplacement d'installation par défaut du binaire systemd-boot. Cela signifie que le démarrage de Linux en utilisant systemd-boot est très simple.

  • Tout d’abord, assurez-vous d’avoir monté la partition système EFI à /démarrage
  • Continuez avec #Installation normalement
  • Une fois dans l'environnement chrooté, tapez la commande suivante pour installer systemd-boot:
# bootctl --path = / boot install

La commande ci-dessus va copier le systemd-boot binaire à /boot/EFI/BOOT/BOOTX64.EFI et ajouter systemd-boot elle-même en tant qu'application EFI par défaut (entrée de démarrage par défaut) chargée par le gestionnaire de démarrage EFI.

Au prochain redémarrage, le gestionnaire de démarrage Apple, affiché lorsque vous maintenez la touche Option enfoncée lors du démarrage du MacBook, doit afficher Arch Linux (il sera affiché sous la forme suivante: Démarrage EFI comme option de démarrage possible.

Pointe: Si vous avez installé Arch Linux avec OS X, vous pourrez modifier l'emplacement de démarrage par défaut à partir des paramètres système sous OS X. Si Arch Linux n'apparaît pas comme une option de démarrage possible, vous devrez monter la partition système EFI sous OS. X avant de choisir votre option de démarrage:

$ diskutil mount disk0s1

Utilisation du chargeur de démarrage Apple natif avec GRUB

Tango-edit-clear.png "src =" http://wiki.archlinux.org/images/8/87/Tango-edit-clear.png "width =" 48 "height =" 48 "/><b>Cet article ou cette section nécessite des améliorations de la langue, de la syntaxe wiki ou du style. Voir Aide: Style pour référence.</b><img alt=

Malgré l'utilisation de UEFI, le chargeur de démarrage EFI natif du MacBook n'utilise pas la partition EFI pour le démarrage. Au lieu de cela, il recherche les fichiers .efi dans toutes les partitions des lecteurs internes et externes et les affiche comme options de démarrage possibles si certaines conditions sont remplies. Par exemple, MacBooks peut détecter une installation OSX existante après avoir vérifié que:

  • il y a une partition au format HFS +
  • la partition contient l'id de la partition af00
  • à la racine de cette partition, il y a un fichier appelé mach_kernel
  • à l'intérieur de cette partition, il y a un boot.efi déposer à l'intérieur / Système / Bibliothèque / CoreServices

Cela signifie que la configuration d'une installation Arch pour qu'elle soit automatiquement reconnue par le chargeur de démarrage du MacBook est possible. De plus, il nécessite simplement un HFS + correctement formaté /démarrage partition et ne nécessite pas d’intervention avec la partition système EFI. L'avantage de cette méthode est qu'elle peut bien coexister avec OS X et permet d'éviter d'autres chargeurs de démarrage tels que rEFInd. Cependant, cela nécessite une configuration manuelle. Les étapes suivantes expliquent comment effectuer cette configuration avec GRUB.

  • Tout d’abord, lors de la configuration d’une nouvelle installation Arch, créez un /démarrage cloison. De nombreux outils sont disponibles dans Arch ISO, par exemple cgdisk.
  • Assurez-vous que la taille de la partition est d’au moins 250 Mo au minimum, car elle sera utilisée pour stocker le noyau ainsi que tout noyau personnalisé que vous installerez ultérieurement. De plus, assurez-vous que le type de partition est défini comme Apple HFS / HFS + (il apparaîtra comme Apple HFS / HFS + dans fdisk / cgdisk ou af00 dans gdisk)
  • Étant donné que l’ISO d’installation Arch n’inclut pas le hfsprogsAUR package, nous devons l’installer dans l’environnement d’installation avant de formater la nouvelle partition en tant que HFS +
    # pacman -Sy hfsprogs
 # modprobe hfsplus
 # mkfs.hfsplus / dev / sdX -v "Arch Linux"

Remarque: remplacez / dev / sdX avec le bon appareil selon le cas

Attention:

Une fois dans l’environnement chrooté, n’oubliez pas d’installer le logiciel hfsprogsAUR package sur le système nouvellement installé ainsi. Après l’installation du paquet, régénérez initramfs lors de son chrootage.

    # mkinitcpio -p linux
  • Une fois dans l’environnement chrooté, installez le ver et efibootmgr paquets.
  • En outre, créer un mannequin mach_kernel fichier
    # touch / boot / mach_kernel
 # mkdir -p / boot / EFI / arch && touch / boot / EFI / arch / mach_kernel
  • Les étapes suivantes installent l’application GRUB UEFI pour: /boot/EFI/arch/System/Library/CoreServices/boot.efi et installer ses modules pour / boot / grub / x86_64-efi.
    # grub-install --target = x86_64-efi --efi-directory = / boot

Après cela, pensez à créer un fichier de configuration standard:

    # grub-mkconfig -o / boot/grub/grub.cfg

Comme vous pouvez le voir, la structure de répertoires du boot.efi n'est pas correct, comme le / Système / Bibliothèque / CoreServices répertoire n'est pas censé être un sous-répertoire du / boot / EFI / dossier. Pour cette raison, nous devons déplacer le boot.efi Le stub à un emplacement reconnu par le chargeur de démarrage du MacBook:

    # mv / boot / EFI / arch / System / / boot /
 # rm -r / boot / EFI /

Après cela, vous devez créer le fichier suivant

# nano /boot/System/Library/CoreServices/SystemVersion.plist

 
 
        ProductBuildVersion
        
        ProductName
        Linux
        Version de produit
        Arch Linux
 
 

Lors du prochain redémarrage, le gestionnaire de démarrage Apple, affiché lorsque vous maintenez la touche Option enfoncée lors du démarrage du MacBook, devrait afficher Arch Linux comme option de démarrage. La sélection de cette option démarrera GRUB.

Terminé! GRUB peut maintenant être sélectionné sur le chargeur de démarrage MacBook standard et vous pouvez démarrer dans votre nouvel Arch Arch Linux.

Pointe: Après l’installation, il est éventuellement possible de définir une icône personnalisée à afficher dans le chargeur de démarrage du MacBook. Pour ce faire, vous devez installer le logiciel wget, librsvg et bibliothèques paquets. Après cela, il suffit de suivre les commandes suivantes:

 $ wget -O /tmp/archlinux.svg https://www.archlinux.org/logos/archlinux-icon-crystal-64.svg
 $ rsvg-convert -w 128 -h 128 -o /tmp/archlogo.png /tmp/archlinux.svg
 $ sudo png2icns /boot/.VolumeIcon.icns /tmp/archlogo.png
 $ rm /tmp/archlogo.png
 $ rm /tmp/archlinux.svg

De toute évidence, vous pouvez remplacer le logo Arch par n'importe quelle autre icône de votre choix.

Autres méthodes

Tango-view-refresh-red.png "src =" http://wiki.archlinux.org/images/2/28/Tango-view-refresh-red.png "width =" 48 "height =" 48 "/ ><b>Cet article ou cette section est obsolète.</b><img alt=

Raison: La section qui décrit la configuration du chargeur de démarrage pour d’autres configurations doit être révisée et restructurée de manière plus lisible (discussion dans Talk: Mac #).
Pointe: rEFIt est un chargeur de démarrage populaire pour les ordinateurs à microprogramme EFI (y compris les Mac). Il peut être installé à tout moment pendant l'installation. Pour obtenir des instructions, reportez-vous à #rEFIt.

Si vous optez pour une configuration Arch uniquement Linux, l'installation du chargeur de démarrage n'est pas différente de celle d'une autre machine: Installez systemd-boot, rEFInd ou un autre chargeur de démarrage de votre choix.

Si, par contre, vous démarrez en mode dual / triple, lisez la suite.

Installer directement GRUB sur une partition EFI

Remarque: Ces instructions sont connues pour fonctionner sur un MacBook Pro (début 2011). Veuillez lire attentivement la procédure ainsi que les détails qui suivent.

Remarque: Avec un nouveau MacBook Pro (mi-2014), cette procédure n’a fonctionné qu’après l’installation du
efibootmgr paquet.

Procédure:

  • Faire un répertoire nommé efi dans /démarrage
  • Monter le déjà existante Partition EFI sur votre Mac à cette / boot / efi annuaire
  • Installer GRUB dans ce répertoire
  • Faire un répertoire nommé lieu dans / boot / grub
  • Copie grub.mo de / usr / share / locale / en @ quot / LC_MESSAGES / à / boot / grub / locale
  • Générer une configuration pour GRUB
  • Terminé! GRUB va maintenant démarrer au redémarrage et vous pouvez démarrer dans votre nouvel Arch Arch Linux.
  • N'oubliez pas de maintenir la touche ALT / Option tandis que démarrer votre ordinateur si vous souhaitez redémarrer sous OS X.

Détails (extraits des exemples GRUB EFI M5A97):

Terminez les procédures d’installation standard d’Arch en vous assurant d’installer ver et partitionnez votre disque dur de démarrage en tant que GPT.

Depuis les systèmes GRUB # UEFI:

La partition système UEFI devra être montée à / boot / efi / pour que le script d'installation GRUB le détecte:

# mkdir -p / boot / efi
# mount -t vfat / dev / sdXY / boot / efi

Où X est votre disque dur d'amorçage et Y est la partition efi que vous avez créée précédemment.

Installez l’application GRUB UEFI sur et ses modules pour / boot / grub / x86_64-efi en utilisant:

# modprobe dm-mod
# grub-install --target = x86_64-efi --efi-directory = / boot / efi --bootloader-id = arch_grub --recheck --debug
# mkdir -p / boot / grub / locale
# cp /usr/share/locale/en@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo

Générer une configuration pour GRUB

# grub-mkconfig -o / boot/grub/grub.cfg

Utiliser la bénédiction

Il est possible d’amorcer directement à partir de GRUB en mode EFI sans utiliser rEFIt par le biais de ce que l’on appelle «bénédiction» après avoir placé GRUB sur un ordinateur. partition séparée. Ces instructions sont connues pour fonctionner sur un MacBook7,1. Il est conseillé d’héberger GRUB sur une partition FAT32 ou HFS +, mais ext2 ou ext3 peut également fonctionner. La commande appleloader de GRUB ne fonctionne pas actuellement avec la version 7,1, mais un support peut être ajouté avec le correctif disponible ici.

Une fois que l’installation de GRUB est à l’emplacement souhaité, vous devez indiquer au microprogramme de démarrer à partir de cet emplacement. Cela peut être fait à partir d'une installation existante OS X ou d'un disque d'installation OS X. La commande suivante suppose que l’installation de GRUB est en cours. / efi / grub sur une partition OS X existante:

    # bless --folder / efi / grub --file /efi/grub/grub.efi

Compilation

Certains modèles peuvent nécessiter que EFI_ARCH soit défini sur i386.

    branche bzr --revision -2 bzr: //bzr.savannah.gnu.org/grub/trunk/grub grub
 cd grub
 ./autogen.sh
 patch -p1 <appleloader_macbook_7_1.patch
 exportation EFI_ARCH = x86_64
 ./configure --with-platform = efi --target = $ {EFI_ARCH} --program-prefix = ""
 faire
 cd grub-core
 ../grub-mkimage -O $ {EFI_ARCH} -efi -d. -o grub.efi -p "" part_gpt part_msdos ntfs ntfscomp hfsplus fat ext2 chaîne de démarrage normale configfile linux multiboot
 cp grub.efi * .mod * .lst votreinstallation

Installation

Remarque: Cette section est nécessaire uniquement si vous souhaitez que OS X soit installé avec Arch Linux. Sinon, suivez les étapes du guide d'installation officiel, puis passez à # Post-installation.
  • Démarrez à partir du CD d’installation Arch Linux ou à partir d’un lecteur USB amorçable créé manuellement.
Remarque:

  • Sur un MacBookPro7,1, une erreur s'est produite lors du démarrage du support d'installation Version 2012.12.01: "Impossible de gérer le déréférencement du pointeur NULL du noyau à 0000000000000010" pendant pacpi_set_dmamode. Pour résoudre ce problème, démarrez avec l'option: acpi = off. Après avoir chrooté, ajoutez MODULES = "ata_generic" dans /etc/mkinitcpio.conf et exécutez mkinitcpio -p linux, voir: Guide d'installation, 9 Configurez le système.
  • Certains utilisateurs de MacBook signalent des sorties de clavier étranges, telles que des retards prolongés et le doublage de caractères. Pour résoudre ce problème, démarrez avec les options suivantes: arch noapic irqpoll acpi = force
  • Procédez à l'installation comme décrit dans le guide d'installation sauf dans les domaines suivants:
    • Ignorez la partition à l’étape des disques, ne faites que les étapes de formatage et de montage de la partition, en prenant soin d’attribuer les partitions appropriées. Des partitions ont déjà été créées si vous avez suivi #Partitions
    • (pour démarrer avec EFI) Après l’étape d’installation du chargeur d’amorçage, quittez le programme d’installation et installez GRUB.
    • (pour démarrer avec la compatibilité du BIOS) Dans la phase d’installation du chargeur de démarrage, éditez le fichier menu.lst et ajoutez reboot = pci à la fin de la noyau lignes, par exemple:
      kernel / vmlinuz-linux root = / dev / sda5 ro reboot = pci

      Cela permettra à votre MacBook de redémarrer correctement à partir d'Arch.

    • (pour démarrer avec la compatibilité du BIOS) Également à l’étape d’installation du chargeur d’amorçage, installez GRUB sur n’importe quelle partition /démarrage est sur.

      Attention: Ne pas installer GRUB sur / dev / sda !!! Cela risquerait de créer un post-environnement instable.

    • Dans la phase de configuration du système, éditez le fichier /etc/mkinitcpio.conf et assurez-vous que clavier le crochet est dans le CROCHETS ligne quelque part après la détection automatique crochet. Cela chargera les pilotes de votre clavier au cas où vous deviez l’utiliser avant le démarrage d’Arch (par exemple, en entrant un mot de passe LUKS ou en utilisant le shell de dépannage).
  • Une fois le processus d'installation terminé, redémarrez votre ordinateur.
  • Si vous utilisez un support optique, maintenez la touche d'éjection enfoncée au démarrage de votre MacBook; cela devrait éjecter le disque d'installation Arch Linux.
  • En cas de double amorçage OS X et Arch Linux, maintenez la touche alt (option) enfoncée pendant le démarrage du système pour utiliser le chargeur de démarrage Mac afin de sélectionner le système d'exploitation à démarrer.

Post-installation

Tango-edit-clear.png "src =" http://wiki.archlinux.org/images/8/87/Tango-edit-clear.png "width =" 48 "height =" 48 "/><b>Cet article ou cette section nécessite des améliorations de la langue, de la syntaxe wiki ou du style. Voir Aide: Style pour référence.</b><img alt=

Voir Recommandations générales pour les instructions de gestion du système et les didacticiels de post-installation, tels que la configuration d'une interface utilisateur graphique, d'un son ou d'un pavé tactile.

Vidéo

Différents modèles de MacBook ont ​​différentes cartes graphiques.
Pour voir quelle carte graphique vous avez, tapez:

$ lspci | grep VGA
  • Si cela revient NVIDIA, lisez NVIDIA.
  • Sinon si ça retourne ATI ou DMLA, lisez ATI.
Note NVIDIA
Pointe: Si vous avez installé le système d'exploitation en mode EFI et que les pilotes binaires NVIDIA ne fonctionnent qu'en mode BIOS (par exemple, vous obtenez un écran noir au démarrage EFI), essayez cette approche: http://askubuntu.com/a/613573/492886

Pour les MacBooks avec des graphiques NVIDIA, pour que le rétroéclairage fonctionne correctement, vous aurez peut-être besoin de la nvidia-blAUR paquet.

Pointe:

  • Si le contrôle du rétroéclairage ne fonctionne pas après l'installation de nvidia-bl, vous devez répertorier le module du noyau apple_bl dans la liste noire.
  • Si le contrôle du rétroéclairage ne fonctionne pas de cette façon, essayez de définir les paramètres du module. Sans commentaire options nvidia_bl max_level = 0x1ffff shift = 11 dans /etc/modprobe.d/nvidia_bl.conf devrait faire l'affaire.
  • Sinon, vous pouvez choisir d'utiliser le pommed-lightAUR paquet. Si vous le faites, vous voudrez peut-être modifier les paramètres de pas dans /etc/pommed.conf.mactel à environ 5000-10000 en fonction du nombre de niveaux de luminosité que vous désirez. La luminosité maximale est d'environ 80000, alors tenez-en compte.

Pavé tactile

Le touchpad devrait avoir la fonctionnalité de base par défaut. Un véritable pilote multitouch se comportant de manière très similaire à celle d’un OS X natif est inclus dans la liste. xf86-input-mtrack-gitAUR paquet. Les options de configuration sont documentées dans le readme.

Les options suivantes de mtrack fonctionnent bien sur un MacBook7,1:

    Option "Taille du pouce" "50"
 Option "ScrollDistance" "100"

Probablement, vous devez également ajouter:

    MatchDevicePath "/ dev / input / event10"

Pour désactiver le clic à cliquer (c'est-à-dire appuyer pour cliquer) par défaut, ajoutez ce qui suit à votre section de configuration mtrack

            Option "TapButton1" "0"
   Option "TapButton2" "0"
   Option "TapButton3" "0"

Défilement naturel: Pour configurer le défilement naturel à deux doigts similaire à OS X, reportez-vous à la section Touchpad Synaptics # Natural scrolling.

Si vous utilisez xf86-input-mtrack-gitAUR, vous pouvez simplement échanger les boutons de défilement vers le haut et vers le bas (ainsi que les boutons de défilement vers la gauche et vers la droite):

/etc/X11/xorg.conf.d/10-mtrack.conf
        ...
  Option "ScrollUpButton" "5"
  Option "ScrollDownButton" "4"
  Option "ScrollLeftButton" "7"
  Option "ScrollRightButton" "6"
  ...

Remarque spéciale sur les anciens modèles de Macbook (confirmé sur MacBook2,1): Sur les anciens modèles de Macbook (pré-multitouch), le pavé tactile ne fonctionnera pas correctement tant que vous n'avez pas installé le package xf86-input-synaptics. S'il vous plaît voir Touchpad Synaptics pour plus d'informations sur l'installation et la configuration de ce paquet.

Note sur le MacBookPro5,5: J'ai trouvé qu'il est beaucoup plus simple d'utiliser le xf86-input-synaptics en extra. Bien qu'il ne fonctionne pas beaucoup comme un balayage à 3 doigts, ce pilote fournit une réponse plus rapide. gpointing-device-settingsAUR fournit également une configuration graphique simple. Vous trouverez ci-dessous un fichier de configuration Xorg /etc/X11/xorg.conf.d/60-synaptics.conf à titre de référence seulement.

    Section "InputClass"
       Identifiant "touchpad catchall"
       Pilote "synaptics"
       MatchIsTouchpad "sur"
       MatchDevicePath "/ dev / input / event *"
       Option "SHMConfig" "sur"
       Option "TapButton1" "1"
       Option "TapButton2" "3"
       Option "TapButton3" "2"
       Option "PalmDetect" "sur"
       Option "VertEdgeScroll" "off"
       Option "HorizEdgeScroll" "désactivée"
       Option "CornerCoasting" "off"
       Option "EdgeMotionUseAlways" "off"
       Option "AreaLeftEdge" "10"
       Option "AreaRightEdge" "1270"
 EndSection

Pour certains utilisateurs, le clic droit avec deux doigts peut ne pas fonctionner correctement et le pavé tactile peut également devenir moins réactif après ces paramètres. Pour moi, la suppression de 'AreaLeftEdge' et 'AreaRightEdge' a résolu ce problème.
OS X comme MultiTouch Gestures actuellement cassé en raison de nouveaux pilotes synaptiques! XSwipe est un script perl léger et hautement personnalisable destiné aux utilisateurs souhaitant ajouter davantage de gestes multitouch à OS X dans Arch. Une fois installé et configuré (voir le wiki xSwipe sur Github), je vous recommanderais d'ajouter xSwipe en tant qu'élément de démarrage.

Clavier

Les claviers MacBook fonctionnent par défaut. Pour permuter les touches fn avec les touches FX, voir Clavier Apple.

Pour l'activer, vous pouvez mapper avec la bonne application comme xbindkeys ou par les préférences DE; mais un autre très bon moyen, que nous recommandons, est d’installer le pommed-lightAUR paquet.

Modifier le /etc/pommed.conf en fonction de votre matériel sur MacBook, construisez-le à partir de /etc/pommed.conf.mac ou /etc/pommed.conf.ppc exemples de fichiers.

Notez que vous pouvez également l'exécuter sans fichier de configuration, les valeurs par défaut peuvent fonctionner pour vous. Puis activez et démarrez pommed.service.

Pointe: si vous utilisez Gnome ou KDE, vous pouvez facilement configurer 3ème niveau de fonctionnalité, clé multimédia, etc. dans les préférences du clavier.

Rétro-éclairage du clavier

Le rétroéclairage du clavier est contrôlé par / sys / class / leds / smc :: kbd_backlight. Écrivez la valeur souhaitée pour luminosité dans ce répertoire.

Tous les deux une lumière ou kbdlightAUR (bloqué depuis 2015) permettent de contrôler le rétroéclairage du clavier via des scripts. Avec les règles udev ou sxhkd appropriées, ils autorisent les changements de niveau de lumière sans être root.

À partir de 2017-11-12, une lumière fournit une solution «juste-fonctionne» testée sur un MacbookPro 8,1.

Vous pouvez également consulter la page wiki Rétro-éclairage du clavier.

Note NVIDIA

Si la luminosité ne fonctionne pas correctement via pommed, assurez-vous d’avoir installé le nvidia-blAUR emballage et insertion

trouver . -name "*" -exec sed -i '/ mbp_backlight / nvidia_backlight /' '{}' ;

dans la deuxième ligne de la fonction pgg PKGBUILD build () et refait le package. De ce post de forum.

Une autre solution possible consiste à modifier le build PKGBUILD pommé:

trouver . -name "*" -exec sed -i '/ nvidia_backlight / apple_backlight /' '{}' ;

Si le précédent ne fonctionne pas, essayez ce qui suit,

lancez nvidia-settings, éditez le fichier '/etc/X11/xorg.conf' et ajoutez cette ligne dans la section Device:

Option "RegistryDwords" "EnableBrightnessControl = 1"

Enregistrez, redémarrez et vérifiez le fonctionnement des boutons de rétroéclairage.
Plus d'informations disponibles sur Ubuntu MacBookPro5,5

Wifi

Différents modèles de MacBook ont ​​différentes cartes sans fil.

Vous pouvez facilement vérifier la carte de votre MacBook en:

# lspci | réseau grep
  • Si vous avez une carte Atheros, tout devrait fonctionner immédiatement.
  • Les générations de MacBook 5.0 et 6.0 peuvent avoir un BCM43xx, suivez les instructions du pilote broadcom-wl sur la page Broadcom Wireless. Les interfaces peuvent permuter pendant le redémarrage, il est donc préférable de les définir dans une règle udev (instructions sur la page Broadcom Wireless).
  • Les MacBook de la génération 8.1 ont le BCM4331, pour lequel le support n’est présent ni dans Linux (3.0 et 3.1) ni dans les pilotes propriétaires de Broadcom. Il existe cependant un support préliminaire pour cela dans Linux 3.2. Pour exécuter les pilotes sur les noyaux précédents, vous devrez utiliser des pilotes compat
  • Si vous avez le bon pilote DKMS broadcom (c'est-à-dire broadcom-wl-dkms) installé et que votre carte wifi n'est toujours pas reconnue, essayez de la reconstruire (reportez-vous à la section Prise en charge du module de noyau dynamique).
Remarque:

  • Si votre connexion est souvent interrompue, vous devrez peut-être désactiver la gestion de l'alimentation Wi-Fi.
  • Eduroam ou similaire peut planter votre gestionnaire de réseau. Retarder simplement la connexion après la connexion devrait faire l'affaire

Gestion de l'alimentation

Powerdown est un ensemble de scripts très simple à mettre en place pour maximiser la durée de votre batterie. Un MacBook Air 2013 avec mise sous tension fournit environ 11 heures d'utilisation de la lumière avec seulement mise sous tension installée.
Toutes les recommandations habituelles en matière de gestion de l’énergie s’appliquent également.

Désactiver Thunderbolt

Linux a toujours une mauvaise gestion de l’alimentation pour les adaptateurs Thunderbolt sur Mac. Cela peut avoir pour effet que les adaptateurs TB restent toujours allumés et empêchent le processeur de passer dans les états d'économie d'énergie les plus profonds [2], dessin ca. 2W de puissance supplémentaire même en l'absence d'utilisation [3]. An easy way to see the CPU states is using powertop. The problem arises when the CPU does not go below C3 as a package (Pkg%pc3).

One workaround is to add

            acpi_osi=!Darwin

to the kernel parameters in your bootloader, thereby telling the firmware that the system is not compatible with macOS [4]. This should disable the TB adapter (at least on older Macs), and thus reduce power consumption greatly, but will probably come with side-effects (e.g. no Thunderbolt, maybe others?).

It is also possible to blacklist the thunderbolt module and then putting the controllers to sleep with

            echo auto > /sys/bus/pci/devices/0000:07:00.0/power/control

Check the correct device number with lspci. This can also be automated. This method reduces power consumption slightly, but still consumes 0.9 W more than the previous method on a Macbook Air 2013.

Suspend and Hibernate

Suspending (suspend to ram) and hibernating (suspend to disk) work fine out of the box:

            systemctl suspend

Issues were reported where the machine would "suspend immediately after resume" in certain conditions when suspending by closing the lid. This was solved by setting the option "sleep-inactive-ac-type" to "nothing" using dconf-editor, option path: org → gnome → settings-daemon → plugins → power).

See Suspend and hibernate for details on how to configure hibernation. Noticably, you'll need a swap partition or file (see the mentioned article for further instructions).

If after suspend laptop is woken up after few seconds, may help to disable all stuff in /proc/acpi/wakeup, exclude LID0:

# echo XHC1 > /proc/acpi/wakeup
$ cat /proc/acpi/wakeup
Device	S-state	  Status   Sysfs node
P0P2	  S3	*disabled
EC	  S3	*disabled
HDEF	  S3	*disabled  pci:0000:00:1b.0
RP01	  S3	*disabled  pci:0000:00:1c.0
RP02	  S3	*disabled  pci:0000:00:1c.1
RP03	  S3	*disabled  pci:0000:00:1c.2
ARPT	  S4	*disabled  pci:0000:03:00.0
RP05	  S3	*disabled  pci:0000:00:1c.4
RP06	  S3	*disabled  pci:0000:00:1c.5
SPIT	  S3	*disabled
XHC1	  S3	*disabled  pci:0000:00:14.0
ADP1	  S3	*disabled
LID0	  S3	*enabled

And for permanent disabling:

$ cat /etc/udev/rules.d/90-xhc_sleep.rules 

# disable wake from S3 on XHC1
SUBSYSTEM=="pci", KERNEL=="0000:00:14.0", ATTR{power/wakeup}="disabled"

If this does not work, check that ARPT is disabled, and add a corresponding rule to udev, like this:

SUBSYSTEM=="pci", KERNEL=="0000:03:00.0", ATTR{power/wakeup}="disabled"

If this still does not work, try disabling LID0.
This way suspending via lid-closing should be made impossible, so you might want to follow the instructions in this forum post to make suspending via both lid-closing and systemd possible, by using systemd services.

Wake Up After Suspend

Occasionally the Macboook Air may wake up immediately after suspend.
To fix this:

cat /proc/acpi/wakeup

Check to see that XHC1 and LID0 are enabled. If they are, disabling them will fix the problem. After disabling them, the only way to wake up your computer from suspend is by using the power button.

To do this type to following command (vim can be any cli editor)

sudo vim /etc/systemd/system/suspend-fix.service

Then add the following text and save:

[Unit]



Description=Fix for the suspend issue
[Service]
Type=oneshot
ExecStart=/bin/sh -c "echo XHC1 > /proc/acpi/wakeup && echo LID0 > /proc/acpi/wakeup"
[Install]
WantedBy = multi-user.target

And then run the following:

systemctl enable suspend-fix.service
systemctl start suspend-fix.service

Disabling only XHC1 is not recommended if you have this bug, since it may result in glitchy behavior.

Capteur de lumière

The values can be read from:

    /sys/devices/platform/applesmc.768/light

A "cat" on this path returns two-tuples like (4,0). The below referenced lighter script ignores the second value – which always seems to be 0 – and uses the first number as measured environment lighting brightness value.

If you want to use the built in light sensor to automatically adjust screen and keyboard backlight brightness check out
Lighter [5] (simple perl script, easy to fine-tune) and Lightum [6] (Requires Gnome or KDE but is older and more complete than Lighter).

Du son

Pointe: If using ALSA, the internal speaker might not be disabled when using the headphone jack. To solve this, enable "Auto-mute" using alsamixer

First of all follow ALSA wiki page, then if something does not work correctly, continue reading this part.

Edit your /etc/modprobe.d/50-sound.conf ou /etc/modprobe.d/modprobe.conf appending this line:

options snd_hda_intel model=intel-mac-auto

This should automatically specify the codec in your MacBook. If you have a MacBookPro12,1, you might need

    options snd-hda-intel index=1,0

instead. Alternatively, for MacBookPro5,X, you can use:

options snd_hda_intel model=mb5

(note that the jack output is controlled with "HP").

If you have an iMac8,1, you should instead use

options snd-hda-intel model=mbp3 position_fix=2

For Aluminium iMacs, see iMac Aluminium#Getting sound to work right

You can try to specify other options, that depend on your hardware. All other possible settings are listed in Kernel Documentation, avaible online:

Then, reboot.

Bluetooth

Bluetooth should work out-of-the box. See the article on Bluetooth to install and configure all software needed.

Magic Mouse

If you use a magic mouse you will find it works nicely out of the box. You might want to tweak some settings such as scroll-speed ou accélération. There is no GUI for this at this time. The only way to set these settings is to instruct the kernel driver (hid_magicmouse) with parameters. Create a modprobe config file for your mouse.

/etc/modprobe.d/magicmouse.conf
options hid_magicmouse scroll-speed=55 scroll-acceleration=1 emulate_3button=0

This will instruct the driver to have a fast scroll-speed, do exponential acceleration and do not emulate a 3 button mouse. You can find an overview of all parameters and their current settings in /sys/module/hid_magicmouse/parameters.

To play with the settings without rebooting you can also set them through the command line, like so:

# echo 55 > /sys/module/hid_magicmouse/parameters/scroll_speed

Remarque: Using kernel 4.10.10-1-macbook the Magic Mouse (hid_magicmouse) will cause a lot of system lock ups. If you experience random lock ups, try a different, wired, mouse to see if this is the case for you as well.

Webcam

iSight

Remarque: Linux kernel from 2.6.26 includes the Linux UVC driver natively. MBP 6,2+ (Kernel ~2.6.37+) iSight works out of the box without the need to use firmware from OS X. Only use isight-firmware-tools if it doesn't work normally.

iSight webcams on MacBooks or pre 6,2 MacBook Pros (6,2 came out around 2010) require the Apple's proprietary firmware that cannot be redistributed. It must be extracted from OS X and loaded onto Arch.

You will need to install isight-firmware-toolsAUR to extract the firmware. This package also includes a udev rule and ELF binary that are necessary, even once you have extracted the firmware file into /lib/firmware/isight.fw, for the file to be loaded every time you boot your computer (namely /etc/udev/rules.d/isight.rules qui utilise /usr/lib/udev/ift-load).

Instructions:

First you need to get the firmware out of a particular file located on your OS X install. It is located in /System/Library/Extensions/IOUSBFamily.kext/Contents/PlugIns/AppleUSBVideoSupport.kext/Contents/MacOS/AppleUSBVideoSupport.

Pointe: le AppleUSBVideoSupport file from a OS X 10.6 (Snow Leopard) installation may not work properly. If possible, use the file from OS X 10.5 or earlier.

To mount the OS X drive if multi-booting:

# mkdir /media/OSX
# mount -t hfsplus /dev/sda2 /media/OSX

Then, install the isight-firmware-toolsAUR package.

Locate the AppleUSBVideoSupport file in the OS X directory listed above. Either copy it over to your Arch system (Any OS X installation should do, such as an iMac, not just one specific to your system) or, if multi-booting, mount the OS X drive and navigate to the directory. (On 10.7 (Lion) the directory is /System/Library/Extensions/IOUSBFamily.kext/Contents/PlugIns/AppleUSBVideoSupport.kext/Contents/MacOS.) In that directory you can go ahead and extract the driver:

# ift-extract --apple-driver AppleUSBVideoSupport

When it's done, check that the firmware has been found:

# ls /lib/firmware/isight.fw

Once successful, completely SHUTDOWN your Mac and start it back up again (to clear the hardware state of the webcam). Faire ne pas redémarrer.

It should be automatically loaded at boot; if it isn't you can load the uvcvideo module manually or load it at boot.

You can use many applications to test the webcam:

# mplayer tv:// -tv driver=v4l2:width=320:height=240:device=/dev/video0 -fps 30

A simple solution to take snapshots is:

# mplayer tv:// -vf screenshot

and the pressing the s key to take a snapshot. Files are of the format shotdddd.png and are reported in the standard output.

Facetime HD

According to Apple, all recent MacBook models contain a Facetime HD camera instead of the iSight. The following list is an example:

  • iMac (21,5" mid 2011)
  • iMac (27" mid 2011)
  • MacBook Air (mid 2011)
  • MacBook Pro (15" early 2011)
  • MacBook Pro (17" early 2011)
  • MacBook Pro (13" early 2011)

If your MacBook is more recent than the models listed above, it is likely equipped with the Facetime HD camera as well.

In order to make the camera work, you need to install the bcwc-pcie-gitAUR package. This will enable camera video support through the facetimehd kernel module.

In order to verify if the Facetime camera is working after the installation of both packages, you'll need to reboot your system.

Remarque: Keep in mind that, although working, this is a reverse-engineered driver. PC suspension is not supported if a program that is keeping the camera active is running.

Temperature Sensors

For reading temperature just install lm_sensors. See the lm_sensors page for more information.

Color Profile

We can use color profiles from OS X.

First, install the xcalibAUR package.

Second copy pre-saved color profiles placed in /Library/ColorSync/Profiles/Displays/ on OS X partition to ~/colorprofiles/ par exemple.

There are color profile files agree with in MacBook models; select the right one:

  • Color LCD-4271800.icc for MacBook Pro with CoreDuo CPU
  • Color LCD-4271880.icc for MacBook with Core2Duo
  • Color LCD-4271780.icc for MacBook (non-Pro) based on CoreDuo or Core2Duo.

Pointe: Also OS X allows to save current color profile from Displays > Color section de la Mac OS System Preferences, in this case file is saved to /Users//Library/ColorSync/Profiles.

Finally you can activate it by running

# xcalib ~/colorprofile.icc

Remarque: Previous command set the color profile only for the current session; this mean that you must run it every time you login in your system. For automating it you can execute the command by Autostart Application, concording with your DE (or add the command to your login manager's initialization script, e.g. /etc/gdm/Init/Default).

Attention: GNOME will revert the profile set by xcalib. It's preferable to set the profile using Couleur in settings.

Apple Remote

First, to correctly install and configure the lirc software that control IR see LIRC wiki.

Then make LIRC use /dev/usb/hiddev0 (ou /dev/hiddev0) by editing /etc/conf.d/lircd. Here is how mine look:

#
# Parameters for lirc daemon
#
LIRC_DEVICE="/dev/usb/hiddev0"
LIRC_DRIVER="macmini"
LIRC_EXTRAOPTS=""
LIRC_CONFIGFILE="/etc/lirc/lircd.conf"

Utilisation irrecord (available when installing lirc) to create a configuration file matching your remote control signals (alternatively, you can try to use the lircd.conf below):

# irrecord -d /dev/usb/hiddev0 -H macmini output_conf_file

Début lircd et utilise irw to check if it works.

Example of an /etc/lirc/lircd.conf:

begin remote

  name  lircd.conf.macbook
  bits            8
  eps            30
  aeps          100

  one             0     0
  zero            0     0
  pre_data_bits   24
  pre_data       0x87EEFD
  gap          211994
  toggle_bit_mask 0x87EEFD01

      begin codes
          Repeat                   0x01
          Menu                     0x03
          Play                     0x05
          Prev                     0x09
          Next                     0x06
          Up                       0x0A
          Down                     0x0C
      end codes

end remote

HFS partition sharing

First, install the hfsprogsAUR package.

we have to list our partitions. Utilisation

fdisk -l /dev/sda

example output:

# fdisk -l /dev/sda
    Device  Boot     Start         End      Blocks   Id  Type
 /dev/sda1               1          26      204819   ee  GPT
 /dev/sda2              26       13602   109051903+  af  Unknown
 /dev/sda3   *       13602       14478     7031250   83  Linux
 /dev/sda4           14478       14594      932832+  82  Linux swap / Solaris

As we see, the "Unknown" partition is our OS X partition, which is located in /dev/sda2.

Create a "mac" folder in /media:

# mkdir /media/mac

Add at the end of / etc / fstab this line:

/dev/sda2    /media/mac     hfsplus auto,user,rw,exec   0 0

Mount it :

mount /media/mac

and check it:

ls /media/mac

HFS+ Partitions

Journaling

HFS+ partitions, now the default in OS X, are not fully supported by Linux and are mounted as read-only by default. In order to write to an HFS+ partition, the safe way is to disable journaling. This can be accomplished using the OS X Disk Utility. Refer to this Apple support page for more information or try to do it from the command line:

Find your partition:

# diskutil list
/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *750.2 GB   disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:                  Apple_HFS OSX                     149.5 GB   disk0s2
   3:                  Apple_HFS Macintosh HD            599.2 GB   disk0s3
   4:                 Apple_Boot Recovery HD             650.0 MB   disk0s4

In this example we will use disk0s3 partition named as Macintosh HD. To know if journaling is activate or not you could execute:

# diskutil info /dev/disk0s3 | grep -i journal
                File System Personality:  Journaled HFS+
    Name (User Visible):      Mac OS Extended (Journaled)
    Journal:                  Journal size 49152 KB at offset 0x1176000

As you can read the journaling is active. To turn off the journaling you could execute:

# diskutil disableJournal disk0s3

To verify it is done execute the info command again.

If you get noting as output, then journaling is disabled.

However, if you fail to disable journaling. You can change "auto,user,rw,exec" in / etc / fstab to "auto,user,force,rw,exec" and mount it.

Yosemite and later

Since Yosemite, HFS+ partitions are now wrapped a CoreStorage volume. Verify that you have an CoreStorage volume.

# fdisk -l /dev/sdX
 Disk /dev/sdX: 298.1 GiB, 320072933376 bytes, 625142448 sectors
 Units: sectors of 1* 512 = 512 bytes
 Sector size (logical/physical): 512 bytes / 4096 bytes
 I/O size (minimum/optimal): 4096 bytes / 4096 bytes
 Type de label: gpt
 Device      Start      End         Sectors    Size     Type
 /dev/sdX1   40         409639      409600     200M     EFI System
 /dev/sdX2   409640     623872871   623463232  297.3G   Apple Core storage
 /dev/sdX3   623872872  625142407   1269536    916.0M   Apple boot

HFS+ uses two volume headers, one 1024 bytes into the device and one 1024 from the end of the device. With the HFS+ partition wrapped in the CoreStorage volume the end of the partition is not actually 1024 bytes from the end of the /dev/sdX2 partition.
To fix this you need to specify sizelimit=X when mounting.

To determine sizelimit do the following:

  1. Run testdisk /dev/sdX and select your drive
  2. Sélectionner EFI GPT
  3. Sélectionner Analyse et alors Quick Search

Sample output:

    TestDisk 7.0, Data Recovery Utility, April 2015
 Christophe GRENIER 
 http://www.cgsecurity.org
 
 Disk /dev/sdX  - 320 GB / 298 GiB - CHS 38913 255 63
     Partition     Start      End        Size in sectors
 P  EFI System     40         409639     409600  [EFI]
 P  Mac HFS        409640     623147815  622738176
 P  Mac HFS        623872872  625142407  1269536

What you see now is the output of the HFS partition itself without the CoreStorage volume. Take the size in sectors (622738176 in this example) and multiply by the number of bytes in your logical sector size (512 in this example).

622738176 * 512 = 318841946112

Finally, mount your disk with the sizelimit=X option.

    mount /dev/sdX -t hfsplus -o ro,sizelimit=318841946112

Home Sharing

UID Synchronization

In OS X

Remarque: It is strongly recommended that UID/GID manipulation be done immediately after a new user account is created, in OS X as well as in Arch Linux. If you installed OS X from scratch, then this operation is guaranteed to work after logging into your account for the first time.

Step 1: change UID and GID(s)

Pre-Leopard

  1. Open NetInfo Manager située dans le /Applications/Utilities dossier.
  2. If not done for you already, enable access to user account transactions by clicking on the closed lock at the bottom of the window, and entering your account password, or root password if you have created a root account.
  3. Aller vers /users/ is the name of the account that will have read/write access to the folder that will be shared with the primary user in Arch.
  4. Changer la UID value to 1000 (the value used by default for first user created in Arch).
  5. Also change the GID value to 1000 (the value used by default for user account creation in Arch).
  6. Aller vers /groups/, automatically saving the changes you have made so far.

Remarque: If you get an error message that the transaction is not allowed, log out and log back in.

Leopard

In Leopard, the NetInfo Manager application is not present. A different set of steps is required for UID synchronization:

  1. Open Préférences de système.
  2. Cliquer sur Users & Groups.
  3. Unlock the pane if not already done so.
  4. Right-click on the desired user and select Options avancées.
  5. Write down the value of the Identifiant d'utilisateur field, you will need it later on. Change both the UID and GID to match the UID and GID of the account wished to be shared with in Arch (1000 by default for the first user created in Arch).
Step 2: change "Home" permissions
  1. S'ouvrir Terminal dans le /Applications/Utilities dossier.
  1. Enter the following command to reclaim the permission settings of your home folder, replacing , et with the user name whose UID and GID values you just changed, the group name whose GID value you just changed and the old UID number, respectively.
# find /User/ -user  -exec chown : {} ;

In Arch

To synchronize your UID in Arch Linux, you are advised to perform this operation while creating a new user account.
It is therefore recommended that you do this as soon as you install Arch Linux.

Now you must substitute Arch's home with OS X's home, by modify entries of / etc / fstab.

Avoid long EFI wait before booting

If your MacBook spends 30 seconds with "white screen" before booting you need to tell the firmware where is the booting partition.

Boot OS X, if do not have it installed, you can use the install DVD (select language, then click Utilities->Terminal), or another MacBook with OS X (connect the two computers via firewire or thunderbolt, start the other MacBook keeping pressed T, boot your MacBook keeping pressed Options).

Either way, once you got a OS X terminal running on your MacBook you need to execute, as root, a different command if the boot partition is EFI or it is not:

# bless --device /dev/disk0s1 --setBoot            # if the booting partition is EFI

ou

# bless --device /dev/disk0s1 --setBoot --legacy   # if the booting partition is not EFI

(given that if your GRUB or EFI is on sda1, /dev/disk1s2 if it is on sdb2, etc). See also https://bbs.archlinux.org/viewtopic.php?pid=833215 and https://support.apple.com/kb/HT1533 .

Mute startup chime

The startup chime volume is controlled by the EFI variable SystemAudioVolume-7c436110-ab2a-4bbb-a880-fe41995c9f82. So it can be muted with

# printf "x07x00x00x00x00" > /sys/firmware/efi/efivars/SystemAudioVolume-7c436110-ab2a-4bbb-a880-fe41995c9f82

Alternatively, you can use a OS X install disk to mute the chime. Boot from it, select language, then click Utilities > Terminal, and enter

# /usr/sbin/nvram SystemAudioVolume=%01

(or whatever volume you want).

Remarque: Required formatting of the value provided for key SystemAudioVolume may differ depending on MacBook model and perhaps the version of OS X install media. If the above command fails to work, try enclosing the value in double quotes.

kworker using high CPU

Sometime with the addition of Yosemite, some users found that kworker CPU usage will spike, as disccused here. This is sometimes the result of runaway ACPI interrupts.

To check and see, you can count the number of recent ACPI interrupts and see if any of them are out of control.

            grep . -r /sys/firmware/acpi/interrupts/

If you see that one particular interrupt is out of control (possibly GPE66), i.e., registering hundreds of thousands of lines, you can try disabling it (replace XX with the runaway interrupt):

            echo "disable" > /sys/firmware/acpi/interrupts/gpeXX

Disabling random ACPI interrupts could cause all kinds of problems, so do this at your own risk. If this fixes the problem, there is discussion about how to make a systemd service that automatically disables an interrupt at every boot here.

rEFIt

Remarque:

  • You probably want to have a look at rEFInd, which is some type of successor of rEFIt.
  • This is not a requirement. It only gives you a menu to choose between OS X and Arch Linux upon every boot.

For more see, rEFIt myths.

In OS X, download the ".dmg" from rEFIt Homepage and install it.

Remarque: If you have already partitioned your hard disk in preparation for the Arch installation, rEFIt may not be enabled by default. You will have to run the "enable.sh" script installed in /efi/refit/.

S'ouvrir Terminal and enter:

cd /efi/refit;
./enable.sh

Problems with rEFIt

If you experience problems after the install of Arch or rEFIt, especially is the right OS is not showing up to boot to or if it dumps you at a GRUB prompt stuck like the following:

GRUB>_

Then have a look at this link:

http://mac.linux.be/content/problems-refit-and-grub-after-installation

It can give you a basic idea on how to boot off the Arch live cd, mount the problem Arch install, chroot, use gptsync, and reinstall GRUB. This is probably for more advanced users who can translate the commands from a debian system to an Arch system and also apply it to the partitions on their machine. Be careful not to install GRUB in the wrong spot.

If you need a copy of gptsync you can wget it from here:
http://packages.debian.org/sid/gptsync
or try these, for 64 bit:

wget http://ftp.us.debian.org/debian/pool/main/r/refit/gptsync_0.14-2_amd64.deb

and for i386:

wget http://ftp.us.debian.org/debian/pool/main/r/refit/gptsync_0.14-2_i386.deb

since they are .deb packages you will need the program deb2targzAUR.

Mavericks upgrade breaks Arch boot option

For some multi-boot users who utilize a separate Linux boot partition, the OS X Mavericks upgrade may overwrite the boot partition with Apple's own recovery boot filesystem. This breaks the Arch Linux boot option in rEFIt/rEFInd. The best way to proceed in this situation is to abandon a separate boot partition and use the EFI system partition (ESP) to install the bootloader of your choice. It is also recommended that you use rEFInd instead of rEFIt as development on the latter has halted.

Assuming grub2 as the bootloader:

Use the Arch LiveCD to boot to a shell and chroot to your broken Arch Linux environment.

Mount the ESP on /boot.

Edit the fstab and remove the old boot partition and make ESP the new boot partition. Now mount the ESP as the new /boot parition.

# mount -a

Reinstall the linux package.

Create a new initramfs and vmlinuz in /boot.

# mkinitcpio -p linux

Install grub.

# grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=grub --recheck --debug

Create a new grub.cfg file.

# grub-mkconfig -o /boot/EFI/grub/grub.cfg

Make sure that grub.cfg is in the same directory as grubx64.efi.

Generate a new refind_linux.conf file in /boot simply by running mkrlconf.sh which comes with rEFInd.

Exit the chroot environment.

Reboot. You should see a new entry for Arch Linux in rEFInd and it should boot to your Arch Linux installation.

Model-specific information

MacBook

April 2016 12" – Version 9,1

  • Booting from USB via EFI works fine, when giving the intremap=nosid kernel option. (On Ubuntu, also noacpi nomodeset seem to be necessary.) Remember to hold the Alt key on booting to enter the boot menu.
  • The wireless card works out of the box with brcmfmac.
  • Suspend / hibernate does not work. The problem seems to be the NVMe that does not wake up. When booting from an external drive, suspend / hibernate works out of the box.
  • Audio recording works out of the box. Audio playback works, but the built-in speakers don't (no solution yet).
  • The keyboard and the touchpad do ne pas work out of the box. There is a work-in-progress driver available that works well: macbook12-spi-driver-dkmsAUR. Sometimes the touchpad does not work after booting but this can be fixed by reloading the driver with rmmod applespi && modprobe applespi.
  • The keyboard backlight does not work (no solution yet).

Mid 2007 13" – Version 2,1

Remarque: I used the 201212 ISO image.

Since older Macbooks have a 32bit EFI running, the usual installation image is not recognized. You need to either remove the UEFI support from the disc (Unified Extensible Firmware Interface#Remove UEFI boot support from optical media) or build a 32bit EFI version of the disc. The paragraphs below will take the first path to success, booting into BIOS mode and its pitfalls. For a try the other way round, read Unified Extensible Firmware Interface#Create UEFI bootable USB from ISO first.

First prepare your harddisc according to your wishes. In this scenario it was a "Linux only" approach with

/dev/sda1 HFS+ AF00 200M -> EFI boot system on Apple HFS+ partition
/dev/sda2 ext4 8300 147G -> arch system
/dev/sda3 swap 8200 1G   -> swap

le hfsprogsAUR package contains the tools to handle HFS/HFS+ filesystems. The rEFInd bootloader recognizes it on its own. Usually the partition for the EFI bootloader is a FAT32 (vfat) partition. In this case I tried rEFIt first, which apparently needs the HFS+ filesystem to work, and kept it at that.

The mount points are:

/dev/sda2 -> /
/dev/sda1 -> /boot

The bootloader in use was rEFInd instead of rEFIt. To install it, the rEFInd homepage provides a good guide. Usually it is simply done by copying rEFInd:

mkdir /boot/EFI
cp -vr /usr/share/refind/drivers_ia32 /boot/EFI/refind/
cp -vr /usr/share/refind/tools_ia32 /boot/EFI/refind/
cp -vr /usr/share/refind/fonts /boot/EFI/refind/
cp -vr /usr/share/refind/icons /boot/EFI/refind/
cp -v /usr/share/refind/refind_ia32.efi /boot/EFI/refind/
cp -v /usr/share/refind/refind.conf-sample /boot/EFI/refind/refind.conf
cp -v /usr/share/refind/refind_linux.conf-sample /boot/refind_linux.conf

Remarque: I'm using the 32bit version of Arch and refind, since the EFI of the old MacBooks is 32bit. I'm not sure about 32bit rEFInd booting a 64bit Arch…

The pitfall here is, that the system bootet in BIOS compatibility mode and not in EFI mode. You cannot therefore use efibootmgr, because the EFI variables (even with 'modprobe efivars') are not available. While installing the system get mactel-bootAUR. le hfs-bless utility comes in handy, when blessing the EFI bootloader. This is done by calling:

hfs-bless /boot/EFI/refind/refind_ia32.efi

Since the Linux kernel does come with EFI stub enabled, it seems a good idea to run it through a bootloader first. Especially if it runs not out of the box. But using rEFInd makes GRUB (or any other bootloader) obsolete, because of that.

Remarque: In the refind_linux.conf you add any kernel option you may want as long as you use the EFI stub of your kernel. In refind.conf you adjust your needs for the bootloader itself, like menu entries. If you use them (menu entries), rEFInd should not look for these EFI stub kernels itself, so blacklist the directories used in here, like /démarrage/.

Not running out of the box is unfortunately the initial stage for the kernel. Since we installed it in BIOS mode, two modules are missing to grant access to the root partition while booting. Hence the 'initfsram-linux.img' can not be found/loaded. Adding the following modules to your 'MODULES' line in /etc/mkinitcpio.conf solved this (original post).

/etc/mkinitcpio.conf
MODULES="ahci sd_mod"

Rebuild your kernel image:

mkinitcpio -p linux

The bootloader rEFInd can scan kernels even out of the '/boot/…' directory and assumes an efi kernel even without the extension '.efi'. If you do not want to try out special kernels, this should work without the hassle to copy each kernel after building to some spot special.

If you happen to get multiple entries for one boot image, it often results of a previous installation of a bootloader within the MBR. To remove that, try the following – taken from the original post. This is valid for GPT partitioned discs, so please check your environment and save your MBR first.

# dd if=/dev/zero of=/dev/sda bs=440 count=1

Macbook Pro

Early 2015 13"/15" – Version 12,x/11,4+

Sans fil

le brcmfmac driver is working as of 2015-11-20, with newer firmware necessary for working 5GHz support (see here.)

Remarque: On the Macbook Pro 12,1 if the brcmfmac driver can not be started and the following errors occur in the journal:

brcmfmac: brcmf_chip_recognition: chip backplane type 15 is not supported
brcmfmac: brcmf_pcie_probe: failed 14e4:43ba

then check whether PCI runtime power management is enabled on the device, and disable it if so.

Bluetooth

Bluetooth is fully supported starting from kernel-4.4.0.

Suspend & Power Off (11,4+)

The 11,4 and 11,5 MacBook Pros do not shutdown or suspend correctly with the default kernel. This issue is being addressed in Bug 103211 and a temporary patch is currently available in linux-macbookAUR. Note that Linux 4.13.0 has this patch included, and will be released shortly.

Keyboard & Trackpad

Haptic feedback works out of the box due to the trackpad's built-in firmware.

There are several drivers available that provide multitouch support. The following have been confirmed working with the MacBookPro12,1.

Pour xf86-input-libinput the following configuration emulates some features from the OS X functionality. For more options see libinput(4).

/etc/X11/xorg.conf.d/90-libinput.conf
Section "InputClass"
    Identifier "libinput touchpad catchall"
    MatchIsTouchpad "on"
    MatchDevicePath "/dev/input/event*"
    Driver "libinput"
    Option "NaturalScrolling" "true"
EndSection

Pour xf86-input-synaptics the following configuration is necessary to make the touchpad work fully.

/etc/X11/xorg.conf.d/60-magictrackpad.conf
Section "InputClass"
    Identifier "Trackpad"
    Driver "synaptics"
    MatchIsTouchpad "on"
    MatchDevicePath "/dev/input/event*"
EndSection

Further, some US/ANSI keyboards suffer from an issue where the tilde key (~, the key vertically between Esc and Tab) registers as < and >. The following config file fixes this issue.

/etc/modprobe.d/hid_apple.conf
options hid_apple iso_layout=0

See this kernel bugzilla for more details and the relevant patches for earlier kernels.

Graphique

For Intel-only graphics, install the xf86-video-intel package. For more information or OpenGL/3D support, follow instructions at Intel graphics.

À partir de linux kernel 4.16.6 dual graphics switching does work on the 11,5 (2015) with Intel modesetting and the AMD GPU utilizing the radeon driver (amdgpu is untested). See MacBookPro11,x#Graphics to enable the integrated graphics. Once the laptop boots with integrated graphics enabled you can use VGA Switcheroo controls to power down the discrete GPU. However, if you keep it powered on you will be able to utilize HDMI connections and using switcheroo-controlAUR you can run applications on the AMD GPU.

Remarque: The kernel parameters acpi_backlight, i915.lvds_downclock, i915.enable_ips, et intel_iommu are no longer necessary as of kernel 4.2.

Remarque: (Kernel 4.10.8, MacBook Pro 11,4+) If you experience system lock ups and/or tearing in Xorg, remove the .xf86-video-intel completely, including any config file you made for it. Xorg will default to its modesetting DDX driver. The performance of this driver is good and the locks go away. See also: Intel graphics
Remarque: If you are experiencing flickering issues with Xorg, you can set i915.enable_rc6 to 0 parameter into the kernel parameters which will disable to power saving of Intel graphics.

2012 – 2014 models

Macbook Air

Early 2014 11" – Version 6,1

This is almost the same as the 2013 version, where the only known difference is a slightly faster processor. The version numbers have not been changed since the 2013 version.

It works excellently after following the instructions for the MBA 2013 13" here and in the forum thread.
Bluetooth, which has been reported not working for some people with the 2013 version, works without trouble for the 2014 version, although it should be excactly the same.

Remarque: Unless you have a local repository on a USB disk, you need a USB to ethernet adaptor or a USB wireless adaptor supported natively by the kernel to easily install Arch Linux, since you have to install the broadcom-wl-dkms package to make the internal wireless adaptor work.

Unresolved issues:

  • There is no driver for the webcam yet.
  • rEFInd uses 30 seconds to start booting. Using the bless trick stops rEFInd from loading, and it has to be re-installed.

Mid 2013 13" – Version 6,2

Dedicated forum thread

Installing and booting

Booting from a normal 2013.6 USB key works fine, but I could not seem to get either GRUB or Syslinux working.

I was able to boot by first installing Arch Linux following the MacBook guide at the wiki (having a separate FAT32 /boot partition). Skip the bootloader installation.

Installing rEFInd from OS X (important!) and installing the EFI stub loader made me able to boot fine.

Dedicated thread.

Remarque: Installing rEFInd from Linux (or from OS X, but to the esp) also works fine
Arch Only Installation

This method works without rEFInd and uses grub to boot EFI. Partition as follows:

    /dev/sda1 200M Microsoft basic data
 /dev/sda2 256M Linux filesystem
 /dev/sda3 4G Linux swap
 /dev/sda4 108.6G Linux filesystem

sda1 can also be a HFS+ partition for EFI. This example chooses to use FAT32 (vfat). Although swap is optional, it is required for hibernation. Instead of sda4 for root and home, an alternative partition scheme would be to make sda4 as root and sda5 as home.

Format and mount:

    mkfs.vfat -F 32 /dev/sda1
 mkfs.ext2 /dev/sda2
 mkswap /dev/sda3
 swapon /dev/sda3
 mkfs.ext4 /dev/sda4
    mount /dev/sda4 /mnt
 mkdir / mnt / boot
 mount/dev/sda2 /mnt/boot
 mkdir /mnt/boot/efi
 mount /dev/sda1 /mnt/boot/efi

Finish the installation according to the Installation guide and skip anything after the bootloader. After you have generated your initramfs and set root passwd follow below to setup grub:

    pacman -S grub efibootmgr
 mount -t efivarfs efivarfs /sys/firmware/efi/efivars
 grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=grub --recheck --debug
 grub-mkconfig -o /boot/efi/EFI/grub/grub.cfg
 cp /boot/efi/EFI/grub/grub.cfg /boot/grub/grub.cfg
 cp /boot/efi/EFI/grub/grubx64.efi /boot/efi/EFI/boot/bootx64.efi}}

Now you can exit/unmount/reboot:

    sortie
 umount -R /mnt
 redémarrer
Stability problems

Remarque: Passing libata.force=1:noncq to the kernel parameters solves the problem.

This is the big worry for me. Every now and then my system hangs for a brief moment and everything involving net or disk access just hangs there for a while and then it seems to work.
So far it only seems to happen when I run something disk- or CPU-intensive. Also had an occassion when I could not start X and just got this repeating all over my screen:

ata1.00: failed command: WRITE FPDMA QUEUED
ata1.00: cmd 61/08:f0:10:8c:c2/00:00:0b:00:00/40 tag 30 ncq 4096 out
res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
ata1.00: status: { DRDY }

On the next attempt it worked fine.
I did SMART short and long tests on my disk and they returned fine:

smartctl -a

There are some messages in my boot that indicate this could be disk and/or ACPI related.

These are with 2013-06 ISO, 3.9.7-1 2013 x86_64 kernel.

journalctl -b
Seems to only work with the headphone jack, not with the speakers.

dmesg

Remarque: Same problem in 2017 with a Macbook Air early 2014. Updating the firmware (via migration to macOS Sierra) solved the issue.

Marvell ATA suspend bugs

If you have 2013 MacBook Air with a Marvell 128 or 256 GB drive, you might get the following ata errors instead after pm-suspend/resumes:

ata1: exception Emask 0x10 SAct 0x0 SErr 0x10000 action 0xe frozen
ata1: irq_stat 0x00400000, PHY RDY changed
ata1: SError: { PHYRdyChg }
ata1: hard resetting link
ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
ata1.00: unexpected _GTF length (8)
ata1.00: unexpected _GTF length (8)
ata1.00: configured for UDMA/33
ata1: EH complete

Try what Patrick and Tejun figured out on the linux bug. I followed what Patrick describes with sata_alpm, and I haven't seen the issue since.

There are more steps on how to resolve this issue in this thread on the Arch forum

Suspend/Resume

Brightness is either 0% or 100% after resuming from suspend. Until the kernel is fixed, use patjak's fix by installing mba6x_bl-dkmsAUR. Patjak's github is at [7].

Wifi

WiFi does not work out of the box. Installer broadcom-wl-dkms to connect to a network. If booting from the official Arch Linux ISO, one needs to unload a few standard modules in order to use the included wl module. Do so as follows:

# rmmod b43 ssb bcma wl

Now simply load the wl module:

# modprobe wl

This should automatically load the onboard wifi which can be seen by issuing: ip a. From here follow the WPA supplicant#Connecting with wpa_cli article to bring up the wireless network.

Touchpad

Since 3.10.3 kernel touchpad works perfectly with xf86-input-synaptics.

l'audio

ALSA may recognise the HDMI audio out as card 0 which will be the default card. Confirm this by checking the output of

            aplay -l

If that is the case, you may need to create a /etc/asound.conf with below entries:

    defaults.pcm.card 1
 defaults.ctl.card 1

to use the HDA Intel card, ie. the built-in speakers / headphones.

Mid 2012 13" — version 5,2

Kernel panics using default boot media under arch kernel 3.5. Ajouter intremap=off fixes this. Additionally, there are problems loading the applesmc module (meaning the temperature sensors, fan, and keyboard backlight do not work). These problems are fixed in the linux 3.6-rc4 mainline kernel (I have tested).

Mid 2012 11.5" — Version 5,1

If you have issues with waking from sleep while in X11 such as a black screen or showing the console with a frozen mouse cursor then remove xf86-input-synaptics et installer xf86-input-mtrack-gitAUR. This fixed errors such as

    (EE) [dix] bcm5974: unable to find touch point 0

and backtraces that causes X11 to crash. This might apply to Version 5,2 assuming they use the same trackpad.

Mid 2011 — version 4,x

Works out-of-the-box since kernel 3.2.

Early 2008 — version 1,1

Everything works out of the box though you will need the b43-fwcutter package (or simply b43-firmwareAUR) for the wireless adapter to work.

Since this model has only one USB port, you may find it easiest to install Arch with a powered USB hub. Plug a USB network adapter (wireless or ethernet adapter to plug into a USB port) and your Arch installation media into the USB hub.

If you can't get any result by scanning wireless network after boot, unload modules b43 et ssb and load them again:

            rmmod ssb
   rmmod b43
   modprobe b43

There is a good chance you will find what's wrong with DMA from the dmesg log.

Even if you can scan wireless networks after reloading the modules, it's still possible that you will only be able to connect to some networks, but not all of them. According to a more detailed discussion here: http://crunchbang.org/forums/viewtopic.php?id=17368, adding pio=1,qos=0 options to the b43 module can solve this problem.

I tested this for a 13' MacBookAir1,1 with a BCM4321 chipset, and it works.

Voir également

Click to rate this post!
[Total: 0 Average: 0]

Commentaires

Laisser un commentaire

Votre commentaire sera révisé par les administrateurs si besoin.