====== Apple MacBook Pro 13-Inch "Core i5" 2.5 / "Core i7 2.9" (Mid-2012) ======
Identifiers: **Mid-2012** - MD101LL/A* //(i5)// - MD102LL/A //(i7)// - **%%MacBookPro9%%,2** - A1278/2554*
----
===== Hardware =====
| //Year introduced// | June 11, 2012 |
| //CPU// | Intel(R) Core(TM) i5-3210M @ 2.50Ghz / i7-3520M @ 2.90Ghz (Ivy Bridge) |
| //Ethernet// | Broadcom %%NetXtreme%% BCM57765 Gigabit Ethernet PCIe |
| //Graphics// | Intel(R) HD Graphics 4000 (integrated GPU with 1.5GB shared memory) |
| //Memory// | 4GB (or 8GB for the i7) RAM DDR3 @ 1600Mhz |
| //Screen// | LED-backlit 13,3" widescreen TFT active-matrix "glossy" @ 1280x800 |
| //Wireless// | Broadcom BCM4331 802.11a/b/g/n Dual-Band Wireless |
| //Sound// | Cirrus Logic CS4206 (Internal Analog 3.1/2.0) |
----
===== Support overview =====
^ Component ^^ Status ^ Details ^
| Graphics | Graphical sessions | ✔ | Xorg works out of the box |
| Backlight (brightness) control | :?: | Requires [[https://www.freebsd.org/cgi/man.cgi?query=asmc&sektion=4|asmc(4)]] and [[https://www.freebsd.org/cgi/man.cgi?query=acpi_video&sektion=4|acpi_video(4)]] drivers |
| Input devices | Keyboard backlight | :?: | Requires [[https://www.freebsd.org/cgi/man.cgi?query=asmc&sektion=4|asmc(4)]] and [[https://www.freebsd.org/cgi/man.cgi?query=acpi_video&sektion=4|acpi_video(4)]] drivers |
| Touchpad | :?: | Requires [[https://www.freebsd.org/cgi/man.cgi?query=wsp&sektion=4|wsp(4)]] driver |
| Media keys | Brightness keys | :?: Requires [[https://www.freshports.org/sysutils/asmctl|sysutils/asmctl port]] |
| ::: | Volume keys | :!: Doesn't work out of the box |
| Network | Ethernet | ✔ | Works out of the box with [[https://www.freebsd.org/cgi/man.cgi?query=bge&sektion=4|bge(4)]] driver |
| ::: | Wi-Fi | ✘ | BCM4331's driver not ready yet |
| Other | Battery | ✔ | Works out of the box |
| ::: | Bluetooth | :!: | Untested but detected |
| ::: | CD/DVD drive | ✔ | Works out of the box |
| ::: | Fan | :?: | Requires [[https://www.freebsd.org/cgi/man.cgi?query=coretemp&sektion=4|coretemp(4)]] and [[https://www.freebsd.org/cgi/man.cgi?query=asmc&sektion=4|asmc(4)]] drivers |
| ::: | SD card reader | ✔ | Works out of the box |
| ::: | Suspend & resume | :?: | Requires %%%%''%%sysctl hw.acpi.lid_switch_state=S3%%''%%%% |
| ::: | Webcam | :!: | Untested but detected |
| ::: | Ports | %%DisplayPort%% | :!: Untested but detected |
| ::: | ::: | %%FireWire%% | :!: Untested but detected |
| ::: | ::: | Thunderbolt | ✘ |
| ::: | ::: | USB | ✔ |
| ::: | ::: | Headphone jack | ✔ Available on pcm1 |
| Sound | Speakers | :?: | Requires tweaking to power up the sub-woofer |
| Last update: 2021-06-13 12:58:27+0200 ||||
* **Legend**
* ✔ OK
* :?: Somewhat OK: requires additional tweaking or works worse than expected
* :!: Present but status unknown or untested
* ✘ Does not work
* //nothing// Not sure if present
----
===== Tweaks on FreeBSD 12.x-RELEASE =====
==== Battery ====
* Internal battery is detected out of the box. Maximum efficiency while on battery is done with [[https://www.freebsd.org/cgi/man.cgi?query=powerd&sektion=8|powerd(8)]] and the following settings on [[https://www.freebsd.org/cgi/man.cgi?query=rc.conf&sektion=5|/etc/rc.conf]]:
# Enable powerd(8) at boot
powerd_enable="YES"
# powerd(8) flags
power_flags="-n min -a hiadaptive -b adaptive"
==== Fan control ====
* Fan control needs the [[https://www.freebsd.org/cgi/man.cgi?query=asmc&sektion=4|asmc(4)]] and [[https://www.freebsd.org/cgi/man.cgi?query=coretemp&sektion=8|coretemp(8)]] drivers. Once drivers are loaded with %%%%''%%kldload asmc && kldoad coretemp%%''%%%%, control of the fan is done with %%%%''%%sysctl(8)%%''%%%%. For example, the following would set the fan speed running at 3200 RPM:
sysctl dev.asmc.0.fan.0.minspeed=3200
* A quick and dirty shell script to control the fan based on the current temperature of the cpu: {{laptops/apple_macbookpro9_2/asmcfan?linkonly|asmcfan}}
* Make a cronjob running every minute on [[https://www.freebsd.org/cgi/man.cgi?query=crontab&sektion=5|/etc/crontab]] (or root's crontab by making the proper change on the cron entry below):
# Setting fan speed based on current temperature
* * * * * root /opt/local/bin/asmcfan
==== Sound ====
* Kernel driver for the Cirrus Logic CS4206: [[https://www.freebsd.org/cgi/man.cgi?query=snd_hda&sektion=4|snd_hda(4)]]
* List of pcm devices:
% cat /dev/sndstat
FreeBSD Audio Driver (64bit 2009061500/amd64)
Installed devices:
pcm0: on hdaa0 (1p:4v/1r:4v) default
pcm1: on hdaa0 (1p:1v/0r:0v)
pcm2: on hdaa0 (1p:1v/0r:0v)
No devices installed from userspace.
* By default, sound is tiny (it does sound muffled). These laptops has 2 internal speakers (the right is tied to a tiny sub-woofer) so the default pin assignment should be corrected by inverting sequence of internal speakers pins that are in the same association to correctly power up the sub-woofer. From [[https://www.freebsd.org/cgi/man.cgi?query=snd_hda&sektion=4|snd_hda(4)]] sequences are explained:
For multichannel input/output associations sequence
numbers encode channel pairs positions: 0 - Front, 1 -
Center/LFE, 2 - Back, 3 - Front Wide Center, 4 - Side.
Standard combinations are: (0) - Stereo; (0, 2), (0,
4) - Quadro; (0, 1, 2), (0, 1, 4) - 5.1; (0, 1, 2, 4)
- 7.1.
* To correct this pins need to be adjusted at boot time. Put this on [[https://www.freebsd.org/cgi/man.cgi?query=device.hints&sektion=5|/boot/device.hints]]:
hint.hdaa.0.nid10.config="seq=0"
hint.hdaa.0.nid11.config="seq=1"
* Reference: https://forums.FreeBSD.org/threads/how-to-solve-tiny-sound-on-a-macbook-pro-9-2-mid-2012.80741/
* The sound may be too low out of the box. Raise up the relative level with:
sysctl hw.snd.vpc_0db=1
* The auto-sense of the headphone jack port while being correctly detected does not work when in the same association as the speakers and use the correct %%%%''%%seq=15%%''%%%%. Use a graphical mixer (ie. [[https://www.freshports.org/audio/gtk-mixer|audio/gtk-mixer]]) or %%%%''%%sysctl hw.snd.default_unit=1%%''%%%% to switch to the headphones as a workaround.
* Equalizers in mixer applications are possible via the following device configuration on [[https://www.freebsd.org/cgi/man.cgi?query=loader.conf&sektion=5|/boot/loader.conf]]:
# Enable equalizer in mixer applications for internal speakers (pcm0)
hint.pcm.0.eq=1
# Enable equalizer in mixer applications for analog headphones (pcm1)
hint.pcm.1.eq=1
# Enable equalizer in mixer applications for digital line (pcm2)
hint.pcm.2.eq=1
==== Suspend/Resume ====
* Suspend and resume is working after setting the following in [[https://www.freebsd.org/cgi/man.cgi?query=sysctl.conf&sektion=5|/etc/sysctl.conf]].
* To suspend when closing the lid:
hw.acpi.lid_switch_state=S3
* To suspend when using the power button:
hw.acpi.power_button_state=S3
==== Trackpad ====
- The [[https://www.freebsd.org/cgi/man.cgi?query=atp&sektion=4|atp(4)]] driver is old making the trackpad fuzzy. Use the more recent kernel driver [[https://www.freebsd.org/cgi/man.cgi?query=wsp&sektion=4|wsp(4)]].
- Put the following on [[https://www.freebsd.org/cgi/man.cgi?query=sysctl.conf&sektion=5|/etc/sysctl.conf]]:
hw.usb.wsp.enable_single_tap_clicks: 0
hw.usb.wsp.scr_hor_threshold: 20
hw.usb.wsp.pressure_tap_threshold: 120
hw.usb.wsp.pressure_untouch_threshold: 10
hw.usb.wsp.pressure_touch_threshold: 50
hw.usb.wsp.z_factor: 5
hw.usb.wsp.scale_factor: 12
hw.usb.wsp.debug: 1
- To make the trackpad working in Xorg, add this to [[https://www.freebsd.org/cgi/man.cgi?query=sysctl.conf&sektion=5|/etc/sysctl.conf]]:
kern.evdev.rcpt_mask=3
----
===== Files =====
* {{laptops/apple_macbookpro9_2/dmesg.boot?linkonly|/var/run/dmesg.boot}}
* {{laptops/apple_macbookpro9_2/acpidump?linkonly|acpidump -dt}}
* {{laptops/apple_macbookpro9_2/devinfo?linkonly|devinfo -v}}
* {{laptops/apple_macbookpro9_2/pciconf?linkonly|pciconf -lv}}
* {{laptops/apple_macbookpro9_2/asmcfan?linkonly|asmcfan shell script}}
* {{laptops/apple_macbookpro9_2/xorg.conf.new?linkonly|Xorg.conf auto-detection}}
----
{{tag>Laptop Apple Mobile}}