OpenIntelWireless / IntelBluetoothFirmware

Intel Bluetooth Kernel Extensions for macOS
https://OpenIntelWireless.github.io/IntelBluetoothFirmware
GNU General Public License v3.0
2.44k stars 260 forks source link

Sleep / instant wake when using Bluetooth kexts #477

Closed perez987 closed 7 months ago

perez987 commented 7 months ago

Have you read the docs?

Yes

macOS Version

macOS 13.6.4. 13.6.5, 14.3, 14.4 beta and 14.4 final

Kext Version

v2.4.0

Wireless Adapter Model and USB Product ID

AX210NGW

Description

Good afternoon. When I enable Bluetooth using IntelBluetoothFirmware.kext, IntelBTPatcher.kext and BlueToolFixup.kext all works fine on the Bluetooth side but I lose sleep. I get a typical sleep/instant wake behaviour. The system goes to sleep but wakes up almost instantly.

The sleep/instant wake process looks like this on Console:

Time: 18:37:48 
Process: powerd
Subsystem: com.apple.sleepwake.type

com.apple.message.domain: com.apple.sleepwake.type
com.apple.message.signature: Normal Sleep
com.apple.message.signature2: Software Sleep
com.apple.message.signature3: UserActivity Assertion
com.apple.message.signature4: UserActivity Assertion
com.apple.message.result: pass
com.apple.message.summarize: YES
SenderMachUUID: 8FBF43AE-6EC8-3B33-B9E5-ED2D64575A21

Time: 18:37:48 
Process: powerd
Subsystem: com.apple.sleepwake.type

com.apple.message.domain: com.apple.sleepwake.waketime
com.apple.message.waketime: 1459.902939
com.apple.message.waketype: Dark Wake from Normal Sleep
SenderMachUUID: 8FBF43AE-6EC8-3B33-B9E5-ED2D64575A21

Time: 18:37:48  
Process: powerd
Subsystem: com.apple.sleepwake.type

com.apple.message.domain: com.apple.sleepwake.type
com.apple.message.signature: Normal Sleep
com.apple.message.signature2: Software Sleep
com.apple.message.signature3: UserActivity Assertion
com.apple.message.signature4: UserActivity Assertion
com.apple.message.result: pass
com.apple.message.summarize: YES
SenderMachUUID: 8FBF43AE-6EC8-3B33-B9E5-ED2D64575A21

Time: 18:37:48 
Process: powerd
Subsystem: com.apple.sleepwake.type

com.apple.message.domain: com.apple.sleepwake.waketime
com.apple.message.waketime: 480.621979
com.apple.message.waketype: Full Wake from Dark Wake
SenderMachUUID: 8FBF43AE-6EC8-3B33-B9E5-ED2D64575A21

Disabling Bluetooth prior to go to sleep doesn't fix the issue.

Of course, adding SSDT-GPRW to ACPI folder and Change GPRW to XPRW, needs SSDT-GPRW.aml to ACPI/Patch sleep comes back. The system goes to sleep as expected but only wakes up from power button. Ability to wake up by pressing mouse or keyboard button is lost.

Tell me if you need any extra info to help.


SSDT-GPRW

DefinitionBlock ("", "SSDT", 2, "DRTNIA", "GPRW", 0x00000000)
{
    External (XPRW, MethodObj)    // 2 Arguments

    Method (GPRW, 2, NotSerialized)
    {
        If (_OSI ("Darwin"))
        {
            If ((0x6D == Arg0))
            {
                Return (Package (0x02)
                {
                    0x6D, 
                    Zero
                })
            }

            If ((0x0D == Arg0))
            {
                Return (Package (0x02)
                {
                    0x0D, 
                    Zero
                })
            }
        }

        Return (XPRW (Arg0, Arg1))
    }
}

Change GPRW to XPRW patch

    <key>ACPI</key>
    <dict>
        <key>Patch</key>        <array>
            <dict>
                <key>Base</key>
                <string></string>
                <key>BaseSkip</key>
                <integer>0</integer>
                <key>Comment</key>
                <string>Change GPRW to XPRW, needs SSDT-GPRW.aml</string>
                <key>Count</key>
                <integer>0</integer>
                <key>Enabled</key>
                <true/>
                <key>Find</key>
                <data>R1BSVwI=</data>
                <key>Limit</key>
                <integer>0</integer>
                <key>Mask</key>
                <data></data>
                <key>OemTableId</key>
                <data></data>
                <key>Replace</key>
                <data>WFBSVwI=</data>
                <key>ReplaceMask</key>
                <data></data>
                <key>Skip</key>
                <integer>0</integer>
                <key>TableLength</key>
                <integer>0</integer>
                <key>TableSignature</key>
                <data></data>
            </dict>
        </array>
    </dict>

System report.txt

Info in System Report - Bluetooth

Attached (hangs at submit the issue)

Relevant log output

[    2.820070]: IOUSBHostDevice@14820000: IOUSBHostDevice::setConfigurationGated: IntelBluetoothFirmware selected configuration 1

Kernel Panic Logs

No response

zxystd commented 7 months ago

Sorry can't help on Hackintosh issues. The kexts are working fine as expected, and confirms not influence sleep/wake. Please make sure you are using the latest alpha version of AirportItlwm.