CLAY-BIOS / Lenovo-ThinkPad-T450s-Hackintosh-OpenCore

此仓库可以让你在macos中使用ThinkPad T450s T450 X250 X1C3的所有功能(不包括指纹、VGA),且99%接近于白苹果的完美黑苹果。
Apache License 2.0
284 stars 59 forks source link

DW1820A Bluetooth Not available (USBMap issue?) #11

Closed i3p9 closed 3 years ago

i3p9 commented 3 years ago

I use a DW1820A and when I tried your EFI, Bluetooth wasn't available to use. When using this ACPI patches, Bluetooth works perfectly, can you see what might be wrong? Other than this issue, your patches are more stable!

CLAY-BIOS commented 3 years ago

我使用DW1820A,蓝牙无法使用,当我尝试您的EFI时。当蓝牙工作完美时[使用](https://github.com/i3p9/Hackintosh-BigSur-Catalina-OpenCore-Lenovo-T450s-efi/tree/master/EFI/OC/ACPI),ACPI,你能看出可能有什么问题吗?除了这个问题,你的补丁更稳定了! 我不确定是什么问题,但我没有遇到这个问题。 你可以尝试这个config文件。 config的副本.plist.zip

i3p9 commented 3 years ago

Thanks for the config file, I'll test it and let you know.

I noticed in the config file you're injecting AirPortBrcm4360_Injector.kext and AirPortBrcmNIC_Injector.kext from AirprtBrcmFixUp, is there any reason to do it? as DW1820A already runs with just AirprtBrcmFixUp (and the bt kexts) pictured here:

image

I would like to know more about it.

And second question, why are you injecting VoodooI2C.kext and VoodooI2CHID.kext? Is it for the Touchpad? Because Touchpad already works with RMI, does running with l2C has better performance? Thanks!

CLAY-BIOS commented 3 years ago

Thanks for the config file, I'll test it and let you know.

I noticed in the config file you're injecting AirPortBrcm4360_Injector.kext and AirPortBrcmNIC_Injector.kext from AirprtBrcmFixUp, is there any reason to do it? as DW1820A already runs with just AirprtBrcmFixUp (and the bt kexts) pictured here:

image

I would like to know more about it.

And second question, why are you injecting VoodooI2C.kext and VoodooI2CHID.kext? Is it for the Touchpad? Because Touchpad already works with RMI, does running with l2C has better performance? Thanks!

  1. I only injected airportbrcmnic from airportbrcmfixup_ Injector.kext I needed it in earlier versions. (it may not be needed now, but I haven't modified it.)

2.VoodooI2C.kext and VoodooI2C HID.kext Just to drive the touchscreen, it has nothing to do with the touchpad. If you don't use the touchscreen, you can delete it. 截屏2020-12-09 20 03 42

i3p9 commented 3 years ago

The config you provided is working perfectly. Thank you! I'll test it for a couple days and replace my repo's ACPI files with yours (with credit ofc).


Yeah my bad for asking about VoodoolC2, I should have just googled it. I don't have a touchscreen so I deleted the entries.

And airportbrcmnic doesn't need to be injected now. Only AirportBrcmFixup.kext injected is enough for the card to run. I needed pci-aspm-default set to 0, though.

Couple questions about your config, firstly, do we need LiluFriend now? As it's already integrated into Lilu now.

And, can you test YogaSMC and see if Fan control is working for you? I can see the fan speed but can't control the fan speed. I think some acpi editing is needed to r/w in EC. Since you patched it yourself you'd understand it better. I think WE1B and WECB from SSDT-RCSM (from yogasmc) is needed to be in the battery patch?

Thanks again for answering my questions!

CLAY-BIOS commented 3 years ago

The config you provided is working perfectly. Thank you! I'll test it for a couple days and replace my repo's ACPI files with yours (with credit ofc).

Yeah my bad for asking about VoodoolC2, I should have just googled it. I don't have a touchscreen so I deleted the entries.

And airportbrcmnic doesn't need to be injected now. Only AirportBrcmFixup.kext injected is enough for the card to run. I needed pci-aspm-default set to 0, though.

Couple questions about your config, firstly, do we need LiluFriend now? As it's already integrated into Lilu now.

And, can you test YogaSMC and see if Fan control is working for you? I can see the fan speed but can't control the fan speed. I think some acpi editing is needed to r/w in EC. Since you patched it yourself you'd understand it better. I think WE1B and WECB from SSDT-RCSM (from yogasmc) is needed to be in the battery patch?

Thanks again for answering my questions!

1.LiluFriend.kext and CPUFriendDataProvider.kext don't need it now.

  1. you only need to add WE1B and WECB methods to the battery patch to achieve fan control. 截屏2020-12-10 11 59 22

This is my patch SSDT-OCBATT.zip

截屏2020-12-10 11 57 22

i3p9 commented 3 years ago

Okay! Removing LiluFriend and CPUFriendDataProvider. I'm guessing you're using SSDT-EC-USBX to do power management instead of cpufrienddataprovider? Would like to know what you're using instead of CPUFriendDataProvider.

Last question, Clamshell mode. I had clamshell mode perfectly working with this EFI. With lid closed and monitor attached via MiniDP, computer would wake from USB Keyboard. Not working in your EFI after a couple hours of sleep. Do you know what might cause it? Since I only use my laptop in Clamshell mode, it's kind of important for me. Thanks! Sorry again for all these questions. You've been very very helpful!

CLAY-BIOS commented 3 years ago

Okay! Removing LiluFriend and CPUFriendDataProvider. I'm guessing you're using SSDT-EC-USBX to do power management instead of cpufrienddataprovider? Would like to know what you're using instead of CPUFriendDataProvider.

Last question, Clamshell mode. I had clamshell mode perfectly working with this EFI. With lid closed and monitor attached via MiniDP, computer would wake from USB Keyboard. Not working in your EFI after a couple hours of sleep. Do you know what might cause it? Since I only use my laptop in Clamshell mode, it's kind of important for me. Thanks! Sorry again for all these questions. You've been very very helpful!

  1. Inject X86 patch into ACPI to load apple native power management, so CPUFriendDataProvider is not needed. https://github.com/daliansky/OC-little/tree/master/05-注入设备/05-1-注入X86

  2. SSDT-EC-USBX is only USB port information.

  3. I'm not sure what the problem is, but you can try HibernationFixup.kext, it may be helpful to you. https://github.com/acidanthera/HibernationFixup

i3p9 commented 3 years ago

Ah, understood.

As for the clamshell mode, it's working normally. (As in lid is now closed and I'm using it currently). The problem is when I leave it for a few hours, then when I try to wake it up it doesn't wake up. I'll try HibernationFixup and let you know.

Now that I think about it, I might also be an issue with Hibernation, my Hibernation is set to 3, so I've set it to 0 only when the power adapter is connected. I'll check and see if that works.

Edit: It didn’t work. Same issue. Laptop doesn’t wake up in clamshell mode at all.

A I've checked the logs about Clamshell, so when lid is open (external monitor not connected), I see this:

Screen Shot 2020-12-10 at 6 07 51 PM

And when lid is closed and monitor is connected, I see this:

Screen Shot 2020-12-10 at 6 07 41 PM

Clamshell seems to work correctly, but another issue is console is getting flooded with the Clamshell message. I'll try to diagnose it. Do you have such logs about it in your machine?

CLAY-BIOS commented 3 years ago

Ah, understood.

As for the clamshell mode, it's working normally. (As in lid is now closed and I'm using it currently). The problem is when I leave it for a few hours, then when I try to wake it up it doesn't wake up. I'll try HibernationFixup and let you know.

Now that I think about it, I might also be an issue with Hibernation, my Hibernation is set to 3, so I've set it to 0 only when the power adapter is connected. I'll check and see if that works.

Edit: It didn’t work. Same issue. Laptop doesn’t wake up in clamshell mode at all.

A I've checked the logs about Clamshell, so when lid is open (external monitor not connected), I see this:

Screen Shot 2020-12-10 at 6 07 51 PM

And when lid is closed and monitor is connected, I see this:

Screen Shot 2020-12-10 at 6 07 41 PM

Clamshell seems to work correctly, but another issue is console is getting flooded with the Clamshell message. I'll try to diagnose it. Do you have such logs about it in your machine?

This is my diary. when lid is open external monitor not connected. 截屏2020-12-10 21 48 00

And when lid is closed and monitor is connected. 截屏2020-12-10 21 50 19

i3p9 commented 3 years ago

We seem to have the same logs. So when you are in clamshell mode, and go to Sleep. Can you wake your computer while it's in Clamshell mode?

Let me test the other EFI and see if the behavior changes. I really like your EFI and specially your patches but I also need Clamshell mode waking up from sleep to work!

i3p9 commented 3 years ago

So I tried with my EFI again and Wake from Clamshell mode is working for me. Logs don't seem to show anything useful.

image

So the issue is probably with patches with LID or sleep. I really really like your EFI and patches but that's the only thing currently not working. And kind of important for me, as I always use this machine in Clamshell mode. Can you see if you can see what's causing the problem? Since you're very good at patching.

Also you can let me know which .aml files might be responsible for the issue, and then I can compare both patches to see if there's anything important. Thanks!

CLAY-BIOS commented 3 years ago

所以我又尝试了我的EFI,从翻盖模式唤醒对我来说很有效。日志似乎没有显示任何有用的东西。

图像

因此,问题可能与带有LID或睡眠的补丁有关。我真的很喜欢你的EFI和补丁,但这是目前唯一不起作用的东西。对我来说有点重要,因为我总是在翻盖模式下使用这台机器。你能看看你是否能看到问题的原因吗?既然你很擅长修补。

您还可以告诉我哪些.aml文件可能对该问题负责,然后我可以比较这两个补丁,看看是否有任何重要内容。谢谢!

This could be the result of a sleep shortcut patch. Record the status of the LID device in the LID method.

i3p9 commented 3 years ago

So in SSDT-T450S-VPS2.aml, I'm removing the _Q13 method only, and in SSDT-PTSWAK.aml, I'm removing the whole _SB.LID scope itself because it only has the method you marked, right? Let me test and see!

Edit: Tested them. No dice. These were the modified version I used: SSDTs.zip

I did modify them correctly right?


But yeah, I totally seems like an issue with the LID. The computer doesn't wake up at all when the LID is closed. Where is that code located in the patch? Also I'm okay with losing the Sleep shortcut key. I never use the laptop's keyboard anyway.

CLAY-BIOS commented 3 years ago

So in SSDT-T450S-VPS2.aml, I'm removing the _Q13 method only, and in SSDT-PTSWAK.aml, I'm removing the whole _SB.LID scope itself because it only has the method you marked, right? Let me test and see!

Edit: Tested them. No dice. These were the modified version I used: SSDTs.zip

I did modify them correctly right?

But yeah, I totally seems like an issue with the LID. The computer doesn't wake up at all when the LID is closed. Where is that code located in the patch? Also I'm okay with losing the Sleep shortcut key. I never use the laptop's keyboard anyway.

Sorry, I was negligent. _Q13 and LID in the config.plist file also need to be deleted.

截屏2020-12-11 18 57 44

i3p9 commented 3 years ago

Hey sorry I just got some time test it out again. After disabling the patches you mentioned in the last comment, it still doesn't work :(

When I press the space bar on the external keyboard, it lights up but unfortunately doesn't wake up the laptop. Maybe an USB issue? I'm sorry I'm being annoying with the issue.

Crazy thing is, Clamshell is working. See this:

image

First command was run when laptop display was open, second one ran when the laptop display was closed.

I think the issue is that the external keyboard isn't waking up the laptop, OR the laptop isn't waking up at all from sleep when the lid is closed. Did you implement anything related to that when patching?

image

from ioreg, running your efi with the patches you suggested.

CLAY-BIOS commented 3 years ago

Hey sorry I just got some time test it out again. After disabling the patches you mentioned in the last comment, it still doesn't work :(

When I press the space bar on the external keyboard, it lights up but unfortunately doesn't wake up the laptop. Maybe an USB issue? I'm sorry I'm being annoying with the issue.

Crazy thing is, Clamshell is working. See this:

image

First command was run when laptop display was open, second one ran when the laptop display was closed.

I think the issue is that the external keyboard isn't waking up the laptop, OR the laptop isn't waking up at all from sleep when the lid is closed. Did you implement anything related to that when patching?

image

from ioreg, running your efi with the patches you suggested.

I recustomized the USB and the problem seems to have been fixed. Please test this EFI file.

EFI.zip

i3p9 commented 3 years ago

Oh wow! I can't thank you enough. I will test right now!


Omg! After some initial testing it actually seems to work! I will test it further when I go to sleep. One thing changed on the surface that I'd say is that my Keyboard's backlight and mouse light doesn't turn off, or only turns off for a brief moment. (I don't mind this, keyboard/mouse has turn off light on idle). Thank you so much!

I took a look at what you've changed. To me it looks like that you modified SSDT-TEMP.aml, SSDT-EC-USBX.aml and SSDT-OCBATT.aml, disabled WAKE related patches and re-enabled a patch and re-mapped your usb in USBPorts.kext.

Is there anything else you did? I would like to know how you fixed it if you have some free time to write. No pressure at all. I just wanna learn :)

CLAY-BIOS commented 3 years ago

Oh wow! I can't thank you enough. I will test right now!

Omg! After some initial testing it actually seems to work! I will test it further when I go to sleep. One thing changed on the surface that I'd say is that my Keyboard's backlight and mouse light doesn't turn off, or only turns off for a brief moment. (I don't mind this, keyboard/mouse has turn off light on idle). Thank you so much!

I took a look at what you've changed. To me it looks like that you modified SSDT-TEMP.aml, SSDT-EC-USBX.aml and SSDT-OCBATT.aml, disabled WAKE related patches and re-enabled a patch and re-mapped your usb in USBPorts.kext.

Is there anything else you did? I would like to know how you fixed it if you have some free time to write. No pressure at all. I just wanna learn :)

I checked your EFI file carefully. I noticed that in SSDT-XHCI, some USB ports are internal. In my EFI, I set all USB ports to USB3.0. So I set (camera·fingerprint·touch screen·Bluetooth) to internal and successfully solved the problem. 截屏2020-12-15 19 16 16

i3p9 commented 3 years ago

That's amazing debugging! Funny thing is I also looked at the USBMap of my EFI and yours in Hackintool to see if anything was off, I didn't even notice the Internal/USB3 options. Thank you so so much for doing this for me. Now I'm 100% using your Patches with my EFI. Best of both worlds.

Also, I have tested out your solution for a longer period of time and it's working flawlessly! Thank you again. Please don't mind if I ask you more questions about things related to this later!


Closing this issue for now. I might reopen it if I have other questions. Thank you again!

CLAY-BIOS commented 3 years ago

That's amazing debugging! Funny thing is I also looked at the USBMap of my EFI and yours in Hackintool to see if anything was off, I didn't even notice the Internal/USB3 options. Thank you so so much for doing this for me. Now I'm 100% using your Patches with my EFI. Best of both worlds.

Also, I have tested out your solution for a longer period of time and it's working flawlessly! Thank you again. Please don't mind if I ask you more questions about things related to this later!

Closing this issue for now. I might reopen it if I have other questions. Thank you again!

Add:

  1. After testing, you may still need to use CPUFriendDataProvider.kext. Without using CPUFriendDataProvider.kext, the minimum CPU frequency is 1.2Ghz, after use it is 0.7Ghz. Therefore, using CPUFriendDataProvider.kext may save power.

  2. Some BCM network cards need to use AirPortBrcmNIC_Injector.kext, for example: BCM43224, BCM4360.

  3. I re-customized the USB according to the original ACPI, And updated to the latest version,You can test it.

截屏2020-12-24 00 32 09

i3p9 commented 3 years ago

Ah thank you for the update. I'll test it out.

As for 2. Since my card is BCM4350, and maybe that's why I didn't need to inject anything specific from AirportBrcmFixup.kext. Only loading AirportBrcmFixup.kext works for me. (Everything native is working).

And as for the brcmfx-country entry, I have nothing setup and my channel is set to US, as I wanted. So I won't really need to set it right?

I also noticed you added some patches in the BrcmBluetooth kexts here: https://github.com/CLAY-BIOS/Lenovo-ThinkPad-T450s-Hackintosh-Big-Sur-OpenCore/commit/d3c7c3185d71de51b755718b44c820b0b24fac9f

Why was this necessary? Thanks!

CLAY-BIOS commented 3 years ago

Ah thank you for the update. I'll test it out.

As for 2. Since my card is BCM4350, and maybe that's why I didn't need to inject anything specific from AirportBrcmFixup.kext. Only loading AirportBrcmFixup.kext works for me. (Everything native is working).

And as for the brcmfx-country entry, I have nothing setup and my channel is set to US, as I wanted. So I won't really need to set it right?

I also noticed you added some patches in the BrcmBluetooth kexts here: d3c7c31

Why was this necessary? Thanks!

1. brcmfx-country = #a is a common setting, it can avoid country/region issues. For example: You set brcmfx-country to US, but you are using it in China. Will cause some functions to be unavailable.

2. The patch in BrcmBluetooth.kext is for testing, you don’t care about it, it will not have any effect. Because I have an Apple card whose Bluetooth ID is f007_0a5c I tried to inject ID into BrcmBluetooth.kexts to drive Bluetooth, but it didn't work. f007 is a bad ID, there are a batch of Apple card Bluetooth on the market is this ID (the same bad ID is also 22BE) Some profiteers are selling this kind of Apple cards. Some say that these cards are test cards, and some say that they are fake cards. I don’t know the source of these Apple cards. The Bluetooth of these Apple cards cannot be driven.

i3p9 commented 3 years ago

Ah, understood. Since I have DW1820A, I'm using the unmodified version of brcmbluetooth kexts and it's working perfectly.

Because of hackintoshing becoming more and more popular, native apple cards are becoming harder to find and getting more expensive. I initially bought a native BCM94360CD with adapter, which was never recognized by the system. Still not sure if the card was dead or the adapter was dead. Then I switched to DW1820A and using it without any issues so far. The only issue is when updating MacOS, I have to disable the card from BIOS or else the macOS installer won't boot. Did you face any issues like that?


I just booted using your current EFI in the repo. Everything seems alright so far. Without CPUFriendDataProvider, I was getting minimum of 0.8GHz, with your CPUFriendDataProvider I am getting minimum of 0.7GHz which is better I guess.

Oh and did you face any issues of CPU frequency being quite high when idle? I am averaging 1.7Ghz to 2.2Ghz even on idle sometimes. Although CPU power usage is very low, around Total package power is about 1.1W. (Although my CPU is undervolted by -100mA)

Another question, what is your idle temp on the system? Mine is like this; (running safari with 5 tabs, spotify, vscode, npm and terminal open)

Screen Shot 2021-01-01 at 5 42 38 AM
CLAY-BIOS commented 3 years ago

Ah, understood. Since I have DW1820A, I'm using the unmodified version of brcmbluetooth kexts and it's working perfectly.

Because of hackintoshing becoming more and more popular, native apple cards are becoming harder to find and getting more expensive. I initially bought a native BCM94360CD with adapter, which was never recognized by the system. Still not sure if the card was dead or the adapter was dead. Then I switched to DW1820A and using it without any issues so far. The only issue is when updating MacOS, I have to disable the card from BIOS or else the macOS installer won't boot. Did you face any issues like that?

I just booted using your current EFI in the repo. Everything seems alright so far. Without CPUFriendDataProvider, I was getting minimum of 0.8GHz, with your CPUFriendDataProvider I am getting minimum of 0.7GHz which is better I guess.

Oh and did you face any issues of CPU frequency being quite high when idle? I am averaging 1.7Ghz to 2.2Ghz even on idle sometimes. Although CPU power usage is very low, around Total package power is about 1.1W. (Although my CPU is undervolted by -100mA)

Another question, what is your idle temp on the system? Mine is like this; (running safari with 5 tabs, spotify, vscode, npm and terminal open)

Screen Shot 2021-01-01 at 5 42 38 AM
  1. I didn't encounter this problem. I don't need to disable Wi-Fi in BIOS no matter upgrading or new installation.
  2. I think the CPU frequency is normal.
  3. The temperature is about the same as you. 截屏2021-01-01 19 06 55
i3p9 commented 3 years ago

Thanks! And as for the network card needing to be disabled for update, it only happens on the DW1820A (00JT494) for me. Which card are you using right now?


unrelated question, your istat menu shows cpu and gpu frequency in the sensor section, how? Did you buy it from the App Store or their website? I didn't know before and I bought it from the App Store.

i3p9 commented 3 years ago

Ah thanks for confirming. And the issue with disabling network card for macOS update happens only with DW1820A 00JT494. Which card are you using right now?

CLAY-BIOS commented 3 years ago

Thanks! And as for the network card needing to be disabled for update, it only happens on the DW1820A (00JT494) for me. Which card are you using right now?

unrelated question, your istat menu shows cpu and gpu frequency in the sensor section, how? Did you buy it from the App Store or their website? I didn't know before and I bought it from the App Store.

  1. i downloaded on iStat Menus official website, are you updated to the latest version?
  2. DW1820A 08PKF4 is my wireless card model.
i3p9 commented 3 years ago
  1. Ah, I bought it from the App Store on a discount, and it looks like App Store version doesn't support CPU/GPU Frequency. Oh well, it wasn't super important anyway.

  2. I think your card is fine, my model causes problem with macOS install.


When building your CPUFriendDataProvider, what was the minimum CPU frequency did you put? 600 or 700Mhz? Because according to Intel, i5 5200U can go down to 600Mhz. Link: https://ark.intel.com/content/www/us/en/ark/products/85212/intel-core-i5-5200u-processor-3m-cache-up-to-2-70-ghz.html

CLAY-BIOS commented 3 years ago
  1. Ah, I bought it from the App Store on a discount, and it looks like App Store version doesn't support CPU/GPU Frequency. Oh well, it wasn't super important anyway.
  2. I think your card is fine, my model causes problem with macOS install.

When building your CPUFriendDataProvider, what was the minimum CPU frequency did you put? 600 or 700Mhz? Because according to Intel, i5 5200U can go down to 600Mhz. Link: https://ark.intel.com/content/www/us/en/ark/products/85212/intel-core-i5-5200u-processor-3m-cache-up-to-2-70-ghz.html

The minimum is 700 MHz. I try to set the minimum frequency to 100MHz in cpufrienddataprovider, and the minimum frequency is also 700MHz.