Laptop Modification Plan
I'm planning to tinker with my laptop since I won't be doing architecture anymore. I bought this laptop the summer after I finished the college entrance exam, and being young and naive, I ended up buying a business laptop. As we all know, business laptops equal poor performance and high prices. So, in my second year, after building a desktop, I installed Fedora on the laptop, and it has been gathering dust ever since. A few days ago, during a Fedora upgrade, it crashed. However, I'm going abroad for studies in September, and I still need to use the laptop. My plan is to install Windows 10 LTSC, Ubuntu 18.04 LTS, and macOS Mojave as three operating systems, replace the HDD with an SSD, and upgrade the network card.
This post was translated from my Chinese blog post with the aid of ChatGpt.
As usual, let’s start with the specifications:
Model: Acer TravelMate P645-SG
CPU: Intel Core i7-5500U (2.4GHz/2C4T) (A rather subpar one)
GPU: NVIDIA 840M 2G (Planning to remove the discrete graphics card for improved performance)
Memory: 8GB DDR3L 1600MHz
SSD: Jumper L8T 128GB mSATA interface
HDD: Western Digital 500GB 5400RPM Blue
Network Card: Intel 7265NGW
Now, for the hardware upgrades:
Network Card: Replacing it with DW1560 for better compatibility with Hackintosh, costing around 330 CNY on Taobao.
Hard Drive: Replacing the mechanical hard drive with a Samsung 860 EVO 500GB, priced at 559 CNY on JD.com.
Memory: Still contemplating this one, planning to upgrade the 4GB slot to 8GB.
Hardware Upgrades
I have to admit, I’ve opened up my computer four or five times these past few days, and I’ve worn out quite a few screws. Below is a teardown image. The red box marks the location of the network card, which I’ve already removed. The green box is for the memory, and the yellow box is the new SSD I’ve installed.
I must have been quite out of my mind back then. I chose to study architecture, and even my choice of laptop was peculiar. I ended up with a 5th generation low-voltage CPU paired with an 8th series discrete GPU. The only advantage seemed to be the long battery life.
Network Card
The original Intel network card is, of course, incompatible, so I needed to purchase a network card that’s compatible with Hackintosh from a certain online marketplace. Before buying, make sure to check the interface and card length, which is usually ngff
for these small cards.
When installing, disconnect the original antenna interface by prying it open with your fingernail. Then, replace it with the new one and reconnect the antenna.
I encountered a small issue with the DW1560 on my laptop - Bluetooth wasn’t working. None of the three systems could detect any Bluetooth devices. After some research, I found that it was necessary to block two identification pins on the back. The simplest and most straightforward method is to use tape to cover these two pins, as shown in the image below.
You need to block the two pins on the right side within the red circle. It’s best for those of us who are a bit clumsy to use tweezers for this task. Be careful not to cover the two pins on the left side. After blocking, the BIOS self-check time may be slightly longer, but it’s not a significant issue.
SSD
This old laptop only has one MSATA and one SATA3 interface, so I can’t use M.2, which is quite frustrating. I removed the original 500GB hard drive and put it in an external hard drive enclosure. Although the speed is not great, it’s still usable. I’ve partitioned it for macOS as a backup.
Memory
This laptop has 4GB of onboard memory plus a 4GB slot, making memory upgrades quite challenging. The only option is to go for an unbalanced 4GB + 8GB configuration, which is a bit of a nightmare for perfectionists like me. So, I’ve put that upgrade on hold for now. I’ll consider it if I run into memory issues later on.
Win10 LTSC Installation
First, I installed LTSC on the 128GB SSD. I chose it mainly to increase battery life a bit and save disk space.
Download the Image File
You can download Win10 image files from the MSDN, I Tell You
website. Here’s the link:
Find the corresponding version in the left-hand operating system section, and then you can download it. These are ed2k
links, so it’s recommended to use a download manager like Thunder (if available). If you have the capability, consider supporting the website owner; maintaining it for over a decade is no small feat.
Create a Bootable USB Drive
Win10 image files are getting larger, and the install.wim
file for 1903 is already over 4GB. Therefore, it’s better to use UltraISO to burn it. In the past, when install.wim
was less than 4GB, you could directly extract the ISO to a USB drive.
For the Old Tan Sauerkraut’s image, there are no files larger than 4GB. So, get an 8GB or larger USB drive and extract the image directly onto it.
UltraISO Burning Tutorial
This is the process for creating a 1903 bootable USB drive. Skip this if you’re installing LTSC.
- Insert your USB drive.
- Run UltraISO as an administrator.
- Go to
File
>Open.
- In the pop-up window, locate your ISO file, and click
Open.
- Click
Bootable
>Write Disk Image.
- In the pop-up window, select your USB drive.
- Use the default writing method
USB-HDD+.
- Click
Write.
Installation
- Plug in the bootable USB drive and then boot the computer while repeatedly pressing
F2
to enter the BIOS. - Set the USB drive as the first boot option.
- Save and exit the BIOS.
- After a while, the system will enter the language selection screen. Usually, the default is fine, so click
Next.
- Use
Shift
+F10
to open the terminal. - Type
diskpart
to open disk management. - Type
list disk
to list the hard drives. - Find the number of the target installation disk and type
select disk [number]
and press Enter. - Type
clean
and press Enter. - Type
convert gpt
to convert the disk to GPT format. - Click
Install Now.
- Accept the terms and click
Next.
- Choose
Custom.
- Select the target disk and click
Next.
- When restarting, remove the bootable USB drive.
- The rest is straightforward, just click
Next
until it’s finished.
Activation
LTSC doesn’t have digital rights activation (even though LTSB did; it’s frustrating that they removed it in the new versions). So, you need to use KMS activation.
Right-click on the Windows logo in the start menu and run PowerShell
as an administrator. Then enter the following commands one by one:
1 | slmgr -ipk M7XTQ-FN8P6-TTKYV-9D4CC-J462D |
A dialog box will appear during the process; just click OK
for all of them.
The remaining process is installing software. I’ve summarized some useful software in another article. Here’s the link:
LinkUbuntu 18.04 LTS Installation
Download the Image File
You can download Ubuntu’s image file from the official website. Here’s the link:
LinkCreate a Bootable USB Drive
You can create a bootable USB drive for Ubuntu using software. However, if you prefer a quicker method, you can simply extract the ISO image directly onto a USB drive. Then, add the EFI boot option corresponding to the USB drive in the BIOS settings to start the installation.
Installation
- Select
Install Ubuntu
and press Enter to begin the installation. - Choose your language and keyboard layout.
- Opt for
Minimal installation
to save time. - Whether to
Download updates while installing Ubuntu
is optional; you can choose according to your preference. - Under
Installation type,
selectSomething else.
- Locate the target disk for Ubuntu installation.
- Click the
+
in the lower left corner to create partitions. You can choose from various partitioning methods. I created three partitions:- The first is the
EFI system partition,
with a size of 512MB. - The second is
Swap space,
which is the same size as your actual RAM. I allocated 8192MB, which is 8GB. - The third is the primary partition mounted at
/
and formatted with theExt4 journaling file system.
The size can vary depending on your needs; I allocated 160GB.
- The first is the
- After partitioning, select the
EFI
partition and clickInstall Now.
- Choose your time zone and create a username and password.
- Once the installation is complete, you’ll be prompted to restart.
Adding Grub Bootloader
After restarting, you might find that your system boots directly into Windows because Ubuntu hasn’t added the bootloader. To fix this, you can add the Grub EFI boot option in your BIOS settings. Set it as the primary boot option so that Ubuntu and Windows can coexist.
Macos Mojave 10.14.6 Installation
The last and most challenging part of this project is setting up a Hackintosh (macOS on non-Apple hardware). It took me several days and quite a few detours, but I opted for the Vanilla
installation approach.
The process of creating the installation drive is quite complex and beyond the scope of this document. I recommend following the Vanilla Laptop Guide. I only discovered this website when I was fixing sleep-related issues towards the end of my journey. If I had found it earlier, I could have saved myself a lot of trouble.
Here’s a brief summary of my experience, but please note that I strongly recommend following the guide mentioned above:
My Hackintosh Setup:
- Success Rate: 95% working perfectly.
- Features Not Tested: SD card reader and external video output (HDMI and VGA).
Drivers and Features:
Category | Status |
---|---|
Battery | OK |
Display | OK |
Brightness Control | OK |
Sleep/Wake | OK |
USB | OK |
Keyboard | OK |
Trackpad | OK |
Audio | OK |
CPU Power Management | OK |
Airdrop | OK |
SD Card Reader | N/A |
HDMI Output | N/A |
VGA Output | N/A |
Below is a detailed account of my troubleshooting journey. If you want to skip it, click the link below:
Skip to the EFI sectionCreating the Installation Drive
Below is a summary of my rather convoluted journey in creating the installation drive, provided for reference. Please note that some details might be a bit fuzzy as I had a simpler experience when creating the second Hackintosh on another machine.
Initially, I attempted to create the installation drive on Windows using gibMacOS. This method relies on restoring an image, which means you have to download the installation image online during the installation process. Unfortunately, my network card wasn’t functioning properly, which led to an awkward situation.
Next, I scoured the internet for tutorials and, in a state of slight panic, picked one to follow step by step. However, I ended up creating a PE (Preinstallation Environment) drive instead. I thought to myself, “Wait, this image is supposed to be Mojave 10.14.6, right?”
I then downloaded the official Mojave image from Apple, burned it to a USB drive, added the EFI partition with Clover, and replaced the plist with a Vanilla one. However, when I booted up, the
Install macOS
option was mysteriously missing, leaving me in another predicament.Here’s how I eventually resolved it: I replaced the entire EFI partition from the last installation with the EFI partition created in Windows during my first attempt. Afterward, I replaced the plist file with the Vanilla one. It sounds rather foolish, but it worked.
Downloading the Original Mojave Image
You can obtain the original image using the macOS Mojave Patcher Tool.
Once you’ve downloaded the tool, open it, and from the top menu, select Tools
> Download macOS Mojave
.
Creating the Installation Disk
For this step, I used the software called DiskMaker X 8 for MacOS Mojave.
Please make sure not to download the latest version, as it’s intended for Catalina.
- After downloading the software, open it. It may prompt you to update, but you can select
Not now, thanks.
- Choose
Select a macOS Installation App
and locate the installation image you downloaded in the previous step. ClickChoose.
- Select
An 8 GB USB thumb drive (ERASE ALL DISL).
- Choose your USB drive, then click
Choose this disk.
- It will ask for your password, and after a short wait, it will notify you that the installation disk has been created.
Creating the EFI Partition
For this step, you’ll need to use the Clover EFI bootloader.
Download and install Clover. During installation, select Customize
in the Installation Type
section and choose your USB drive as the installation location.
UEFI Settings:
- Only install the UEFI version.
- Install Clover to the EFI system partition.
- Under
UEFI Drivers,
select the following three options:- AptioMemoryFix
- PartitionDxe
- ApfsLoader
For some reason, the installation disk I created this way didn’t allow me to access the installation page. So, I copied the EFI folder created during my initial gibMacOS attempt and replaced the original EFI folder on the USB drive.
Replacing config.plist
In this step, you’ll need to find the config.plist
file corresponding to your CPU model and replace the existing config.plist
in your EFI folder. Skilled individuals on Github have already created appropriate files based on CPU generations. Make sure to set the model to MacBook Air7,2.
Here’s an explanation of CPU codenames:
- CoffeeLake: 8th generation CPU
- Haswell: 4th generation CPU
- Ivy Bridge: 3rd generation CPU
- KabyLake: 7th generation CPU
- Skylake: 6th generation CPU
Yes, there’s a gap there, and my 5th generation Broadwell CPU doesn’t have its specific category. So, I used the 4th generation files, as the 5th generation is essentially a minor upgrade of the 4th generation and works similarly.
Since Github doesn’t have a direct download button, you’ll need to click on the file you want, then click on Raw
at the top of the page, and right-click to Save As
to download the config.plist
file.
Loading Kexts (Kernel Extensions)
Kexts are similar to drivers and are necessary to drive your hardware. You’ll need the following files:
- VirtualSMC.kext - The core kext; the downloaded zip file includes several companion kexts that should also be used.
- Lilu.kext - Consider this as something like a runtime library.
- WhateverGreen.kext - Graphics card patch.
- VoodooPS2.kext - Driver for keyboard and touchpad.
- AppleALC.kext - Sound card patch.
- IntelMausiEthernet.kext - Ethernet card patch.
- AirportBrcmFixup.kext - Wireless patch.
- BrcmFirmwareData.kext - Wireless card patch.
- BrcmPatchRAM2.kext - Comes in the same package as the previous one.
- FakePCIID.kext - PCI patch.
- FakePCIID_Broadcom_WiFi.kext - Comes in the same package as the previous one.
Place these files in the ./EFI/CLOVER/kext/Other
directory.
Installing the System
I’ve already covered part of the installation process in a previous blog post. Here’s a copy-paste of that information.
BIOS Settings
- Boot into the BIOS (shortcut key is F2) and reset all settings to default.
- Disable
Secure boot
and save the changes. - Reboot and enter the BIOS again. Set the
Boot Device
preference to your USB drive. - When booting from the USB drive, you’ll enter the Clover menu. Select
Boot macOS Install from OS X Base System
and press Enter. Clover will display verbose mode by default, showing the status as it scrolls on the screen. Once it’s done, the macOS installation program will appear, and you’ll see the language selection menu.
Formatting the Disk
Before installing macOS, you need to format the target disk.
- Double-click
Disk Utility.
- Click the drop-down menu at the top left corner and choose
Show All Devices.
- Click
Erase
at the top. - Select the hard drive where you want to install macOS, and configure it as follows:
- Name: (Choose a name for your hard drive)
- Format: Mac OS Extended (Journaled)
- Scheme: GUID Partition Map
- Click
Erase
at the bottom right. - Close
Disk Utility.
System Installation
- Select
Install macOS
and clickContinue.
- Choose the disk where you want to install macOS.
- Wait for about ten minutes. After the installation is complete, your computer will automatically restart.
System Setup
After rebooting, choose the USB drive boot again, enter Clover, and select Boot macOS from [Your Hard Drive Name].
Wait for Clover’s verbose mode to finish, and you’ll arrive at the welcome page. Choose your country and keyboard layout, and then:
- Transfer Information to This Mac: Choose
Don't transfer any information now.
- Apple ID: You can skip this for now. You might need to modify your model later, and after that, you’ll need to log in again.
- Terms and Conditions: Agree to all.
- Express Set Up: Choose
Customize settings
and uncheck everything inAnalytics
to prevent macOS from analyzing your system.
Wait for a while, and you can access the macOS system.
System Configuration
We still need to boot from the installation USB drive for this step. We will copy the EFI files from the USB drive to the boot drive so that you won’t need the USB drive anymore. First, download the following two software:
Clover EFI Bootloader Configuration
Download and install Clover EFI bootloader. Proceed with the installation, and when you reach the Installation Type
section, choose the following settings:
- Install Clover for UEFI booting only
- Install Clover to the EFI partition
- In the
UEFI Drivers
section, select the following three options:- AptioMemoryFix
- PartitionDxe
- ApfsLoader
- Install RC Scripts to the target volume
Replacing EFI Files
- Download, install, and open Clover Configurator.
- In the left-hand menu, click on
Mount EFI.
- Find the hard drive where macOS is installed on the bottom right and click
Mount Partition
next to it. - Click
Open Partition
to open the EFI folder. - Open the
EFI
folder on the installation USB drive and copy its contents to the folder opened in the previous step. - If prompted about duplicate files, click
Replace.
Now, you can restart your computer and enter the BIOS to change the preferred boot option to Clover. You can remove the USB drive at this point.
Driver Installation
Some drivers can be installed using Clover Configurator.
In the Install Drivers
section under UEFI Drivers,
check the following options. Note that it’s not entirely certain which ones are essential:
- ApfsDriverLoader
- AptioInputFix
- AptioMemoryFix
- AudioDxe
- DataHubDxe
- FSInject
- HFSPlus
- PartitionDxe
- Ps2MouseDxe
- SMCHelper
- UsbKbDxe
- UsbMouseDxe
The following steps require the use of “Hackintool” for configuration.
LinkAudio
You have already installed the AppleALC audio driver, but there is no sound yet. Follow these steps:
- Click on
Audio.
- In the
Layout ID
below, choose a numeric value. In your case, you chose 127.
Graphics
- Click on
Apply Patches.
- Under
CPU Type,
selectBroadwell,
and forPlatform ID,
choose0x16160002.
- Click
Apply Patches
below. - In the
General
section, check the following:- Device Properties
- Automatically Detect Changes
- All
- Inject
- VRAM
- Graphics
- Audio
- In the
Advanced
section, check the following:- DVMT Pre-Allocated 32MB
- Disable eGPU
- Map DP to HDMI
- Fake ID
- VRAM 2048MB
- Enable HDMI 2.0 (4K)
- USB Port Limit
- Click
Generate Patch.
Display
- Click on
Display.
- Select your display.
- In
Inject EDID,
choose the appropriate aspect ratio and resolution. - Click the plus sign below.
- Click the export button in the lower right corner.
- Copy the generated kext file to the
./EFI/CLOVER/kext/Other
directory.
Click on File
in the top menu, choose Export Config.plist
to replace the file in the EFI partition, and then restart.
USB
USB is closely related to sleep functionality, and many sleep-related issues are caused by USB. USB needs to be customized using Hackintool.
- First, open the Clover Configurator and apply the patch that removes the USB port limit; the relevant patches will be marked in the comments.
- Open Hackintool, click on USB, and you will see that connected ports are displayed in green.
- Prepare a USB 3.0 flash drive and a USB 2.0 device like a keyboard or mouse, and open Notepad.
- Plug the laptop’s USB ports with both 2.0 and 3.0 devices, and note down their corresponding names.
- If there is a Type-C port, insert the device in both orientations; if the port remains unchanged, it is Type-C+sw; otherwise, it is Type-C.
- Select the connector type based on your records. Choose
Internal
for unrecorded ports. - Select the ports that haven’t turned green and click the minus sign to remove them.
- Ensure that the number of ports is less than or equal to 15, with USB 3.0 ports counted as two.
- Click the export icon in the lower right corner.
- Place the generated SSDT file in the
./EFI/CLOVER/ACPI/patched
directory. - Put the generated USBport.kext into the
./EFI/CLOVER/kext/Other
directory. - Go back to Clover Configurator and disable the USB port limit removal patch in kernel and driver patches.
- Restart your computer.
The following settings require the use of SSDT, so first download maciASL.
LinkBrightness
There are two methods to adjust brightness. The first one is to enable PLNF in Clover Configurator, which is simple but conflicts with battery management. Therefore, it is recommended to use the SSDT method. Download the SSDT file from the link below and place it in the ./EFI/CLOVER/ACPI/patched
directory.
After restarting, you will see a brightness slider in the system preferences. However, you won’t be able to adjust the screen brightness using the keyboard shortcuts. To set up keyboard shortcuts for brightness adjustment:
- Open System Preferences.
- Go to Keyboard > Shortcuts.
- Click on Display.
- Set up shortcuts for
Decrease Display Brightness
andIncrease Display Brightness
without conflicting with other shortcuts.
CPU
CPU-related issues primarily concern frequency scaling. Without patches, the CPU remains in turbo mode, consuming more power. To address this, you can use ssdtPRGen.
Follow these steps:
- Open Terminal.
- Run the following command to download the script:
curl -o ~/ssdtPRGen.sh https://raw.githubusercontent.com/Piker-Alpha/ssdtPRGen.sh/Beta/ssdtPRGen.sh
- Give execute permission to the script with:
chmod +x ~/ssdtPRGen.sh
- Run the script and follow the prompts to generate an SSDT file.
- Place the generated SSDT file in the
./EFI/CLOVER/ACPI/patched
directory. - Restart your computer.
You can check if the CPU is properly frequency scaling by installing software like Intel Power Gadget.
With these configurations, your Hackintosh should be close to perfect. Sign in with your Apple ID and complete the remaining settings.
That’s it!
EFI Download
Download and extract the EFI folder. You will need to customize it with your specific hardware details using Clover Configurator.
Acer TravelMate P645-SGAfter downloading, enter the BIOS settings and set Clover as the default bootloader to enjoy using all three systems.
Beautifying Ubuntu
If you’re not a fan of Ubuntu’s default theme, you can easily customize it. Open the terminal and install the necessary plugin with the following command:
1 | sudo apt install chrome-gnome-shell |
Theme
I recommend using the Arc Theme.
To install it, open the terminal and run:
1 | sudo apt install arc-theme |
Once installed, open Settings
and set the Arc theme for both Applications
and Shell.
Icons
After changing the theme, you may want to change the icons as well. I recommend the Papirus
icon theme.
To install Papirus icons, open the terminal and run these commands:
1 | sudo add-apt-repository ppa:papirus/papirus |
Once installed, open Settings
and set the Icon
theme to Papirus.
Terminal
For a transparent terminal, open the terminal and go to Edit
> Profile Preferences.
Select your profile and click on the Colors
tab. Check the box that says Use transparent background.
Adjusting Windows 10 Time
After installing all three systems, you may notice that the time in Windows 10 is incorrect, possibly 8 hours behind. This is because Windows 10 uses local time in the BIOS, while macOS and Linux use UTC time. To adjust this, follow these steps:
- Press
Win+R
to open the Run dialog. - Type
regedit
and press Enter to open the Registry Editor. - Navigate to
HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Control/TimeZoneInformation/
. - Right-click and create a new
DWORD
value namedRealTimeIsUniversal
. - Set the value of
RealTimeIsUniversal
to1
. - Restart your computer.
With these adjustments, your systems should be well-configured. Enjoy it!
References: AMD OS X Vanilla、The Vanilla Laptop Guide、hackintosh.gitbook.io、sleele的博客、黑果小兵、SemiconductorKING