Macbook Pro Early 2013 (macbookpro10,1) status

After a hiatus of about 11 years during which OSX was my desktop, not long ago I decided to return to my favorite of old: FreeBSD. Luckily a recent 10-STABLE commit made it possible to EFI boot FreeBSD on my MacBook Pro natively. Thanks for that!
I'm now happily running FreeBSD stable/10 and Xorg with the Nvidia proprietary driver and a run(4) D-Link WiFi USB dongle.

However, I was wondering about a couple of issues I worked around: WiFi, the graphics driver and suspend/resume.

WiFi: the MacBook Pro Early 2013 uses a Broadcom BCM4331 WiFi chip which is not natively supported. Using ndisgen bcmwl5.inf bcmwl564.sys, a kernel module was created, but did not yield a working driver, even if I include bcmwlcoi64.dll. Including this dll creates a separate dll.ko (loading which does not make any difference) and the kernel outputs the following messages if I load ndis.ko and then bcmwl564_sys.ko:
Code:
ndis0: <Broadcom 802.11n Network Adapter> mem 0xc1900000-0xc1903fff at device 0.0 on pci4
device_attach: ndis0 attach returned 12
pci0:4:0:0: Device leaked IRQ resources
pic0:4:0:0: Device leaked memory resources
Does anyone know if I'm using ndisgen(8) correctly or not? Should BCM4331 be working using the ndis(4) drivers?

Graphics: since acpiconf -iv shows the laptop is using approximately 18000mW during relatively idle circumstances, I was wondering if it is possible to use the the internal HD4000 GFX instead of the discrete Nvidia chip. When I load the i915kms driver, the display becomes unresponsive while the system stays up. It seems like the driver loads correctly, but the display is still using the Nvidia chip output. Can that hunch be correct? Is it possible to completely disable the Nvidia chip and use the integrated Intel HD 4000 exclusively? X runs nicely using the proprietary Nvidia driver, but if I can save some energy using the Intel HD4000 graphics, that would be even better.

Suspend/resume: is this supposed to be working?
 
Last edited by a moderator:
Hi QdK

I'm currently trying FreeBSD 10.3 STABLE on my MacbookPro5,1 for the same reason (native EFI), my main problems are in the same areas (WiFi, Graphics and Suspend/Resume).

WiFi:
As you've discovered bwi() and bwn() don't appear to support BCM43xx. This Thread 24856/ shows some attempts to get them working with FreeBSD 9, b7j0c mentions that the ndisgen() method requires the windows driver from Apple rather than a generic pc driver. I haven't tried this yet. Although I've read that ndis can be slow and unstable anyway.

Graphics:
My MacbookPro5,1 has a dual GPU configuration too. Although they are both nvidia, this means when the nvidia driver is loaded it is valid for both. As a result xorg doesn't know which to use and will refuse to start unless I explicitly tell it.

So I think you get the same problem once you have both the nvidia and intel drivers loaded. If you just load one of the drivers xorg should work automatically. Alternatively you could load both and define a device section with BusID in your /usr/local/etc/X11/xorg.conf (see the Handbook section 5.4.5), this would also allow you to switch between them.

I think that you need to actually turn off the PCI device to save energy, regardless of whether they are actually being used they still draw a lot of power. I've not looked into the details of how to do this yet but it is possible.

One other issue I have is switching back to a virtual console after starting xorg, and also after exiting xorg. This is not a new problem though, the handbook mentions using vt() instead of sc() to solve this on "old" systems. But I'm wondering if this has to do with the new EFI loader, I'll try adding it into the /boot/loader.conf to see if this makes any difference, (or if it breaks the EFI loader).

Suspend/Resume:
I can suspend with apm() but not fully resume, I think this may be the same problem as the virtual console and xorg as I can still trigger a clean shutdown with the power button.

Other Things:
There are some other things that haven't worked immediately and I haven't investigated in detail yet like asmc() and atp()
 
Update: I will try to keep this on topic to FreeBSD 10.3 STABLE and MBPs in general, so not to hijack your thread and keep it relevant to your MacbookPro10,1. Maybe I should start another thread for the 5,1 model.

TrackPad:
Not sure how old atp() is but it doesn't work for me and appears to have been replaced with wsp() which does work, I think this is new to 10.3 STABLE and 11 CURRENT. Strangely I found this out by loading and unloading the atp() driver manually which loads wsp() on the second attempt.

Graphics:
vt() is required by the new UEFI bootloader and resume (e.g from suspend or from xorg) appears to be broken: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=188833 current workaround from suspend is to switch between a vt and xorg to bring xorg back.
 
Gave up with ndisgen() :( trying to download and extract massive Apple bootcamp installers was painful, also can't seem to find anyway to get files out of them including via WINE. Think iI'd rather stick with Ethernet than endure anymore.
 
Back
Top