Skip to content

macbookpro late 2013 Notes

chris edited this page Feb 25, 2022 · 34 revisions

Contents

My daily 🚗er Apple ⌘

the early 2013 MBPr model # is A1398 Ivy Bridge
the late 2013 MBPr model # is A1398 Haswell

my daily driver / Hardware

  • Network Adapter Broadcom Corporation BCM4360 802.11ac Wireless Network Adapter, AC 1300 ie. 1.3 Gb/s link
  • Native screen resolution - 2880 x 1800

my daily driver / hardware / upgrades

in short my 2013 late macbook pro has a intel haswell i7 processor with a bga1364 socket. the same mobile i7 was used in apple computers til mid 2014. my particular model has a intel 4850hq whereas the mid 2014 has a 4980hq and the first versions of the broadwell microarch use the same bga1364

in a different time line 🔮 it'd be fun to buy an extra board an attempt to reball / solder a broadwell i7 to see if it would work with either the 2013 or 2014 boards. and might well see if the 1GB memory chips i purchased would work as well.

.. / .. / .. / useful links

my daily driver / hardware / RAM upgrade 16gb to 32gb

pretty sure the apple board number on my logic board is 820-00426 as that's the board with a 2.3GHz i7 with 16gb RAM and a discrete GPU (dGPU).

.. / useful search terms & links
dram spd straps

daily driver / hardware / GPU / Nvidia dGPU GT750m

It appears the Nvidia GT750m built around the Keppler architecture supports both hardware encoding and decoding for various video codecs along with support for Nvidia's CUDA toolkit.

For device matrix of Nvidia hardware that works with the CUDA toolkit provided by Nvidia see

software > dGPU > driver(s) > Nvidia web drivers for macOS

Apple rolls out it's own drivers for macOS, however there are alternate Nvidia developed drivers for Nvidia GPUs that work with macOS 10.13.x for 10.14 ...that is kindof a different story at the moment. All that said, to get the Nvidia web drivers going on macOS 10.13 High Sierra

  1. Download the CUDA driver
  2. Download insanely mac the web driver

The CUDA toolkit may need to be installed in order to install the CUDA driver. The CUDA toolkit provided by Nvidia can be installed view brew.

brew cask install nvidia-cuda

hardware > Ports

My particular late 2013 MBP has two Thunderbolt 2 ports compatible with DisplayPort and they are the same interface as Mini DisplayPort.

A quick note about Thunderbolt 2 it doubled the bandwidth of the bus from 10GBPs to 20GBPs. And a DisplayPort 1.2 interface with compatible cable should be capbable of displaying a 4K resolution image at 60Hz on a compatible screen.

Display Assembly

The internal Retina LCD panel is IPS and has a refresh rate of 60Hz, as most if not all laptop monitors do.

There are two main manufactures of display assemblies for a MacBook Pro 2013 late model.

  • Samsung
  • LG
echo "output of LG panel"
Color LCD 
LP154WT1-SJE1
DCN33940GMRFD4NA0

To determine the manufacture of the LCD display on macOS

ioreg -lw0 \
| grep \"EDID\" \
| sed "/[^<]*</s///" \
| xxd -p -r | strings -6

copypasta

ioreg -lw0 | /usr/bin/grep \"EDID\" | sed "/[^<]*</s///" | xxd -p -r | strings -6

Some LCD panels are known to have a yellowish tint to them, that said macOS provides an ICC profiler adjustment utility in System Preferences.app. There is another app known as Color Sync Utility.app that is useful for diagnosing ICC profiles for computer monitors, ie. LCD display assemblies / panels.

for a howto on replacing the physical LCD panel from the display assembly, youtube

Upgrading the SSD to an OWC Aura Pro

To upgrade a MBP 2013 late model to an OWC Aura Pro 2TB drive, macOS 10.13 will be required because apparently 10.12 will not recognize the drive because there is a Boot ROM Version upgrade when installing the macOS High Sierra upgrade.

  • macOS Sierra 10.12

    • Boot ROM Version MBP112.0142.B00
    • SMC Version (system) 2.19f12
  • macOS High Sierra 10.13

    • Boot ROM Version MBP112.O145.B00
    • SMC Version (system) 2.19f12

To print the above mentioned Boot ROM Version using CLI

system_profiler SPHardwareDataType

After installing macOS High Sierra, ie. macOS 10.13.4 on my box, the microcode version of the Intel i7 processor went from version 15 to version 25.

To print the microcode version for an Intel based Mac

sysctl -n machdep.cpu.microcode_version

As of November 5th 2018 the current microcode version running on my MacBook Pro 11,3 is 26

macOS 10.13 can not be installed on a external disk running macOS 10.12 because when an internal disk is mounted externally the Recovery partition is not mounted, and macOS High Sierra can not be installed because it can't access the firmware partition. see for more info.

For complete write-up of how I upgraded my 1TB SSD to a 2TB OWC Aura SSD, click here

MacBook Pro 11,3 uses a non standard M.2 connector for attaching an SSD drive to the system, that said an adapter can be purchased to attach a more generic / standard interface M.2 keyed NVMe SSD to the system.

Late 2013 MacBook Pro M.2 SSD adapter, amazon

macbook-pro-m.2-keying

macOS

To print the microcode version of Intel CPU, ie. an i7 running within macOS

sysctl machdep.cpu.microcode_version

To check and see if a MacBook supports an IR remove

  1. Select  > System Preferences...
  2. Choose Security & Privacy
  3. Click on Advanced...
  4. If the MacBook has support for an IR remote there should be a checkbox to toggle functionality.

For more info IR support see

To determine wether macOS is using the discrete GPU or the integrated GPU

To check and see if the EFI on a Intel Mac is 32bit or 64 bit

ioreg -l -p IODeviceTree | grep firmware-abi

Working with a MacBook Pro keyboards

On a modern era MacBook Pro, ie. a 2013 based Intel Mac, there are no 🙅

  • Insert
  • Delete
  • Page Up
  • Page Down
  • Home
  • End

See this image a graphical representation of the Insert Pad keys.

To get around not having an Insert Pad on MacBook, the fn key can be used in combination with the arrow keys, to simulate PgUp and PgDn

To get Windows / PC style delete functionality on a Mac, ie. where the cursor is to the left of the text and the cursor pulls text ie. deleting text, where as on a Mac the delete requires the cursor be to the right of the text and and then deletes text by moving the cursor to the left while delete characters it travels over.

fn + delete

fn + delete

To input a Home or End

fn + fn +

Useful Links 🔗 macOS

Linux

Great 👌 explanation for contributing to the Linux kernel

To find the model # of MBPr in Linux

dmidecode -s system-product-name

Working with GRUB2

To install grub2 to a removable USB drive from a Live Linux USB

grub-install --target=x86_64-efi --efi-directory=/mnt/usb --boot-directory=/mnt/usb/boot --removable --modules=part_gpt --bootloader-id=grub

a configuration file grub.cfg will be needed in order to bootstrap an ISO

grub-mkconfig -o /boot/grub/grub.cfg

Useful Links for working with GRUB2

Working with storage

To see a partition layout of a disk

lsblk

To format a filesystem to a disk

mkfs.ext4 /dev/partition

To convert a .dmg to an .iso follow the below steps

Debian based distro

apt-get install dmg2img
dmg2img my-fancy-pants.dmg

After the process completes, rename my-fancy-pants.img to my-fancy-pants.iso

mv my-fancy-pants.img my-fancy-pants.iso

Useful Links 🔗 Working with Storage

Working with the kernel

a kernel module can be inserted into a running kernel with insmod a kernel module can be removed from a running kernel with rmmod
a kernel module is code that is inserted into and unloaded out of the static kernel image at run time.

three types of modules

  1. char module is a device that can be accessed like a file, stream of bytes.
  2. block module block drivers have a completely different interface than char drivers.
  3. network module

char module - synchronous
block device - asynchronous /proc/iomem should show what area of memory a device is occupying

To list known modules loaded in a Linux kernel

lsmod

To list info about a specific kernel module

modinfo <moduleName>

To load the vfio kernel module

sudo modprobe vfio

Printing useful info about system hardware

To get megahertz of CPU

lscpu

To print a list of devices attached to the PCI bus

lspci -nn

Working with processes

In UNIX / Linux a process is created using fork() and is composed of

  • address space
  • one thread upon creation
  • a process contains one thread

user space programs talk to the kernel via system calls, and the kernel talks to the hardware via interrupts.

A simple Hello Kernel program

hello.c ```c #include #include

static int hello_init(void){ printk(KERN_ALERT “TEST: Hello Kernel!\n”); return 0; }

static void hello_exit(void) { printk(KERN_ALERT “EXIT: Goodbye Kernel!\n”); }

module_init(hello_init); module_exit(hello_exit);

</details>

<a id="troubleshooting-audio"></a>

### Troubleshooting Audio

> ALSA replaced OSS as the audio engine in Linux

To get the current version of ASLA

```shell
cat /proc/asound/version

To print the installed sound devices / cards on the system

cat /proc/asound/cards

To reload pulseaudio / ALSA sound server

pulseaudio -k; alsa force-reload

sudo may be required for alsa force-reload

To reconfigure a PulseAudio sound server during runtime see 🙈, pacmd

To show a list of available sound cards

aplay -l

ALSA - is kernel sound mixing PulseAudio - is user level sound mixing

To print the state of the sound system

aplay -l

To print the state of the sound system

pactl list

How to fix the distorted audio / sound playback?

enable the following flag when launching qemu

--audio-drv-list=alsa

Useful Links Troubleshooting Audio

Working with QEMU and GDB

To start qemu with gdb support, ie. debugging qemu with gdb

qemu [-s/-gdb]

Launch GDB in a different $TERM or $SHELL and make sure the appropriate architecture is set see 🙈 for more info

To print the version of Python 🐍 that GDB using

python import sys;print sys.version

The above command must be run within the (gdb) prompt

Working with QEMU

To attach an iPhone or iPod within qemu

see 🙈

To launch a Windows 7 VM from QEMU

qemu-system-x86_64 -m 2048 -enable-kvm -vga qxl VM/windows7.img -usbdevice tablet -monitor stdio

To setup macOS within QEMU

see 🙈

To pass USB device through to QEMU

(qemu) usb_add host:03eb:6124

You will need to find the appropriate Device ID for this work

Useful Links Working with QEMU

Arch Linux

To list network interfaces on a system

ip link

To find wireless interface name

iw dev

To remove a package and all it’s dependencies

pacman -Rs <packageName>

Useful Links 🔗 > Arch Linux

X11

Where is xorg.conf on an Arch Linux system?

/etc/X11/xorg.conf

Running macOS with KVM

Useful Links 🔗 > Running macOS with KVM

Zombie MacBooks 🧟‍♂️

Troubleshooting Zombie MacBooks

If the computer beeps 3x three times from the internal system speaker with no output on the display, and the computer has removable system RAM, then more than likely the system RAM has not been properly inserted into the system, thus the three beeps.

To boot a MacBook into macOS Recovery mode

+ R

Useful Links 🔗

TODOs

  • check to see if the below statement is still valid.

Update the below quoted statement only applies on the 32bit systems because 32bit systems are limited to allocating 4GB of memory, thus the max memory a user space process can occupy is 3GB because 1GB is reserved for the kernel. That said 64bit systems can allocate a shit load more memory, ie. in the range of 16 exabytes. Now most systems don't come close to having 16 exabytes so most hardware / software only enables certain bits for address space ~ 2^48 = 256TB / 2^42 ~ 4TB of addressable space which is done for performance reasons for modern systems.

note each user space process is still limited to a 3GB of memory

Marlin Randos

  • If needing to purchase a new Mac FWR look into a 13" mid 2014 a1502
Clone this wiki locally