MSzturc / Lenovo-T460-OpenCore

Files and Scripts to install macOS Catalina on T460 with OpenCore Bootloader
52 stars 12 forks source link

Just some information request #3

Closed Sniki closed 4 years ago

Sniki commented 4 years ago

@MSzturc

Sorry for bothering you with an issue but i just want to know a few things regarding the configuration as these laptops have very similar ACPI Configuration across generations:

-hbfx-dump-nvram What does this boot-arg do ?

MSzturc commented 4 years ago

H8DR (0x00) to (0x01) to ACPI rename Can you just give a short brief explanation why you do this change and what it actually does ?

H8DR is a toggle switch based on os revision. In newer systems it should be 0x01. It's used in ~30 places in your DSDT (search for it in MaciASL)

Windows 2006 to 2015 and then Windows 2015 to Darwin Why have you done this specific change and what it actually does ?

To get rid of SSDT-XOSI.dsl (it does exactly the same with less code)

-hbfx-dump-nvram What does this boot-arg do ?

Have a look here: https://github.com/acidanthera/HibernationFixup

Sniki commented 4 years ago

H8DR is a toggle switch based on os revision. In newer systems it should be 0x01. It's used in ~30 places in your DSDT (search for it in MaciASL)

In my Haswell Lenovo ThinkPad T440S, it seems to be enabled with WNTF which on my DSDT, WNTF only loads under Windows 2001, is it in this case supposed to be unnecessary ?

If (\_OSI ("Windows 2001"))
                {
                    \WNTF = 0x01
                    \WXPF = 0x01
                    \WSPV = 0x00
                    OSYS = 0x07D1
                }

32 places in my DSDT, do you really think it is necessary ? i never used it and had no issues. I attached my DSDT.aml so you can check, i may be wrong DSDT.aml.zip

To get rid of SSDT-XOSI.dsl (it does exactly the same with less code)

Windows Emulation with OSI/XOSI is not recommended by Acidanthera according to their configuration.pdf:

Avoid patching _OSI to support a higher level of feature sets unless absolutely required. Commonly this enables a number of hacks on APTIO firmwares, which result in the need to add more patches. Modern firmwares generally do not need it at all, and those that do are fine with much smaller patches.

But let's just ignore that, what is your specific need for _OSI Windows emulation ?, is there something specific that doesn't work without it as i haven't noticed any single change affect system so far.

Have a look here: https://github.com/acidanthera/HibernationFixup I see, that is more for debugging purpose i believe

I do have a weird issue on my T440S on Catalina, (this problem is not present on Mojave). After i wake from sleep the entire system is frozen, image shows up (Desktop or Login Screen) and mouse cursor does move but i cant click anything or anyhwere.

Couldn't find the source of the problem so far.

MSzturc commented 4 years ago

In my Haswell Lenovo ThinkPad T440S, it seems to be enabled with WNTF which on my DSDT, WNTF only loads under Windows 2001, is it in this case supposed to be unnecessary ?

Im not sure if it is actually needed. My build is based on @tluck Clover build. I've migrated it from his setup to OpenCore and never questioning it. I will experiment with it in the future. Thx for the advise.

But let's just ignore that, what is your specific need for _OSI Windows emulation ?, is there something specific that doesn't work without it as i haven't noticed any single change affect system so far.

I've planned to get rid of this code too. From the OC Laptop guide i read that it's mainly for I2C controllers needed, so i've put it onto my todo list when my system will be stable. Funfact OC runs now over 2 months stable and I forgot about it.

tluck commented 4 years ago

Remember these boxes were designed to run windows and have support a lot of Windows versions - setting OSI to something like windows 2009 is pretty safe - to get more modern features. So can probably not set WNTF = 1 and be fine.

Sniki commented 4 years ago

Im not sure if it is actually needed. My build is based on @tluck Clover build. I've migrated it from his setup to OpenCore and never questioning it. I will experiment with it in the future. Thx for the advise.

In my opinion and experience it is not necessary, i see no change with or without it to be honest. Will do one more test to 100% confirm this.

I've planned to get rid of this code too. From the OC Laptop guide i read that it's mainly for I2C controllers needed, so i've put it onto my todo list when my system will be stable. Funfact OC runs now over 2 months stable and I forgot about it.

Yes but first the T460 i assume has no I2C Controllers and even if a specific laptop does have I2C controllers you can patch the I2C device to not need Windows emulation in order to load. It’s exactly the same way the HPET is patched on this laptop.

Remember these boxes were designed to run windows and have support a lot of Windows versions - setting OSI to something like windows 2009 is pretty safe - to get more modern features. So can probably not set WNTF = 1 and be fine.

@tluck thanks for joining. Yes that is true but at the same time, they run Linux perfectly fine OOB which again sort of proves that it may be a feature set that only Windows could benefit from that.

A month or two ago, XOSI was still needed for some Bluetooth controllers as devices failed to connect or some where having issues with Bluetooth on cold boot or wake from sleep.

Recent commit to BrcmPatchRam on Acidanthera from Mishurov if im correct, fixed that problem and now i believe we have no need for it.

Update: also you remember the XHC.PMEE thing, i don’t patch PTS for it, i had that issue too where laptop will reboot instead of shutdown if a usb device is plugged in but that issue is gone and the reason i believe is no Windows Emulation was the fix for me. As vit9696 mentioned he says that enable those features sets will just bring more issues into surface. It is covered on the OC Documentation.pdf

Thank you for the continuous support on ThinkPads and thanks to you primarily, today we can enjoy TouchPads, Physical Buttons and TrackPoint on Lenovo ThinkPads. Recent update of VoodooPS2 broke physical buttons (if you have seen my issue in Acidanthera bugtracker), will attempt with Kprinssu to fix it during weekend.

Another issue im having on Catalina is that after wake from sleep, screen turns on (Login screen or desktop or last previous state before sleep) i can move the cursor but the entire system is frozen, i can’t click into anything at all.

I wonder if any of you know or experienced this one and have a possible idea of a fix. Still couldn’t figure the cause and with 100% same EFI it doesn’t happen on Mojave.

I also learned how to patch HPET properly with OpenCore thanks to your examples.

Thanks for the support !

MSzturc commented 4 years ago

I did a couple of experiments:

After i removed XDSM patch all my USB Ports and Bluetooth stopped working. I've done a bit of research and found out that SSDT-XHCI.dsl has a dependency on XDSM.

@junaedahmed was there a reason why you decided to use the aml method to fix usbports over the kext method?

junaedahmed commented 4 years ago

@MSzturc , The only reason XHCI has a XDSM dependency to make the implementation OS agnostic. And injecting USB port this way is the most native way, it reduces external dependency.

Sniki commented 4 years ago

@MSzturc , The only reason XHCI has a XDSM dependency to make the implementation OS agnostic. And injecting USB port this way is the most native way, it reduces external dependency.

Honestly as far as documentation expains, USBPorts.kext is the most optimal way to implement USB ports. First it’s just a kext and it has 0 effects on other operating systems.

Second it doesn’t touch ACPI and has no such complications required to implement them.

Third: it’s how Apple recommends and what they actually use on their Mac(s) (Not usbports.kext but they do the same thing with their native kexts for USB)

0 patches required just list the usbports.kext on Config.plist and you are good to go.

As for USB PowerProperties, aside from USBX device, those can be injected with Device Properties as well if i recall correctly and even on USBPorts.kext too.

If you want i can draft you a T460 cleaned up EFI configuration and see my proposed changes.

MSzturc commented 4 years ago

If you want i can draft you a T460 cleaned up EFI configuration and see my proposed changes.

For sure. I've started with my first hackintosh a couple of weeks ago. So I expect that there is a lot of space for improvement in my build. I learn every day new things and im happy to get feedback from experienced people like you.

Sniki commented 4 years ago

If you want i can draft you a T460 cleaned up EFI configuration and see my proposed changes.

For sure. I've started with my first hackintosh a couple of weeks ago. So I expect that there is a lot of space for improvement in my build. I learn every day new things and im happy to get feedback from experienced people like you.

Great, i will check when i get some time, do you have acpi dump somewhere to upload (origin) folder as that’s where i should start as (source)

MSzturc commented 4 years ago

Sure here is my System DSDT [System DSDT.dsl.zip](https://github.com/MSzturc/Lenovo-T460-OpenCore/files/4717591/System.DSDT.dsl.zip

Damn, this one is already patched. Is there a way to get the dsdt from OpenCore before it patches it?

nvm.. found a solution: https://dortania.github.io/Getting-Started-With-ACPI/Manual/dump.html

MSzturc commented 4 years ago

Here is my unpatched DSDT.aml.zip

MSzturc commented 4 years ago

After a couple of day using my new build without xosi patching and h8dr patching i noticed a behaviour thats new. When my Laptop goes to standby a noice occurs. It sounds like the crackle of electricity.

Sniki commented 4 years ago

@MSzturc Will send a Pull Request or list some suggestions on an issue with a configuration done from scratch with my suggestions so you can give it a try.

However i have a few questions for you:

Thanks !

MSzturc commented 4 years ago

What is the difference between hibernate and deep idle?

benbender commented 4 years ago

I've done experiments with deep-idle on a T480 and for me, it disables S3 and AOAC (Always On, Always Connected) in modern laptops - sadly the T480 (and most likely T460) doesn't support it (visible in the FACP(?)-ACPI-Table)

More Information can be found here: https://github.com/daliansky/OC-little/tree/master/01-%E5%85%B3%E4%BA%8EAOAC