Solved MacBook Pro 8,1 setup trouble

TempleBSD

Member

Reaction score: 14
Messages: 43

Hello and thanks already for having clicked on this!

I'm having some trouble getting FreeBSD setup fully working on my late 2011 13" MPB. Most things do work suprisingly well but here are my problems:
  1. Trackpad
  2. Suspend/Resume
  3. WiFi (BCM 4331)
Some general info: FreeBSD 13.0 is installed on a partitioned drive using EFI alongside MacOS and has the root partition encrypted with geli.

About the Trackpad: Basic functionality is available (moving the cursor and clicking) with default, atp and wsp drivers. However when starting X and using either atp or wsp X will not register input. I have tried most configurations (also no config) I've found on the web for X (my file is /usr/local/etc/X11/xorg.conf.d/touchpad.conf) and never got it to work which is a shame. Driver loads and attaches, I have also tried to disable the ums driver which worked but did not help. To clarify: I am mostly concerned with the pad working in X, no need for it being shared with console if that helps. Nothing of interest (to my novice eyes) appeared in /var/log/Xorg.0.log

Suspend works when setting
Code:
hw.acpi.lid_switch_state=s3
in /etc/sysctl.conf when closing the lid. Might be due to me having the controller driver installed in order to control keyboard backlight. On opening the lid however seemingly random behaviour occurs. I exclusively closed the lid in an X-environment (dwm window manager if that is of concern) and sometimes it would just work but the mouse would become janky. Other times either X reopens and the keyboard and touchpad dont work, or X shuts down and im sent back to tty, or the darn thing does nothing at all or just gets stuck in the wakeup process.

If further information/logs are required for troubleshooting this, please do tell.
Thank you for your time!

EDIT#1: Bought WiFi USB dongle thinggy.
 
Last edited:
OP
T

TempleBSD

Member

Reaction score: 14
Messages: 43

For future reference or anyone stumbling across this:
1: FreeBSD 13 uses evdev by default which interferes with atp/wsp somehow. I built a kernel without evdev but there might be some other way of disabling it.
2: ACPI suspend/resume is an unimplemented feature. What I have with the command will enter C3-State of the CPU which will interrupt execution until left and therefore might rub some applications the wrong way.
3: BCM4331 is not supported by the bwn/bwi driver and using ndis is reportedly not fast and I never got it to work. Purchase a WiFi dongle that has a chipset listed in the "hardware" section of the BSDs release you are using. I have the TP-Link TU2 AC650, which is one of the few compatible ones available in European amazon. AC WiFi is not supported and the speeds you will get with n wont be amazing. Plug in an ethernet cable if you intend to download heaps of *
 

tmcclean

New Member

Reaction score: 12
Messages: 7

I had similar experiences installing FreeBSD 13.0 on an old MacBook Pro 5,5 (mid-2009).

1. Multitouch trackpad works OK-ish in both console and X (somewhat jerky two-finger scrolling and fairly reliable two-finger-for-right click) using the wsp() driver, if you use the command sysctl kern.evdev.rcpt_mask=3 (or in sysctl.conf). Without that setting, I had exactly the same experience as you.

2. I had similar problems with suspend and resume. Closing the lid usually sleeps, and opening it sometimes wakes up... but it's hard for me to tell if it's an ACPI issue or the fact the battery on the machine is so old it's simply buggy hardware.

I'll post complete notes on my experience here in the forum shortly.
 
OP
T

TempleBSD

Member

Reaction score: 14
Messages: 43

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=252236 this should fix your problems as well. Never had such smooth scrolling under BSD. Its actually closer to native MacOS than I thought would be possible. Suspend/Resume is generally not implemented. The way its done right now and the way my setting here (which I dont use any more) does it, is by forcing the CPU in the C3 state which some programs might not like, depending on what they're doing at the time of suspension. I just dont use suspend but rather dim my backlight or turn of the laptop entirely. Really not an issue with the amazing battery life I get now ...
 
OP
T

TempleBSD

Member

Reaction score: 14
Messages: 43

When I was in 12.1-RELEASE (now on 12.2-RELEASE-p6), I stumbled on that touchpad issue and tried to troubleshoot it and posted what I could find: https://forums.freebsd.org/threads/macbook-pro-13-mid-2012-touchpad-fine-tuning.75787/post-466071
Did you ever get WiFi to work with the integrated chipset?
Thanks TempleBSD for that PR, I'll check whether this could improve touchpad!
You really ought to try wsp with the patch. Scrolling actually works with default settings (when using wsp) and does so nicely.
 

Machiaveli

Member

Reaction score: 25
Messages: 58

Did you ever get WiFi to work with the integrated chipset?

Nope, just tried after upgrading to 12.2-RELEASE and it's still a no go so relying again on an USB wifi dongle.

You really ought to try wsp with the patch. Scrolling actually works with default settings (when using wsp) and does so nicely.

Yes it's on my todo list as even with wsp() the scrolling is somewhat fuzzy and there's no way to switch off natural scrolling.
 
OP
T

TempleBSD

Member

Reaction score: 14
Messages: 43

Indeed it does. Loads has changed with regards to input in 13.0, as evdev is used by default now.
 

Machiaveli

Member

Reaction score: 25
Messages: 58

Indeed it does. Loads has changed with regards to input in 13.0, as evdev is used by default now.

Thanks for the info TempleBSD :beer:
I've just tried 13.0-RELEASE on a second MBP (Model 9,2, mid-2012, FreeBSD as the sole OS) and the boot time is freaking long. Did you also get that?
 
OP
T

TempleBSD

Member

Reaction score: 14
Messages: 43

Cant say that, no. I'm however running a heavily stripped down kernel and GELI-AES256 on /. The latter of course slowing down the process a bit. Whats yours doing on boot? If you could upload your dmesg we can have a look at that and see if anything fishy is going on.
 

Machiaveli

Member

Reaction score: 25
Messages: 58

Cant say that, no. I'm however running a heavily stripped down kernel and GELI-AES256 on /. The latter of course slowing down the process a bit. Whats yours doing on boot? If you could upload your dmesg we can have a look at that and see if anything fishy is going on.

Thanks for looking into this! The boot process is abnormally long to get to the boot screen and not using encryption on / (or any other partition). Once back at home, i'll post the dmesg.
 

Machiaveli

Member

Reaction score: 25
Messages: 58

TempleBSD please find attached the dmesg. Thanks again for looking into this.
But the problem lies way before, at the EFI console, from there it hangs for about 3 minutes then proceed to the FreeBSD loader.

I never experienced this before (in 11, 12.1 or 12.2).
 

Attachments

  • dmesg.txt
    68.7 KB · Views: 31
  • DSC_0031.JPG
    DSC_0031.JPG
    717.3 KB · Views: 41

RypPn

New Member

Reaction score: 7
Messages: 15

I seem to recollect blessing the partition will help with boot times. Details are vague now as I could never be bothered to try it.
 

Machiaveli

Member

Reaction score: 25
Messages: 58

I'll try blessing but this wasn't necessary at all on this specific model on previous FreeBSD versions.

Edit. nope blessing doesn't help here...
 

covacat

Aspiring Daemon

Reaction score: 315
Messages: 639

its either bootcode, either loader. you can try to boot with loader/bootcode from 12.2
before trying make sure you can boot from external media or have other means to revert the changes
 

Machiaveli

Member

Reaction score: 25
Messages: 58

its either bootcode, either loader. you can try to boot with loader/bootcode from 12.2
before trying make sure you can boot from external media or have other means to revert the changes
Thanks covacat for the help.
How can I achieve that? Just by copying /boot/efi from 12.2?
 

covacat

Aspiring Daemon

Reaction score: 315
Messages: 639

probably /boot/loader.efi and the code in the efi sys partition
im not sure, but as long you can revert the changes it's worth to try
 

Machiaveli

Member

Reaction score: 25
Messages: 58

Sorry for the late reply.
So after trying this doesn't fix the big delay I got before the boot loader screen appears.
 
OP
T

TempleBSD

Member

Reaction score: 14
Messages: 43

This doesn't happen on my model, no clue what can cause such a delay. Try booting from a freebsd-13-memstick and see if the problem persists. If not, odds are you might have to reinstall. DMESG really doesn't help in this case because as you say, the delay happens during efi-loader. I have no clue whether there are logs for the loader or how one can go about tracing your problem. Open up your own thread here, maybe someone more knowledgeable will come around. In the meantime just reinstall. Back up what you need and then re-setup the MBP. If the delay occurs even with the memstick, then you're sol afaik.
 

Machiaveli

Member

Reaction score: 25
Messages: 58

Actually checked other install media and all lead to the same thing: UEFI console just hangs for about 3 minutes before freebsd's loader screen appears. Cleared up some of the old "crufts" boot entries with efibootmgr(), still the same problem.

I'll dig deeper to find differences between 12.2-RELEASE and 13.0-RELEASE, else I'll check 14.0-CURRENT.
Thanks again for the hints.
 
Top