Contribute
Register

[Guide] Lenovo G50-80 80L0 Big Sur & Catalina OpenCore

Status
Not open for further replies.
Joined
May 28, 2018
Messages
126
Motherboard
Dell XPS 8930
CPU
i7-8700
Graphics
RX 580
update 2020-12-22: The same config can be used to either upgrade to Big Sur or do a fresh installation of Big Sur. See below for details

This is a rewrite of my previous guide using Clover. I am getting ready to install BigSur on it, but decided to first convert from Clover to OpenCore. Because of how OpenCore handle multi-boot, it took me far more effort to convert straight DSDT patches into SSDT and renames. Instead of reinstalling macOS, I left it at the current installation of 10.15.2. I have not testing installing macOS on this set up, but I assume it would be effortless.

Model: Lenovo G50-80 80L0
CPU: i3 4030u
Graphics: Intel HD4400
Ram: 16GB
Hard drive: TeamGroup SATA SSD GX2 512GB
Audio: Conexant CX20751/2
Ethernet: RTL8111
Wifi: Intel AC 3160
macOS version: 10.15.2 and 11.1
OpenCore: 0.6.4

Note: Press Fn+F2 at start up to boot into BIOS, and Fn+F12 for boot manager

Thank you @RehabMan for all your help on debugging my hackintosh process and all the excellent guides and tools. Also thank you @vanluu for the excellent guides on Lenovo G50-80 on El Capitan and Sierra. I decided I would post my experience here to share with everyone and for myself in the future to reference back to.

Please gather the latest versions of these tools online. I’m sure you can find the latest version just by googling the names.

Tools needed:
  • macOS Catalina bootable USB drive (created with another macOS computer)
  • Apps (please google and download the latest version)
    • OpenCore 0.6.4
    • OpenCore Configurator
    • ProperTree (You can compile the script into a binary)
    • Hackintool
    • MaciASL
    • IORegistry Explorer 2.1
  • DSDT/SSDT
    • Pre-built:
      • SSDT-EC
      • SSDT-PLUG
      • SSDT-PNLF
      • SSDT-XOSI
    • SSDT-Time:
      • SSDT-HPET (SSDT-Time)
    • Manual:
      • SSDT-_PWR (For sleep/wake)
      • SSDT-BATT (For battery gauge)
      • SSDT-BRGT (For F11/F12 screen brightness control)
  • EFI Drivers:
    • AudioDxe
    • HfsPlus
    • OpenCanopy
    • OpenRuntime
  • Kexts:
    • AirportItlwm
    • AppleALC
    • Itlwm
    • Lilu
    • RealtekRTL8111
    • SMCBatterymanager
    • SMCProcessor
    • SMCSuperIO
    • USBPorts (Built with Hackintool)
    • VirtualSMC
    • VoodooPS2Controller (acindanthera or Rehabman's builds, see below for details)
    • WhateverGreen
Follow dortania's guide for the overall installation and config.plist setup process, I am only writing details here where dortania's guide is insufficient for this build.

A lot of these patches were originally DSDT patch in clover. The same patch should work in OpenCore as well, but it appears that loading the entire DSDT table in OpenCore would override all other renames (ACPI patches). Maybe I am wrong, it seems to me that I can either do all DSDT patches, or all SSDT + renames, but not both. I ended up converting all DSDT patches I needed to SSDT + renames.

A quick explanation of DSDT patch vs SSDT + renames: DSDT almost the entire ACPI table. If you put a DSDT (patched or not) in your ACPI folder, OpenCore uses this instead of the DSDT inside your bios to boot. It is far easier to patch DSDT because you can just change directly whatever you want to fix. If you want to use SSDT, you'll first need to tell OpenCore to "delete" out the sections in the DSDT you are changing, then supply another version of those "deleted" sections with an SSDT file. Problem is that it is impractical to actually delete sections in DSDT, so instead of deleting them, we rename the ACPI methods in those sections into something else that would never be called by your system, effectively rendering them useless, then resupply SSDT with methods of the original name. For a complete walk-through, please read Rehabman's post. Although it was written for Clover, it also applies to OpenCore.

If you want to use my config.plist, make sure you put in your own serial numbers.

known problems
  • Wifi does not work, as expected. use a dongle
    • Wifi works well under Catalina using AirportItlwm. Only drawback is the slow speed which is the current limit of the kexts
    • AirportItlwm is unstable under Big Sur. A lot of times it can find networks, but cannot join.
      • Itwlm + Heliport is far more stable. However, you may lose location service because it is based on Wifi "map"
      • Itwlm does not coexist with powernap. It'll cause kernal panic. So it is either or.
  • If you use acidanthrera's build of VoodooPS2Controller, you'll have gestures up to 3 fingers, however, track pad buttons don't work
    • If you use Rehabman's build, trackpad button works but you lose gesture control.
  • TV app will not play purchased video, and Netflix won’t play in Safari
    • WhateverGreen requires dedicated GPU for DRMto work
      • DRM is broken in BigSur anyways
    • I don’t watch video from iTunes store so I don’t care
    • Chrome plays Netflix just fine

USB port mapping:
  1. Generate USBPorts.kext using HackinTool. (I used the previous USBPorts.kext for Clover.) Here are the mapped ports:
  2. HS01 = Right side USB 2.0
    HS03 = Left side USB 2.0
    HS02 = Left side USB 3.0 (running as 2.0)
    SSP1 = Left side USB 3.0
    HS04 = Card Reader
    HS06 = Webcam
    HS07 = Bluetooth
  3. I got lazy and used the prebuilt SSDT-EC.aml instead of generating it with HackinTool

wifi:
  1. Intel wifi cards are now supported with AirportItlwm.kext! No need to use USB Wifi dongle anymore.
  2. AirportItlwm appears unstable in Big Sur.
    1. Make sure you use the AirportItlwm.kext for Big Sur vs Catalina. There're two versions.
    2. Itlwm + Heliport seem to be a bit more stable.
  3. Itwlm does not coexist with powernap. It'll cause kernal panic. So it is either or.

fix Audio:
  1. IRQ conflicts prevents AppleALC to run correctly even with the same layout-id in clover
  2. SSDT is needed to patch HPET, easiest is to use SSDT-Time
  3. Boot into Windows, open SSDT-Time, extract DSDT, then use option 1 to creast SSDT-HPET. Default option c works fine
  4. Don't forget to copy the patches (renames) from patches.plist generated by SSDT time into your config.plist
  5. Layout 3 and 28 both seemed to work

battery status:
  1. Make sure system definition is a battery-equiped Mac. Took me a long time to figure out iMac definitions would obviously not be showing a battery percentage
  2. Make sure SMCBatterymanager.kext is in your EFI/OC/kexts folder
  3. I converted the MaciASL DSDT patch (Rehabman's [bat] Lenovo G50-70 patch)
  4. Tl;dr, use attached config.plist and SSDT-BATT.aml
  5. Comparing the DSDT before and after the patch, we can see that methods _BIF, _BST, MHPF, MHIF, GBID, and SMTF have been modified. Therefore, we need to add renames to OpenCore to change names of the methods into XBIF, XBST, XMHP, XMHI, XGBI, and XSMT respectively. (Note these renames can be arbitrary, as long as they aren't actualy ACPI method names can is called in the DSDT. Use Cmd+F to look and see if the rename already exist in your DSDT before using it.)
  6. Two objects, FWBT and SMDA, also has been renamed by the patch. However, these two objects are only called in methods that we are renaming (therefore orphaned and never called/used), I'm not sure if they needed to be renamed. I did include them, however
  7. Find Replace Comment
    5F424946 00 58424946 00 _BIF to XBIF
    5F425354 08 58425354 08 _BST to XBST
    4D485046 01 584D4850 01 MHPF to XMHP
    4D484946 01 584D4849 01 MHIF to XMHI
    47424944 08 58474249 08 GBID to XGBI
    534D5446 01 58534D54 01 SMTF to XSMT
    46555348 08465742 54 46555348 08574254 58 FWBT to WBTX
    534D4441 4010 4D444158 4010 SMDA to MDAX
  8. After doing the renames, we have to build the SSDT file. Rehabman's guide really spelled out step by step what you should do. If you plan on following it, expect spending a few hours. I find it helpful to download his example DSDT and follow along.
  9. End results is the SSDT-BATT.aml attached.

sleep/wake problems:
  1. Before I apply the following patches, my machine would go to sleep, and then reboot immediately. OpenCore debug says "Sleep/wake failure in EFI"
  2. I drilled down to 2 DSDT patches that would fix the issue: Rehabman's [sys] RTC fix, and Rehabman's [usb] USB3 _PRW 0x6D (instant wake)
  3. RTC fix would allow the machine to sleep properly, however every 15-30 seconds you can hear the disk drive trying to spin and then stop. The machine stays asleep though.
  4. USB3 _PRW 0x6D fix cures the disk drive issue. If you pay attention to the patch preview in MaciASL, it'll be obvious why we use the 0x6D patch instead of 0x0D
  5. The RTC fix is relatively easy. Looking at the before and after DSDT, you can see the length of the _CRS object in RTC was shorted from 0x08 to 0x02. A simple ACPI rename can affect this change (see below)
    1. I saw this guide after applying my patch. Maybe this would be a better patch to fix RTC?
  6. USB3 _PRW 0x6D is a bit more troublesome. It changes 5 _PRW methods into Name(_PRW, package(), and then it adds 3 _DSM methods
  7. The _DSM methods appears to be injecting power parameters to the USB ports, which the USBport.kext should be doing. I tried the patch without these added _DSM methods and sleep/wake still worked perfectly, so I skipped adding these _DSM methods in my SSDT
  8. Patching _PRW methods is a bit more troublesome because there are more than 5 _PRW methods in the entire DSDT. However using Cmd+F to look at all _PRW methods, you can see the ones we want to patch all have Return (GPRW (0x6D.... inside the methods. All other methods that we want to leave alone either have (Return (GPRW (0x69 or something very different. So we just need to rename the _PRW that matches:
    1. Code:
      Method (_PRW, 0, NotSerialized)
      {
          Return (GPRW (0x6D
    2. By referencing the mixed bytecode DSDT created by running "iasl -l -dl DSDT.aml", we can find out the binary code for the above is 140F5F50 525700A4 47505257 0A6D
    3. Now we need to rename the _PRW into XPRW, which is 140F5850 525700A4 47505257 0A6D
    4. After the rename, we need to supply the correct _PRW methods in an SSDT. By following the aforementioned Rehabman's guide, end results are the attached SSDT-_PRW.aml
  9. Find Replace Comment
    70007000 0108 70007000 0102 RTC Shorten from 8 to 2
    140F5F50 525700A4 47505257 0A6D 140F5850 525700A4 47505257 0A6D Rename _PRW to XPRW
  10. USBPorts.kext also require power injection to prevent panic on wake from hibernation. See newly attached file.

brightness key (F11/F12):
  1. Screen brightness adjustment is pretty much out-of-the-box with the prebuilt SSDT-PNLF. However the F11 and F12 keys for enabling it doesn't work
  2. Looking at my old clover guide, we have this DSDT patch
    1. Code:
      into method label _Q11 replace_content
      begin
      // Brightness Down\n
      Notify (PS2K, 0x20)\n
      end;
      into method label _Q12 replace_content
      begin
      // Brightness Up\n
      Notify (PS2K, 0x10)\n
      end;
  3. Before converting it into an SSDT patch, I tested this DSDT patch and it did not work. After some digging, I found out 2 reasons
    1. Somewhere in the DSDT there must be code to detect which OS you're running. If the OS doesn't match, somewhere in this chain of events will stop working: F11/F12 keys pressed -> call _Q11/_Q12 methods -> notify PS2K (PS2 Keyboard) with arguments -> PS2K applying brightness change. By also applying Rehabman's [sys] OS Check Fix (Windows 10) patch, the brightness keys worked
    2. Notify (PS2K, 0x20) and 0x10 works with ApplePS2SmartTouchPad.kext, for VoodooPS2Controller.kext (which we use in this guide), we need 0x0405 (brightness down) and 0x0406 (brightness up)
  4. OS Check can be fixed with the prebuilt SSDT-XOSI available on dortania's guide.
  5. Rename and SSDT will be needed for the _Q11 and _Q12 method. Renames are already in the sample.plist so we just need to enable them. SSDT is built by following the aforementioned Rehabman's guide. See end result in attached SSDT-BRGT.aml. Please note I added OS check in this SSDT. When in Windows, it need to be able to call the original _Q11 and _Q12 methods (now renamed by OpenCore on-the-fly to XQ11 and XQ12). Therefore, there is an if statement for "if Darwin (macOS), then use Notify PS2K; else (Windows, Linux etc), then call XQ11 or XQ12."

overview of DSDT/SSDT patch changes from Clover:
  • [audio] Audio Layout 3
    • Enable audio by matching AppleALC to correct layout
    • Use OpenCore alcid=3 boot flag, or code in NVRAM
  • [bat] Lenovo g50-70
    • Allows battery percentage
    • Changed into rename + SSDT
  • [igpu] Rename B0D3 to HDAU
    • For graphics and HDMI audio
    • Automagically patched by WhateverGreen(?)
  • [igpu] Rename GFX0 to IGPU
    • For graphics and HDMI audio
    • Automagically patched by WhateverGreen
  • [sys] HPET Fix and [sys] IRQ Fix
    • For audio
    • Used SSDT-HPET + renames created by SSDT-Time
  • [sys] OS Check Fix (Windows 10)
    • For screen brightness keys
    • Used pre-built SSDT-XOSI
  • [sys] RTC fix
    • Allows computer to wake properly instead of reboot on wake
    • Used Opencore rename
  • [usb] 7-series/8-series USB
  • [usb] USB3 _PRW 0x6D (instant wake)
    • Fix disk drive trying to wake laptop
    • Used rename + SSDT
  • Custom patch for keyboard screen brightness control:
    • Code:
      into method label _Q11 replace_content
      begin
      // Brightness Down\n
      Notify (PS2K, 0x0405)\n
      end;
      into method label _Q12 replace_content
      begin
      // Brightness Up\n
      Notify (PS2K, 0x0406)\n
      end;
    • Used rename + SSDT

enable OpenCore bootstrap:
  1. Follow this guide
  2. Keep Windows from hijacking OpenCore every time Windows update
  3. Does not appear to work no matter you have bootstrap or bootstraplight enabled. My current "solution" is to boot into Windows if forced, then mount EFI folder and rename /EFI/Microsoft/Boot/bootmgfw.efi to something like, e.g. bootmgfw-orig.efi
  4. Note: after successfully booting into macOS using OpenCore, rename it back to bootmgfw.efi or you won't be able to boot Windows from the OpenCore OS picker.
  5. If you have a USB drive inserted in the left USB 2.0 port during boot, Windows boot manager will steal control from OpenCore again

enable TRIM (SSD only):
  1. Prolong your SSD's life by enabling TRIM
  2. Go to Terminal, type "sudo trimforce enable" without quotes, then reboot

upgrade to Big Sir
  1. I downloaded Big Sur 11.0.1 a while back from the App Store on my other hackintosh. I then created a bootable installer following this guide
  2. I first updated my system from 10.15.2 to 11.0.1 by copying the Install Big Sur.app from the thumb drive onto the local disk drive. Upgrade process was relatively smooth. The machine had to reboot several times. At one point during the installation, if you have verbose turned on in OpenCore, you may notice spam messages from Itlwm that says something like "updateIdlePolicyGated: consensus idle policy timeout 500ms." I thought I was in an error loop and restarted the machine a few times by holding down the power button. Turned out if you had some patience, it will get out of that loop and proceed with the installation
    1. After updating, it broke my HiDPI settings. I had to disable SIP by setting csr-active-config to 03000000, run one-key-hidpi, then reenable SIP by setting back to 00000000
    2. I then updated 11.0.1 to 11.1 without trouble
  3. After confirming a relatively stable Big Sur installation, I booted with the USB installer, wiped my disk and reinstalled Big Sur
    1. USB must be inserted into the USB 2.0 port to be able to boot. However, if you have a USB drive installed at that port during boot, Windows Boot Manager will steal command from OpenCore and boot into Windows
    2. I ended up copying my EFI folder from the laptop SSD onto the bootable USB drive, and pressed Fn+F12 to get into BIOS boot picker to boot from USB
    3. Installation seemed to be smoother than upgrade. I did not notice the error loop that Itwlm was throwing
    4. After installation, I restored my Time Machine backup using migration assistant. After migration, it would reboot and eventually ask if you want to turn on File Vault. My config currently does not support File Vault. My machine may be too slow for that also so I likely will never try to add support. You can follow this guide if you want File Vault.
    5. Update to 11.1 also seemed to go smoothly
  4. As mentioned above, AirportItlwm is unstable under Big Sur. I can scan available networks but I could not join them.
  5. Over all I would probably prefer Catalina as it is still more stable than Big Sur. Other than the face lift, I don't see much reasons for Big Sur over Catalina for me
 

Attachments

  • EFI OC 0.6.4.zip
    11.6 MB · Views: 2,098
  • AirportItlwm(BigSur).kext.zip
    9.5 MB · Views: 830
  • USBPorts.kext.zip
    1.3 KB · Views: 522
Last edited:
As an FYI, using your EFI folder with Big Sur works fine. The only thing I see that's not working are the touchpad buttons (touchpad works, but click buttons not). Other than that, everything seems to work. Looking forward to your Big Sur guide.
 
As an FYI, using your EFI folder with Big Sur works fine. The only thing I see that's not working are the touchpad buttons (touchpad works, but click buttons not). Other than that, everything seems to work. Looking forward to your Big Sur guide.
I updated this guide to describe upgrade to Big Sur. Update progressed with little to no problems.

I am unable to resolve the touchpad button problems. If you want gestures, use acidanthera's VoodooPS2Controller build; if you want touchpad buttons, use Rehabman's build.
 
Hi! All works fine except sleep/wake and airplay in big Sur, can you help me??
I own a G50-70 i7 4th gen with and AMD dgpu...
 
Good starting point would be googling the kernel panic message
What happens is that when closing the hinge the screen does not turn off, it only turns off due to the passage of time and then black screen...
 
Probably need some DSDT patch for your lid. Look in MaciASL and find the lid patch for your model
 
Probably need some DSDT patch for your lid. Look in MaciASL and find the lid patch for your model
I have all fully functional on clover, will dsdt patches of clover work in opencore?
 
Status
Not open for further replies.
Back
Top