-
Notifications
You must be signed in to change notification settings - Fork 5
macbookpro late 2013 Notes
- My daily driver
- macOS
- Linux
- Working with QEMU and GDB
- Working with QEMU
- Arch Linux
- Useful Links
- TODOs
the early 2013 MBPr model # is A1398 Ivy Bridge
the late 2013 MBPr model # is A1398 Haswell
- Network Adapter Broadcom Corporation BCM4360 802.11ac Wireless Network Adapter, AC 1300 ie. 1.3 Gb/s link
- Native screen resolution - 2880 x 1800
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.
- replacement heatsink ifixit
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).
dram spd straps
- https://gregdavill.github.io/posts/dell-xps13-ram-upgrade/
- https://www.youtube.com/watch?v=CTsEJ49LLsQ
- https://www.youtube.com/watch?v=i0m81_7k6Hc
- https://www.youtube.com/watch?v=UIsMx28Pakg
- dGPU > GT750m > Nvidia Keppler
- GT750m > supported tech
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
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
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
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.
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
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
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
- Select >
System Preferences...
- Choose
Security & Privacy
- Click on
Advanced...
- 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
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 + →
- Driver Porting Basics for macOS
- GitHub - AppleHardwareTest
- Wikipedia HFS+ criticisms
- Apple | checkcoverage.apple.com
To find the model # of MBPr in Linux
dmidecode -s system-product-name
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
- MultiBoot USB with Grub2 - boot directly from iso files
- GRUB 2 bootloader - Full tutorial
- GRUB ISO boot Examples - Ubuntu
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
a kernel module can be inserted into a running kernel with
insmod
a kernel module can be removed from a running kernel withrmmod
a kernel module is code that is inserted into and unloaded out of the static kernel image at run time.
- char module is a device that can be accessed like a file, stream of bytes.
- block module block drivers have a completely different interface than char drivers.
- 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
To get megahertz of CPU
lscpu
To print a list of devices attached to the PCI bus
lspci -nn
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.
hello.c
```c #include #includestatic 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 foralsa 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
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
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
- libvirt - A useful app for managing VM's
- KVM/QEMU hypervisor driver
- A nice 👌 little write up on using macOS with qemu
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>
- MBP 11,3 setting up Arch Linux
- Apple Mac EFI systems
- Arch wiki - Broadcom wireless
- How to setup a Live USB to boot an Arch Linux ISO
- Dual booting macOS and Arch Linux
- Arch wiki - HiDPI explained
- Great 👌 writeup about setting up Arch on a 💻
Where is xorg.conf
on an Arch Linux system?
/etc/X11/xorg.conf
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
- Arch wiki covering MacBook 11,x
- GitHub wiki for broadcom webcam driver
- How to mount a Time Capsule volume under GNU/Linux
- How to mount and ISO filesystem in GNU/Linux
- How to mount DMG images within a GNU/Linux
- Debian EFI mode boot on a Macbook Pro, without rEFIt
- 9 Linux Parted Command Examples – mkpart, mkpartfs, resize partitions
- LiveUSB/Guide - Gentoo wiki
- Set partition labels - cyberciti
- Arch Linux BBS thread on mounting a Time Capsule
- 😬 Click at your own risk
⚠️
-
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
- If needing to purchase a new Mac FWR look into a 13" mid 2014 a1502
If you find any of this info helpful on your journey 🏍 click that 👆 ⭐️ star button. It sure makes me feel warm and fuzzy 🐻 on the inside.
- Linux and macOS Operation Notes
- Vim & Neovim Notes
- git Notes
- 🐠 fish shell Notes
- ECMAScript Tooling
- 🥧 Raspberry Pi Notes
- asdf version manager Notes
- Bind9 Notes
- Creating a custom motd on Debian Jessie
- ECMAScript Tooling
- Email client Notes
- Email Server Setup Notes Postfix & Dovecot
- Emoji side quest
- fish shell Notes
- 🥚 🤓 git it got it good Notes
- git Notes
- Graphics and Image Processing Notes
- GUI text editor Notes
- 🍻🐧 Homebrew and Linuxbrew formula Notes
- Linux and macOS Administration Notes
- Linux and macOS Troubleshooting Notes
- MacBook Pro Late 2013 Notes
- Vim & Neovim Notes
- Video Production Notes
- Python Notes
- radare Notes
- Raspberry Pi Notes
- Terminal Emulators
- Tmux Notes
- Web Browser Notes
- Weechat Notes
- Microsoft Windows Notes