Git Product home page Git Product logo

surface-go-2-opencore's Introduction

OpenCore logo

Surface-Go-2-OpenCore

macOS on the Core m3-8100Y Microsoft Surface Go 2 thanks to Acidanthera's OpenCore bootloader.

Disclaimer

This repository is neither a howto nor an installation manual. Using these files requires at least basic knowledge of Acidanthera's OpenCore bootloader, ACPI, UEFI and the art of hackintoshing in general. I recommend reading the excellent Dortania's OpenCore Install Guide, as well as all its linked resources.

Although this repository is a fork of kingo132's Surface Go 2 hackintosh repository, my OpenCore EFI folder was built from scratch by following Dortania's OpenCore Install Guide with the latest releases of Acidanthera's OpenCore bootloader and every required kexts. Nevertheless, kingo132's repository provided an extremely valuable and helpful resource for building my OpenCore EFI folder and hacking the tablet's UEFI BIOS.

Recommendations

I recommend completely erasing the device's SSD by creating a new GPT partition table before attempting to install macOS, as it makes the installation process much easier. You may use any Linux live ISO with a partitioning tool such as GParted or KPartition to erase the SSD.

For macOS to be able to boot on the Surface Go 2, the Secure Boot option needs to be disabled in the BIOS. The boot screen will then display a large red bar with a lock icon at the top of the display when Secure Boot is disabled. This is normal.

Please be aware that all PlatformInfo and SMBIOS information was removed from the OpenCore config.plist files. Users will therefore need to generate their own PlatformInfo with CorpNewt's GenSMBIOS tool before attempting to boot a Surface Go 2 with this repository's EFI folder.

The kexts required to enable the trackpad and the touchscreen are special versions of VoodooI2C.kext and VoodooI2CHID.kext patched and improved by lazd. Updating those kexts with the official ones from the VoodooI2C repo will most certainly break trackpad and touchscreen functionality! They were renamed to VoodooI2C-SurfaceTouch.kext and VoodooI2CHID-SurfaceTouch.kext so as not to be auto-updated by tools such as OCAT. The AirportItlwm.kext from the OpenIntelWireless repo is required to enable the Wifi chip and was renamed to AirportItlwm-Sonoma.kext for the same reason.

Software Specifications

Software Version
Target OS Apple macOS 14.2.1 Sonoma
OpenCore MOD-OC v0.9.8
SMBIOS MacBookAir8,1
SSD format APFS file system, GPT partition table

Computer Specifications

Device Hardware
CPU Intel Core m3-8100Y (1.1 - 3.4 GHz, Amber Lake-Y)
iGPU Intel UHD Graphics 615
Audio Realtek ALC298
RAM 2x4 GB LPDDR3 1867 MHz
Wifi + Bluetooth Wifi6 AX200, Bluetooth 5.0
Storage Kioxia/Toshiba 128GB SSD
USB Type-C 3.1 Gen 1 Supports Power Delivery and DisplayPort
MicroSD Card reader Realtek PCI-E Card Reader
Front & Rear camera Intel(R) AVStream Camera 2500, ISP Interface, 8 MPix/5 MPix
IR camera Intel(R) AVStream Camera 2500, ISP Interface
Keyboard / Trackpad Microsoft Type Cover
Display 10.50 inch 3:2, 1920 x 1280 pixel 220 PPI, 10-Point Capacitive
Touchscreen ELAN9038, \_SB.PCI0.I2C1.TPL1
Screen BOE CQ NV105WAM-N31, BOE088B
NFC NXP NFC Client Device, NXP3001
Battery 26.81Wh 7.66v 3500mAh
LTE (if available) Surface Mobile Broadband, USB device, Qualcomm Snapdragon X16 LTE
GPS (if available)
Accelerometers, gyroscopes, ambient light sensors

What works

  • CPU power management (SSDT-PLUG.aml)
  • CPU SpeedStep (CPUFriend.kext, CPUFriendDataProvider.kext)
  • iGPU with full acceleration (SSDT-PNLF.aml, WhateverGreen.kext, AAPL,ig-platform-id 00001B59)
  • SSD drive (NVMeFix.kext)
  • USB-C port (SSDT-EC-USBX-LAPTOP.aml, USBMap.kext)
  • WLAN (AirportItlwm.kext)
  • Bluetooth (IntelBluetoothFirmware.kext, IntelBTPatcher.kext, BlueToolFixup.kext)
  • Internal speakers, microphone and Combojack (AppleALC.kext, alcid=3)
  • Power, volume up and volume down buttons (VoodooPS2.kext)
  • Surface Type Cover keyboard with working brightness, volume and mute keys, working caps lock light (VoodooPS2.kext)
  • Surface Type Cover trackpad with native multi-touch gestures (SSDT-XOSI.aml, VoodooI2C, VoodooI2CHID)
  • Touchscreen (SSDT-XOSI.aml, VoodooI2C.kext, VoodooI2CHID.kext)
  • Surface Pen (SSDT-XOSI.aml, VoodooI2C.kext, VoodooI2CHID.kext)
  • MicroSD Card reader (RealtekCardReader.kext, RealtekCardReaderFriend.kext)
  • Battery percentage and cycle count (VirtualSMC.kext, SMCBatteryManager.kext)
  • Hibernation (hibernatemode 25) - the device successfully wakes up from hibernation mode
  • USB Type-C to HDMI
  • USB Type-C to USB3 & USB2
  • USB Type-C Power Delivery

What needs some more work

  • Sleep (hibernatemode 3) - the device wakes up from sleep displaying the Surface logo on the internal display
  • Accelerometers, gyroscope
  • Ambient light sensor

What will probably never work

  • Front & rear cameras
  • IR camera (Windows Hello)
  • NFC
  • LTE

Turning off BD PROCHOT

On this device, BD PROCHOT will activate at temperatures as low as 60°C ~ 70°C. When it kicks in, the CPU will throttle down to 0.4Ghz, making the device more or less unusable. That's why BD PROCHOT needs to be disabled in order to increase the performance of the machine.

You may use arter97's DisablePROCHOT UEFI extension which is already included in the EFI/OC/Drivers folder to disable BD PROCHOT. However, if the CPU continues to be fully loaded with BD PROCHOT disabled, the temperature may increase up to 90°C. Beyond 90°C, the device will become unstable and either crash or power off. To avoid this, the temperature needs to be kept under control.

The DisablePROCHOT.efi driver is included but disabled in both config.plist files, as enabling it leads to the CPU overheating and the computer shutting down during install. You may enable the driver once macOS is installed on the device.

Undervolting to reduce heat and improve performance

There are two undervolting tools available for macOS:

The VoltageShift.kext is already included and enabled in this repository's Kexts folder. To be able to launch the voltageshift command line tool from anywhere, copy VoltageShift from the Tools folder to your /usr/local/bin folder by entering sudo cp voltageshift /usr/local/bin/ in the macOS terminal after navigating to the folder where you downloaded and unzipped the voltageshift executable file.

Please refer to the instructions found in the VoltageShift repository, as well as to the excellent howto found in zearp's repository.

Disabling CFG Lock

  1. Boot into OpenCore
  2. Press Space to see the list of tools
  3. Select setup_var
  4. Press enter
  5. Restart

To verify this worked, press Space and select the ControlMsrE2 -- if it was successful, you'll see:

This firmware has UNLOCKED MSR 0xE2 register!

Finally, edit config.plist and set Kernel -> Quirks -> AppleCpuPmCfgLock and Kernel -> Quirks -> AppleXcpmCfgLock to false.

Enabling native HiDPI display settings in macOS

On the installed macOS system, the default display resolution is too small for a small device such as the Surface Go 2. To enable the native HiDPI settings in the Display Preferences of macOS, download and run the one-key-hidpi script and select the option (4) 1920x1280 Display. This fork of xzhih's one-key-hidpi tool was modified to add the 1920x1280 resolution needed for the Surface Go 2.

Disabling Sleep and enabling Hibernate

As there is still no solution to the sleep issue on the Surface Go 2, it is recommended to disable Sleep altogether and use Hibernate for now:

sudo pmset restoredefaults;
sudo pmset -a hibernatemode 25;

Fixing broken iMessage

To fix issues with iMessage (Apple Messages) related to the Intel Wireless driver, please disable the AirportItlwm-Sonoma.kext in your config.plist and use the itlwm_v2.2.0_stable.kext.zip and its companion app HeliPort instead.

Related issues

Useful links

Related repositories

surface-go-2-opencore's People

Contributors

jlempen avatar kingo132 avatar lazd avatar

Stargazers

我如天翼 avatar Thomas Holden avatar Vinyxdev avatar LI JIA QI avatar Nil avatar Null avatar tolikes avatar Rody Davis avatar Mazdak Shafiei Sabet avatar Péter Finta avatar  avatar zwjsnd avatar Faris Khowarizmi avatar Jerry Isbell avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar Vinyxdev avatar

Forkers

lazd

surface-go-2-opencore's Issues

USB Type-C to HDMI/DP doesn't seem to work

I haven't been able to get this to work since Big Sur, it stopped working in Monterey.

I use a Cable Matters USB C Multiport Adapter since I need to use DisplayPort to get full refresh rate on my 24" Dell retina monitor. I'll give some basic Type-C to HDMI adapters at try to verify the adapter isn't a problem, but I do recall this adapter working in Big Sur.

Has anyone tested this recently on Sonoma?

Surface pen doesn't work

It just does nothing... I think it may have been broken in VoodoI2C 2.7 (see VoodooI2C/VoodooI2C#500), or perhaps I broke it when I removed this for loop in VoodooI2C/VoodooI2CHID#69 (which was fixed in VoodooI2C/VoodooI2CHID#73).

In any case, we need to build VoodooI2CHID from the master branch and see if it's fixed. I'm working on that now, but unfortunately XCode 15.2 on Sonoma doesn't have IOKit, so I can't build it at the moment. I'll figure something out and will test/send a PR with the updated kexts if it works.

Trackpad and keyboard not working on Monterey on Go 2

They worked fine on the Open Core boot screen, but stopped working completely once Mac OS booted into the installation UI, as if no Type Cover was connected.

Un/replug Type Cover didn't help. But the touch screen was fine.

I have tried to replace VoodooI2C.kext and VoodooI2CHID.text from #1 (comment) but still no luck.

Replacing VoodooI2C with the latest 2.8 version and rebuilding the config.plist accordingly didn't work either, unfortunately.

Power management/battery life issues

I find my Surface only gets about 1.5 hours of battery life from a full charge in macOS. I've done the best I can to disable spotlight, turn on low power mode, etc, but it's still sipping quite a bit of juice.

I do have scripts that turn turbo mode on and off, and I believe having turbo on is the thing that uses the most power. I'm wondering if this has to do with CFG lock?

Here are my scripts:

# pass 0 to disable, anything else to enable
function toggleturbo() {
    if [ "$1" -eq "0" ]
        then
            echo Disabling turbo mode
            sudo /Library/Application\ Support/VoltageShift/voltageshift turbo 0
        else
            echo Enabling turbo mode
            sudo /Library/Application\ Support/VoltageShift/voltageshift turbo 1
    fi
}

# pass 0 to disable, anything else to enable
function undervolt() {
    if [ "$1" -eq "0" ]
        then
            # Turbo off
            echo Undervolting with turbo off
            cd /Library/Application\ Support/VoltageShift/
            sudo ./voltageshift buildlaunchd -120 0 0 0 0 0 0 28 18 0.002 60
        else
            # Turbo on
            echo Undervolting with turbo on
            cd /Library/Application\ Support/VoltageShift/
            sudo ./voltageshift buildlaunchd -120 0 0 0 0 0 1 28 18 0.002 60
    fi
}

I generally operate with undervolt 1, which undervolts the CPU and enables turbo mode.

Hibernation results in instant wake if Surface Type Cover is connected

I know sleep doesn't work (wakes up to a Surface logo that never goes away), but I did find that hibernate works great with one caveat: if you have the Surface Type Cover connected, it instantly wakes up.

  1. Disable all Bluetooth kexts -- these have also been causing some instant wake issues, so we want to rule them out for this test.
  2. Enable hibernate with sudo pmset -a hibernatemode 25;
  3. With the Surface Type Cover connected, choose Apple Menu -> Sleep. You'll see it go all the way to sleep and power off, then immediately wake up, boot to OpenCore, then restore from hibernate (it does so in 14-16 seconds!).
  4. Run pmset -g log | grep -e "Sleep.*due to" -e "Wake.*due to" and observe:
2023-04-06 10:02:55 -0700 Sleep               	Entering Sleep state due to 'Software Sleep pid=167':TCPKeepAlive=disabled Using AC (Charge:100%) 32 secs   
2023-04-06 10:03:27 -0700 Wake                	Wake from Standby [CDNVA] : due to /Lid Open Using AC (Charge:100%) 

Then, disconnect the type cover and choose Apple Menu -> Sleep again. No instant wake! If you then press the power button, it wakes right back up and comes alive in 14-16 seconds.

As stated above, I was getting some GLAN XDCI wakes before removing all Bluetooth kexts, as well as a couple random kernel panics, but that's for another issue once I figure this out...

Add display rotation instructions to README

I'm happy to report display rotation works just fine with Display Rotation Menu from Mage Software! Previously, when I tried this, I remember that scroll direction was reversed, but that's not the case now.

Screenshot 2024-01-23 at 11 27 57 PM

Not all the HiDPI options are available, really only 640x960 is usable, but it's pretty cramped.

Screenshot 2024-01-23 at 11 34 31 PM

UEFI BIOS hacks detailed instructions

I'm currently using config-easy.plist and would like to give config-hard.plist a try, but the documentation does not inspire confidence. I understand what needs to be changed, and that there are two tools I can use to do so, but I'd definitely benefit from detailed step-by-step instructions, especially since the machine can be bricked if this is done incorrectly.

The README says:

Dortania OpenCore Post-Install guide has detailed instructions on how to use the RU.efi tool.

However, the linked page doesn't mention RU.efi and instead details a different method that involves a modified GRUB shell, leaving me worried I'd be missing something critical and end up bricking the machine.

I think it would be worth documenting this delicate procedure directly in the repository. I'd be willing to write the docs if I knew what I was doing. Any guidance?

Enable hibernate

Howdy, I'm in the process of updating to Sonoma, and ahead of this I went ahead and upgraded OpenCore by copying in your newly updated EFI.

I have working hibernate in Monterey, but I noticed that, in your README, you mention you couldn't get hibernate to work. Here's how you do it:

  1. In config.plist, Misc -> Boot -> HibernateMode = NVRAM
  2. In config.plist, Misc -> Boot -> HibernateSkipsPicker = true

Then, run the following:

sudo pmset restoredefaults
sudo pmset -a hibernatemode 25

Reboot, then close the cover on your Surface. Wait about 30-40 seconds, then open the cover back up. Press the power button for like 1-2 seconds, and you'll see the Windows logo. Within about 13 seconds of pressing the power button, it should restore from hibernation, skipping OC completely.

I just tested this on Monterey using your latest EFI folder from this repo on OC 0.9.7 and can confirm it works.

Let me know if you get it working!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.