Mieze / IntelMausiEthernet

OS X driver for Intel onboard LAN
400 stars 98 forks source link

IntelMausiEthernet breaks wake on network #31

Closed cattyhouse closed 4 years ago

cattyhouse commented 4 years ago

you may want to test to verify. thanks

nyhtml commented 4 years ago

As a curious Hackintosh user, was this with OpenCore or Clover? And by the way, your issue may be related to Issue #17.

cattyhouse commented 4 years ago

I use OpenCore 0.5.9

cattyhouse commented 4 years ago

In acidanthera’s version 1.0.2 , the wolCapable was also set to false in the code, but wol works when mac is sleeping. I don’t think turning this on will help.

cattyhouse commented 4 years ago

Because of these codes:


    /* Setup power management. */
    if (provider->findPCICapability(kIOPCIPowerManagementCapability, &pmCapOffset)) {
        pmCap = provider->extendedConfigRead16(pmCapOffset + kIOPCIPMCapability);
        DebugLog("Ethernet [IntelMausi]: PCI power management capabilities: 0x%x.\n", pmCap);

        if (pmCap & (kPCIPMCPMESupportFromD3Cold | kPCIPMCPMESupportFromD3Hot)) {
            wolCapable = true;
            DebugLog("Ethernet [IntelMausi]: PME# from D3 (cold/hot) supported.\n");
        }
        pciPMCtrlOffset = pmCapOffset + kIOPCIPMControl;
    } else {
        IOLog("Ethernet [IntelMausi]: PCI power management unsupported.\n");
    }
    provider->enablePCIPowerManagement();
cattyhouse commented 4 years ago

@nyhtml

just tried to set these 2 options to true, and wol works now, thanks for your information.

https://github.com/Mieze/IntelMausiEthernet/blob/b1cafc7e07eeec32ee65eac0c8a01d6c4653cb59/IntelMausiEthernet/IntelMausiEthernet.cpp#L180-L181

then i think in latest commit, something is wrong here :

https://github.com/Mieze/IntelMausiEthernet/blob/b725a08ebc149ae2b4367c3fc700904736368514/IntelMausiEthernet/IntelMausiHardware.cpp#L107-L110

nyhtml commented 4 years ago

@cattyhouse

Cool. 😀 And with OpenCore 0.5.9. 👍

I'm still waiting the rest of my parts to finish my second build to make the switch. Shipping is slower now due to the pandemic so I'm stuck waiting for parts from overseas and glad I didn't pull apart my current Clover system (yet) to upgrade.

Mieze commented 4 years ago

No, there is nothing wrong with the driver and your issue also has nothing to do with the latest commit. WoL support works as specified because it is only enabled when the hardware reports that it supports WoL. Otherwise it will be disabled. In case you've got trouble getting WoL to work, please fix your system to report WoL support properly.

cattyhouse commented 4 years ago

@Mieze Hi, Mieze thanks for your reply, can you take a look at the debug log of version 1.0.3 (wol does not work during sleep) and 1.0.2 (wol works during sleep)? i did some awk to remove the first few columns

102.debug-new.log 103.debug-new.log

the main difference, i think is on 1.0.2, after going to sleep there is

[IntelMausi]: WUFC=0x00000002.

while on 1.0.3, there isn't , according to the source code

#define E1000_WUFC_MAG 0x00000002 /* Magic Packet Wakeup Enable */

this means on 1.0.2, Magic Packet Wakeup Enable was active during sleep.