THEDEVIOUS1 / CHUWI-MINIBOOK-HACKINTOSH

EFI files for hackintosh on the CHUWI Minibook
38 stars 7 forks source link

Usb 3 power issue #5

Closed hatran0884 closed 4 years ago

hatran0884 commented 4 years ago

Hi

Firstly, thank you so much for your great effort, because of this, my installation becomes much easier. However that would be helpful if some folloues little issues could be resolved:

lazd commented 4 years ago

@hatran0884 let's keep this issue focused on the USB power problem. It's not good Github etiquette to discuss unrelated problems within the same issue.

Please discuss the screen resolution issues here: https://github.com/THEDEVIOUS1/CHUWI-MINIBOOK-HACKINTOSH/issues/3

Please file a separate issue for the Bluetooth problem, and I think you should file an issue for the Clover bootloader rotation feature request against Clover itself (see previous related discussion here).

lazd commented 4 years ago

I have noticed the USB power issue when plugging my TP-Link TL-WN725N WiFi adaptor into the USB 2 port. I get a "USB Accessory Needs Power" warning. My SD card reader works fine in the USB 2 port, however.

Screen Shot 2019-12-14 at 11 55 47 AM

When the WiFi adaptor is plugged into the USB 3 port, there are no power issues.

balopez83 commented 4 years ago

Hi @lazd & @hatran0884, the usb power issues should be fixed with the last commit. Please make sure to remove usbinjectall.kext replacing it with usbports.kext and remove all usb related ssdt patches in your ACPI folder mirroring the current EFI folder hosted here on GitHub. To make sure you have no other conflicting kexts or patches I would replace your EFI with a fresh download from Github moving your config to the new efi. Please confirm you also do not have any port limit patches in your config file. If after updating the EFI you still have usb power issues please report back. I anticipate we will be updating the EFI to the latest version of clover as well as updating the SMBIOS version for better support of the MiniBooks components soon.

lazd commented 4 years ago

@balopez83 I tried the new EFI folder by replacing my existing EFI folder, changing serial numbers and UUID in config4K.plist, reinstalling the Realtek WiFi driver, and rebooting. Note that my boot device is a USB SD card reader while I wait on my M2 NVMe drive.

Unfortunately, I get the power issue described in my previous comment when I plug the WiFi adapter into the USB2 port and move the card reader to the USB3 port.

Here's what System Profiler says when the card reader is in the USB2 port and WiFi in USB3 (everything works in this configuration, both before I updated and after):

Screen Shot 2019-12-15 at 8 58 13 AM Screen Shot 2019-12-15 at 8 58 17 AM

Here's what it shows when the card reader is in the USB3 port and WiFi in USB2 (WiFi does not power on in this configuration, both before and after the update):

Screen Shot 2019-12-15 at 9 03 38 AM Screen Shot 2019-12-15 at 9 03 49 AM

Note that I am running the modified BIOS from this repository.

Can I provide any additional debugging information or logs?

balopez83 commented 4 years ago

@lazd Thank you for letting me know. I will look into that ports configuration to see if there is a limit preventing enough power to go to it. You mentioned though using the realtek driver, did you install the one in the EFI or are you using a wifi management program with driver/kext installed at the OS level? it might be the difference in why not enough power is being driven to it.

lazd commented 4 years ago

@balopez83 I am using the Realtek driver recommended in the README, which installs the kexts inside of EFI/Clover/kexts/Other. It does run a management program with its own menubar widget.

Should I try a different driver, or move those kexts to /L/E/ or /S/L/E?

It is odd that, when its plugged into the USB3 port, it shows 896mA required for the card reader, and it seems to get pretty hot (though that might just be due to the increased speed).

Azkali commented 4 years ago

@lazd I recommend letting Clover inject the kexts drivers for you, so you keep your system clean ( especially for incoming MacOS updates )

lazd commented 4 years ago

@Azkali ok, they're currently in EFI/Clover/kexts/Other so I think I'm good there.

balopez83 commented 4 years ago

Hi @lazd & @hatran0884 , if you’re still having issues with Usb power and Bluetooth can you try to move the Realtek drivers to L/E and remove from EFI? I suspect there is an issue with certain WiFi cards drawing too much power with the Realtek drivers being injected from clover.

Before my computer died I was unable to duplicate the issue but I had my drivers installed in L/E and in all ports it worked with no power issues but also with a different driver package which may also be part of the issue. I was attempting to change my setup to match using the driver package recommended from the readme and rechecking the Usb setup when my computer died never to turn on again (unrelated but coincidental I’m sure). I did notice issues with Bluetooth not working properly early on and suspected an issue with certain devices pulling power away from the controller when not set up properly but never made the connection at that time that it could be related to the Realtek driver that was installed in the EFI. I have moved away from injection for other reasons and the Bluetooth issue resolved itself but again I had made enough changes that I didn’t make the connection that could have been related to the Realtek kext. While I have no screenshots right now I was able to push about 2.1 amps out of the 3.0 port and I think 1.5 out of the 2.0 port (charging phone) also ran external ssd’s, WiFi in any port, card reader, etc., and had no power indicators in macOS or Bluetooth issues with my setup. With that said let’s see if the kexts are the issue since I won’t be able to test your setup until my computer comes back.

I will update the readme to recommend moving kexts to L/E if injection vs. L/E appears to be the issue. Alternatively if it looks like the kexts themselves are causing macOS to assign improper power I’ll link the alternative driver packages for those that have issues with this.

hatran0884 commented 4 years ago

you seem to be correct about the bluetooth related issue, I have just moved it to L/E, and tried to plug an external HDD into USB3 port, no more error of USB Accessory needs more power, but the HDD didnt show up on the finder even though the it appeared in the USB 3 controller under system report. it seems the Realtek driver has some issue. for your info, the bluetooth connection before moving to L/E behaved pretty strange, I was only able to connect to a Magic Mouse, I could not connect to any other brand bluetooth mouse. sometimes, if I reboot into Windows, the bluetooth gave an error of POWER STATUS FAILURE, if I closed the lid and reopen it, the bluetooth got back to work fine. so now how can I have the hdd appear in the Finder ?

lazd commented 4 years ago

if I reboot into Windows, the bluetooth gave an error of POWER STATUS FAILURE

I noticed a similar issue; when I rebooted into Windows, my Bluetooth device was disabled in the Device Manager. Re-enabling it didn't seem to bring Bluetooth back online, neither did restarting. I had to shut down and start up again to get Bluetooth working in Windows again.

Also, I noticed my WiFi dongle (plugged into the USB 3 port) would start slowing down, with pings starting at around 30ms, then getting up to over 1000ms with several dropped over the course of a minute. In the menu widget, selecting "Turn off USB WiFi" and subsequently "Turn on USB WiFi" resulted in 30ms pings again with the same degradation. It's working fine right now, and I have not been able to reproduce this problem, but I wonder if it's related to the USB power issue...

I did not move my Realtek drivers to L/E yet, I will give that a try, and I will look for errors related to Bluetooth in Windows between reboots and see if closing the lid helps.

hatran0884 commented 4 years ago

if I reboot into Windows, the bluetooth gave an error of POWER STATUS FAILURE

I noticed a similar issue; when I rebooted into Windows, my Bluetooth device was disabled in the Device Manager. Re-enabling it didn't seem to bring Bluetooth back online, neither did restarting. I had to shut down and start up again to get Bluetooth working in Windows again.

Also, I noticed my WiFi dongle (plugged into the USB 3 port) would start slowing down, with pings starting at around 30ms, then getting up to over 1000ms with several dropped over the course of a minute. In the menu widget, selecting "Turn off USB WiFi" and subsequently "Turn on USB WiFi" resulted in 30ms pings again with the same degradation. It's working fine right now, and I have not been able to reproduce this problem, but I wonder if it's related to the USB power issue...

I did not move my Realtek drivers to L/E yet, I will give that a try, and I will look for errors related to Bluetooth in Windows between reboots and see if closing the lid helps.

Moving realtek drivers to L/e didnt help. We need to have a better solution. I found that it seems the usb is not patched properly. It might be the reason why it wakes up by XHCI devices. I have observed the systems woke up when i unplugged a wifi dongle out of usb port.

hatran0884 commented 4 years ago

@lazd I notice you are using the modified BIOS from this repo, could you help to check whether there is an option in the BIOS to disable WAKE ON LAN and WAKE ON USB ? this is because i am having an issue with random instant wake. i have tried a lot of methods: removed Realtek, edited DSDT, replaced kexts,... without help. I suspect it might be the minibook itself causing this issue. Btw, reflashing the modified BIOS caused the windows license to be deleted ? thank you

lazd commented 4 years ago

Hey @hatran0884, here are the USB options: IMG_0668

I checked other sections and found no mention of those options.

I have also seen my machine wake due to USB activity, so there's definitely something going on.

hatran0884 commented 4 years ago

could you trace of what is the cause of instant wakeup? mine is PWRB GLAN XDCI, it is very annoying because my device always wakes up at the mid night by itself, and keep doing the loop until out of battery, so I get up at the morning finding it unable to boot up! I tried to edit DSDT to remove _PRW method for GLAN, XDCI and XHC, but still no luck I really have no idea what else to do now

lazd commented 4 years ago

@hatran0884 it's worth trying the darkwake=0 boot argument. Let us know if that fixes it!

hatran0884 commented 4 years ago

@balopez83 the usb 3 power issue has been resolved by changing SMBIOS from 12inch macbook to macbook air 2018 and re patched the USB ports.