You are not logged in.
Hi!
I've installed archlinux on my new MacBook Air (Mid 2012) using Archboot and everything looked fine.
After the installation i wanted to boot archlinux (using grub2-efi) and it ended in a black screen.
If i add noefi as a kernel parameter arch linux boots normal, but the keyboard and probably other stuff does not work.
If i manually boot through the grub2 command line, the screen freezes after entering the boot command.
With the Mid 2011 MacBook Air the installation with archboot succeeds without problems.
Has anybody an idea how to fix my problems?
Offline
I'm typing this on a mid-2012 Air too, i haven't used grub2-efi with it but originally installed with syslinux (bios) which worked okay. Now i'm using rEFInd with efi_stub as described here:
https://wiki.archlinux.org/index.php/UE … ing_rEFInd
to EFI-boot directly to linux without a bootloader.
ᶘ ᵒᴥᵒᶅ
Offline
Mid 2012? So it's brand new?
Unfortunately I can't contribute to a solution, but there have been other threads worth checking out about macbook airs. The consensus seems to be that linux will run on them, but not until a while after they've been "out in the wild" so the driver hackers can catch up to the hardware changes.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
I'm typing this on a mid-2012 Air too, i haven't used grub2-efi with it but originally installed with syslinux (bios) which worked okay. Now i'm using rEFInd with efi_stub as described here:
https://wiki.archlinux.org/index.php/UE … ing_rEFInd
to EFI-boot directly to linux without a bootloader.
thx i'll try it and tell later if it worked
Offline
I installed Arch using latest archboot iso (dd'ed to USB flash).
No problems with installing bootloader (grub2 with efi works perfectly).
I had to add noapic to kernel line when booting archboot or it would show a kernel panic. If you don't add it to the grub2 config after the install is done, booting in the Arch won't work and all you get is a black screen. So just add noapic and it should boot just fine.
There are some warnings or errors displayed during the boot (something about the wifi card and maybe something else) but it doesn't matter much for now.
Almost everything works with Kernel 3.4.4 out of the box.
I used wpa_supplicant, so didn't need any USB ethernet adapters to install X and other things.
The thing that doesn't work is applesmc module for controlling fan speed/keyboard backlight.
I tried to modprobe applesmc but got:
ERROR: could not insert 'applesmc': Input/output error
And dmesg is full of:
[ 1579.746760] applesmc: : read arg fail
[ 1579.833217] applesmc: : read arg fail
[ 1579.920595] applesmc: LCSA: read arg fail
[ 1580.006595] applesmc: : read arg faili
[ 1580.093070] applesmc: : read arg fail
[ 1580.180382] applesmc: LCSA: read arg fail
[ 1580.232584] applesmc: driver init failed (ret=-5)!
Any ideas how to get it working?
Offline
i've not experience strictly about your problem, but...
i think the problem is the lack of the module/kernel to support the controller, the new controller because is very new hardware.....
+pc: custom | AMD Opteron 175 | nForce4 Ultra | 2GB ram DDR400 | nVidia 9800GT 1GB | ArchLinux x86_64 w/ openbox
+laptop: Apple | MacBook (2,1) | 2GB ram | Mac OS X 10.4 -> DIED
+ultrabook: Dell | XPS 13 (9343) | 8GB ram | 256GB ssd | FullHD display | Windows 8.1 64bit ArchLinux x86_64 w/ Gnome
Offline
Even tho it is almost the same as the previous MBA, you are probably right.
Has anyone else tried setting up Arch on the new MBA?
Offline
I've tried the whole night through various things and came to the result that it's not a problem of the bootloader (as i already thought), but of the kernel.
It's not possible to load the kernel without the noefi paramter, neither with grub2 nor with rEFInd nor with pure efi_stub.
With the noefi parameter to kernel boots fine, but it does not recognize the built in usb devices (e.g. the keyboard). If i plug in another usb keyboard it works fine.
Another problem is that reboot and shutdown don't work, but this can be fixed with the kernel parameter reboot=acpi http://en.gentoo-wiki.com/wiki/Apple_Ma … boot_hangs
The last problem that i've noted is that i'm not able to set up wifi. Using the livecd it works out of the box, but using the booted arch, there is no interface but the loopback interface. I think this problem is also related to the noefi boot.
I'm typing this on a mid-2012 Air too, i haven't used grub2-efi with it but originally installed with syslinux (bios) which worked okay. Now i'm using rEFInd with efi_stub as described here:
https://wiki.archlinux.org/index.php/UE … ing_rEFInd
to EFI-boot directly to linux without a bootloader.
do you use any kernel parameters or worked it out of the box?
Offline
I'm typing this on a mid-2012 Air
Mid 2012? So it's brand new?
Uh oh.. I posted that one a bit too late at night, i don't have a brand new Air... Sorry @TS, i must've miscounted by a year or something..
ᶘ ᵒᴥᵒᶅ
Offline
litemotiv wrote:I'm typing this on a mid-2012 Air
Trilby wrote:Mid 2012? So it's brand new?
Uh oh.. I posted that one a bit too late at night, i don't have a brand new Air... Sorry @TS, i must've miscounted by a year or something..
Ah okay a friend of mine has a mid 2011 using grub2 to boot and it works fine, so i think it's related to the 2012 macbook air.
nevertheless thx a lot!
Maybe EFI boot with this macbook is (at this time) impossible, because of the following (from https://help.ubuntu.com/community/UEFIB … ot_options)
In 2.6.27-2.6.28, amd64 kernel, there is a bug that would cause EFI to hang. Since 2.6.27, it would only map available RAM, and the EFI runtime needs to be mapped with efi_ioremap. However, efi_ioremap only reserves MAX_EFI_IO_PAGES (100) pages for EFI, which is not enough for Apple 64-bit firmware (about 17M). To workaround this, you need to pass the "noefi" option which tells the kernel to disable EFI. However, some models do not need this workaround (eg MacBookPro5,3).
But if there are any other ideas i would be very pleased!
Offline
@0x530302: If you think the problem is in the kernel, then try latest -rc kernel linux-mainline https://aur.archlinux.org/packages.php?ID=50893 and check whether that boots properly. Chances are macbook air support migth be fixed in the -rc kernels. If linux-mainline gives the same issues, then file a ticket in kernel bugzilla (but first try linux-mainline).
Offline
@0x530302: If you think the problem is in the kernel, then try latest -rc kernel linux-mainline https://aur.archlinux.org/packages.php?ID=50893 and check whether that boots properly. Chances are macbook air support migth be fixed in the -rc kernels. If linux-mainline gives the same issues, then file a ticket in kernel bugzilla (but first try linux-mainline).
Using the mainline kernel does not make any changes, but i found a dirty workaround (at least until booting with efi is possible).
I just needed a usb thumb drive (assume that it is /dev/sdb)
1. Format usb thumb drive
create one big partition in fdisk and create an ext2 filesystem on it:
# fdisk /dev/sdb
# mkfs.ext2 /dev/sdb1
2. Install Grub Legacy to thumb drive
Make sure that the grub package is installed.
# mount /dev/sdb1 /mnt
# mkdir -p /mnt/boot/grub
# cp /usr/lib/grub/i386-pc/* /mnt/boot/grub/
# echo '(hd0) /dev/sdb' > /media/usb/boot/grub/device.map
# grub-install --root-directory=/mnt/ /dev/sdb
3. Copy Kernel and Initramfs to the thumb drive
# cp /boot/vmlinuz-linux /boot/initramfs-linux.img /mnt/
4. Create grub's menu.lst
create /mnt/boot/grub/menu.lst with the following content:
default 0
# (0) Arch Linux
title Arch Linux
root (hd0,0)
kernel /vmlinuz-linux root=<<change to your root partition (e.g /dev/sda5)>> ro
initrd /initramfs-linux.img
5. unmount and reboot
# umount /mnt
# reboot
Press alt/option key while booting until the apple boot menu appears. The Apple Bootloader should recognize the usb pendrive as an USB Icon Labeled with Windows. Booting from this will load the Grub Legacy from the thumb drive. Booting the Arch Linux entry in Grub loads the kernel and the initramfs from the pendrive and loads your system from the harddrive. You can safely remove the stick after the initramfs was loaded.
That is neither a good nor an elegant way, but it is the only one worked so far.
Last edited by 0x530302 (2012-06-29 02:07:59)
Offline
0x530302, would just installing grub-bios instead of grub-efi to your harddrive give the same effect? If the problem lies in efi-boot then any form of bios-boot will probably work okay, without needing a usb stick.
ᶘ ᵒᴥᵒᶅ
Offline
I had to add noapic to kernel line when booting archboot or it would show a kernel panic. If you don't add it to the grub2 config after the install is done, booting in the Arch won't work and all you get is a black screen. So just add noapic and it should boot just fine.
I also have the Macbook Air 5,2, but if i add noapic to the kernel line, the screen also becomes black after Waiting for UDev events to be processed.
Have you done something else to get arch booting?
Offline
merged ...
There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !
Offline
Janhouse wrote:I had to add noapic to kernel line when booting archboot or it would show a kernel panic. If you don't add it to the grub2 config after the install is done, booting in the Arch won't work and all you get is a black screen. So just add noapic and it should boot just fine.
I also have the Macbook Air 5,2, but if i add noapic to the kernel line, the screen also becomes black after Waiting for UDev events to be processed.
Have you done something else to get arch booting?
Firs time I installed from archboot I booted from LTS kernel (because I didn't know about the noapic thing and the new one didn't boot), so it installed LTS kernel and I was not able to successfully boot because the display got all weird after Udev events.
The 2nd time I installed, I added the noapic to the archboot, so I could boot the new kernel and install it normally.
Then the noapic line worked.
Offline
0x530302, would just installing grub-bios instead of grub-efi to your harddrive give the same effect? If the problem lies in efi-boot then any form of bios-boot will probably work okay, without needing a usb stick.
Yes, but i wanted to let the grub2-efi be untouched on my harddrive, to test if something changed.
The 2nd time I installed, I added the noapic to the archboot, so I could boot the new kernel and install it normally.
Then the noapic line worked.
That's awkward. I assume i've installed it the same way, but i still have the problem. Could you please show me the contents of your /etc/mkinitcpio.conf?
Offline
litemotiv wrote:0x530302, would just installing grub-bios instead of grub-efi to your harddrive give the same effect? If the problem lies in efi-boot then any form of bios-boot will probably work okay, without needing a usb stick.
Yes, but i wanted to let the grub2-efi be untouched on my harddrive, to test if something changed.
Janhouse wrote:The 2nd time I installed, I added the noapic to the archboot, so I could boot the new kernel and install it normally.
Then the noapic line worked.That's awkward. I assume i've installed it the same way, but i still have the problem. Could you please show me the contents of your /etc/mkinitcpio.conf?
Yes, it worked with grub2-efi without any problems for me.
And sure, here is my mkinitcpio.conf: http://pastebin.com/WeWntT3D
Besides the LUKS and uresume stuff, the rest was generated by the arch install.
And grub.cfg (just in case): http://pastebin.com/iTuqmZHW
Offline
Yes, it worked with grub2-efi without any problems for me.
And sure, here is my mkinitcpio.conf: http://pastebin.com/WeWntT3D
Besides the LUKS and uresume stuff, the rest was generated by the arch install.And grub.cfg (just in case): http://pastebin.com/iTuqmZHW
There are no big differences to my configuration. I've tried the normal arch kernel and the current mainline (3.5) kernel. Both don't work.
It seems to be a problem related to the i915 driver. I've added i915.diescreaming=1 to the kernel line and i could boot, because i915 was not loaded.
Have you tried suspend to ram through pm-utils?
Offline
Yes, suspending to ram and disk works.
And I am using whatever is the latest kernel fron arch repos (testing enabled).
Offline
I figured out what the problem is.
The i915 driver can't correctly identify my screens. When i wait until the system has booted and then blindly login, open a terminal and type
$ xrandr --output eDP1 --off
$ xrandr --output eDP1 --auto
everything seems to work!
Last edited by 0x530302 (2012-07-02 06:15:04)
Offline
Did you figure out how to get the applesmc driver working?
Offline
Did you figure out how to get the applesmc driver working?
This patch, contributed by a user at the ubuntu forums, works on a MacBookPro9,2:
diff --git a/drivers/hwmon/applesmc.c b/drivers/hwmon/applesmc.c
index 0162f55..f41585e 100644
--- a/drivers/hwmon/applesmc.c
+++ b/drivers/hwmon/applesmc.c
@@ -54,7 +54,7 @@
#define APPLESMC_MAX_DATA_LENGTH 32
/* wait up to 32 ms for a status change. */
-#define APPLESMC_MIN_WAIT 0x0040
+#define APPLESMC_MIN_WAIT 0x0010
#define APPLESMC_MAX_WAIT 0x8000
#define APPLESMC_STATUS_MASK 0x0f
Offline
Yes, I already found it yesterday, works great.
I also compiled the kernel with B43_BCMA_EXTRA so I could use b43 driver with my wireless card on Macbook Air.
So, seems like everything is working now.
Offline
Has anyone had any success enabling AHCI on the Air? I've tried following the instructions here, but the kernel refuses to boot when I add "setpci -d 8086:1e03 90.b=40" to grub.
Offline