Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improving Ventura Support on the Lenovo T530 #31

Closed
jozews321 opened this issue Dec 19, 2022 · 119 comments
Closed

Improving Ventura Support on the Lenovo T530 #31

jozews321 opened this issue Dec 19, 2022 · 119 comments

Comments

@jozews321
Copy link

I have a T430 and I've been testing Ventura for around a month and these are my findings (More like OCLP findings lol)

  • Ventura dropped the legacy AppleIntelCPUPowerManagement.kext, so the cpu is gonna be stuck in base clock, one solution is injecting the legacy kexts again via OC dortania/OpenCore-Legacy-Patcher@964697a. I couldn't get this to work in my T430, It always kernel panics, some problem with the P-states or something. but I found an alternative. enabling Xcpm, with the help from your guide https://github.com/5T33Z0/Lenovo-T530-Hackintosh-OpenCore/tree/main/ACPI/Enable_XCPM and so far everything has been stable.
  • There is a system crash that happens with Metal 1 GPUs like the HD4000 related to mediaanalysisd, it can be fixed with the latest build of RestrictEvents and the boot-arg revblock=media
  • Root patch without disabling AMFI, this is desirable because having AMFI disabled breaks random stuff around the system. Screenshot 2022-12-19 at 3 19 41 PM
  • Add the boot-arg ipc_control_port_options=0 to fix some crashing problems with Electron apps like Discord
@5T33Z0
Copy link
Owner

5T33Z0 commented Dec 19, 2022

Thanks for the feedback and the tips!

Just figured out today, that the CPU is working without turbo. Workaround as you already figured out was force-enabling XCPM and generating an SSDT with PluginType 1.

I had to disable AMFI to be able to install the HD4000 drivers in Post. But if I can set that in NVRAM instead then this is great. Will try that!

@Jan-E
Copy link

Jan-E commented Dec 25, 2022

Merry Xmas! On a new machine would the Clover version be easier than the OpenCore version for Ventura? Which one of the 2 is more future-prooof?

@5T33Z0
Copy link
Owner

5T33Z0 commented Dec 25, 2022

Both work, but the OC version contains the booter and kernel patches for the board-id vmm spoof which allow using MacBookPro10,1 SMBIOS and get System Updates. Since I don't know how to integrate the Booter Patches into Clover, you have to use -no_compat_check, so System Update Notifications won't work.

@5T33Z0
Copy link
Owner

5T33Z0 commented Dec 27, 2022

I just noticed that you can run Ventura without all the Kernel Patches required for enabling the Board-VMM spoof in Big Sur and newer (you still need the Booter patches, though to skip the board-id check). I don't know if this works for insttalling OS and the HD4000 drivers but for booting it's working fine.

Instead of the Kernel Patches, you just use RestrictEvents.kext with boot-arg revpatch=sbvmm or the equivalent NVRAM key to enable the spoof in OpenCore:

Bildschirmfoto 2022-12-27 um 16 47 01

This way, you can also can get System Updates in Clover. Although the Booter Patches can't be applied with Clover, using RestrictEvents, revpatch=sbvmm and -no_compat_check allows booting macOS Ventura as MacBookPro10,1 AND getting system updates, which wasn't possible before.

@jozews321
Copy link
Author

Hey continuing with the PM issues. I found the cause of the kernel panic when injecting AppleIntelCPUPowerManagement.kext and AppleIntelCPUPowerManagementClient.kext like the real Macs do with OCLP. I was getting this panic:
Screenshot 2023-01-01 at 4 00 07 AM
Dying in _IvybridgeCStateRegInit. The AppleCpuPmCfgLock Quirk was supposed to help unlocking the 0xE2 MSR and that's why in Monterey just works. but if those kext are injected with OC to use in Ventura the AppleCpuPmCfgLock Quirk doesn't work so for now its the 0xE2 MSR or CFG lock needs to be unlocked natively before OC Loads for the kexts to work.

So I found a kinda involved way of unlocking it in my T430 modifying the bios and flashing it.

  • Download your Thinkpad bios from 1vyrain
  • Pretty much follow this Guide to manually patch the bios to always enable the 0xE2 MSR
  • Upload the patched bios to some server that works with HTTP not HTTPS I used 0x0.st
  • Downgrade your bios to an older version for 1vyrain to work with IVprep
  • Connect an Ethernet cable and boot the 1vyrain USB
  • Choose the second option to patch a custom bios
  • Put the link of the bios you uploaded using only HTTP and flash

Now the CFG Lock is always disabled and the injected kexts will work just fine and the system will be more stable and with a little better performance. I ran into some very weird wake issues with XCPM.
Also if you do the mod you can disable permanently the AppleCpuPmCfgLock Quirk

There might be an easier way of doing this like Fixing CFG Lock says but I think that doesn't work with 2nd and 3rd gen Thinkpads

@5T33Z0
Copy link
Owner

5T33Z0 commented Jan 1, 2023

Thanks for the guide. I probably won't do this since my primary system is Catalina and I don't won't to mess with the BIOS again. I bricked it once before and had to flash it with a programmer and a clamp to revive it (I'm already on 1vyrain).

Where did you get the 2 kexts from to re-enable ACPI Power Management?

@jozews321
Copy link
Author

I think it might be a good idea to do a PR to unlock the MSR to every supported 1vyrain model cause its the same for every model i think.
You can download the kexts that OCLP uses from https://github.com/dortania/OpenCore-Legacy-Patcher/tree/main/payloads/Kexts/Misc

@5T33Z0
Copy link
Owner

5T33Z0 commented Jan 1, 2023

Thanks a lot. Hey, I just injected both kexts with OC (and disabled the kernel patch for XCPM) and my system booted right away.

The kexts are injected according to kextstat:

Line 67:   com.apple.driver.AppleIntelCPUPowerManagement (222.0.0) 20DD89B4-45CE-3E56-A484-15B74E79ACDD <9 8 7 6 3 1>
Line 96:   com.apple.driver.AppleIntelCPUPowerManagementClient (222.0.0) B3E52B58-0634-333C-9A71-E99BE79F8283 <9 8 7 6 3 1>

X86 Plugin is not loaded:

sysctl machdep.xcpm.mode          
machdep.xcpm.mode: 0

And Intel Power gadget uses the correct values:

Bildschirm­foto 2023-01-01 um 13 45 34

Because when I am using XCPM, the low frequency is significantly higher: 1.2 Ghz, istead of 800 Mhz.

So I guess having 1vyrain installed unlocks 0xE2 MSR already.

@jozews321
Copy link
Author

That's weird I had 1vyrain installed and the MSR was locked for me. Can you try running the OC tool ControlMsrE2.efi and tell me if it says locked or unlocked?

@5T33Z0
Copy link
Owner

5T33Z0 commented Jan 1, 2023

It says UNLOCKED:

20230101_183859_HDR

I just realized I can also boot without AppleCpuPmCfgLock

@5T33Z0
Copy link
Owner

5T33Z0 commented Jan 1, 2023

I did some CPU benchmarking tests in Ventura.

I've also noticed that plugin type 0 is used when injectiong the AppleIntelCPUPowerManagement kexts – even when Plugin-Type 1 is enabled. So I disabled the kexts to make sure that XCPM is used. And then single core performance was significantly worse.

@jozews321
Copy link
Author

Doing some investigation in regard to your unlocked 0xE2 MSR I found that the 1vyrain modded bios for the T530 has that mod already applied EB080FBAE80F(Unlocked) in the place of 75080FBAE80F(Locked)

Screenshot 2023-01-01 at 2 20 13 PM

but the 1vyrain modded bios for the t430 doesn't have the mod applied having the stock 75080FBAE80F(Locked)

Screenshot 2023-01-01 at 2 24 14 PM

So that's why your CFG lock is already unlocked after installing 1vyrain and you don't need AppleCpuPmCfgLock

Also I can confirm with Xcpm the single core score is slightly lower using a i7 3610qm too

and with AICPUPM:

@5T33Z0
Copy link
Owner

5T33Z0 commented Jan 1, 2023

Ah, okay. I think you have 3 Options now:

  • Either you can ask the 1vyrain dev if he will include the MSR 0xE2 Unlock to his T430 BIOS, or
  • You can report the issue with the AppleCpuPmCfgLock Quirk not working on the T430 when injectiung the AppleIntelCPUPowerManagement kexts with OpenCore into Ventura using Acidanthera's Bug tracker
  • Do both ;)

@sp4
Copy link

sp4 commented Jan 4, 2023

Thank you for the Christmas edition. It got me going on my W530 with i7 3740QM CPU and Kepler K1000M. I successfully upgraded to your latest EFI, and now the Intel Power Gadget works.

VDA Decoding works.

I have a couple of annoyances, very minor:

  1. iGlance can't report fan speed.
  2. Brightness keys don't work.
  3. rfkill functionality not working on FN+F5.
  4. Mic mute LED doesn't illuminate.

Should I open PRs for Fan and FN key support, or is there a simple fix for those issues?

The attention to detail in the system level functionality is much-appreciated.
w530

@5T33Z0
Copy link
Owner

5T33Z0 commented Jan 4, 2023

No PRs, since you have a W530. No support.

  • Brightness keys work fine for me.
  • You need to add VirtualSMC's SMCSuperIO.kext plugin for fan speed monitoring
  • My Mic is disabled in BIOS because it's dead. I guess I ripped a wire when disassembling the system.

I am going to upload a new EFI Release later in the day which brings back Plugin-Type 0 support for Ventura.

@5T33Z0
Copy link
Owner

5T33Z0 commented Jan 4, 2023

New EFI is up with Plugin-Type 0 support.

Requires a A BIOS where CFG lock can be disabled so the MSR 0x2E are unlocked, as pointed out by jozews321 previously.

@sp4
Copy link

sp4 commented Jan 5, 2023

Requires a A BIOS where CFG lock can be disabled so the MSR 0x2E are unlocked, as pointed out by jozews321 previously.

I have 1vyrain on a W530 and it's showing as unlocked.

@5T33Z0
Copy link
Owner

5T33Z0 commented Jan 5, 2023

Should I add revblock=gmux as well? According to the description on the RestrictEvents repo it blocks displaypolicyd on Big Sur+. But it seems to be only relevant for real MacBookPro9,1/10,1: dortania/OpenCore-Legacy-Patcher#116

@jozews321
Copy link
Author

It won't do anything, it's only related to the mux switch on real macs to fix the switching of the display from the IGPU to the DGPU

@5T33Z0
Copy link
Owner

5T33Z0 commented Jan 6, 2023

OT: does someone know hpw to use the disklabel utility? I don't understand how to use it. I want to change the label of a disk which is called "Monterey" in boot picker but it has "Ventura" on it now.

@5T33Z0
Copy link
Owner

5T33Z0 commented Jan 7, 2023

I've noticed issues with Spotlight when switching from one version macOS to another. I have Big Sur and Ventura on one disk currently. And whenever I switch, Spotlight indexing restarts and I don't know why. I've noticed this behavior on my Desktop as well. So far, I haven't find any explanations for this.

@aguys123
Copy link

aguys123 commented Jan 8, 2023

Sorry if it's not Thinkpad Laptop related.

I have an Acer Ivy Bridge Laptop and no CFG Lock option in the firmware (already searched in bios dump and using ControlMsrE2.efi). Is there any other way to unlock MSR? Since I can't use injected AICPM.kext using AppleCpuPmCfgLock quirk in Ventura.

@5T33Z0
Copy link
Owner

5T33Z0 commented Jan 8, 2023

Not that I know of. Could you just try injecting the kexts with the AppleCpuPmCfgLock quirk just for tests, though? Just to verify and make sure that it's not working with just the quirk. But keep a backup of your working EFI folder on a FAT32 formatted USB flash drive to recover if it doesn't work.

@sp4
Copy link

sp4 commented Jan 9, 2023

@5T33Z0 I also have access to a T430. No joy.

image

@5T33Z0
Copy link
Owner

5T33Z0 commented Jan 9, 2023

Again, as pointed out by jozews321:

  • You need an unlocked BIOS with Cfg Lock disabled.
  • The 1vyrain version on the T430 BIOS has CFG Lock enabled still. So you have to edit it

On my T530 CFG Lock is disabled so booting works. But it crashes the first time after deploying the EFI. After that it's working fine.

Otherwise you have to force-enable XCPM instead and disable AppleIntelCPUPowerManagement.kext and AppleIntelCPUPowerManagementClient.kext.

@jozews321
Copy link
Author

@sp4 Use this T430 cfg unlocked bios
And follow the guide to upload to some http only server to flash it with 1vyrain

@sp4
Copy link

sp4 commented Jan 10, 2023

@jozews321 thank you. The above guides worked on a NVS 5400m-equipped T430 with a dual-core CPU (i7 3520M) using your linked T430.rom. I'm booted into Ventura 13.0.1 with the recommended AppleIntelPower kexts from OCLP (configured the same way - minus an NVRAM clean). I verified this with kextstat | grep AppleIntelPower

As mentioned I had a repeatable panic in one of these kexts without the CFG unlock ability provided by your modded BIOS.

CDG_unlocked

Note: I use tools provided by IVPrep as follows: winflash64.exe /sd /file T430.rom to downgrade my BIOS inside a Win11PE environment created by Macrium8 Home.

@sp4
Copy link

sp4 commented Jan 10, 2023

No PRs, since you have a W530. No support.

Note: [for whatever reason, coincidence?] regenerating a SSDT-PM.aml for my processor appears to have fixed the brightness keys FN+UP/DOWN.

@5T33Z0
Copy link
Owner

5T33Z0 commented Jan 10, 2023

I don't see how those 2 things could possibly be related but good to hear.

@5T33Z0
Copy link
Owner

5T33Z0 commented Jan 10, 2023

I can't fix this issue where the system is supposed to enter sleep on its own. Once the system turns off the screen and tries entering sleep, the fan ramps up. I left Intel Power Gadget open one time and noticed that the CPU an iGPU ramp up instead of shutting down. I have no idea how to fix this since sending it to sleep from the Apple menu or by pressing Fn+F4 work fine.

@Jan-E
Copy link

Jan-E commented May 27, 2023

Yes. Ventura 13.4 on a X230T and a 1366x768 LCD.
Edit: try clearing the Safari caches, under the development menu.

@5T33Z0
Copy link
Owner

5T33Z0 commented May 27, 2023

Running 13.4? Edit: now it's working lmo, I think the update borked something in my user folder, the solution was to log in as a new user for me

Sounds like a permissions issue. But in new versions of macOS you have to repair permissions in Recovery:

https://eclecticlight.co/2022/11/18/repairing-home-folder-permissions-a-mystery/

@jozews321
Copy link
Author

Running 13.4? Edit: now it's working lmo, I think the update borked something in my user folder, the solution was to log in as a new user for me

Sounds like a permissions issue. But in new versions of macOS you have to repair permissions in Recovery:

https://eclecticlight.co/2022/11/18/repairing-home-folder-permissions-a-mystery/

Turns out it's not a permissions issue, I worked for me when I created a new user not because of that it was because I had connected an external display.

The actual issue was that coreaudiod was crashing when trying to watch a yt video (only crashes when using the laptop speakers) with the display speakers everything was working fine.
I use my own config for my t430 and I hadn't updated the RestrictEvents kext and enabled f16c patching, so when running 13.3+ some AVX2 codepaths were being used resulting in ilegal instructions crashes when using certain functions of coreaudiod

@5T33Z0
Copy link
Owner

5T33Z0 commented May 27, 2023

@Jan-E
Copy link

Jan-E commented May 27, 2023

My VirtualboxVentura defaulted to a OTA update to 13.4, but “failed to prepare the update”. Then I did an inplace update using the full installer. It took 2 hours to complete, but succeeded.

@5T33Z0
Copy link
Owner

5T33Z0 commented May 28, 2023

Some Defaults commands for improving Non-Metal Patches: https://moraea.github.io/Docs/defaults.html

@5T33Z0
Copy link
Owner

5T33Z0 commented Jun 2, 2023

My new used Laptop is on the way… Lenovo ThinkPad T490. ;)

@Jan-E
Copy link

Jan-E commented Jun 2, 2023

Quite close to the X390 on my shelves, so maybe i will move together with you.

@jozews321
Copy link
Author

Just tried the Sonoma beta in my T430. it just work lmao with -lilubetaall.
But OCLP is not working so its horrible

@5T33Z0
Copy link
Owner

5T33Z0 commented Jun 6, 2023

Latest nightly of Lilu already has macOS 14 already covered: "Add -lilubeta to enable Lilu on unsupported OS versions (macOS 14 and below are enabled by default)."

Thanks for the heads-up. I was just about to test it. I guess it will take some time until support for Somona is implemented in OCLP. But at least the cryptex stuff still works.

@jozews321
Copy link
Author

jozews321 commented Jun 6, 2023

Yep, Also Broadcom is completely dead now. Intel will probably be the best WIFI card going forward.

@5T33Z0
Copy link
Owner

5T33Z0 commented Jun 6, 2023

I have a broadcom card. I guess that's the reason why the progress bar got stuck during the second installation stage (once I could select the sonomo volume from the boot menu). I won't buy a new card for this Laptop. I guess I have to take it out to finish the installation.

T490 which is scheduled for arrival today. It comes with either one of those:

Intel 9560 11ac, 2x2 + BT5.0 or Intel AX201 11ax, 2x2 + BT5.0

@jozews321
Copy link
Author

I think both cards are gonna work fine with itlwm and Airportitlwm when it releases for macOS 14

@5T33Z0
Copy link
Owner

5T33Z0 commented Jun 6, 2023

So, the T490 has arrived. This looks and feels like brand spankin' new.

Totally forgot how to install macOS when coming from Windows – it's been a looooong time since I did that :D

@Jan-E
Copy link

Jan-E commented Jun 6, 2023

How much storage does it have? My X230T has in total 1.5TB: 1 TB 2,5 inch and 512 GB in the mSATA slot. Enough for Win10 with a couple of Virtualboxes, 3 hacks of about 160GB and a Time machine partition. To upgrade to Sonoma, I will have to sacrifice the Big Sur hack.

@5T33Z0
Copy link
Owner

5T33Z0 commented Jun 6, 2023

256 GB. But it has a Samsung PM981 which is supposed to be troublesome. Trying to format it in Disk Utility during setup causes a spinning ball of death. Could also be a config issue but I can't be certain until I've tested another disk.

@Jan-E
Copy link

Jan-E commented Jun 6, 2023

My 512GB mSATA drive (with 3 hacks) is a Samsung 860 EVO. No problems. My experiences with the older Samsung EVO drives are better than the newer QVO ones. If I were you, I would go for a 1TB drive at the moment.

@5T33Z0
Copy link
Owner

5T33Z0 commented Jun 6, 2023

https://dortania.github.io/Anti-Hackintosh-Buyers-Guide/Storage.html

I have a spare m.2 disk which I will use for now. I fon't need a 1 TB drive in my laptop.

@5T33Z0
Copy link
Owner

5T33Z0 commented Jun 7, 2023

OT: The T490 is up and running. It has an Intel AC-9560 160 Mhz Card (I don't know if it's a 9000 or 22000 series, though). Wifi works via Itlwm.kext but I can't get Bluetooth to work. USB ports are mapped but I can't figure out if it is supported or not. The kext documentation says somenthing about USB IDs but I don't know how to check for that.

EDIT: I found it in Windows in Device Manager under Hardware-ID. And accoording to my findings it should be compatible: Vendor-ID: 0x8087, PID: 0x0aaa

@Jan-E
Copy link

Jan-E commented Jun 8, 2023

Latest nightly of Lilu already has macOS 14 already covered: "Add -lilubeta to enable Lilu on unsupported OS versions (macOS 14 and below are enabled by default)."

Thanks for the heads-up. I was just about to test it. I guess it will take some time until support for Somona is implemented in OCLP. But at least the cryptex stuff still works.

By now, the nightly lilu.kext does not even need -lilubetaall anymore. I have updated my VirtualboxVentura to OC 0.9.3 nightly and lilu.kext 1.6.6 nightly and am trying to install macOS 14 beta. Will take at least 2 hours, I guess.

@5T33Z0
Copy link
Owner

5T33Z0 commented Jun 8, 2023

Regarding the issue of the menubar in Ventura which show cards that can be disabled:

I think this could be related to devices it detects which are not labeled as internal. Maybee adding AAPL,slot-name built-in to these devices might be a solution.

@Jan-E
Copy link

Jan-E commented Jun 8, 2023

By now, the nightly lilu.kext does not even need -lilubetaall anymore. I have updated my VirtualboxVentura to OC 0.9.3 nightly and lilu.kext 1.6.6 nightly and am trying to install macOS 14 beta. Will take at least 2 hours, I guess.

A couple of reboots down the road:
VirtualBox_macOS13_08_06_2023_12_44_07
1280x720 in Virtualbox 7.0.8. No OCLP, so slow graphics. I always prefer the dock to be on the left side of my screen. Xcode was automatically disabled (top of the dock). Installing Xcode 15 beta will probably take another couple of hours.

@Jan-E
Copy link

Jan-E commented Jun 8, 2023

Apple needs to publish a manual on how to install Xcode 15 beta: https://developer.apple.com/forums/thread/730997

@Jan-E
Copy link

Jan-E commented Jun 9, 2023

By now, the nightly lilu.kext does not even need -lilubetaall anymore. I have updated my VirtualboxVentura to OC 0.9.3 nightly and lilu.kext 1.6.6 nightly and am trying to install macOS 14 beta. Will take at least 2 hours, I guess.

Ouch. I still had -lilubetaall in the bootargs of my VirtualSonoma. When I removed it the box ran into this:
VirtualBox_macOS14_09_06_2023_18_19_12
Maybe Allow loading on macOS 14 without -lilubetaall does not apply to Sonoma Beta in a Virtualbox. The opencore.efi was from OC 0.9.3 nightly 2 days ago. And lilu.kext was the one after Update README.md downloaded from https://dortania.github.io/builds/?product=Lilu&viewall=true

@Jan-E
Copy link

Jan-E commented Jun 22, 2023

Update to Ventura 13.4.1 dowloaded the full installer (11.77 GB), did a couple of reboots and says ‘About 9 minutes remaining…’ now. Always 9 minutes. One more thing and nine more minutes.
Edit: the OCLP tried to update itself using Safari, which does not work because Safari without root patches is crippled. So I had to manually update OCLP with Chrome and then apply the root patches.
Note for the next time: update OCLP first, before updating Ventura. Time for a new TimeMachine backup now. And afterwards update my VirtualboxSonoma.

Repository owner deleted a comment from mrfiskare Jul 24, 2023
@5T33Z0
Copy link
Owner

5T33Z0 commented Jul 24, 2023

ANNOUNCEMENT:

  • I won't tolerate any more posts unrelated to macOS Sonma on T530 on this repo
  • Post like these will be deleted immediately.
  • Users ignoring this rule repeatedly will be blocked!

I've had enough of people misusing the discussions on my repo for support requests! You want to install macOS on the T430/X430? Fork the repo, put in some work and time (like I did) and adjust the config for your needs!

@5T33Z0 5T33Z0 changed the title Improving Ventura Support Improving Ventura Support on the Lenovo T530 Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants