EETagent / T480-OpenCore-Hackintosh

OpenCore 0.6.9 configuration for T480. Optimized for Catalina and Big Sur.
143 stars 32 forks source link

Testing of as yet untested functionality [Thunderbolt 3, DRM] #6

Open EETagent opened 4 years ago

EETagent commented 4 years ago

I need help testing the following functionality

"- [ ] Sidecar with 14,1 SMBIOS Not really needed, but would like to hear if someone managed to get it working"

Additional reports about sleep functionality and PM981 would be appreciated.

danny7g commented 4 years ago

Power Management I had to replace CPUFriend and CPUFriendDataProvider Kexts with my own. However, my T480 has an 8350u.

The item that really made a difference was undervolting with Voltage Shift. Unfortunately, it will vary from CPU to CPU, but I've gotten stability at -110 for CPU and Cache, and -70 for GPU. I set both power limits quite high at 60w; however, this is the piece I'm most unsure about. Also, after sleep, I lose the undervolt. It is supposed to check every 5 minutes to make sure, but I don't think that piece is working correctly - still looking into that. However, undervolting in a pretty cool room increased my Cinebench R20 score from 1529 to 1735.

https://github.com/sicreative/VoltageShift

A third piece of power management is actually hardware related. I installed a 01YR202 heatsink made for the dGPU model, making sure to cover the dGPU interface with Kapton tape. Besides the tape, it's a plug and play solution - just add thermal paste. There are even screws on our motherboard for the GPU portion. I only saw minimal benefit, so it might not be worth the price and effort.

8350u CPU Friend.zip

EETagent commented 4 years ago

-110 is stable value for me too. GPU for me could be undervolted up to -80 but I didn't test long time stability. I know about VoltageShift, problem is that kext and script have to be in same folder and I would like to move VoltageShift.kext to EFI instead of disabling SIP for kexts. There are some people over internet which have VoltageShift in EFI folder so it should be possible, I would probably ask on Reddit about this.

EETagent commented 4 years ago

@danny7g Can you please test these two files. It is a modified version of voltageshift program which should work with kext in EFI folder. I think it works, but it could be a placebo effect.

VoltageShift.zip

Or the new EFI in the testing branch

danny7g commented 4 years ago

Thanks!

Voltageshift worked in the EFI folder. I reconfigured with my undervolt numbers. I tested by setting the folder in terminal "cd /Volumes/MAC\ EFI/EFI/OC/Kexts" and running "./voltageshift info" before and after sleep. I also downloaded the original script and tested outside of the kexts. I then removed the script from the Kexts folder. Finally, I tested in Cinebench to confirm that the undervolt was working before and after sleep, just in case the Voltageshift info command didn't work the way I was thinking. Everything looks good.

I haven't tested the GPU stability with the undervolt again yet, but previously I used Unigine Heaven. With all of the tweaks, I was getting higher Cinebench scores than stock for a 8350u. For Unigine Heaven, the UHD 620 GPU has been under-performing stock even though hardware acceleration is working for me (tested with VideoProc). The only thing that made a slight improvement was switching the RAM dedicated to graphics to 2 GB; this is already built into your config.plist.

I'm using a modified version of the testing branch EFI folder now. I don't need some items like light sensor, never got IO sensors working (I may return to that because I want to control fan speeds), added Broadcom Bluetooth/Wifi, I'm not sure if NVME Fixup is relevant, may remove SSDT-HRTF in future testing, etc. I'm still getting some junk in the Verbose boot log, but still need to play around with it some more. Once upon waking from sleep I lost touchpad functionality, but I can't recreate the issue.

Attached is my current version of the testing EFI with platform info removed from the Generic section of the config.plist.

Modified Test EFI.zip

EETagent commented 4 years ago

Thanks for your feedback.

I am not sure if I understand correctly what you did with the VoltageShift as there is no need to have EFI folder mounted. Original voltageshift wouldn't work as there is part which checks if the VoltageShift.kext is in the same folder.


if u came this far, u can change the following file, change the ```unloadkext()``` and ```loadkext()``` function to do nothing, compile the kext in xcode then should be good, after this u can load it in efi

https://github.com/sicreative/VoltageShift/blob/master/VoltageShiftAnVMSR/main.mm

Good point about the light sensor kext, will remove it too. It's useless. I'm not sure though about SMCSuperIO as macOS could use it for fan control.

There are currently ( at least for me ) issues with VoodooRMI ver. 0.3.0. TrackPad/TrackPoint sometimes don't work. You can for now revert to version 0.2.0

danny7g commented 4 years ago

the command "./voltageshift info" is querying the system status, not the kext itself.

when i had the kext load from outside the EFI, i would get a return value of -110 CPU -70 GPU -110 CPU cache. however, the values would go to zero after sleep. now that it is loading from the efi, after sleep my values are still -110 -70 -110.

zombillano commented 4 years ago

Power Management

I can confirm that undervolting works, but somehow I can't achieve the same undervolting and temperatures that I can achive under windows 10. Under Windows 10 I can undervolt to -120 CPU -80 GPU -120 Cache while under macOS 15.5.5 I can only undervolt to -115 CPU -80 GPU -115 Cache (isn't a big difference). Also while I can get ~35º C at idle on Windows 10 I'm getting ~40º C on macOS. I tried to create my own CPU Friend profile, but I'm not pretty sure about how good or bad it currently is (I'm still learning about Hackintosh). My CPU is i7-8650u. Do I have to modify any other file to match the config to my CPU?.

I can help with other functionality tests that doesn't involve thunderbolt or USB C video output, just tell me what do you want me to do. I can also confirm that PM981 doens't work at all. I achieved to somehow install mac OS but it stopped working after two or three boot attempts. Then I decided to switch to SM961 (I read that it was compatible) but I'm getting the problem described on the issue I reported. Other than that I can confirm that sleep works without any conflict and that both the lid's led and the power button led starts to blink after 10-15 seconds. I can try to messure how long does it take to start to blink. I didn't find any trouble waiking up from sleep. Also I will try to messure power consumption on sleep state.

Finally, I can confirm that NVMeFix works to improve SSD temperature. My temperatures reduced ~10º C (from 43º to 33º) using it.

zombillano commented 4 years ago

Power Managment I can confirm that sleep works pretty well. Left my thinkpad sleeping all night (from 12:00AM to 8:15AM) and it only consumed 1% of battery. Here's my energy saver config:

imagen

zombillano commented 4 years ago

I tried to make SMBus work without any success... Is there a way to control fan's RPM? Also I found that battery info. isn't that accurate. Cycle count doesn't match as well as full charge capacity (at least with what lenovo vantage shows).

EETagent commented 4 years ago

I tried to make SMBus work without any success...

TrackPad and TrackPoint does not work for you?

Is there a way to control fan's RPM?

I think this should be doable with some Fan control utility which does not depends on fan placement by SMBIOS.

Also I found that battery info. isn't that accurate. Cycle count doesn't match as well as full charge capacity (at least with what lenovo vantage shows).

I think that battery health info is unimportant for Hackintosh. If actual battery life indicator works, it's fine.

tienhuynh5312 commented 4 years ago

I confirm Sidecar working on my T480 (Fenvi BCM94360NG). I removed all the intel wireless kexts.

EETagent commented 4 years ago

I confirm Sidecar working on my T480 (Fenvi BCM94360NG). I removed all the intel wireless kexts.

Wired, wireless? If you mean wired, can you test wireless connection too please. It should work with supported Broadcom card

tienhuynh5312 commented 4 years ago

It is wireless card. It performs good and no lag.

EETagent commented 4 years ago

It is wireless card. It performs good and no lag.

Perfect. I could have deduced that.

zombillano commented 4 years ago

TrackPad and TrackPoint does not work for you?

I think this should be doable with some Fan control utility which does not depends on fan placement by SMBIOS. Yeah, trackpad and trackpoint works fine for me, I was trying to make fan works with hackintosh. It should be attached at the SMBus but I'm still learning about all this.

I think that battery health info is unimportant for Hackintosh. If actual battery life indicator works, it's fine. Kind of, it shows like 2%-3% more than what shows under linux/windows. Still not a big trouble, can live with it.

How can I help with "Upper (charging) USB Type C port" and " FireVault 2"?

EETagent commented 4 years ago

Kind of, it shows like 2%-3% more than what shows under linux/windows. Still not a big trouble, can live with it.

Yep, when I had battery treshold configured to 80% it showed 83%, I do not recognize it as a problem though. I would take a look if there is some new revision of BATC and BATT, iasl was mad about these two.

How can I help with "Upper (charging) USB Type C port"

I was not able to get the first USB C port working and as I don't really need it I didn't explore it further.

and " FireVault 2"?

By testing If FV2 encryption is possible, it should be trivial to do with OC unlike with Clover. I would not do that if you have there some important data though

tienhuynh5312 commented 4 years ago

Yep, when I had battery treshold configured to 80% it showed 83%, I do not recognize it as a problem though. I would take a look if there is some new revision of BATC and BATT, iasl was mad about these two.

I am using coconutBattery, and it shows the accurate battery percentage than native os. However, when the battery falls below 15%, both numbers from coconutBattery and native OS will converge.

villeheikkila commented 4 years ago

I can confirm that these configs work without changes with FileVault on 10.15.5. I did initially setup the FileVault with the recommended settings from OpenCore guide but it seems that those changes aren't even needed because everything worked when I forgot to update the settings.

zombillano commented 4 years ago

Yep, when I had battery treshold configured to 80% it showed 83%, I do not recognize it as a problem though. I would take a look if there is some new revision of BATC and BATT, iasl was mad about these two.

About this topic: I found over here that this mate is ussing SSDTs to handle battery threshold. Would be awesome if we can implement this on the T480 too. I'm still learning how ACPI works so easier said that done.

I was not able to get the first USB C port working and as I don't really need it I didn't explore it further.

Do you mean for data transfer? I can test that.

By testing If FV2 encryption is possible, it should be trivial to do with OC unlike with Clover. I would not do that if you have there some important data though

This got confirmed by someone else, maybe I would try too, I'm still focused on solve my SSD problem.

tienhuynh5312 commented 4 years ago

I also confirm the FileVault working without any changes to the config.

afreuden commented 4 years ago

NOTE - This post is WIP and is subjected to change as I do further testing.

Hi All,

I can assist with testing USB C mappings, power delivery, video, audio and data. For work, we use Dell WD15 K17A001 USB C docking stations which I have asked to lend over the weekend.

The docking station only supports USB C with PD and DP, and has the following ports:

Thinkpad T480 hardware Category Component Notes
CPU Intel Core i5-8250U
GPU Intel UHD 620  
SSD Samsung PM961 NVMe SSD
Memory 16GB DDR4 2133  
Battery Dual battery  
Camera 720p Camera  
Wifi & BT Intel Wireless-AC 8265

BIOS Settings

I had some issues with the Thunderbolt controller not showing up in System Information.app, IORegistryExplorer.app or Hackintool.app. It turns out I had the Thunderbolt controller configured for a previous Linux installation and needed to be changed for it to show up in macOS. These are the settings I am using. I an uncertain if this is the best configuration but it works for me. If someone gets around to validating Thunderbolt functionality these BIOS settings may change.

Thunderbolt(TM) 3

Software Component Version
MacOS Mojave 10.14.6 (18G103)
OpenCore 0.5.9

USB Mappings Discovery While testing the USB C ports I noticed that the included USBMap.kext (without Win Hello) appears to have incorrect and missing mappings for the USB C / TB3 ports. I have been testing an experimental USBPorts.kext which was built with assistance of USBInjectAll.kext, Hackintool.app and IORegistryExplorer.app. I consider USBPorts.kext to be highly experimental as I have limited knowledge other than what is defined in the ACPI specifications and the Dortania guide. Perhaps some of these changes can be incorporated into USBMap.kext or possibly transition to USBPorts.kext once it's fully validated?

There is a second XHC hub in the T480 located within the TB3 controller JHL6240 Thunderbolt 3 USB 3.1 Controller (Low Power) [Alpine Ridge LP 2016] with an ID of 0x00 and a Vendor/Device ID of 8086 15C1. This is the USB C hub for the TB3 enabled port. The non TB3 USB C port has a missing USB 3.0 port mapping SS04 which is part of the Sunrise Point-LP USB 3.0 xHCI Controller.

I have attached a copy of USBPorts.kext for those that are curious and would like to test it. Please note that this kext was manually modified by myself as the one auto generated by Hackintool.app misidentifies the connection types and is unable to map SS04.

I am aware of the 15 port limitation and I am uncertain if macOS handles both XHC controllers as one. Would be great for a Subject Matter Expert on USB mappings to provide some thoughts on this kext.

USBPorts.kext.zip

USBPorts.kext Change log 12 July 2020 - Initial Release 14 July 2020 - Removed redundant name keys from all ports, amended Thunderbolt 3 USB C connector type for HS01, updated IOProviderClass for Thunderbolt 3 USB C connector to AppleUSBXHCIARLP. Connected devices now appear under the correct USB Device Tree Bus in System Information.app. 18 July 2020 - Pull request #17 opened for USBPorts.kext to replace USBMap.kext

USBPorts.kext Dell WD15 USB C Dock Dock Port USB C port USB C / TB3 Port Notes
HDMI Yes Yes Audio, Screen Mirroring / Extension, Display Scaling
DP See Notes See Notes Screen flickers to static frequently, using a generic DP to HDMI adapter. Screen black using Apple DP to DVI adapter to an Apple Cinema Display. Note that I do not have a DP cable or compatible monitor. Only have 2x DVI, 1x VGA and 2x TV w/ HDMI.
VGA Yes Yes Screen Mirroring / Extension, Display Scaling. Identifies as HDMI or DVI in System Information.app. Might have something to do with the dock.
Ethernet Yes Yes Full 1000Base-T
USB 2.0 Yes Yes 480 Mbps
USB 3.0 Yes Yes 5 Gbps
Line out No No Not detected in macOS
Headphone/Mic Yes Yes Audio out and microphone works

USB Power Delivery The Dell WD15 USB C Dock is rated for up to 90W power delivery. Charging works as expected in the USB C and Thunderbolt 3 port. I am currently running CoconutBattery.app and there seems to be a quirk where the initial estimated charge time is an absurdly high number (~700 hours), however after a minute or so it goes back to something reasonable. I haven't checked what the charge rate is on the OEM charger but CoconutBattery.app is reporting ~12W on the USB C dock. Will update this section when I get the chance.

Conclusions

Additional Notes / TODO

Comment Change log 12 July 2020 - Initial Comment 14 July 2020 - Added results for VGA and Ethernet. Preliminary results for DP, need to do more testing. Preliminary results for PD via USB C dock. Updated USBPorts.kext 18 July 2020 - Removed USBMap.kext table, updated USBPorts.kext table, added Conclusions, spelling check.

Hope this helps!

Angus

EETagent commented 4 years ago

@afreuden

Wow, thanks for really detailed report. I will look at your USB Map ASAP. Feel free to open pull request when it is finished.

While testing the USB C ports I noticed that the included USBMap.kext (without Win Hello) appears to have incorrect and missing mappings for the USB C / TB3 ports. I have been testing an experimental USBPorts.kext which was built with assistance of USBInjectAll.kext, Hackintool.app and IORegistryExplorer.app. I consider USBPorts.kext to be highly experiemental as I have limited knowledge other than what is defined in the ACPI specifications and the Dortania guide. Perhaps some of these changes can be incorporated into USBMap.kext or possibly transition to USBPorts.kext once its fully validated?

There is a second XHC hub in the T480 located within the TB3 controller JHL6240 Thunderbolt 3 USB 3.1 Controller (Low Power) [Alpine Ridge LP 2016] with an ID of 0x00 and a Vendor/Device ID of 8086 15C1. This is the USB C hub for the TB3 enabled port. The non TB3 USB C port has a missing USB 3.0 port mapping SS04 which is part of the Sunrise Point-LP USB 3.0 xHCI Controller.

Thats the reason why TB port did not work. I am glad that someone was able to fix that.

I have attached a copy of USBPorts.kext for those that are curious and would like to test it. Please note that this kext was manually modified by myself as the one auto generated by Hackintool.app misidentifies the connection types and is unable to map SS04.

I mapped it using the corpnewt's USBMap and it did not found SS04 either. Hackintool is somewhat using same script as those kexts are almost identical ( Mine missing USB power settings though )

I am aware of the 15 port limitation and I am uncertain if macOS handles both XHC controllers as one. Would be great for a Subject Matter Expert on USB mappings to provide some thoughts on this kext.

I think that this is fine. macOS should definitely handle them independently.

afreuden commented 4 years ago

@EETagent

Wow, thanks for really detailed report. I will look at your USB Map ASAP. Feel free to open pull request when it is finished.

Thanks, will do. There really isn't that much difference structure wise between the kexts by corpnewt's tool or Hackintool.app. Haven't decided whether to replace USBMap.kext with USBPorts.kext or just merge it. Sadly I cannot test Thunderbolt 3 functionality so someone else may need to contribute if they have access to a dock or some other device.

Thats the reason why TB port did not work. I am glad that someone was able to fix that.

I had theorised in the original repo https://github.com/taina0407/T480-OpenCore-Hackintosh/issues/5#issuecomment-613273599 that we needed a second entry to map to the other hub so its great that seemed to fix it.

I mapped it using the corpnewt's USBMap and it did not found SS04 either. Hackintool is somewhat using same script as those kexts are almost identical ( Mine missing USB power settings though )

Interesting, Hackintool.app automagically added the USB power settings. Hackintool.app couldn't find SS04 either. I just assumed if HS04 was the USB C 2.0 port then SS04 would be the 3.0 port. Am interested to see if HS03 maps to anything (like the SD reader).

I think that this is fine. macOS should definitely handle them independently.

I am starting to think they are indeed treated as separate hubs.

zombillano commented 4 years ago

I'm back. After selling my SM961 SSD and getting a WD SN750 I can confirm that the SSD was the problem. With this new one I'm being able to sleep without loosing any performance after waking up.

By the other hand, @EETagent : Do you remember this issue? https://github.com/EETagent/T480-OpenCore-Hackintosh/issues/9

Interesting enough, I'm getting it. From my last working hackintosh build to this one I only changed the SSD and the display (got a 1080p IPS display). I can confirm that I can't find it under USB devices, even after trying to create my own USB map. How can this be possible? Any suggestions? It should appear on the 3.0 USB bus, but it does not. I also verified that bluetooth is enabled on the BIOS. Everything else works awesome, I can confirm that the TB port has working USB interface as stated on the message above this one.

I also tried both with my old opencore build (the one used when facing SSD problems) and the last one here on the repo, I just cloned it. I'm kind of lost on this, because I can't find any relation between what I changed and what happens now hahaha.

My theory is that maybe it is under another bus... is it possible?

EETagent commented 4 years ago

Can you verify with USBMap that HS07 is not there? And with USBMap + USBInjectAll too? Give Ubuntu live USB a try to check that there is no hardware damage

zombillano commented 4 years ago

What?? Oddly enough, I was gathering all the info that I was able to get under linux. There my bluetooth worked fine, so after that I rebooted to macOS and now it sees the bluetooth device under HS07 and in fact it works just as well as before. Maybe it was disabled at OS level because I remember I turned it on and off a couple of times before rebooting to macOS

Edit: Maybe it was disabled at OS level? I rebooted a couple of times more and it still works, indeed. I'm so happy because now I have a fully working hackintosh (at least on the things I care of). Of course there are still some things to polish, so I think we should focus on that.

benbender commented 4 years ago

Some feedback, comments and corrections:

USB-C-ports on the right:

Thunderbolt

DRM / Whatevergreen:

Powermanagement

Bios

Sidecar

[1] https://www.ti.com/product/TPS65983#product-details

zombillano commented 4 years ago
* I'm working on a stable solution, but it will take some time.

I'm anxoius to see this improvement. This would take hackintosh on the T480 to the next level.

Powermanagement

* Getting PM right on the T480 is a beast. Problems include:
* Flaky usb-port-sleep on the cardreader/webcam

Works fine for me, what problems do you have with those USB devices?

* CFG Lock on PM-CPU-Registers

Isn't it possible to disable CFG Lock on modded BIOS? I've done it and I was able to disable the kernel Quirks related to CFG Lock.

* The system should(!) go down to at least 800mhz on all cores while using 0.6-0.8W at the cpu-pkg and 3-5W power draw at all. Most configs I see draw 2-3W at the cpu-pkg and 6-12W total resulting in bad battery-life.

Mine never gets that low on frequency, but I can get ~0.8W on idle and 1.5W while writting this with only intel power gadget, the terminal and Firefox open.

* VT-d can be enabled and used when DisableIoMapper-quirk is enabled (which it is in this repo)

I'm curious about this one, does it helps on anything under other OSs? Please elaborate if you can.

* Skyra1n-patches are working. Using it since a few weeks. Procedure is described f.e. here: https://github.com/tylernguyen/x1c6-hackintosh/blob/master/docs/1_README-HARDWAREandBIOS.md

AFAIK I and another person here have our T480 modded. I can't remember its nametag, though.

benbender commented 4 years ago

Powermanagement

* Getting PM right on the T480 is a beast. Problems include:
* Flaky usb-port-sleep on the cardreader/webcam

Works fine for me, what problems do you have with those USB devices?

Have a look at the port statistics in ioreg. The ports should be sleeping/suspended when they are not in use. The problem is relatively subtile, but there. It adds to the total power draw.

* CFG Lock on PM-CPU-Registers

Isn't it possible to disable CFG Lock on modded BIOS? I've done it and I was able to disable the kernel Quirks related to CFG Lock.

Yes, but it doesn't help much, when the system can't throttle the cpus because of other HW-problems (mostly TB-related)

* The system should(!) go down to at least 800mhz on all cores while using 0.6-0.8W at the cpu-pkg and 3-5W power draw at all. Most configs I see draw 2-3W at the cpu-pkg and 6-12W total resulting in bad battery-life.

Mine never gets that low on frequency, but I can get ~0.8W on idle and 1.5W while writting this with only intel power gadget, the terminal and Firefox open.

LPM-Frequency depends on CPUFriendProvider.kext. Do you have TB enabled? Additionally: What runtime do you get (pls name your battery-config)?

* VT-d can be enabled and used when DisableIoMapper-quirk is enabled (which it is in this repo)

I'm curious about this one, does it helps on anything under other OSs? Please elaborate if you can.

If you do virtualization, yes.

zombillano commented 4 years ago

Have a look at the port statistics in ioreg. The ports should be sleeping/suspended when they are not in use. The problem is relatively subtile, but there. It adds to the total power draw.

Oh yeah, I though that you were referring to another issue.

Yes, but it doesn't help much, when the system can't throttle the cpus because of other HW-problems (mostly TB-related)

I see, then if you manage to solve TB PM issues this should be solved too, right?

LPM-Frequency depends on CPUFriendProvider.kext. Do you have TB enabled? Additionally: What runtime do you get (pls name your battery-config)?

I think we have already tried to solve this one without any success. Some of us even tried to generate our own CPUFriendProvider kext but nobody was able to get it to work down to 800Mhz. I've never tested my battery runtime but at this moment I have 82% and activity monitor claims that I must get at least 11 hours. imagen

My T480 only has external 48Wh battery. Is that what you mean by battery-config?

If you do virtualization, yes.

Will enable it, then. I wasn't aware of it.

benbender commented 4 years ago

Wow, thats may be the best runtime i've seen so far for a T480. I would be really interested in dissecting your secret. If you are interested join https://gitter.im/YogaSMC/community and send me a private message there so we don't clutter this issue anymore.

EETagent commented 4 years ago
* (to avoid confusion: usb 3.1 was recently - and totally stupid - rebranded where USB 3.1 gen 1 is 5Gbit/s and USB 3.1 Gen 2 is 10Gbit/s. I'm using the "old" notation here)

Actually USB 3.1 Gen 1 was recently rebranded to USB 3.2 Gen 1(x1) and USB 3.1 Gen 2 to USB 3.2 Gen 2(x1). Not talking about 3.2 Gen 2x2 ... Their naming makes sense, but its confusing for normal consumer

USB 3.2 defines the following connection speeds:
• General nomenclature: Gen X x Y—(Speed x Lanes)
• Enhanced SuperSpeed Gen 1x1—(5G)
• Enhanced SuperSpeed Gen 2x1—(10G)
• Enhanced SuperSpeed Gen 1x2—(5G*2 =10G)
• Enhanced SuperSpeed Gen 2x2—(10G*2 =20G)

Thunderbolt

* OSX expects control of the TB-HW in ACPI, which we have no complete, stable implementation yet. This is needed for proper TB-PM in OSX.

* OSX expects therefor the ICM-Controller to be disabled. This is normally done in apple's FW which we don't have. On other OS's, thats all done in the TB-controller's FW.

* If we poke around in the TB-FW/State too much, it becomes really flaky and unstable. We do need states of the FW/HW, which were never intended or tested by the intel engineers

* OSX expects a so called drom, which can be injected via deviceproperties, to explain the TB-configuration and enable the TB-Port-switch (possible). The drom is checksummed and available for the t480

Interesting, can you post here required device properties? Thanks

* TB can also be working in a PCIe2PCIe-bridge-mode. Thats what's relatively easy achiveable, but lacks many advanced features of TB on the mac. In this mode, connections are mostly handled in FW and outside of the OS.

* I'm working on a (hopefully) stable solution, but it will take some time.

What do you mean by "lacks many advanced feautures of TB on the mac". eGPU? Hot swapping? DMA protection? As far as I know TB3 should work ( Without hot swapping ) even without any additional configuration, at least I saw that over r/hackintosh. Also can you provide additional info about that PCIe2PCIe bridge mode? Thanks

DRM / Whatevergreen:

* The chart for drm-support of WEG is here: https://github.com/acidanthera/WhateverGreen/blob/master/Manual/FAQ.Chart.md

This chart is only for Apple's FairPlay and it is better to have this confirmed on actual configuration. Same with Google's Widewine, which should work on any Hackintosh.

Powermanagement

* Getting PM right on the T480 is a beast. Problems include:

* Flaky usb-port-sleep on the cardreader/webcam

* CFG Lock on PM-CPU-Registers

* interrupt-storms from the TB-controller keeping the CPU from going to lower c-states (confirmable via cpu-pkg-usage or "sudo powermetrics"). Bios assist mitigates this by taking over PM to the TB-firmware.

* PM on the iGPU with whatevergreen is incomplete and partly unstable. We are missing apples intel-guc-fw to get it completely.

* The system should(!) go down to at least 800mhz on all cores while using 0.6-0.8W at the cpu-pkg and 3-5W power draw at all. Most configs I see draw 2-3W at the cpu-pkg and 6-12W total resulting in bad battery-life.

Yes, I do not know about any config where one achieved 800Mhz idle. Power management on iGPU is the biggest problem now #20, but sadly there is nothing we can do about that. "Flaky usb-port-sleep on the cardreader/webcam" I did not know about this, will check it soon.

Sidecar

* didn't test it, but maybe helpful: https://github.com/hieplpvip/SidecarEnabler

This only disable SMBIOS check, MBP 15,2 and 14,1 are already supported so this is useless.

Another problem we have is hibernation, do not know how it exactly works on macOS, but setting that on Ubuntu/Fedora btrfs was really hell

benbender commented 4 years ago
* (to avoid confusion: usb 3.1 was recently - and totally stupid - rebranded where USB 3.1 gen 1 is 5Gbit/s and USB 3.1 Gen 2 is 10Gbit/s. I'm using the "old" notation here)

Actually USB 3.1 Gen 1 was recently rebranded to USB 3.2 Gen 1(x1) and USB 3.1 Gen 2 to USB 3.2 Gen 2(x1). Not talking about 3.2 Gen 2x2 ... Their naming makes sense, but its confusing for normal consumer

USB 3.2 defines the following connection speeds:
• General nomenclature: Gen X x Y—(Speed x Lanes)
• Enhanced SuperSpeed Gen 1x1—(5G)
• Enhanced SuperSpeed Gen 2x1—(10G)
• Enhanced SuperSpeed Gen 1x2—(5G*2 =10G)
• Enhanced SuperSpeed Gen 2x2—(10G*2 =20G)

Aaaaaarghs ;)

Thunderbolt

* OSX expects control of the TB-HW in ACPI, which we have no complete, stable implementation yet. This is needed for proper TB-PM in OSX.

* OSX expects therefor the ICM-Controller to be disabled. This is normally done in apple's FW which we don't have. On other OS's, thats all done in the TB-controller's FW.

* If we poke around in the TB-FW/State too much, it becomes really flaky and unstable. We do need states of the FW/HW, which were never intended or tested by the intel engineers

* OSX expects a so called drom, which can be injected via deviceproperties, to explain the TB-configuration and enable the TB-Port-switch (possible). The drom is checksummed and available for the t480

Interesting, can you post here required device properties? Thanks

                    Method (_DSM, 4, NotSerialized)  // _DSM: Device-Specific Method
                    {
                        Local0 = Package (0x11)
                            {
                                "AAPL,slot-name", 
                                Buffer (0x09)
                                {
                                    "Internal"
                                }, 

                                "name", 
                                Buffer (0x24)
                                {
                                    "Alpine Ridge Thunderbolt Controller"
                                }, 

                                "model", 
                                Buffer (0x2D)
                                {
                                    "Intel JHL6240 Alpine Ridge Thunderbolt 3 NHI"
                                }, 

                                "device_type", 
                                Buffer (0x17)
                                {
                                    "Thunderbolt-Controller"
                                }, 

                                "ThunderboltDROM", 
                                Buffer (0x48)
                                {
                                    /* 0000 */  0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09,  // a.......
                                    /* 0008 */  0x01, 0xB1, 0x13, 0x83, 0x2D, 0x01, 0x3B, 0x00,  // ....-.;.
                                    /* 0010 */  0x09, 0x01, 0x07, 0x17, 0x02, 0x14, 0x08, 0x81,  // ........
                                    /* 0018 */  0x80, 0x02, 0x80, 0x00, 0x00, 0x00, 0x08, 0x82,  // ........
                                    /* 0020 */  0x80, 0x02, 0x80, 0x00, 0x00, 0x00, 0x02, 0x83,  // ........
                                    /* 0028 */  0x0B, 0x84, 0x20, 0x01, 0x00, 0x3C, 0x00, 0x00,  // .. ..<..
                                    /* 0030 */  0x00, 0x00, 0x00, 0x05, 0x85, 0x50, 0x00, 0x00,  // .....P..
                                    /* 0038 */  0x09, 0x01, 0x4C, 0x65, 0x6E, 0x6F, 0x76, 0x6F,  // ..Lenovo
                                    /* 0040 */  0x00, 0x07, 0x02, 0x54, 0x34, 0x38, 0x30, 0x00   // ...T480.
                                }, 

                                "ThunderboltConfig", 
                                Buffer (0x20)
                                {
                                    /* 0000 */  0x00, 0x02, 0x1C, 0x00, 0x02, 0x00, 0x05, 0x03,  // ........
                                    /* 0008 */  0x01, 0x00, 0x04, 0x00, 0x05, 0x03, 0x02, 0x00,  // ........
                                    /* 0010 */  0x03, 0x00, 0x05, 0x03, 0x01, 0x00, 0x00, 0x00,  // ........
                                    /* 0018 */  0x03, 0x03, 0x02, 0x00, 0x01, 0x00, 0x02, 0x00   // ........
                                }, 

                                "linkDetails", 
                                Buffer (0x08)
                                {
                                     0x08, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00   // ........
                                }, 

                                "power-save", 
                                One, 
                                Buffer (One)
                                {
                                     0x00                                             // .
                                }
                            }
                        DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
                        Return (Local0)
                    }

But as I said, its more complicated.

* TB can also be working in a PCIe2PCIe-bridge-mode. Thats what's relatively easy achiveable, but lacks many advanced features of TB on the mac. In this mode, connections are mostly handled in FW and outside of the OS.

* I'm working on a (hopefully) stable solution, but it will take some time.

What do you mean by "lacks many advanced feautures of TB on the mac". eGPU? Hot swapping? DMA protection? As far as I know TB3 should work ( Without hot swapping ) even without any additional configuration, at least I saw that over r/hackintosh. Also can you provide additional info about that PCIe2PCIe bridge mode? Thanks

eGPU shows up as internal, TB2TB-Networking, PM etc

DRM / Whatevergreen:

* The chart for drm-support of WEG is here: https://github.com/acidanthera/WhateverGreen/blob/master/Manual/FAQ.Chart.md

This chart is only for Apple's FairPlay and it is better to have this confirmed on actual configuration. Same with Google's Widewine, which should work on any Hackintosh.

The other question is about HW-acceleration ;)

Powermanagement

* Getting PM right on the T480 is a beast. Problems include:

* Flaky usb-port-sleep on the cardreader/webcam

* CFG Lock on PM-CPU-Registers

* interrupt-storms from the TB-controller keeping the CPU from going to lower c-states (confirmable via cpu-pkg-usage or "sudo powermetrics"). Bios assist mitigates this by taking over PM to the TB-firmware.

* PM on the iGPU with whatevergreen is incomplete and partly unstable. We are missing apples intel-guc-fw to get it completely.

* The system should(!) go down to at least 800mhz on all cores while using 0.6-0.8W at the cpu-pkg and 3-5W power draw at all. Most configs I see draw 2-3W at the cpu-pkg and 6-12W total resulting in bad battery-life.

Yes, I do not know about any config where one achieved 800Mhz idle. Power management on iGPU is the biggest problem now #20, but sadly there is nothing we can do about that. "Flaky usb-port-sleep on the cardreader/webcam" I did not know about this, will check it soon.

Just took the shot on this machine:

pm

It's the LFM for my CPU: https://ark.intel.com/content/www/de/de/ark/products/124968/intel-core-i7-8650u-processor-8m-cache-up-to-4-20-ghz.html

Sidecar

* didn't test it, but maybe helpful: https://github.com/hieplpvip/SidecarEnabler

This only disable SMBIOS check, MBP 15,2 and 14,1 are already supported so this is useless.

As I said, didn't checked it deeply.

Another problem we have is hibernation, do not know how it exactly works on macOS, but setting that on Ubuntu/Fedora btrfs was really hell

Hibernation is hibernatemode 25 and not used on modern macs per default. I can hibernate, the machine powers off and wakes back up. But there is CMOS-checksum-error at boot which I can't get rid off yet and it doesn't have any real benefits for me, so I didn't invest much time. Additionally there seem to be issues from time to time with VoodooPS2 where keycodes get borked on resume (maybe ~20% of my tries or so).

ghost commented 4 years ago

Just wanted to add that the ThinkPad USB-C/USB-A Hybrid Dock Gen 2 is functional. I am using macOS Catalina 10.15.6 with version 5.0.1 of this OpenCore config and the MacbookPro15,2 SMBIOS. To get external video output to work, the free DisplayLink Manager application is required. EDIT: If you are interested in running a DisplayLink dock in what DisplayLink calls "Clamshell Mode" (laptop lid closed), use the legacy DisplayLink USB Graphics Software instead.

TESTED AND WORKING:

UNTESTED:

bjh70 commented 3 years ago

I am trying to get a 4K output through the Thunderbolt port, but using a USB-C to DisplayPort doesn't work (I get a flash of the desktop at 1440p then the output stops working). Using a USB-C to HDMI cable works fine, but only at 1440p. Any info on how I could fix that?

bjh70 commented 3 years ago

I am trying to get a 4K output through the Thunderbolt port, but using a USB-C to DisplayPort doesn't work (I get a flash of the desktop at 1440p then the output stops working). Using a USB-C to HDMI cable works fine, but only at 1440p. Any info on how I could fix that?

OK, I managed to get the USB-C to DisplayPort cable working. I'm not sure what I did exactly, but if I boot with it while the lid is closed it works fine. In fact, I get a 4k image from the Lenovo boot through the OpenCore disk selection and right until the Apple logo progress is halfway done. After that, the screen goes back to 1440P. I am trying to set the resolution using SwitchResX to no avail (it claims the resolution is not available).

Charlyo commented 3 years ago

@EETagent @benbender

Managed to get thunderbolt 3 bus using a changed ssdt from this guide:

Here's my proof and ssdt.

Screenshot 2021-01-10 at 00 34 16

SSDT-TbtOnPch_PINI.aml.zip

snazzybunny commented 3 years ago

My 4k monitor is working at 1440p but I can't seem to get 4k working yet.

@Charlyo Any chance I can take a look at your EFI folder? I added the file and enabled it in the config plist, but I need DTPG too?

jonnathanlopes commented 3 years ago

SSDT-TbtOnPch_PINI.aml.zip

have a guide for this ?I add to opencore, but it didn't work!

snazzybunny commented 3 years ago

SSDT-TbtOnPch_PINI.aml.zip

have a guide for this ?I add to opencore, but it didn't work!

I did the same and am also curious to what you did to get it to work. Thanks.

jonnathanlopes commented 3 years ago

@Charlyo Can you help me config Tb3 in T480?