You are not logged in.

#51 2012-01-17 12:35:48

ego.abyssi
Member
Registered: 2011-07-27
Posts: 45

Re: [Solved] Arch/Archboot Macbook Air (4,2) Installation Woes

Continuing from where I left my last thought, I gave booting into the fallback image a whirl.  Seems to have worked, so I just need to tweak mkinitcpio.conf to get the right things to load.

Interestingly enough, is it also in booting through the fallback image that the panel display resumes its expected bugginess.  There is, however, an interplay between Grub2 setting the display mode and passing it to the kernel, a period where it works, as confirmed on the primary (non-fallback initramfs) which fails to find the hard drive but looks great.

So, I went ahead and used the install disk to chroot into my MBA install, downloaded ABS, downloaded the kernel, and tried to halt the makepkg process to manually patch the intel_bios.c file (or whichever it was, going from memory this morning).  Seems like I might have gotten one of the figures wrong, because booting into this kernel indeed produces a different display output, but not what I was hoping:  I get a not-quite-readable 4-way split screen.

To make this all even funnier, I can get X to start in the chroot from the install disk, but not from my installation that I can tell.  From the chroot environment, I just get stuck in X once I start it.

Thanks goodness for good cigars and good beer to enjoy between bouts with this.

Otherwise, I very well may have lost my sanity!


Fortune sides with him who dares -Virgil

Offline

#52 2012-01-17 12:44:54

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: [Solved] Arch/Archboot Macbook Air (4,2) Installation Woes

ego: you only need to enable the [testing] repo and do a pacman -Syu, all your hardware including the display should be working then. smile

edit: before you update, you should also add brcmsmac to the MODULES line in rc.conf, due to a temporary problem with udev not autoloading the firmware.

Last edited by litemotiv (2012-01-17 12:45:55)


ᶘ ᵒᴥᵒᶅ

Offline

#53 2012-01-18 01:36:22

ego.abyssi
Member
Registered: 2011-07-27
Posts: 45

Re: [Solved] Arch/Archboot Macbook Air (4,2) Installation Woes

Ah...  Well, it seems to be working.  Thanks!

I had tried the [testing] kernel, but only the kernel, not the kmod vice module-init-tools...  Big difference between pacman -S kernel and pacman -Syu. smile

I still have to boot from the fallback image...  The primary image doesn't seem to like detecting my hard drive.

It could be that this stems from booting in EFI mode to a GPT partitioned disk, the implications of which still aren't all entirely clear to me.

Finally, xorg is being whiney about fbdev not being installed.  Perhaps I'll goof with it later.

For the time being, I'm going to call this a success, celebrate with one of the cigars that just came in today, and a nice cold beer.

Thanks, all!

Behold!  MacBook Air (4,2) riseth from the ashes! big_smile


Fortune sides with him who dares -Virgil

Offline

#54 2012-01-18 21:26:28

arno
Member
From: France
Registered: 2007-06-21
Posts: 18

Re: [Solved] Arch/Archboot Macbook Air (4,2) Installation Woes

Sorry guys, I've not been following the post for a while.

The original installation I did was based on a vanila ISO bunrt on an USB drive booted in BIOS mode with a refiT-enabled mac.
I installed grub in BIOS mode, and added the nomodeset kernel boot arg as long as the intel_bios.c patch was unsucessful. Once it was, The same kernel did boot either in BIOS or in EFI mode without the nomodeset kernel param. After this point X could eventually start.

Then, I uninstalled grub, and only kept grub2-efi as shown previously.

To makethe hard drive recognised whithout booting with the fallback initrb, I set the following MODULES line to my mkinitcpio.conf :
MODULES="ahci libahci libata"

However, now I use heavily the MBA, I sometimes encounter scaring kernel errors :

Jan 15 09:50:34 localhost kernel: [  160.235370] INFO: rcu_preempt_state detected stalls on CPUs/tasks: {} (detected by 3, t=18002 jiffies)
Jan 15 09:50:34 localhost kernel: [  160.235393] sending NMI to all CPUs:
Jan 15 09:50:34 localhost kernel: [  160.235412] NMI backtrace for cpu 2
Jan 15 09:50:34 localhost kernel: [  160.235426] CPU 2
Jan 15 09:50:34 localhost kernel: [  160.235428] Modules linked in: hidp usbhid bcm5974 rfcomm bnep ipv6 fuse aesni_intel cryptd aes_x86_64 aes_generic ecb btusb bluetooth asix usbnet mii joydev hid_apple usb_storage hid uas snd_hda_codec_hdmi snd_hda_codec_cirrus vboxnetadp vboxnetflt vboxdrv i915 uvcvideo videodev snd_hda_intel snd_hda_codec applesmc media snd_hwdep v4l2_compat_ioctl32 arc4 evdev input_polldev snd_pcm drm_kms_helper snd_timer battery drm snd i2c_i801 soundcore iTCO_wdt pcspkr snd_page_alloc i2c_algo_bit apple_bl mei(C) ac iTCO_vendor_support i2c_core video intel_agp button processor intel_gtt brcmsmac(C) mac80211 brcmutil(C) cfg80211 rfkill ext4 mbcache jbd2 crc16 uhci_hcd ehci_hcd usbcore sd_mod ahci libahci libata scsi_mod [last unloaded: usbhid]
Jan 15 09:50:34 localhost kernel: [  160.235511]
Jan 15 09:50:34 localhost kernel: [  160.235514] Pid: 0, comm: kworker/0:1 Tainted: G         C  3.1.9-2-ARCH #1 Apple Inc. MacBookAir4,2/Mac-742912EFDBEE19B3
Jan 15 09:50:34 localhost kernel: [  160.235521] RIP: 0010:[<ffffffff8105ac0e>]  [<ffffffff8105ac0e>] try_to_wake_up+0x4e/0x290
Jan 15 09:50:34 localhost kernel: [  160.235532] RSP: 0018:ffff88016fa83d40  EFLAGS: 00000002
Jan 15 09:50:34 localhost kernel: [  160.235535] RAX: 0000000000000000 RBX: ffff8801671bc7e0 RCX: ffff88016fa8ffa8
Jan 15 09:50:34 localhost kernel: [  160.235538] RDX: 0000000000000001 RSI: 000000000000000f RDI: ffff8801671bccf0
Jan 15 09:50:34 localhost kernel: [  160.235541] RBP: ffff88016fa83d80 R08: ffff88016fa8dc40 R09: 0000000000000000
Jan 15 09:50:34 localhost kernel: [  160.235545] R10: 0000000000000001 R11: 0000000000000000 R12: ffff8801671bccf0
Jan 15 09:50:34 localhost kernel: [  160.235548] R13: 0000000000000082 R14: 000000000000000f R15: 0000000000000102
Jan 15 09:50:34 localhost kernel: [  160.235552] FS:  0000000000000000(0000) GS:ffff88016fa80000(0000) knlGS:0000000000000000
Jan 15 09:50:34 localhost kernel: [  160.235555] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
Jan 15 09:50:34 localhost kernel: [  160.235559] CR2: 00007fec1c374010 CR3: 0000000001895000 CR4: 00000000000406e0
Jan 15 09:50:34 localhost kernel: [  160.235562] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
Jan 15 09:50:34 localhost kernel: [  160.235565] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Jan 15 09:50:34 localhost kernel: [  160.235569] Process kworker/0:1 (pid: 0, threadinfo ffff880168fbe000, task ffff880168ed7300)
Jan 15 09:50:34 localhost kernel: [  160.235572] Stack:
Jan 15 09:50:34 localhost kernel: [  160.235575]  ffff88016fa8db48 000000006fa83d88 ffffffff810250a7 ffff88016fa8ffa0
Jan 15 09:50:34 localhost kernel: [  160.235581]  ffff88016fa8dc40 ffff88016b00ef00 ffff88016fa98a00 0000000000000102
Jan 15 09:50:34 localhost kernel: [  160.235587]  ffff88016fa83d90 ffffffff8105ae85 ffff88016fa83da0 ffffffff8107c984
Jan 15 09:50:34 localhost kernel: [  160.235593] Call Trace:
Jan 15 09:50:34 localhost kernel: [  160.235596]  <IRQ>
Jan 15 09:50:34 localhost kernel: [  160.235603]  [<ffffffff810250a7>] ? intel_pmu_enable_all+0xa7/0x110
Jan 15 09:50:34 localhost kernel: [  160.235608]  [<ffffffff8105ae85>] wake_up_process+0x15/0x20
Jan 15 09:50:34 localhost kernel: [  160.235613]  [<ffffffff8107c984>] wake_up_worker+0x24/0x30
Jan 15 09:50:34 localhost kernel: [  160.235618]  [<ffffffff8107e410>] insert_work+0x70/0x80
Jan 15 09:50:34 localhost kernel: [  160.235622]  [<ffffffff8107e696>] __queue_work+0xd6/0x490
Jan 15 09:50:34 localhost kernel: [  160.235628]  [<ffffffff810f68ec>] ? perf_event_task_tick+0xdc/0x2b0
Jan 15 09:50:34 localhost kernel: [  160.235633]  [<ffffffff8107ea80>] delayed_work_timer_fn+0x30/0x40
Jan 15 09:50:34 localhost kernel: [  160.235638]  [<ffffffff810720b1>] run_timer_softirq+0x131/0x440
Jan 15 09:50:34 localhost kernel: [  160.235642]  [<ffffffff8107ea50>] ? __queue_work+0x490/0x490
Jan 15 09:50:34 localhost kernel: [  160.235647]  [<ffffffff8101c139>] ? read_tsc+0x9/0x20
Jan 15 09:50:34 localhost kernel: [  160.235652]  [<ffffffff810692f0>] __do_softirq+0xb0/0x270
Jan 15 09:50:34 localhost kernel: [  160.235658]  [<ffffffff81096578>] ? tick_dev_program_event+0x48/0x110
Jan 15 09:50:34 localhost kernel: [  160.235663]  [<ffffffff8109665f>] ? tick_program_event+0x1f/0x30
Jan 15 09:50:34 localhost kernel: [  160.235669]  [<ffffffff8140e62c>] call_softirq+0x1c/0x30
Jan 15 09:50:34 localhost kernel: [  160.235675]  [<ffffffff81016a15>] do_softirq+0x65/0xa0
Jan 15 09:50:34 localhost kernel: [  160.235679]  [<ffffffff810697fe>] irq_exit+0x9e/0xc0
Jan 15 09:50:34 localhost kernel: [  160.235684]  [<ffffffff8140efce>] smp_apic_timer_interrupt+0x6e/0x99
Jan 15 09:50:34 localhost kernel: [  160.235689]  [<ffffffff8140ce9e>] apic_timer_interrupt+0x6e/0x80
Jan 15 09:50:34 localhost kernel: [  160.235692]  <EOI>
Jan 15 09:50:34 localhost kernel: [  160.235699]  [<ffffffff8127a77b>] ? intel_idle+0xcb/0x120
Jan 15 09:50:34 localhost kernel: [  160.235703]  [<ffffffff8127a75d>] ? intel_idle+0xad/0x120
Jan 15 09:50:34 localhost kernel: [  160.235709]  [<ffffffff8131efb6>] cpuidle_idle_call+0xc6/0x350
Jan 15 09:50:34 localhost kernel: [  160.235714]  [<ffffffff81013229>] cpu_idle+0xc9/0x120
Jan 15 09:50:34 localhost kernel: [  160.235720]  [<ffffffff813fa8c6>] start_secondary+0x202/0x209
Jan 15 09:50:34 localhost kernel: [  160.235723] Code: cc 48 89 fb 41 89 f6 4c 8d a7 10 05 00 00 4c 89 e7 e8 57 06 3b 00 48 8b 13 49 89 c5 31 c0 41 85 d6 0f 84 86 01 00 00 44 8b 5b 2c
Jan 15 09:50:34 localhost [  160.235757]  c7 c6 00 2e 01 00 4c 89 f0 45 85 db 74 65 48 8b 53 08 49 89

I can't tell whether it's Wifi, ethernet, virtualbox (which I kind of use a lot) or suspend / resume, but at this point, lots of things become unresponsive and I have to salvage the MBA (no clean system reboot is possible). The system will kill all apps but won't leave the X graphical mode and stay this way forever.

Anyone else got this?

Occured with any 3.1.X patched kernels. I'm waiting for the 3.2.X kernel to be available in abs to give you guys more news.
Arnaud.

Last edited by arno (2012-01-18 21:45:06)

Offline

#55 2012-01-18 21:43:55

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: [Solved] Arch/Archboot Macbook Air (4,2) Installation Woes

arno, could you please place that log output between code-tags for better readability?


ᶘ ᵒᴥᵒᶅ

Offline

#56 2012-01-18 21:47:33

arno
Member
From: France
Registered: 2007-06-21
Posts: 18

Re: [Solved] Arch/Archboot Macbook Air (4,2) Installation Woes

Sorry, done.

Offline

#57 2012-01-19 01:37:23

ego.abyssi
Member
Registered: 2011-07-27
Posts: 45

Re: [Solved] Arch/Archboot Macbook Air (4,2) Installation Woes

Arno,

Thank you for the suggested modules.

* * *

As a follow-up, with xf86-video-fbdev install, Xorg works just fine.  Not sure if I'm getting super-ultra-fast FPS or whatever, but I don't care how fast my email looks.  It's proportionate to it's native resolution, and that's what counts in my book.  smile

I'm noticing a big of bugginess with what I presume is the testing version of Pacman.  Nothing show-stopping at the moment, but enough to notice.  I mention that here only to caution anyone that would follow this thread to get their MBA running.

* * *

Not sure how to mark this [SOLVED]...

Last edited by ego.abyssi (2012-01-19 01:38:15)


Fortune sides with him who dares -Virgil

Offline

#58 2012-01-19 06:44:03

arno
Member
From: France
Registered: 2007-06-21
Posts: 18

Re: [Solved] Arch/Archboot Macbook Air (4,2) Installation Woes

I've to precise that I'm not in testing but in stable. I used to be in testing but this is my work laptop, and I can't waste too much time with risky updates.

I confirm that the 3.2.1 kernel now works without any patch in EFI, everything seems OK with xf86-video-intel.

This is a great news, as announced in https://bugs.freedesktop.org/show_bug.cgi?id=39533#c77.

The system seems to boot faster BTW, responsiveness might has improved a bit...

I'll keep you posted if thoses kernel traces keep happening in 3.2.

Last edited by arno (2012-01-19 06:44:16)

Offline

#59 2012-01-19 11:13:23

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: [Solved] Arch/Archboot Macbook Air (4,2) Installation Woes

I have not noticed any instability with the latest 3.2 kernel and [testing] packages (using this as my primary / work machine too).

ego: you can mark the topic solved by editing the first post of the thread, and prepending [Solved] to the topic title.


ᶘ ᵒᴥᵒᶅ

Offline

#60 2012-01-27 01:39:46

ego.abyssi
Member
Registered: 2011-07-27
Posts: 45

Re: [Solved] Arch/Archboot Macbook Air (4,2) Installation Woes

I turned off the testing branch, did a pacman -Syuu, and suddenly, things that didn't work before with that kernel suddenly work.  I don't get it, but I'll take it.  The kernel in core seems to work just fine, those the oss module crashes, and I've submitted a bug report on that.

Even more nice is, today, I was able to toss the thumb drive with rEFIt on it.  No need for it to boot any more..   modprobing efivars and running efibootmgr now work on the MBA (4,2).  The Grub2 wiki page even does away with explaining how to configure the firmware with efibootmgr since Grub2 will do this for you if it detects the efivars module loaded upon installing to the disk.  How cool is that?  I just reinstalled Grub2 to the drive, specifiying "grub" for the ID instead of "arch", since that's where I already had it all anyway, and... Voila!

efibootmgr -t 0 just makes it a bit quicker.  No rEFIt, no holding Option on boot...  It just works. smile


Fortune sides with him who dares -Virgil

Offline

#61 2012-01-27 15:12:30

the.ridikulus.rat
Member
From: Indiana, USA
Registered: 2011-10-04
Posts: 765

Re: [Solved] Arch/Archboot Macbook Air (4,2) Installation Woes

ego.abyssi wrote:

Even more nice is, today, I was able to toss the thumb drive with rEFIt on it.  No need for it to boot any more..   modprobing efivars and running efibootmgr now work on the MBA (4,2).  The Grub2 wiki page even does away with explaining how to configure the firmware with efibootmgr since Grub2 will do this for you if it detects the efivars module loaded upon installing to the disk.  How cool is that?  I just reinstalled Grub2 to the drive, specifiying "grub" for the ID instead of "arch", since that's where I already had it all anyway, and... Voila!

efibootmgr -t 0 just makes it a bit quicker.  No rEFIt, no holding Option on boot...  It just works. smile

How come efibootmgr (or for that efivars) works in a Mac? Can you try to find out what it does exactly so that this can be incorporated in Archboot image. AFAIK efibootmgr has not been updated upstream in over a year, and grub2 did not include any Mac specific efi stuff to facilitate what you mentioned. I guess something must have been changes in efivars kernel module.

Offline

#62 2012-01-28 01:42:36

ego.abyssi
Member
Registered: 2011-07-27
Posts: 45

Re: [Solved] Arch/Archboot Macbook Air (4,2) Installation Woes

"I guess something must have been changes in efivars kernel module."

That's the only thing I come up with, too... It just worked.

The changes to the Grub2 wiki page were indicative of some changes in that regard, based on a To Do that mentions updating the wiki to incorporate mactel boot tools, or there abouts.

Also, the piece on Grub2 wiki for modprobing efivars and using efibootmgr is missing, instead replaced with an excerpt that Grub2 will just do the right thing if it detects efivars.

Nice thing, too!  I was about to reformat the efi partition to hfsplus and copy everything back over, after ordering a Mac OS X thumb drive.  Now I don't have to. smile

Well, I'm not a complete noob, but I'm not the most experienced, developer-grade Linux user out there.  If there are particulars you're interested in knowing, let me know what to do, and I'll try to get you the information.  Glad to contribute to the cause, however I can do it.  smile


Fortune sides with him who dares -Virgil

Offline

#63 2012-01-28 10:17:25

the.ridikulus.rat
Member
From: Indiana, USA
Registered: 2011-10-04
Posts: 765

Re: [Solved] Arch/Archboot Macbook Air (4,2) Installation Woes

ego.abyssi wrote:

"I guess something must have been changes in efivars kernel module."

That's the only thing I come up with, too... It just worked.

Has Apple started using UEFI 2.x in Macs?

The changes to the Grub2 wiki page were indicative of some changes in that regard, based on a To Do that mentions updating the wiki to incorporate mactel boot tools, or there abouts.

The mactel-boot tools is independently planned by both Redhat's Matthew Garrett and grub2 upstream precisely bacause of lack to efivars support in Macs. The problem is efivars does detect the variables and able to modify them, but unlike the normal UEFI systems, the boot manager is Macs is not modifiable using the EFI variables, due to which efivars and efibootmgr are useless in Macs. In some Macs using efivars corrupts the firmware and require manuallt replacing the motherboard.

Also, the piece on Grub2 wiki for modprobing efivars and using efibootmgr is missing, instead replaced with an excerpt that Grub2 will just do the right thing if it detects efivars.

That part was actually not specific to grub2 and has been moved to https://wiki.archlinux.org/index.php/Un … efibootmgr instead of being in the grub2 page itself, especially is other UEFI bootloaders are implemented.

Nice thing, too!  I was about to reformat the efi partition to hfsplus and copy everything back over, after ordering a Mac OS X thumb drive.  Now I don't have to. smile

This thing is certainly worth investigating. I am not familiar with Macs (never used Apple products apart from an iPod, that too long ago). Is this a recent Mac (how old is it, late 2011?)?

Offline

#64 2012-01-29 03:24:38

ego.abyssi
Member
Registered: 2011-07-27
Posts: 45

Re: [Solved] Arch/Archboot Macbook Air (4,2) Installation Woes

Has Apple started using UEFI 2.x in Macs?

Well, I don't know if Mac switched to EFI 2.0...  I don't think so, because I ran into issues with modprobing efivars a while back.  You can see it in this thread.

Now suddenly, I can modprobe it, and I haven't updated the firmware.

That isn't enough information for me to draw a good conclusion, however.

The problem is efivars does detect the variables and able to modify them, but unlike the normal UEFI systems, the boot manager is Macs is not modifiable using the EFI variables, due to which efivars and efibootmgr are useless in Macs. In some Macs using efivars corrupts the firmware and require manuallt replacing the motherboard.

Phew!  Well, then I'm lucky...  So far, so good.

That part was actually not specific to grub2 and has been moved to https://wiki.archlinux.org/index.php/Un … efibootmgr instead of being in the grub2 page itself, especially is other UEFI bootloaders are implemented.

While that part was not specific to Grub2, it was handy in explaining some Grub2 installation steps, at least the manual version of these steps.  Meh.  In any case, thanks for pointing me to the resource.  I don't know if I've bothered reading that one yet or not.  I'm all over the wiki.

This thing is certainly worth investigating. I am not familiar with Macs (never used Apple products apart from an iPod, that too long ago). Is this a recent Mac (how old is it, late 2011?)?

I bought it in July, 2011, and began this thread a couple weeks after fighting with it...  And, losing. smile

Well, if you're interested in playing with a sexy piece of hardware, look not much further than the MBA.  Warts and all, it's rather nice.

Samsung and Lenovo have nice, so-called MBA-killers out there, too.


Fortune sides with him who dares -Virgil

Offline

Board footer

Powered by FluxBB