Contribute
Register

Bluetooth device will not wake Hack

Edhawk

Moderator
Joined
Aug 2, 2013
Messages
2,472
Motherboard
Gigabyte Z97X-UD5H
CPU
i7-4790K
Graphics
HD 4600 / RX 580
Mac
  1. iMac
  2. MacBook Air
  3. MacBook Pro
Mobile Phone
  1. iOS
Joined
May 16, 2021
Messages
9
Motherboard
Gigabyte Z390 AORUS I Pro WiFi
CPU
i7-9700K
Graphics
RX 5700 XT

Edhawk

Moderator
Joined
Aug 2, 2013
Messages
2,472
Motherboard
Gigabyte Z97X-UD5H
CPU
i7-4790K
Graphics
HD 4600 / RX 580
Mac
  1. iMac
  2. MacBook Air
  3. MacBook Pro
Mobile Phone
  1. iOS
Did you read through the other 'Miscellaneous' fixes for Fixing USB Power, Fixing Shutdown/Restart and Fixing Instant Wake. As there are some good pointers on those pages that might when combined help with this issue.
 
Joined
May 16, 2021
Messages
9
Motherboard
Gigabyte Z390 AORUS I Pro WiFi
CPU
i7-9700K
Graphics
RX 5700 XT
Did you read through the other 'Miscellaneous' fixes for Fixing USB Power, Fixing Shutdown/Restart and Fixing Instant Wake. As there are some good pointers on those pages that might when combined help with this issue.

*Edit* No more CPU spikes, fans spinning sporadically were caused by a bad GPU PCI-E cable.

Indeed, I did. I've been trying things all day. Went back to debug version 0.6.8 until all issues are resolved. I see you're a moderator and you've likely accumulated a wealth of experience. Anything else you can think of? I appreciate your help!
 
Last edited:

Edhawk

Moderator
Joined
Aug 2, 2013
Messages
2,472
Motherboard
Gigabyte Z97X-UD5H
CPU
i7-4790K
Graphics
HD 4600 / RX 580
Mac
  1. iMac
  2. MacBook Air
  3. MacBook Pro
Mobile Phone
  1. iOS
I'll admit I have gained a bit of knowledge over the years. But have not had to deal with this issue on any of my hacks.

I use Logitech K270 and MK540 wireless Keyboard/Mouse combo's on most of my systems and don't have any connection or wake issues, other than having to double-tap the mouse or a keyboard key to wake the system.

I have a couple of systems using Apple Magic Mouse/Trackpads and Magic keyboards, which connect via Bluetooth to an Apple Airport/Bluetooth card (BMC3460.... cards mounted on a PCIe adapter not one of the pre-built Fenvi cards). As far as I can remember these also work without any issues on my Hacks and real Mac (iMac 2010).


Previous Fixes:
Do you remove the 'Fixes' you apply to the system, once you figure out they are not going to work? If you don't then they could be complicating the system wake issue.


System-wide Power Settings:
How do you have your System Power set?

I use these Terminal Commands after each major update:

sudo pmset -g

Disable Hibernation
sudo pmset -a hibernatemode 0
sudo rm /var/vm/sleepimage
sudo mkdir /var/vm/sleepimage


Disable other hibernation options
sudo pmset -a standby 0
sudo pmset -a autopoweroff 0
sudo pmset powernap 0
sudo pmset proximitywake 0


This is what my system power settings look like in Terminal:

EdwardsiMac1Cat ~ % sudo pmset -g​
Password:​
System-wide power settings:​
Currently in use:​
standby 0​
Sleep On Power Button 1​
womp 1​
hibernatefile /var/vm/sleepimage​
powernap 0​
networkoversleep 0​
disksleep 10​
standbydelayhigh 86400​
sleep 30 (sleep prevented by sharingd)​
autopoweroffdelay 259200​
hibernatemode 0​
autopoweroff 0​
ttyskeepawake 1​
displaysleep 30​
highstandbythreshold 50​
standbydelaylow 86400​
EdwardsiMac1Cat ~ %​

Not sure if running these commands will help but it won't hurt to try them.

In regards your first post in this thread:

M.2 Socket compatibility:
Just so you know the CNVI connector on your motherboard is not suitable for use with an NVME drive, it may take a M.2 SSD, but the see these extracts from a M.2 guide:

Keys & Sockets:
An M.2 SSD is "keyed" to prevent insertion of a card connector (male) to an incompatible socket (female) on the host. The M.2 specification identifies 12 key IDs on the module card and socket interface but M.2 SSDs typically use three common keys: B, M, and B+M. You may find the key type labeled on or near the edge connector (or gold fingers) of the SSD. Before deploying M.2 SSDs, determine the type of socket on the host and check the module connector keying, as each connector should be inserted only in the appropriate socket.

M.2 SATA SSDs can be B+M-keyed (so they can fit in sockets for B-keyed and M-keyed modules), while M.2 NVMe SSDs for PCIe 3.0 x4 lane are M-keyed.


de140a6027c54081bbf8f2e60c6d6562.jpg

M.2 connectors on the host are called "sockets." Each socket has a unique mechanical key, and modules are not interchangeable between sockets. According to PCI Express M.2 Specifications Rev. 1.1, the sockets are distinguished as follows:
  • Socket 1: Connectivity (CNVI) socket for Wi-Fi®, Bluetooth®, NFC (near-field communication) or Wi-Gig.
  • Socket 2: WWAN/SSD/Other Socket that will support various WWAN+GNSS (global navigation satellite system) solutions, various SSD and SSD Cache configurations, and other yet-undefined solutions. (If the motherboard has a Socket 2 for a WWAN card and it is not in use, the socket may accommodate a B+M-keyed small M.2 SSD. Please refer to your motherboard documentation for details).
  • Socket 3: SSD Drive Socket with SATA or up to four PCIe lanes.
The CNVI connector will be 'Socket 1' and an NVME drive would require a 'Socket 3' connector.
 
Joined
May 16, 2021
Messages
9
Motherboard
Gigabyte Z390 AORUS I Pro WiFi
CPU
i7-9700K
Graphics
RX 5700 XT
Interesting, never thought too much about the sleep settings, themselves. The machine does appear to sleep and wake correctly, and I also have a usb keyboard like yours. That one works with no problem. I believe my issue is that even though this bt/wifi centipede is set to internal (255), it's powering down during sleep. One of the settings you mentioned likely prevents that from powering down. I'll tinker with the settings and report back!

Regarding the M.2 information you shared, really appreciate you taking the time to go into that. I'm sure it will help someone who finds this thread! Here's a photo of my wifi/bluetooth centipede solution. Much time and research went into this. It's a broadcom card, inside of an adapter, inside of an M.2 adapter installed in the rear M.2 slot.

bt_wifi_centipede.jpg


As far as removing the failed attempts from EFI, absolutely! I have a backup USB with a very clean, minimal debug 0.6.8 on it just in case. I'm keeping my original EFI on the desktop, and just replacing that after each failed attempt.

Here are my Sleep Settings and USB Map
Screen Shot 2021-05-18 at 12.42.59 PM.png


I'm not exactly sure what HS13 is. I've removed it before, and everything still works.
Screen Shot 2021-05-18 at 12.43.24 PM.png
 
Last edited:

UtterDisbelief

Moderator
Joined
Feb 13, 2012
Messages
6,781
Motherboard
Gigabyte Z490i Aorus Ultra - OC 0.6.8
CPU
i5-10600K
Graphics
GT 1030
Mac
  1. iMac
  2. Mac mini
Classic Mac
  1. eMac
  2. iBook
Mobile Phone
  1. Android
A PCIe slot has an address that caters for one device.

A wireless/BT card is a composite of two devices, this is why the adapter card we use splits them into PCIe and USB.

An external USB bus BT device is still receiving power while the PC sleeps and so can be used by keyboard or mouse to wake the machine.

The PCIe slot is powered down. Because the wireless/BT card is a composite, how the wireless half is operating affects the BT half too.

Hence why the dongle can wake the PC but the m.2 card setup can't.
 
Last edited:

Edhawk

Moderator
Joined
Aug 2, 2013
Messages
2,472
Motherboard
Gigabyte Z97X-UD5H
CPU
i7-4790K
Graphics
HD 4600 / RX 580
Mac
  1. iMac
  2. MacBook Air
  3. MacBook Pro
Mobile Phone
  1. iOS
This is a screenshot showing the Storage interface information for your motherboard (from the Gigabyte specification page):

Screenshot 2021-05-18 at 20.39.51.png

Item 2 says the connector on the rear of the motherboard is a Socket 3 connector, with support for SATA and PCIe NVME drives, not WiFi/BT cards.
  1. From the picture you attached in Post #26, it appears that you have a 2280 adapter card installed in the rear M.2 connector slot.
  2. You then have a 2242 adapter card installed in the 2280 card, with the Broadcom WiFi/BT card installed in this 2242 adapter.
  3. With a USB cable connection from the 2280 adapter, presumably connected to the motherboard USB 2 header.
I would be surprised if this worked to wake the system from sleep, especially given what UtterDisbelief wrote in the post above about the power behaviour of PCIe slots.

These Socket 3 connectors are different from the Socket 1 (CNVI) connectors in that they don't have a hard wired USB port as part of the setup. The CNVI connector usually has HS14 serving any WiFi/BT cards.

So your proposal to switch to the Intel WiFi/BT card may not be such a bad idea, if the system wake via the keyboard or mouse/trackpad is essential. As your current setup, as clever as it is just won't work as you need it to.
 
Joined
May 16, 2021
Messages
9
Motherboard
Gigabyte Z390 AORUS I Pro WiFi
CPU
i7-9700K
Graphics
RX 5700 XT
Really appreciate you all taking the time to reply. This issue is faced by many on here and this should really help to explain what's going on.

So, the million dollar question, is there a way to keep the PCI slot powered during sleep?

If not, I'll be purchasing a USB bluetooth adapter.
 

Edhawk

Moderator
Joined
Aug 2, 2013
Messages
2,472
Motherboard
Gigabyte Z97X-UD5H
CPU
i7-4790K
Graphics
HD 4600 / RX 580
Mac
  1. iMac
  2. MacBook Air
  3. MacBook Pro
Mobile Phone
  1. iOS
I'm not aware of an SSDT or setting that would enable you to set this PCI slot to be powered during sleep.

If you have retained your Intel WiFi/BT card you might want to give that a chance before spending more money on a USB BT adapter.
 
Top