https://wiki.archlinux.org/api.php?action=feedcontributions&user=Matsjoyce&feedformat=atomArchWiki - User contributions [en]2024-03-28T16:28:19ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Dell_XPS_13_(9360)&diff=472004Dell XPS 13 (9360)2017-03-27T21:31:36Z<p>Matsjoyce: /* Troubleshooting */ Add note on hissing</p>
<hr />
<div>[[Category:Dell]]<br />
[[ja:Dell XPS 13 (9360)]]<br />
{| class="wikitable" style="float: right;"<br />
| '''Device''' || '''Status''' || '''Modules'''<br />
|-<br />
| Video || {{G|Working}} || i915<br />
|-<br />
| Wireless || {{G|Working}} || ath10k<br />
|-<br />
| Bluetooth || {{G|Working}}|| btusb<br />
|-<br />
| Audio || {{G|Working}} || snd_hda_intel<br />
|-<br />
| Touchpad || {{G|Working}} || ?<br />
|-<br />
| Webcam || {{G|Working}} || uvcvideo<br />
|-<br />
| USB-C / Thunderbolt 3 || {{G|Working}} || ?<br />
|-<br />
| Wireless switch || {{G|Working}} || intel_hid<br />
|-<br />
| Function/Multimedia Keys || {{G|Working}} || ?<br />
|}<br />
<br />
The Dell XPS 13 Late 2016 (9360) is the fourth-generation model of the XPS 13 line. The laptop is available since October in both a standard edition with Windows installed as well as a Developer Edition with Ubuntu installed. There is no hardware difference between them. Just like the older versions ([[Dell XPS 13 (9333)]], [[Dell XPS 13 (9343)]] and [[Dell XPS 13 (9350)]]) it is available in different hardware configurations. This fourth gen model includes Intel's Kaby Lake CPU and configurable with up to 16GB LPDDR 1866 MHz RAM and a 1TB PCI SSD. It will now also be available in Rose Gold. Prior to previous information it won't be available with LPDDR 2133 MHz RAM.<br />
<br />
The installation process for Arch on the XPS 13 does not differ from any other PC. For installation help, please see the [[Installation guide]] and [[UEFI]]. This page covers the current status of hardware support on Arch, as well as post-installation recommendations.<br />
<br />
As of kernel 4.5, the Intel Kaby Lake architecture is supported.<br />
<br />
<br />
== Content adaptive brightness control ==<br />
In the XPS 13 the display panels (both FHD and QHD+) come with adaptive brightness embedded in the panel firmware, this "content adaptive brightness control" (usually referred to as CABC or DBC) will adjust the screen brightness depending on the content displayed on the screen and will generally be found undesirable, especially for Linux users who are likely to be switching between dark and light screen content. Dell has issued a fix for this however it is only available to run in Windows and for the QHD+ model of the laptop so this precaution should be taken before installing Linux, the FHD model of the XPS 13 (9360) cannot be fixed. This is not a problem with the panel but rather a problem with the way the panels are configured for the XPS 13, as the same panel exists in the Dell's Latitude 13 7000 series (e7370) FHD model but with CABC disabled. The fix is available directly from [http://www.dell.com/support/home/de/de/debsdt1/Drivers/DriversDetails?driverId=20JWV&fileId=3574543510&osCode=WT64A&productCode=xps-13-9360-laptop&languageCode=ge&categoryId=AP Dell].<br />
<br />
== NVM Express SSD ==<br />
=== NVME Power Saving Patch ===<br />
<br />
Andy Lutomirski has created a patchset which fixes powersaving for NVME devices in linux. Currently, this patch is not merged into mainline yet. Until it lands in mainline kernel use the AUR or repository linked below. <br />
{{App|Linux-nvme|Mainline linux kernel patched with Andy's patch for NVME powersaving APST.|https://github.com/damige/linux-nvme|{{AUR|linux-nvme}}}} (check out [http://linuxnvme.damige.net/] for compiled packages)<br />
<br />
This patch is now in mainline (4.11rc1), so it is a matter of time before the standard kernel can be used instead.<br />
<br />
== Video ==<br />
The video should work with the {{ic|i915}} driver of the current {{Pkg|linux}} kernel. Consult [[Intel graphics]] for a detailed installation and configuration guide as well as for [[Intel graphics#Troubleshooting|Troubleshooting]].<br />
<br />
=== Module-based Powersaving Options ===<br />
For the HD 620 graphics card the following modules are working: (see [[Intel graphics#Module-based Powersaving Options]])<br />
modeset=1 enable_rc6=1 enable_fbc=1 <br />
The first argument is to enable modesetting if it's not set by default. The second argument is needed to active power-saving C-States. Higher values than 1 are not available for kaby lake CPUs. The third argument is for frame buffer compression power savings. These values should work well!<br />
<br />
enable_guc_loading=1 enable_guc_submission=1<br />
These arguments are used to enable GuC updates. GuC is a small proprietary binary blob released by intel to update the GuC binary in faster intervals than the kernel release does. It is used for graphics workload scheduling on the various graphics parallel engines. More details at (https://01.org/linuxgraphics/downloads/firmware). The GuC binary for kaby lake is included since firmware release linux-firmware 20170217 in the official repository.<br />
<br />
enable_huc=1<br />
HuC is also an binary blob from intel. It's designed to offload some of the media functions from the CPU to GPU. More details at (https://01.org/linuxgraphics/downloads/firmware). The vanilla kernel doesn't load it at the moment! Patches to load HuC have to find their way into the i915 kernel graphic stack before this option will work. Maybe working for kernel 4.10 or 4.11.<br />
<br />
enable_psr=1 disable_power_well=0 OR enable_psr=2 <br />
Enable psr level 2 is working, while level 1 has a lot of problems. Setting it on level 2 doesn't give much energy saving at the moment. It's said that 'disable_power_well=0 enable_psr=1' is working in this combination.<br />
<br />
NOT WORKING: semaphores=1 <br />
The semaphore option is NOT working for kaby lake CPUs and won't enable even if you set the option to 1.<br />
<br />
=== Blank screen issue after booting ===<br />
If using "late start" [[KMS]] (the default) and the screen goes blank when loading modules, it may help to add {{ic|i915}} and {{ic|intel_agp}} to the initramfs or using a special [[kernel parameter]]. Consult [[Intel graphics#Blank screen during boot, when "Loading modules"]] for more information about the kernel parameter way and have a look at [[Kernel mode setting#Early KMS start]] for a guide on how to setup the modules for the initramfs.<br />
<br />
== Wireless ==<br />
<br />
The Killer 1535 Wirless Adapter is functional and the ath10k firmware is included in recent linux kernel versions. The connection speed reported by iw is limited to 1-6Mbits/s. However this is just the output being wrong. The real connection speed is not limited to this value.<br />
<br />
Some users are experiencing issues, where the connection is dropped under heavy load but reconnects within a brief moment. This might not be noticed during browsing at all but becomes apparent in online games. There is no know solution so far.<br />
<br />
== Bluetooth ==<br />
<br />
After following the instructions given at [[Bluetooth]] tethering of internet connections via phone works immediately.<br />
<br />
<br />
== Thunderbolt 3 / USB 3.1 ==<br />
<br />
The USB-C port supports Thunderbolt 3, Displayport-over-USB-C and USB power delivery as well as USB 3.1.<br />
<br />
=== Ethernet repeatedly disconnects/reconnects with Dell USB-C adapter (DA200) ===<br />
<br />
Use of a power management package (such as [[TLP]]) may cause the ethernet adapter to repeatedly disconnect and reconnect. If this happens, disable/blacklist USB autosuspend for the ethernet adapter. (On my laptop, this is the device <tt>Bus 004 Device 007: ID 0bda:8153 Realtek Semiconductor Corp</tt> in the output of <tt>lsusb</tt>.)<br />
<br />
Also disabling or reducing power of wifi may help: http://en.community.dell.com/support-forums/network-internet-wireless/f/3324/t/19995423<br />
<br />
=== USB-C Compatibility Chart ===<br />
{| class="wikitable"<br />
| '''Device''' || '''Ports''' || '''Status'''<br />
|-<br />
| [http://www.apple.com/uk/shop/product/MJ1K2ZM/A/usb-c-digital-av-multiport-adapter Apple USB-C Digital AV Multiport Adapter] || USB-C, USB-A, HDMI || {{R|Not Working}}<br />
|-<br />
| [http://www.apple.com/uk/shop/product/MJ262B/A/apple-29w-usb-c-power-adapter?fnode=8b Apple 29W USB-C Power Adapter] || USB-C Power || {{R|Not Working}}<br />
|-<br />
| [https://www.amazon.co.uk/gp/product/B01H3K387Q/ref=oh_aui_search_detailpage?ie=UTF8&psc=1 Aukey USB C Hub HDMI 4 Port] || USB-C, 4xUSB-A, HDMI || {{G|Working}}<br />
|-<br />
| [https://www.amazon.com/dp/B012DT6KW2 Dell DA200] || USB-A, Ethernet, HDMI, VGA || {{G|Working}}<br />
|-<br />
| [https://www.amazon.com/dp/B01ANR4CYE StarTech.com tb32dp2 - Thunderbolt 3 Adapter] || 2 x DP (4 K, 60 Hz) || {{G|Working}}<br />
|-<br />
| [https://www.amazon.com/dp/B01C316EIK Cable Matters USB-C Multiport Adapter] || 4K HDMI or VGA, USB 3.0, Gigabit Ethernet || {{G|Working}}<br />
|-<br />
| [https://www.amazon.com/Juiced-BizHUB-Multiport-Ethernet-Delivery/dp/B01J391C3W Juiced Systems BizHUB USB-C Multiport Gigabit HDMI Hub] || 4K@30Hz HDMI, 3x USB 3.0, Gigabit Ethernet, USB-C Power, SD, Micro-SD || {{G|Working}}<br />
|}<br />
<br />
=== Thunderbolt Firmware updates ===<br />
The thunderbolt controller in the laptop has an embedded firmware. The laptop ships with firmware version NVM 18, and the most recent available version from Dell's website is NVM 21. If encountering compatibility problems with Thunderbolt accessories, the firmware may need to be updated. Dell maintains a [https://github.com/dell/thunderbolt-nvm-linux Github repository] explaining the process to update the firmware, but unfortunately, does not provide the updated payload files. These can be extracted from the Windows firmware update files. Mainline support for the firmware update process is pending the inclusion of [https://github.com/01org/thunderbolt-software-kernel-tree/tree/networking these patches] into the Linux kernel. The thunderbolt-icm kernel module is available in the AUR {{AUR|thunderbolt-icm-dkms-git}}.<br />
<br />
== SATA controller ==<br />
When the SATA-controller is set to {{ic|RAID On}} in Bios, the hard disk (at least the SSD) is not recognized. Set to {{ic|Off}} or {{ic|AHCI}} ({{ic|AHCI}} is recommended) before attempting to install Arch.<br />
<br />
== Touchpad ==<br />
The touchpad has no explicit buttons. The buttons are built into the pads surface. There is a small line printed on the pad separating left from right click button. The pad has a '''middle button''' built in! (works with libinput without any configuration): To issue a middle click, simply press on the middle area right between the virtual left and click buttons - so on the small printed separator line.<br />
<br />
=== Remove psmouse errors from dmesg ===<br />
<br />
If {{ic|<nowiki>dmesg | grep -i psmouse</nowiki>}} returns an error, but your touchpad still works, then it might be a good idea to disable {{ic|psmouse}}. First create a config file:<br />
<br />
# nano /etc/modprobe.d/modprobe.conf<br />
<br />
blacklist psmouse<br />
<br />
Then add this file to {{ic|/etc/mkinitcpio.conf}}:<br />
<br />
...<br />
FILES="/etc/modprobe.d/modprobe.conf"<br />
...<br />
<br />
Rebuild your initial ramdisk image (see [[Mkinitcpio#Image creation and activation]]).<br />
<br />
== Touchscreen ==<br />
The touchscreen works without additional configuration. The bug resulting in a disabled touchscreen after resume was fixed with kernel 4.8.5.<br />
<br />
=== Gestures ===<br />
Refer to [[libinput#Gestures]] for information about the current development state and available methods.<br />
<br />
== Keyboard Backlight ==<br />
By default, the keyboard backlight turns off after 10 seconds of inactivity. Some users might find this too short and annoying.<br />
The delay can be increased (or decreased) by editing this file:<br />
/sys/devices/platform/dell-laptop/leds/dell\:\:kbd_backlight/stop_timeout<br />
<br />
You can also change the brightness (0-2) by editing the following file. This is identical to pressing F10 on your keyboard:<br />
/sys/devices/platform/dell-laptop/leds/dell\:\:kbd_backlight/brightness<br />
<br />
== Hidden Keyboard Keys ==<br />
There are additional Fn+<Key> (sequences) that are not marked at all on the keyboard but underlying hardware generates them anyway. Here they are (if you find more add them to the table below):<br />
{| class="wikitable"<br />
|+ Hidden Fn Keys<br />
! Fn+<Key> !! Resulting key (sequence)<br />
|-<br />
| Fn+Ins || XF86Sleep<br />
|-<br />
| Fn+Super_L || Super_R<br />
|-<br />
| Fn+B || Pause<br />
|-<br />
| Fn+R || Print<br />
|-<br />
| Fn+S || Scroll_Lock<br />
|-<br />
| Fn+A / D / E / F / G / T / Q / W || XF86Launch3<br />
|}<br />
<br />
== Firmware Updates ==<br />
Dell provides firmware updates via {{aur|fwupd}}. See [[Flashing BIOS from Linux#fwupd]]. Please note if you have used a bind mount partition for /boot, you will not be able to use the fwupd utility; Instead format a USB as FAT32 and put the bios update .exe on. Reboot into the one-time-boot menu and update the BIOS flash through there.<br />
<br />
Alternatively, the BIOS update can be downloaded from the Dell website, and placed in a location accessible to the firmware. This could be the '/boot' folder, or a FAT32 formatted USB stick. Then restart your laptop and hit F12 while starting. In the boot menu choose firmware update and select the new file!<br />
<br />
== Troubleshooting ==<br />
<br />
=== EFISTUB does not boot ===<br />
The BIOS does not pass any boot parameters to the kernel. Use a UEFI [[boot loader]] instead.<br />
<br />
=== Not waking from suspend ===<br />
Update the BIOS to 1.0.7 to patch this issue.<br />
<br />
=== Power Drain after waking from standby ===<br />
<br />
Some users recognised ~2W more power consumption after waking up from standby. Go to the UEFI Firmware Settings (tap the F2 key when the Dell logo appears) and uncheck the 'Enable Thunderbolt Boot Support'. You may use {{Pkg|powertop}} or {{AUR|powerstat-git}} to reproduce and check this behaviour yourself. <br />
<br />
=== Popping Sound on headphones/external speakers ===<br />
<br />
Power saving being enabled on the audio chip will cause the hissing and popping to appear. <br />
<br />
Have a look at [[Advanced_Linux_Sound_Architecture/Troubleshooting#Pops_when_starting_and_stopping_playback]] and [[Advanced_Linux_Sound_Architecture/Troubleshooting#Popping_sound_after_resuming_from_suspension]].<br />
<br />
If you are using {{Pkg|tlp}}, it will activate power saving by default when on battery. Edit {{ic|/etc/default/tlp}} and disable it.<br />
<br />
=== Coil Whine ===<br />
<br />
Unfortunately Dell still did not fix this issue and the sound for my model was very loud. The issue seems to be connected to the graphic card. For some users, it is possible to reduce it a lot by activating frame buffer compression "enable_fbc=1" [[Intel graphics#Module-based Powersaving Options]]. The coil whine will then start again under heavy graphic load. For the touchscreen model, this may be very often, due to the high resolution screen. In a similar vein, the display can be run at a lower resolution, again reducing the load on the graphics card.<br />
<br />
=== Freezing after waking from suspend ===<br />
<br />
Installing {{aur|xf86-video-intel-git}} is [https://bbs.archlinux.org/viewtopic.php?pid=1698282#p1698282 reported] to fix this.<br />
<br />
=== Continuous hissing sound with headphones ===<br />
<br />
Open alsamixer and set "Headphone Mic Boost" gain to 10 dB: https://www.reddit.com/r/Dell/comments/4j1zz4/headphones_have_static_noise_with_ubuntu_1604_on/ Note that this does reduce the volume slightly.<br />
<br />
== See Also == <br />
<br />
* [https://bbs.archlinux.org/viewtopic.php?id=217865 Arch Forum thread for Dell XPS 13 (9360)]</div>Matsjoycehttps://wiki.archlinux.org/index.php?title=Mac&diff=278135Mac2013-10-09T17:10:27Z<p>Matsjoyce: Added a link for a kernel bug report regarding the audio problem on the 2013 MBA</p>
<hr />
<div>[[Category:Apple]]<br />
[[de:ArchLinux auf einem MacBook]]<br />
[[fr:MacBook]]<br />
[[it:MacBook]]<br />
[[zh-CN:MacBook]]<br />
{{Article summary start}}<br />
{{Article summary text|Details the installation and configuration of Arch Linux on Apple's MacBook and MacBook Pro lines of notebooks.}}<br />
{{Article summary heading|Related}}<br />
{{Article summary wiki|Official Arch Linux Install Guide}}<br />
{{Article summary wiki|Beginners Guide}}<br />
{{Article summary wiki|General Recommendations}}<br />
{{Article summary wiki|MacBook 4,2 (late 2008)}}<br />
{{Article summary wiki|MacBook 5,2 (early-mid 2009)}}<br />
{{Article summary wiki|MacBook Pro 7,1}}<br />
{{Article summary wiki|MacBook Pro 8,1 / 8,2 / 8,3 (2011)}}<br />
{{Article summary wiki|MacBook Pro 9,2 (Mid-2012)}}<br />
{{Article summary end}}<br />
<br />
Installing Arch Linux on a MacBook (Pro) is quite similar to installing it on any other computer. However, due to the specific hardware configuration on a MacBook, there are a few deviations and special considerations which warrant a separate guide. For more background information, please see the [[Installation Guide]], [[Beginners' Guide]]. This guide contains installation-instructions that can be used on any Apple computer whose hardware is supported by the Linux kernel. Please see 'related' pages (on the top right of this page) for model-specific tips and troubleshooting.<br />
<br />
== Overview ==<br />
<br />
Specifically, the procedure for installing Arch Linux on a MacBook is:<br />
<br />
# '''[[#Installation of Mac OS X and firmware update|Install OS X]]''': Regardless of the desired end-configuration, it helps to start from a clean install of OS X.<br />
# '''[[#Installation of Mac OS X and firmware update|Firmware update]]''': This should help reduce errors and provide newer features for the hardware.<br />
# '''[[#Partitions|Partition]]''': This step either resizes or deletes the OS X partition and creates partitions for Arch Linux.<br />
# '''[[#Installation|Install Arch Linux]]''': The actual installation procedure.<br />
# '''[[#Post-install configuration|Post-install configuration]]''': MacBook specific configuration.<br />
<br />
{{Tip|rEFIt is a popular bootloader for EFI-firmware computers (including Macs). It can be installed at any time during the installation. For instructions, please see [[#rEFIt]]. }}<br />
<br />
== Installation of Mac OS X and firmware update ==<br />
<br />
[http://www.apple.com Apple] has excellent instructions for installing OS X. Follow their instructions. Once OS X is installed, go to ''Apple Menu > Software Update'' and update all software. Once this has run, you will need to reboot your computer. Do this, and then run '''Software Update''' again to check to make sure that all updates have been installed.<br />
<br />
If you are not going to have OS X installed, make backups of these files:<br />
<br />
/System/Library/Extensions/IOUSBFamily.kext/Contents/PlugIns/AppleUSBVideoSupport.kext/Contents/MacOS/AppleUSBVideoSupport<br />
<br />
You will need this file later for iSight functionality.<br />
<br />
/Library/ColorSync/Profiles/Displays/<FILES HERE><br />
<br />
You will need the file(s) here for adjusting the [[#Color Profile|color profile]].<br />
<br />
== Partitions ==<br />
<br />
The next step in the installation is to re-partition the hard drive. If OS X was installed using the typical procedure, then your drive should have a GPT format and the following partitions:<br />
<br />
* '''EFI''': a 200 MB partition at the beginning of the disk.It is often read as '''msdos''' or '''FAT''' by some partitioning tools and usually labeled ''#1''.<br />
* '''Mac OS X''': the ''(HFS+)'' partition that should take up all of the remaining disk space. Usually labeled ''#2''.<br />
* '''Recovery''': A recovery partition (only for Mac OS X 10.7+).<br />
How to partition depends on how many operating systems you want install. The following options will be explained:<br />
<br />
* [[#Arch Linux Only|Arch Linux only]] for single boot.<br />
* [[#Mac OS X with Arch Linux|OS X with Arch Linux]] for dual boot.<br />
<br />
If you do not know which option to pick, we recommend the dual boot so you can still return to OS X whenever you want.<br />
<br />
=== Arch Linux only ===<br />
<br />
This situation is the easiest to deal with. Mostly, partitioning is the same as any other hardware that Arch Linux can be installed on. The only special consideration is the MacBook firmware boot sound. To ensure that this sound is off: '''mute''' the volume in OS X before continuing further. The MacBook firmware relies on the value in OS X, if available. Note that if you choose to get rid of the OS X partition, there is no easy way to update your machines firmware unless you use an external drive to boot OS X.<br />
You can boot in EFI mode (recommended) or bios-compatibility mode, if in doubt choose EFI.<br />
<br />
To install using EFI, follow the [[Unified Extensible Firmware Interface#Create UEFI bootable USB from ISO|instruction to make a EFI bootable media]]. Once done double check that your USB key actually boots in EFI mode [[Unified Extensible Firmware Interface#UEFI Variables Support|checking the EFI kernel variables]]. You will need to format the EFI partition with the {{ic|hfsplus}} filesystem ({{AUR|hfsprogs}}) instead of vfat otherwise {{AUR|mactel-boot}} will fail, and in Macbooks [[Unified Extensible Firmware Interface#Non-Mac UEFI systems|you cannot use {{ic|efibootmgr}}]].<br />
<br />
==== EFI ====<br />
<br />
*'''This requires [[GRUB]] to work'''<br />
* Boot installation medium and switch to a free tty.<br />
* Run '''cgdisk''' ({{Pkg|gptfdisk}} package).<br />
* Create the necessary partitions.<br />
<br />
{{Note|<br />
* The swap partition is optional, on machines with a RAM of size 4GB or more, good performance can be expected without a swap partition. Also, a '''swap file''' can be created later, see [[Swap#Swap file|Swap file]].<br />
* For more information on partitioning, see [[Beginners'_Guide#Partitioning hard disks: General information|Partitioning hard disks: General information]].<br />
}}<br />
Simple example (no LVM, crypto):<br />
partition mountpoint size type label<br />
/dev/sda1 /boot/efi 200MiB vfat EFI<br />
/dev/sda2 /boot 100MiB ext2 boot<br />
/dev/sda3 - adjust swap swap<br />
/dev/sda4 / 10GiB ext4 root<br />
/dev/sda5 /home remain. ext4 home<br />
<br />
* Done, you can continue to [[#Installation]]<br />
<br />
==== BIOS-compatibility ====<br />
<br />
* Boot installation medium and switch to a free tty.<br />
* Run '''parted'''. The simplest way is to change the partition table to '''msdos''' and then partition as normal. GRUB is compatible with GPT.<br />
<br />
* Create the necessary partitions.<br />
<br />
* Done, you can continue to [[#Installation]]<br />
<br />
=== Mac OS X with Arch Linux ===<br />
<br />
The easiest way to partition your hard drive, so that OS X and Arch Linux will co-exist, is to use partitioning tools in OS X and then finish with Arch Linux tools.<br />
<br />
{{Warning|It is highly recommended that this only be attempted after a clean install of OS X. Using these methods on a pre-existing system may have undesired results.}}<br />
<br />
{{Note|If you have any problems, try using [http://gparted.sourceforge.net/ gparted] (i.e. ''instead'' of using Disk Utility and/or cgdisk). It is capable of shrinking the OS X partition and creating Linux partitions ready for installation.}}<br />
<br />
'''Procedure''':<br />
* In OS X, run '''Disk Utility.app''' (located in {{ic|/Applications/Utilities}})<br />
<br />
* Select the drive to be partitioned in the left-hand column (not the partitions!). Click on the '''partition''' tab on the right.<br />
<br />
* Select the volume to be resized in the '''Volume scheme'''.<br />
<br />
* Decide how much space you wish to have for your OS X partition, and how much for Arch Linux. Remember that a typical installation of OS X requires around 15-20 GiB, depending on the number of software applications and files.<br />
<br />
* Finally, type the new (smaller) size for the OS X partition in the size box and click '''Apply'''. This will create a new partition out of the empty space. You will delete this partition later.<br />
<br />
{{Note|if you wish to have a shared partition between OS X and Arch Linux, then additional steps will need to happen here. Please see [[#Shared Partition]].}}<br />
<br />
* If the above completed successfully, then you can continue. If not, then you may need to fix your partitions from within OS X first.<br />
<br />
* Boot the Arch install CD by holding down the alt key during Boot. Follow one of the procedures below according to your choice of boot-method.<br />
<br />
==== EFI ====<br />
<br />
* Run '''cgdisk'''<br />
<br />
* Delete the partition you made in Disk Utility.app and create the necessary partitions for Arch Linux. OS X likes to see a 128 MiB gap after partitions, so when you create the first partition after the last Mac OS X-partition, type in '''+128M''' when cgdisk asks for the first sector for the partition. A simple example (no LVM, crypto):<br />
{{Note|<br />
* The swap partition is optional, on machines with a RAM of size 4GB or more, good performance can be expected without a swap partition. Also, a '''swap file''' can be created later, see [[Swap#Swap file]].<br />
* If you want to be able to boot GRUB from the Apple boot loader, you can create a small hfs+ partition (for convenience, use OS X to format it in Disk Utility.app afterwards). Follow the GRUB EFI install procedure, and mount your {{ic|/boot/efi}} directory to the hfs+ partition you created. Finally, finish up again in OS X by blessing the partition. This will set GRUB as the default boot option (holding alt at startup goes to the mac boot options screen still. See http://mjg59.dreamwidth.org/7468.html)<br />
* For more information on partitioning, see [[Partitioning]].<br />
* OS X's EFI partition can be shared with archlinux, making the creation of an additional EFI partition dedicated to arch completely optional<br />
}}<br />
partition mountpoint size type label<br />
/dev/sda1 /boot/efi 200MiB vfat EFI<br />
/dev/sda2 - ? hfs+ Mac OS X<br />
/dev/sda3 - ? hfs+ Recovery<br />
/dev/sda4 - 100MiB hfs+ Boot Arch Linux from the Apple boot loader (optional)<br />
/dev/sda5 /boot 100MiB boot boot<br />
/dev/sda6 - ? swap swap (optional)<br />
/dev/sda7 / 10GiB ext4 root<br />
/dev/sda8 /home remaining ext4 home<br />
<br />
* Done, you can continue to [[#Installation]]<br />
<br />
==== BIOS-compatibility ====<br />
<br />
* Run '''parted''' as root.<br />
<br />
* Delete the empty space partition and partition the space as you would for any other installation. Note that MBR is limited to 4 primary partitions (including the efi partition). That leaves 2 primary partitions for arch. One strategy is to have a system and home partition, and use a swap file (I have not tried to use logical partitions). Another is to dedicate one partition to a shared partition (see below).<br />
<br />
* Next, create new filesystems on those partitions which need them, especially the partition which will contain /boot. If you're not sure how to do this using {{ic|mkfs.ext2}} (or whatever), run {{ic|/arch/setup}} and work through until you get to Prepare Hard Drive and use the "Manually configure block devices..." option, then exit the installer. This is necessary so that rEFIt will set the right partition type in the MBR in the next step (without an existing filesystem, it seems to ignore the partition type set by parted), without which GRUB will refuse to install to the right partition.<br />
<br />
* At this point you should reboot your computer and have rEFIt fix the partition tables on your hard drive. (If you do not do this, you may have to reinstall GRUB later on in order to have your Mac recognize the Linux partition.) When you are into the rEFIt menu, select '''update partition table''', then press Y. Reboot.<br />
<br />
* Done, you can continue to [[#Installation]]<br />
<br />
=== Mac OS X, Windows XP, and Arch Linux triple boot ===<br />
<br />
This may not work for everyone but it has been successfully tested on a Macbook from late 2009.<br />
<br />
The easiest way to partition your hard drive, so that all these operating systems can co-exist, is to use disk utility in Mac OS X, use the formatter on windows XP install CP, and then finish with Arch Linux tools.<br />
<br />
{{Warning|It is highly recommended that this only be attempted after a clean install of Mac OS X. Using these methods on a pre-existing system may have undesired results. At least back your stuff up with timemachine or clonezilla before you begin.}}<br />
<br />
'''Procedure''':<br />
* In Mac OS X, run '''Disk Utility''' (located in {{ic|/Applications/Utilities}}).<br />
<br />
* Select the drive to be partitioned in the left-hand column (not the partitions!). Click on the '''partition''' tab on the right.<br />
<br />
* Select the volume to be resized in the '''volume scheme.'''<br />
<br />
* Decide how much space you wish to have for your Mac OS X partition, how much fo XP, and how much for Arch Linux. Remember that a typical installation of Mac OS X requires around 15-20 GiB, and XP about the same, depending on the number of software applications and files. Something like OSX 200Gb, XP 25Gb, Arch 25Gb should be fine.<br />
<br />
* Put your decisions into action by pressing the + button and adding the new partitions, Label them as you like and make sure that your XP partition is the last one on the disk and is formatted for FAT32. It is probably best to have Arch formatted in HFS format as to not confuse you later, it will be reformatted anyway.<br />
<br />
So in linux terms your partitions will be something like:<br />
<br />
:*sda (disk)<br />
:*sda1 (Mac boot partition - you cannot see this one in OSX)<br />
:*sda2 (OSX install in HFS+)<br />
:*sda3 (Arch install temporarly in HFS)<br />
:*sda4 (XP install in FAT32)<br />
<br />
* Finally, click '''apply'''. This will create a new partition out of the empty space.<br />
<br />
{{Note|Using this method you may not be able to have a shared partition between Mac OS X and Arch Linux, this is because the mac will only allow for 4 active partitions. You will however be able to mount a HFS partition in Arch for one workaround. There are other workarounds possible also.}}<br />
<br />
* If the above completed successfully, you can continue. If not, then you may need to fix your partitions from within Mac OS X first.<br />
<br />
* You will not be needing boot camp this way, the program rEFIt is much more flexible (though not as flexible as GRUB). Download and install rEFIt [[http://refit.sourceforge.net/]]<br />
<br />
* Go into a terminal in OS X and perform the following, this will enable the rEFIt boot manager. <br />
<br />
cd /efi/refit<br />
./enable.sh<br />
<br />
* Reboot to check the rEFIt is working, it should appear on boot. When it comes up go to the rEFIt partition manager and agree to the changes.<br />
<br />
* Put your XP install CD and boot it with rEFIt - You may have to reboot a few times until it is recognized by the boot loader. Install XP and once it is installed use the OSX install CD to get your drivers running nicely in XP.<br />
** Note: when installing XP make sure you select your XP partition and format it again inside the XP installer. If you do not reformat it will not work.<br />
<br />
* Boot the Arch install CD, log in as root and run {{ic|# /arch/setup}}.<br />
<br />
* Follow the install as normal but note that you will have to tell that arch installer to mount sda3 as the root partition and format it as ext3, there will not be a /boot or swap partition so ignore those warnings.<br />
<br />
* At this point, if you are dual booting, you should reboot your computer and have rEFIt fix the partition tables on your hard drive. (If you do not do this, you may have to reinstall GRUB later on in order to have your Mac recognize the Linux partition.) When you are into the rEFIt menu, select '''update partition table''', then press Y.<br />
# reboot<br />
<br />
* Done! You can continue to [[#Installation]] but make sure you read [[#Booting directly from GRUB]] for the stage "* (for booting with EFI) After the install boot loader stage, exit the installer and install GRUB."<br />
<br />
== Booting directly from GRUB ==<br />
<br />
=== Installing GRUB to EFI partition directly ===<br />
<br />
* If you would like to use GRUB as your main bootloader and use the "boot while holding the Alt/Option key" method to go back to Mac OS X rather than using alternatives such as rEFIt (http://refit.sourceforge.net/, mentioned previously in [[#BIOS-compatibility]] and [[#Mac OS X, Windows XP, and Arch Linux triple boot]]) then you must install {{Pkg|grub-efi-x86_64}} to your Mac's '''already-existing''' EFI partition (see below). <br />
<br />
{{Note| These instructions are known to work on a Macbook Pro (Early 2011). Please read the procedure carefully '''as well as the details following it'''.}}<br />
<br />
'''Procedure''':<br />
<br />
* Install {{Pkg|grub-efi-x86_64}}<br />
<br />
* Make a directory named {{ic|efi}} in {{ic|/boot}} <br />
<br />
* Mount the '''already-existing''' EFI partition on your Mac to this {{ic|/boot/efi}} directory<br />
<br />
* Install GRUB to this directory<br />
<br />
* Make a directory named {{ic| locale}} in {{ic| /boot/grub}}<br />
<br />
* Copy {{ic| grub.mo}} from {{ic| /usr/share/locale/en\@quot/LC_MESSAGES/}} to {{ic| /boot/grub/locale}} <br />
<br />
* Generate a configuration for GRUB<br />
<br />
* Done! GRUB will now start on reboot and you can boot into your newly installed Archlinux.<br />
<br />
* Remember to hold ALT/Option key '''while''' starting your computer if you want to boot back into Mac OS X.<br />
<br />
<br />
'''Details (quoted from [https://wiki.archlinux.org/index.php/GRUB_EFI_Examples#M5A97]):'''<br />
<br />
Finish the standard Arch install procedures, making sure that you install {{Pkg|grub-efi-x86_64}} and partition your boot hard disk as GPT.<br />
<br />
From [https://wiki.archlinux.org/index.php/Grub#Install_to_UEFI_system_partition]:<br />
<br />
The UEFI system partition will need to be mounted at {{ic|/boot/efi/}} for the GRUB install script to detect it:<br />
<br />
# mkdir -p /boot/efi<br />
# mount -t vfat /dev/sdXY /boot/efi<br />
<br />
Where X is your boot hard disk and Y is the efi partition you created earlier.<br />
<br />
Install GRUB UEFI application to and its modules to {{ic|/boot/grub/x86_64-efi}} using:<br />
<br />
# modprobe dm-mod<br />
# grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=arch_grub --recheck --debug<br />
# mkdir -p /boot/grub/locale<br />
# cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo<br />
<br />
Generate a configuration for GRUB<br />
<br />
# grub-mkconfig -o /boot/grub/grub.cfg<br />
<br />
=== Using blessing ===<br />
<br />
It is possible to boot directly from GRUB in EFI mode without using rEFIt through what is known as "blessing" after placing GRUB on a '''separate partition'''. These instructions are known to work on a Macbook 7,1. It is advisable to host GRUB on either a FAT32 or HFS+ partition, but ext2 or ext3 may also work. GRUB's appleloader command does not currently work with the 7,1, but support can be added with the patch available [https://savannah.gnu.org/bugs/index.php?33185 here].<br />
<br />
After the GRUB install is in the desired location, the firmware needs to be instructed to boot from that location. This can be done from either an existing OS X install or an OS X install disk. The following command assumes that the GRUB install is in {{ic|/efi/grub}} on an existing OS X partition:<br />
# bless --folder /efi/grub --file /efi/grub/grub.efi<br />
<br />
=== Compilation ===<br />
<br />
Some models may need EFI_ARCH set to i386.<br />
bzr branch --revision -2 bzr://bzr.savannah.gnu.org/grub/trunk/grub grub<br />
cd grub<br />
./autogen.sh<br />
patch -p1 < appleloader_macbook_7_1.patch<br />
export EFI_ARCH=x86_64<br />
./configure --with-platform=efi --target=${EFI_ARCH} --program-prefix=""<br />
make<br />
cd grub-core<br />
../grub-mkimage -O ${EFI_ARCH}-efi -d . -o grub.efi -p "" part_gpt part_msdos ntfs ntfscomp hfsplus fat ext2 normal chain boot configfile linux multiboot<br />
cp grub.efi *.mod *.lst yourinstalllocation<br />
<br />
=== Example grub.cfg ===<br />
<br />
{{out of date|reason=kernel26}}<br />
Note that there may be a better method for loading Windows.<br />
{{bc|1=<br />
set debug=video<br />
insmod efi_gop<br />
<br />
menuentry "Arch Linux EFI" {<br />
set root=(hd0,3)<br />
#search --set -f /boot/vmlinuz26-efi-physical<br />
#loadbios /boot/vbtrace_bios.bin /boot/int10.bin<br />
linux /boot/vmlinuz26-efi-physical root=/dev/sda3 reboot=pci resume=/dev/sda3 resume_offset=151552<br />
initrd /boot/kernel26-efi-physical.img<br />
}<br />
<br />
menuentry "MacOSX" {<br />
set root=(hd0,2)<br />
# Search the root device for Mac OS X's loader.<br />
#search --set -f /usr/standalone/i386/boot.efi<br />
# Load the loader.<br />
chainloader /usr/standalone/i386/boot.efi<br />
}<br />
<br />
menuentry "Windows 7" {<br />
appleloader HD<br />
}<br />
<br />
menuentry "Boot from CD" {<br />
appleloader CD<br />
}<br />
<br />
menuentry "Boot from USB" {<br />
appleloader USB<br />
}<br />
}}<br />
<br />
== Installation ==<br />
<br />
{{Note|This section is only required if you want to have Mac OS X installed along with Arch Linux. If not, follow the steps in the official install guide, then skip to [[#Post-Install Configuration]].}}<br />
<br />
* Boot from the Arch Linux install CD or the latest [[Archboot]] iso (unofficial) depending on your needs. For a USB that is bootable by Apple's UEFI, you'll need to follow these steps to [[Unified_Extensible_Firmware_Interface#Create_UEFI_bootable_USB_from_ISO|create a UEFI bootable USB.]]<br />
{{Note|<br />
* On MacBook Pro 7,1, I had an error booting the installation media Version 2012.12.01: "unable to handle kernel NULL pointer dereference at 0000000000000010" during pacpi_set_dmamode. To fix this problem, boot with the option: acpi&#61;off. After chrooting, add MODULES&#61;"ata_generic" into /etc/mkinitcpio.conf and execute mkinitcpio -p linux, see: [[Installation_Guide#Configure_the_system|Installation Guide, 9 Configure the system]].<br />
* Some MacBook users report strange keyboard output such as long delays and character doubling. To fix this problem, boot with the following options: arch noapic irqpoll acpi&#61;force}}<br />
<br />
* Log in as '''root'''<br />
<br />
{{Note|If you want to do a netinstall rather than installing the possibly outdated packages on the iso and depend on a wireless network that is encrypted, you should change to a free tty and connect manually before proceeding, see [[Beginners_Guide#Setup wireless in the live environment (optional)|Beginners_Guide]]}}<br />
<br />
* Proceed through the installation as described in the [[Official Arch Linux Install Guide]] '''except''' in the following areas:<br />
** In the [[Official Arch Linux Install Guide#Prepare Hard Drive|prepare hard drive]] stage, do only the [[Official Arch Linux Install Guide#Manually configure block devices, filesystems and mountpoints|set filesystem mountpoints]] step, taking care to assign the correct partitions. Partitions have already been created if you followed [[#Partition]]<br />
** '''(for booting with EFI''') After the [[Official Arch Linux Install Guide#Install Bootloader|install boot loader]] stage, exit the installer and install [[GRUB]].<br />
** '''(for booting with BIOS-compatibility)''' In the [[Official Arch Linux Install Guide#Install Bootloader|install boot loader]] stage, edit the menu.lst file and add '''reboot=pci''' to the end of the '''kernel''' lines, for example: {{bc|1=kernel /vmlinuz26 root=/dev/sda5 ro reboot=pci}} This will allow your MacBook to reboot correctly from Arch.<br />
** '''(for booting with BIOS-compatibility)''' Also in the [[Official Arch Linux Install Guide#Install Bootloader|install boot loader]] stage, install GRUB on whatever partition that {{ic|/boot}} is on. {{Warning|Do not install GRUB onto ''/dev/sda'' !!! Doing so is likely to lead to an unstable post-environment.}}<br />
** In the [[Official Arch Linux Install Guide#Configure System|configure system]] stage, edit /etc/mkinitcpio.conf and add the '''usbinput''' hook to the '''HOOKS''' line somewhere after the '''autodetect''' hook. This will load the drivers for your keyboard in case you need to use it before Arch boots (e.g. entering a [[LUKS]] password or using the troubleshooting shell).<br />
<br />
* When the install process is complete, reboot your computer.<br />
<br />
* If using optical media, hold down the eject key as your MacBook starts, this should eject the Arch Linux install disk.<br />
<br />
* If dual-booting Mac OS X and Arch Linux, hold down the alt (option) key while the system boots to use the Mac bootloader to select which OS to boot.<br />
<br />
=== Additional steps for Arch Linux only install===<br />
<br />
GRUB seems to be more complicated and less straightforward than rEFInd on EFI environments, so it's usually the prefered choice. It'll also add entries for bootable devices if they're plugged in, and requires no rebuild/redeployments when the configuration is updated.<br />
<br />
==== GRUB ====<br />
<br />
{{Note|Do this after you tested that your setup is working. This procedure has been tested on a MacBook 4,1 with an msdos partition table. It may not work on newer versions. Please update if it works for you.}}<br />
* In order for Linux to boot up straight away, you will have to tell the firmware that your /boot partition is bootable, or you will always have to hold down the option (alt) key whenever you want to start up your computer.<br />
* In order to do this you will need the original Mac OS X install disk<br />
* Boot into it (you may need to hold the option (alt) key during boot again to access it)<br />
** Open Terminal.app (found under the Utilities menu in the menu bar), and type:<br />
# diskutil list<br />
** Find the device name of your /boot partition (this is your root (/) partition, if you don't have it separate). The format should be /dev/disk0sX, where X is a number from 1 to infinity<br />
** If using EFI type (replace X with the appropriate number):<br />
# bless --folder=/Volumes/efi --file=/Volumes/efi/efi/arch/grubx64.efi --setBoot<br />
# bless --mount=/Volumes/efi --file=/Volumes/efi/efi/arch/grubx64.efi --setBoot<br />
** If using BIOS-compatibility type (replace X with the appropriate number):<br />
# bless --device /dev/disk0sX --setBoot --legacy --verbose<br />
* Remove the installation disk and restart your computer<br />
* After a few seconds of grey screen, your boot loader screen should appear automatically.<br />
<br />
==== rEFInd ====<br />
<br />
{{Note|This has been tested on a 2013 MBA. There's no reason for it not to work on older models.}}<br />
<br />
* Install [https://www.archlinux.org/packages/extra/x86_64/refind-efi/ rEFInd] from [extra].<br />
* Install rEFInd into the EFI partition:<br />
# refind-install<br />
* Create configuration files for the linux images in /boot:<br />
# refind-mkrlconf<br />
* Edit /boot/refind_linux.conf if you need to add any additional kernel parameters.<br />
<br />
== Post-install configuration ==<br />
<br />
=== Xorg ===<br />
<br />
Install and configure Xorg by following the [[Xorg]] article.<br />
<br />
==== Video ====<br />
<br />
Different MacBook models have different graphic cards.<br />
<br />
To see which graphics card you have type:<br />
<br />
$ lspci | grep VGA<br />
<br />
* If it returns a string containing '''intel''' you only need the {{Pkg|xf86-video-intel}} driver. Intel-based MacBooks work out-of-the-box.<br />
<br />
* If it returns '''nVidia''', read [[NVIDIA]].<br />
<br />
* Otherwise if it returns '''ATI''' or '''AMD''', read [[ATI]].<br />
<br />
===== NVIDIA note =====<br />
<br />
{{Tip|MBP 6.2 - With the proprietary [[NVIDIA]] drivers, support for [[NVIDIA#Enabling Pure Video HD (VDPAU/VAAPI)|PureVideo HD]] is available for hardware video decoding. }}<br />
<br />
For MacBooks with NVIDIA graphics, for the backlight to work properly you may need the {{AUR|nvidia-bl}} package found in the [[AUR]].<br />
<br />
{{Tip|<br />
* If backlight control doesn't work after installing nvidia-bl, you should [[Kernel modules#Blacklisting|blacklist]] apple_bl kernel module.<br />
* Alternatively, you can choose to use the {{AUR|pommed-light}} package. If you do so, you may wish to change the step settings in {{ic|/etc/pommed.conf.mactel}} to something around 5000-10000 depending on how many levels of brightness you desire. The max brightness is around 80000, so take that into account.}}<br />
<br />
===== Macbook 6.2+ - EFI =====<br />
<br />
As of 4/30/2011, the proprietary nvidia driver is not known to work under X with this model in efi mode. The nouveau driver should work out of the box, but dri should be installed from the [https://aur.archlinux.org/packages/mesa-git/PKGBUILD mesa-git] package.<br />
<br />
===== MacbookPro 5.5, NVIDIA and secondary display =====<br />
<br />
As of January 1 2011, the latest NVIDIA drivers (290.10) might not work properly when a secondary display is used (tested with TwinView), NVIDIA's current [http://www.nvnews.net/vbulletin/showthread.php?t=122606 long-live supported] 275xx drivers seem to work fine. Install {{AUR|nvidia-275xx}} and {{AUR|nvidia-utils-275xx}}, and possibly {{AUR|lib32-nvidia-utils-275xx}} if you are on x86_64 system and want 32-bits support.<br />
<br />
MacbookPro 5.5 has an NVIDIA 9400m graphics card. This problem might apply to other devices as well.<br />
<br />
==== Touchpad ====<br />
<br />
The touchpad should have basic functionality by default. A true multitouch driver which behaves very similarly to native OSX can be installed from the AUR: {{AUR|xf86-input-multitouch-git}}. It supports 1, 2 and 3 finger gestures, including differentiation between horizontal and vertical 3 finger swipe. Additional details are available at [http://bitmath.org/code/multitouch/ the driver's project page].<br />
<br />
xf86-input-multitouch-git does not support any sort of configuration without editing the driver's source. Some users are also experiencing issues with false clicks from palm touches. There is now a much more configurable fork available as {{AUR|xf86-input-mtrack-git}}. Configuration options are documented in the [https://github.com/BlueDragonX/xf86-input-mtrack readme].<br />
<br />
The following mtrack options work well on a Macbook 7,1:<br />
<br />
Option "Thumbsize" "50"<br />
Option "ScrollDistance" "100"<br />
<br />
Probably you need also to add:<br />
<br />
MatchDevicePath "/dev/input/event10"<br />
<br />
'''Natural scrolling:''' To configure natural two finger scrolling similar to [http://www.apple.com/au/osx/what-is/gestures.html#gallery-gestures-scroll Mac OSX], refer to [[Touchpad_Synaptics#Natural_Scrolling]]. If you are using GNOME, it will override these settings - in this case refer to [[GNOME#Natural_scrolling_touchpad]].<br />
<br />
'''Special Note About Older Macbook Models (confirmed on MacBook 2,1):''' On older Macbook models (pre-multitouch), the touchpad will not function properly until you install the xf86-input-synaptics package. Please see [[Touchpad Synaptics]] for more information on installing and configuring this package.<br />
<br />
'''Note on Macbook Pro(5,5):''' I found it is much simpler to use the xf86-input-synaptics[https://www.archlinux.org/packages/extra/x86_64/xf86-input-synaptics/] in Extra. Although it does not have much function as 3 finger swipe, this driver provides faster response. Gsynaptics[https://www.archlinux.org/packages/community/i686/gsynaptics/] also provides a simple GUI config. Below is a Xorg config file /etc/X11/xorgconfig.d/60-synaptics.conf for reference only.<br />
Section "InputClass"<br />
Identifier "touchpad catchall"<br />
Driver "synaptics"<br />
MatchIsTouchpad "on"<br />
MatchDevicePath "/dev/input/event*"<br />
Option "SHMConfig" "on"<br />
Option "TapButton1" "1"<br />
Option "TapButton2" "3"<br />
Option "TapButton3" "2"<br />
Option "PalmDetect" "on"<br />
Option "VertEdgeScroll" "off"<br />
Option "HorizEdgeScroll" "off"<br />
Option "CornerCoasting" "off"<br />
Option "EdgeMotionUseAlways" "off"<br />
Option "AreaLeftEdge" "10"<br />
Option "AreaRightEdge" "1270"<br />
EndSection<br />
'''OS X like MultiTouch Gestures''' For users looking to add more of OS X's multitouch gestures to Arch, [https://github.com/iberianpig/xSwipe xSwipe] is a highly customisable, light weight pearl script, which does just that. Once installed and configured (see xSwipe wiki on Github) I would recommend adding xSwipe as a [https://wiki.archlinux.org/index.php/Autostarting start up item].<br />
<br />
==== Keyboard ====<br />
<br />
MacBook keyboard works by default. For swaping fn keys with Fx keys see [[Apple Keyboard]].<br />
<br />
To enable it you can map with right application like '''xbindkeys''' or through DE preferences; but another very good way, that we recommend, is to install {{AUR|pommed}} from the [[AUR]].<br />
<br />
Edit the {{ic|/etc/pommed.conf}} according to your hardware on MacBook, building<br />
it from {{ic|/etc/pommed.conf.mac}} or {{ic|/etc/pommed.conf.ppc}} example files.<br />
<br />
Note that you can also run it without a configuration file, the defaults may work for you. Then enable pommed [[Systemd]] service and reboot.<br />
<br />
{{Tip|if you are using Gnome or KDE you can easily configure ''3rd level functionality'', ''multimedia key'', etc. in Keyboard Preferences.}}<br />
<br />
{{Note|See the [[Xorg input hotplugging]] page for other configuration information.}}<br />
<br />
===== Keyboard Backlight =====<br />
<br />
The keyboard backlight is controlled by {{ic|/sys/class/leds/smc::kbd_backlight}}. Write the desired value to {{ic|brightness}} in that directory.<br />
<br />
You may also use [https://aur.archlinux.org/packages/kbdlight/ kbdlight] to control keyboard backlight though scripts or by running it via sxhkd or xbindkeys. It has the advantage of allowing keyboard light-level changes without being root.<br />
<br />
====== NVIDIA note ======<br />
<br />
If the brightness does not function correctly through pommed, make sure you have installed the {{AUR|nvidia-bl}} package and insert<br />
<br />
find . -name "*" -exec sed -i 's/mbp_backlight/nvidia_backlight/' '{}' \;<br />
<br />
into the second line of the pommed PKGBUILD build() function and remake the package. From [https://bbs.archlinux.org/viewtopic.php?id=105091 this forum post].<br />
<br />
Another possible solution is to modify the pommed PKGBUILD build():<br />
<br />
find . -name "*" -exec sed -i 's/nvidia_backlight/apple_backlight/' '{}' \;<br />
<br />
If the previous does not work try the following,<br />
<br />
run nvidia-settings, edit the file '/etc/X11/xorg.conf' and add this line into the Device section:<br />
<br />
Option "RegistryDwords" "EnableBrightnessControl=1"<br />
Save and reboot and check backlight buttons work.<br />
More information available at [https://help.ubuntu.com/community/MacBookPro5-5/Precise#LCD ubuntu macbook pro 5,5]<br />
<br />
=== Wi-Fi ===<br />
<br />
Different MacBook models have different wireless cards.<br />
<br />
You can easily check what card do your MacBook have by:<br />
<br />
# lspci | grep Network<br />
<br />
* If you have an Atheros card, all should work out-of-the-box.<br />
<br />
* If you have a Broadcom card, follow the [[Broadcom BCM4312]] page.<br />
<br />
* 5.0 and 6.0 generation MacBooks may have a BCM43xx, follow the instructions for the broadcom-wl driver on the [[Broadcom wireless]] page. The interfaces can swap during reboot so its best to define them in a udev rule (instructions on the [[Broadcom wireless]] page).<br />
<br />
* 8.1 generation MacBooks have BCM4331, for which support is not present in either Linux (3.0 and 3.1) or the proprietary drivers by Broadcom. There is however preliminary support for it in Linux 3.2. To run the drivers on earlier kernels, you will need to use [http://wireless.kernel.org/en/users/Download compat-wireless]<br />
<br />
{{Note|If your connection frequently drops, you may have to turn off Wi-Fi power management. If you are running [[pm-utils]], you may override wireless power management by creating an executable file {{ic|/etc/pm/wireless}} with the lines:<br />
#!/bin/sh<br />
iwconfig wlp2s0 power off<br />
}}<br />
<br />
=== Power management ===<br />
<br />
==== Laptop-mode-tools ====<br />
<br />
Because the MacBook is obviously a laptop, you may wish to control its power management features using something like [[Laptop Mode Tools]].<br />
<br />
However, Laptop Mode Tools is known to disable the keyboard in console mode after being idle for a few seconds (does not happen when using X). If this happens to you set <br />
<br />
CONTROL_USB_AUTOSUSPEND=0<br />
<br />
in {{ic|/etc/laptop-mode/conf.d/usb-autosuspend.conf}}. See this [https://bbs.archlinux.org/viewtopic.php?pid=984831 forum thread] for the original workaround.<br />
<br />
==== Suspend to RAM (kernel suspend) ====<br />
<br />
Suspend (the kernel suspend) should work out of the box (I had a problem in which the machine would "suspend immediately after resume" in certain conditions when suspending by closing the lid. This was solved by de-selecting the option "event_when_closed_battery" in gconf-editor &rarr; gnome-power-manager &rarr; actions).<br />
<br />
For a macbook2,1 (bought in 2007) s2ram works using <br />
s2ram -f -a 3 <br />
To make it work with kde4 you have to create a file named "config" into /etc/pm/config.d containing<br />
SLEEP_MODULE="uswsusp"<br />
S2RAM_OPTS="-f -a 3"<br />
<br />
For a MacBook Pro 3,1 (bought in 2008), the following command should work, both in X and in a console:<br />
s2ram -f -a 1<br />
<br />
Note: If you use pm-utils suspending lead (at least for me) disk freeze. Try changing /etc/pm/config.d/module to<br />
SLEEP_MODULE=tuxonice<br />
<br />
For a macbook5.5, s2ram may work using (be sure to run it in X)<br />
s2ram -f -p -m<br />
<br />
==== Suspend to disk (hibernate) ====<br />
<br />
{{Merge|Swap#Swap file|These part is duplication of Swap file section in Swap. Should check and merge it to Swap.}}<br />
Hibernate should work if you have a swap partition. If you opted for a swap file because of the MBR limitation to 4 primary partitions, you can still get hibernate functionality by following these instructions (this is mostly taken from http://ubuntuforums.org/showthread.php?t=1042946):<br />
<br />
* Create a swapfile (here 2G = bs*count):<br />
# dd if=/dev/zero of=/swapfile bs=1024 count=2M<br />
It is recommended, but not necessary, to create the swapfile on a newly created partition, so that fragmentation is minimum.<br />
# chmod 600 swapfile <br />
# mkswap swapfile <br />
mkswap: swapfile: warning: don't erase bootbits sectors<br />
on whole disk. Use -f to force.<br />
Setting up swapspace version 1, size = 2097148 KiB<br />
no label, UUID=6bf46166-4f9e-433a-aac1-91cb3f5cf8ba<br />
# <br />
Note that we will not use this UUID later.<br />
* Add the swapfile in {{ic|/etc/fstab}}:<br />
/swapfile none swap sw 0 0<br />
* Determine the UUID of partition on which the swapfile is (/usr/bin/blkid is provided by util-linux-ng)<br />
# blkid -g<br />
# blkid<br />
/dev/sda4: UUID="388014d3-1d18-4ca0-980e-ef2f9fdebde4" TYPE="ext3" <br />
388014d3-1d18-4ca0-980e-ef2f9fdebde4 is the number we are looking for.<br />
* Determine the physical offset of the swapfile:<br />
# filefrag -v /swapfile | head<br />
Filesystem type is: ef53<br />
Filesystem cylinder groups is approximately 132<br />
File size of /swapfile is 2147483648 (524288 blocks, blocksize 4096)<br />
ext logical physical expected length flags<br />
0 0 24576 12 merged<br />
1 12 24589 24587 1024 merged<br />
2 1036 25615 25612 1024 merged<br />
3 2060 26640 26638 1024 merged<br />
4 3084 27665 27663 1024 merged<br />
5 4108 28690 28688 1024 merged<br />
$ <br />
Here, 24576 is the number we want.<br />
* Edit {{ic|/boot/grub/grub.cfg}} and add:<br />
resume=/dev/disk/by-uuid/388014d3-1d18-4ca0-980e-ef2f9fdebde4 resume_offset=24576<br />
to your kernel stanza options (or use the kopt method as in the post). Note that the "resume=UUID=" actually did not work for me. I had to use the {{ic|/dev/disk/by-uuid}} syntax.<br />
<br />
Note: "ro" has to be at the end of the line, like this:<br />
kernel /boot/vmlinuz-linux root=/dev/sda4 '''resume=/dev/sda4 resume_offset=24576''' ro<br />
* Nothing to do with update-grub nor mkinitcpio.<br />
* Reboot once<br />
* Try to hibernate<br />
<br />
=== Light sensor ===<br />
<br />
If you want to use the built in light sensor to automatically adjust screen and keyboard backlight brightness check out<br />
'''Lighter''' [https://github.com/Janhouse/lighter] (simple perl script, easy to fine-tune) and '''Lightum''' [https://github.com/poliva/lightum] (Requires Gnome or KDE but is older and more complete than Lighter).<br />
<br />
=== Sound ===<br />
<br />
{{Tip|MBP 5.5: since kernel 2.6.32 this works out of the box - just unmute the front speakers and store the sound level }}<br />
<br />
First of all follow [[ALSA]] wiki page, then if something does not work correctly, continue reading this part.<br />
<br />
Edit your {{ic|/etc/modprobe.d/50-sound.conf}} or {{ic|/etc/modprobe.d/modprobe.conf}} appending this line:<br />
<br />
options snd_hda_intel model=intel-mac-auto<br />
<br />
This should automatically specify the codec in your MacBook. Alternatively, for MacBookPro5,X, you can use:<br />
<br />
options snd_hda_intel model=mb5<br />
<br />
(note that the jack output is controlled with "HP").<br />
<br />
If you have an iMac8,1, you should instead use<br />
<br />
options snd-hda-intel model=mbp3 position_fix=2<br />
<br />
You can try to specify other options, that depend on your hardware. All other possible settings are listed in Kernel Documentation, avaible online:<br />
<br />
* [http://www.kernel.org/doc/Documentation/sound/alsa/ALSA-Configuration.txt ALSA-Configuration.txt]<br />
* [http://www.kernel.org/doc/Documentation/sound/alsa/HD-Audio.txt HD-Audio.txt]<br />
* [http://www.kernel.org/doc/Documentation/sound/alsa/HD-Audio-Models.txt HD-Audio-Models.txt].}}<br />
<br />
Then, reboot.<br />
<br />
=== Bluetooth ===<br />
<br />
{{Note|Bluetooth should work out-of-the box. The hid2hci utility is used by default since bluez 4.91}}<br />
<br />
See the article on [[Bluetooth]] to install and configure all software needed.<br />
<br />
=== Webcam ===<br />
<br />
==== iSight ====<br />
<br />
{{Note|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.}}<br />
<br />
You can use many applications to test the camera:<br />
<br />
* MPlayer<br />
<br />
# mplayer tv:// -tv driver=v4l2:width=320:height=240:device=/dev/video0 -fps 30<br />
<br />
* Cheese<br />
* Skype<br />
* Ekiga<br />
<br />
A simple solution to take snapshots is:<br />
<br />
# mplayer tv:// -vf screenshot<br />
<br />
and the pressing the s key to take a snapshot. Files are of the format shot\d\d\d\d.png and are reported in the standard output.<br />
<br />
==== Facetime HD ====<br />
The Facetime HD webcam (included on 2013 MBAs onwards) [http://mactaris.blogspot.co.uk/2013/07/webcam-settings-20-will-support.html is no longer UVC device], and therefore, does not work out of the box.<br />
<br />
=== Temperature Sensors ===<br />
<br />
For reading temperature just install and configure '''lm_sensors'''.<br />
See [[Lm sensors]] page.<br />
<br />
=== Color Profile ===<br />
<br />
We can use color profiles from Mac OS.<br />
<br />
First, install {{AUR|xcalib}} from the [[AUR]].<br />
<br />
Second copy pre-saved color profiles placed in {{ic|/Library/ColorSync/Profiles/Displays/}} on Mac OS partition to {{ic|~/colorprofiles/}} for example.<br />
<br />
There are color profile files agree with in MacBook models; select the right one:<br />
<br />
* '''Color LCD-4271800.icc''' for MacBook Pro with CoreDuo CPU<br />
* '''Color LCD-4271880.icc''' for MacBook with Core2Duo<br />
* '''Color LCD-4271780.icc''' for MacBook (not Pro) based on CoreDuo or Core2Duo.<br />
<br />
{{Tip|Also Mac OS allows to save current color profile from ''Displays > Color'' section of the ''Mac OS System Preferences'', in this case file is saved to {{ic|/Users/<username>/Library/ColorSync/Profiles}}.}}<br />
<br />
Finally you can activate it by running<br />
<br />
# xcalib ~/colorprofile.icc<br />
<br />
{{Note|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).}}<br />
<br />
=== Apple Remote ===<br />
<br />
First, to correctly install and configure the '''lirc''' software that control IR see [[Lirc]] wiki.<br />
<br />
Then make LIRC use {{ic|/dev/usb/hiddev0}} (or {{ic|/dev/hiddev0}}) by editing {{ic|/etc/conf.d/lircd}}. Here is how mine look:<br />
<br />
#<br />
# Parameters for lirc daemon<br />
#<br />
LIRC_DEVICE="/dev/usb/hiddev0"<br />
LIRC_DRIVER="macmini"<br />
LIRC_EXTRAOPTS=""<br />
LIRC_CONFIGFILE="/etc/lirc/lircd.conf"<br />
<br />
Use '''irrecord''' (available when installing '''lirc''') to create a configuration file matching your remote control signals (alternatively, you can try to use the {{ic|lircd.conf}} below):<br />
<br />
# irrecord -d /dev/usb/hiddev0 -H macmini output_conf_file<br />
<br />
Start '''lircd''' and use '''irw''' to check if it works.<br />
<br />
Example of an {{ic|/etc/lirc/lircd.conf}}:<br />
<br />
begin remote<br />
<br />
name lircd.conf.macbook<br />
bits 8<br />
eps 30<br />
aeps 100<br />
<br />
one 0 0<br />
zero 0 0<br />
pre_data_bits 24<br />
pre_data 0x87EEFD<br />
gap 211994<br />
toggle_bit_mask 0x87EEFD01<br />
<br />
begin codes<br />
Repeat 0x01<br />
Menu 0x03<br />
Play 0x05<br />
Prev 0x09<br />
Next 0x06<br />
Up 0x0A<br />
Down 0x0C<br />
end codes<br />
<br />
end remote<br />
<br />
=== HFS partition sharing ===<br />
<br />
First, we need {{AUR|hfsprogs}} package from AUR. <br />
<br />
we have to list our partitions. Use<br />
<br />
fdisk -l /dev/sda<br />
<br />
example output:<br />
<br />
# fdisk -l /dev/sda<br />
Device Boot Start End Blocks Id Type<br />
/dev/sda1 1 26 204819 ee GPT<br />
/dev/sda2 26 13602 109051903+ af Unknown<br />
/dev/sda3 * 13602 14478 7031250 83 Linux<br />
/dev/sda4 14478 14594 932832+ 82 Linux swap / Solaris<br />
<br />
As we see, the "Unknown" partition is our OS X partition, which is located in {{ic|/dev/sda2}}.<br />
<br />
Create a "mac" folder in /media:<br />
<br />
# mkdir /media/mac<br />
<br />
Add at the end of ''/etc/fstab'' this line:<br />
<br />
/dev/sda2 /media/mac hfsplus auto,user,rw,exec 0 0<br />
<br />
Mount it :<br />
<br />
mount /media/mac<br />
<br />
and check it:<br />
<br />
ls /media/mac<br />
<br />
=== HFS+ Partitions ===<br />
<br />
HFS+ partitions, now the default in Mac OS X, are not fully supported by Linux and are mounted as read-only by default. In order to write to an HFS+ partition, it is necessary to disable journaling. This can be accomplished using Mac OS X Disk Utility. Refer to this [http://support.apple.com/kb/ht2355 Apple support page] for more information.<br />
<br />
===Home Sharing===<br />
<br />
'''''UID Synchronization'''''<br />
<br />
==== In OS X ====<br />
<br />
{{Note|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.}}<br />
<br />
===== Step 1: change UID and GID(s) =====<br />
<br />
'''''Pre-Leopard'''''<br />
<br />
# Open '''NetInfo Manager''' located in the ''/Applications/Utilities'' folder.<br />
# 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.<br />
# Navigate to ''/users/<new user name>'' where <new user name> 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.<br />
# Change the '''UID''' value to 1000 (the value used by default for first user created in Arch).<br />
# Also change the '''GID''' value to 1000 (the value used by default for user account creation in Arch).<br />
# Navigate to {{ic|/groups/<new user name>}}, automatically saving the changes you have made so far.<br />
<br />
{{Note|If you get an error message that the transaction is not allowed, log out and log back in.}}<br />
<br />
'''''Leopard'''''<br />
<br />
In Leopard, the '''NetInfo Manager''' application is not present. A different set of steps is required for UID synchronization:<br />
<br />
# Open '''System Preferences'''.<br />
# Click on '''Users & Groups'''.<br />
# Unlock the pane if not already done so.<br />
# Right-click on the desired user and select '''Advanced Options'''.<br />
# Write down the value of the '''User ID''' 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).<br />
<br />
===== Step 2: change "Home" permissions =====<br />
<br />
# Open up '''Terminal''' in the {{ic|/Applications/Utilities}} folder.<br />
<br />
# Enter the following command to reclaim the permission settings of your home folder, replacing <your user name>, <your user group> and <your old UID> 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.<br />
<br />
# find /User/<your user name> -user <your old UID> -exec chown <your user name>:<your user group> {} \;<br />
<br />
==== In Arch ====<br />
<br />
To synchronize your UID in Arch Linux, you are advised to perform this operation ''while creating a new user account''.<br />
It is therefore recommended that you do this as soon as you install Arch Linux.<br />
<br />
Now you must substitute Arch's home with Mac OS's home, by modify entries of {{ic|/etc/fstab}}.<br />
<br />
=== Avoid long EFI wait before booting ===<br />
<br />
If your Macbook spends 30 seconds with "white screen" before booting you need to tell the firmware where is the booting partition.<br />
<br />
Boot Mac OS X, if do not have it installed, you can use the install DVD (select language, then click Utilities->Terminal), or another MacBook with Mac OS X (connect the two computers via firewire or thunderbolt, start the other Macbook keeping pressed T, boot your MacBook keeping pressed Options).<br />
<br />
Either way, once you got a Mac 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:<br />
<br />
# bless --device /dev/disk0s1 --setBoot # if the booting partition is EFI<br />
or<br />
# bless --device /dev/disk0s1 --setBoot --legacy # if the booting partition is not EFI<br />
<br />
(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 .<br />
<br />
=== Mute startup chime ===<br />
<br />
If you forgot to mute before installing, you can still mute again if you have a Mac OS X install disk. Boot from it, select language, then click ''Utilities > Terminal'', and enter<br />
<br />
# /usr/bin/nvram SystemAudioVolume=%01<br />
<br />
(or whatever volume you want).<br />
<br />
== rEFIt ==<br />
<br />
{{Note|<br />
* You probably want to have a look at [http://www.rodsbooks.com/refind/ refind], which is some type of successor of rEFIt.<br />
* This is not a requirement. It only gives you a menu to choose between OS X and Arch Linux upon every boot.<br />
}}<br />
<br />
For more see, [http://refit.sourceforge.net/myths/ refit myths].<br />
<br />
In OS X, download the ".dmg" from [http://refit.sourceforge.net/ Refit Homepage] and install it.<br />
<br />
{{Note|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/.}}<br />
<br />
Open up '''Terminal''' and enter:<br />
<br />
cd /efi/refit;<br />
./enable.sh<br />
<br />
=== Problems with rEFIt ===<br />
<br />
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:<br />
<br />
GRUB>_<br />
<br />
Then have a look at this link:<br />
<br />
http://mac.linux.be/content/problems-refit-and-grub-after-installation<br />
<br />
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.<br />
<br />
If you need a copy of gptsync you can wget it from here:<br />
http://packages.debian.org/sid/gptsync<br />
or try these, for 64 bit:<br />
<br />
wget http://ftp.us.debian.org/debian/pool/main/r/refit/gptsync_0.14-2_amd64.deb<br />
<br />
and for i386:<br />
<br />
wget http://ftp.us.debian.org/debian/pool/main/r/refit/gptsync_0.14-2_i386.deb<br />
<br />
since they are .deb packages you will need the program {{Pkg|deb2targz}}.<br />
<br />
== Model-specific information ==<br />
<br />
=== MacBook ===<br />
<br />
==== Mid 2007 13" - Version 2,1 ====<br />
<br />
{{Note|I used the 201212 ISO image.}}<br />
{{Warning|Current linux-3.8.x packages do not work with their EFI stub and refind-efi. Either use an older package ({{Pkg|linux}} 3.7.10-1 works with {{Pkg|refind-efi}} 0.6.8-1) or you may use a bootloader which does not rely on EFI stub. Similiar issues are reported with {{Pkg|gummiboot}}.}}<br />
<br />
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_ISO]]) 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.<br />
<br />
First prepare your harddisc according to your wishes. In this scenario it was a "Linux only" approach with<br />
<br />
/dev/sda1 HFS+ AF00 200M -> EFI boot system on Apple HFS+ partition<br />
/dev/sda2 ext4 8300 147G -> arch system<br />
/dev/sda3 swap 8200 1G -> swap<br />
<br />
The {{AUR|hfsprogs}} 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.<br />
<br />
The mount points are:<br />
<br />
/dev/sda2 -> /<br />
/dev/sda1 -> /boot/efi<br />
<br />
The bootloader in use was [http://www.rodsbooks.com/refind/index.html rEFInd] instead of rEFIt. To install it, the rEFInd homepage provides a good guide. The pitfall here is, that the system bootet in BIOS compatibility mode and not in EFI mode. You can't therefore use {{ic|efibootmgr}}, because the EFI variables (even with 'modprobe efivars') are not available. While installing the system get {{AUR|mactel-boot}} from the [[AUR]]. The {{ic|hfs-bless}} utility comes in handy, when blessing the EFI bootloader. This is done by calling e.g.:<br />
<br />
hfs-bless /boot/efi/EFI/refind/refind.efi<br />
<br />
Since the Linux kernel does come with EFI stub enabled, it seemed 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.<br />
<br />
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 {{ic|/etc/mkinitcpio.conf}} solved this ([https://bbs.archlinux.org/viewtopic.php?pid=1139226#p1139226 original post]).<br />
<br />
{{hc|/etc/mkinitcpio.conf|2=<br />
MODULES="ahci sd_mod"}}<br />
<br />
Rebuild your kernel image:<br />
<br />
mkinitcpio -p linux<br />
<br />
The bootloader rEFInd can scan kernels even out of the '/boot/efi/...' directory and assumes an efi kernel even without the extension '.efi'. If you don't want to try out special kernels, this should work without the hassle to copy each kernel after building to some spot special.<br />
<br />
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 [http://ubuntuforums.org/showpost.php?p=7828260&postcount=4 original post]. This is valid for GPT partitioned discs, so please check your environment and save your MBR first.<br />
<br />
# dd if=/dev/zero of=/dev/sda bs=440 count=1<br />
<br />
=== MacBook Pro ===<br />
<br />
==== 10,1 ====<br />
<br />
* [[MacBookPro Retina]].<br />
<br />
=== MacBook Air===<br />
<br />
==== Mid 2013 13" - Version 6,2 ====<br />
[https://bbs.archlinux.org/viewtopic.php?id=165899 Dedicated forum thread]<br />
===== Installing and booting =====<br />
Booting from a normal 2013.6 USB key works fine, but I couldn't seem to get either GRUB or Syslinux working.<br />
<br />
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. <br />
<br />
Installing [http://www.rodsbooks.com/refind/getting.html rEFInd] from OS X (important!) and installing the EFI stub loader made me able to boot fine.<br />
<br />
[https://bbs.archlinux.org/viewtopic.php?id=165710 Dedicated thread].<br />
<br />
{{Note| Installing [http://www.rodsbooks.com/refind/getting.html rEFInd] from Linux (or from OS X, but to the esp) also works fine}}<br />
<br />
===== Stability problems =====<br />
{{Note| Passing {{ic|<nowiki>libata.force=1:noncq</nowiki>}} to the kernel parameters solves the problem.}}<br />
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. <br />
So far it only seems to happen when I run something disk- or CPU-intensive. Also had an occassion when I couldn't start X and just got this repeating all over my screen:<br />
<br />
ata1.00: failed command: WRITE FPDMA QUEUED<br />
ata1.00: cmd 61/08:f0:10:8c:c2/00:00:0b:00:00/40 tag 30 ncq 4096 out<br />
res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)<br />
ata1.00: status: { DRDY }<br />
<br />
On the next attempt it worked fine.<br />
I did SMART short and long tests on my disk and they returned fine:<br />
<br />
[http://pastebin.com/vRE4T2Ld smartctl -a]<br />
<br />
There are some messages in my boot that indicate this could be disk and/or ACPI related.<br />
<br />
These are with 2013-06 ISO, 3.9.7-1 2013 x86_64 kernel.<br />
<br />
[http://pastebin.com/mjTJaPFa journalctl -b]<br />
Seems to only work with the headphone jack, not with the speakers.<br />
<br />
[http://pastebin.com/SdAcHuKh dmesg]<br />
<br />
<br />
<br />
===== WiFi =====<br />
WiFi does not work out of the box. Install {{AUR|broadcom-wl-dkms}} to connect to a network. <br />
<br />
===== Touchpad =====<br />
Since 3.10.3 kernel touchpad works perfect with {{Pkg|xf86-input-synaptics}}.<br />
<br />
===== Audio =====<br />
In order to get audio, put the following in /etc/asound.conf:<br />
defaults.pcm.card 1<br />
defaults.pcm.device 0<br />
defaults.ctl.card 1<br />
Seems to only work with the headphone jack, not with the speakers.<br />
This bug may be fixed by this patch: https://bugzilla.kernel.org/show_bug.cgi?id=60811<br />
<br />
==== Mid 2012 13" - Version 5,2 ====<br />
<br />
Kernel panics using default boot media under arch kernel 3.5. Adding '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).<br />
<br />
==== Mid 2012 11.5" - Version 5,1 ====<br />
<br />
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 and install mtrack-git from aur. This fixed errors such as <br />
(EE) [dix] bcm5974: unable to find touch point 0<br />
and backtraces that causes X11 to crash. This might apply to Version 5,2 assuming they use the same trackpad.<br />
<br />
===== Installing using the Archboot 2012.06 image =====<br />
<br />
Several people have reported problems installing Arch Linux on the MBA version 5,2 (See [https://bbs.archlinux.org/viewtopic.php?id=144089 problems booting archlinux on a MacBook Air Mid 2012]). A common problem is that the screen is not detected and therefore goes black when the installer boots. To fix this problem one has to select the normal install (Not the LTS) during boot and press tab to edit the boot flags. Then add noapic flag to the boot line. This should fix the screen going black. Install the system as you normally would. It may help later in the configuration process if the support packages are installed already at this stage.<br />
<br />
When the install has finished again add the noapic flag to the GRUB boot line (if you use GRUB) and also add i915.diescreaming=1 (or perhaps i915.die). This should keep the screen from going black when booting the new system. After you enter the system the wireless driver should be loaded. If you installed the support packages during installation you should have the wifi-menu command. Run it and select the network you want to use. One could also use wpa_supplicant but wifi-menu is quite fast to use at this stage. Now you are ready to upgrade the system. As of writing there have been a lot of changes to Archlinux since the 2012.06 image of Archboot was released ([https://www.archlinux.org/news/filesystem-upgrade-manual-intervention-required-1/ filesystem] and [https://www.archlinux.org/news/the-lib-directory-becomes-a-symlink/ glibc]). Therefore the upgrade process can be a bit difficult. The current solution has sucessfully upgraded a standart archboot version to a up-to-date version as of October 2012 and this step should be obsolete in future releases of archboot.<br />
<br />
First ignore the new "big" changes to Arch Linux,<br />
<br />
pacman -Suy --ignore glibc,libarchive,curl,filesystem <br />
<br />
If this only upgrades pacman then run the command again. Remember to make sure that pacman is ignoring the packages you don't want upgraded now. Otherwise you may break the system and have to reinstall! Now upgrade to the new filesystem,<br />
<br />
pacman -S filesystem --force<br />
<br />
As described in [[DeveloperWiki:usrlib|Glibc upgrade guide]] there may be conflicts with installed packages that require the /lib directory. Follow the guide and remove any packages that use /lib. The stock 3.4.2 kernel from Archboot should be on this list so first upgrade this,<br />
<br />
pacman -S linux<br />
<br />
This may give some errors saying that the system may not boot because of missing modules. Ignore this warning for now. The stock install may also contain gcc in the /lib directory so also remove this if needed and any other packages that have conflicts. Now Glibc should be the only package in /lib so run the system upgrade and accept all changes, <br />
<br />
pacman -Su<br />
<br />
Finally reinstall the kernel so that it can find the correct modules.<br />
<br />
Now this command shouldn't give any errors like last time. You can also reinstall gcc at this point. After a rebooted the system should startup and the new kernel should have fixed the problem with the screen going black. If want to boot Xorg then you may need to remove the i915.diescreaming=1 line from GRUB. If not then attach a external screen and try to fix the problem that way. Some people have reported commands that may help on the [https://bbs.archlinux.org/viewtopic.php?id=144089 forum].<br />
<br />
==== Mid 2011 - Version 4,x ====<br />
<br />
Works out-of-the-box since kernel 3.2. It is recommended to use [[Archboot]], install [[GRUB]] and use EFI.<br />
<br />
==== Early 2008 - Version 1,1 ====<br />
<br />
Everything works out of the box though you'll need [https://www.archlinux.org/packages/core/x86_64/b43-fwcutter/ b43-fwcutter] (or simply [https://aur.archlinux.org/packages/b43-firmware/ b43-firmware]) for the wireless adapter to work.<br />
<br />
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.<br />
<br />
If you found that you can not get any result by scaning wireless network after boot until unload module b43 and ssb and reload them again as following:<br />
<br />
rmmod ssb<br />
<br />
rmmod b43<br />
<br />
modprobe b43<br />
<br />
There is a good chance you will found something wrong with DMA from the dmesg log.<br />
<br />
And even if you can scan wireless access point after reloading the modules. You will still probably found that you can connect some access points, but can not connect to other routers.<br />
<br />
According to a more detailed discussion here: http://crunchbang.org/forums/viewtopic.php?id=17368, add pio=1, qos=0 options to the b43 module can solve this problem.<br />
<br />
I tested this for a 13' MacBook Air 1,1 with a BCM4321 chipset, and it works.<br />
<br />
(I think above information is useful because it cost me several days to figure out his problem, however, I'm not a native English speaker, so please help me improvement this text by correcting any grammer and expression errors and delete this comment after that.)<br />
<br />
== See also ==<br />
<br />
* http://www.netsoc.tcd.ie/~theorie/interblag/2010/01/30/installing-arch-linux-on-a-mac-pro/<br />
* http://allanmcrae.com/2010/04/installing-arch-on-a-macbook-pro-5-5/<br />
* http://allanmcrae.com/2012/04/installing-arch-on-a-macbook-pro-8-1/<br />
* http://linux-junky.blogspot.com/2011/08/triple-boot-archlinux-windows-7-and-mac.html</div>Matsjoyce