Mieze / LucyRTL8125Ethernet

macOS driver for Realtek RTL8125
237 stars 29 forks source link

There is no documentation or instructions on how to activate WOL #17

Open deilsoncso opened 10 months ago

deilsoncso commented 10 months ago

Although Kext can support WOL, its line is not enabled by default, see below:

wolCapable = false; wolActive = false;

Is there any syntax that I can add to bootarg to activate these two options or would I have to compile kext with these two options to "true"? Would you be able to compile one that has this function activated or is it possible to pass a parameter in the bootarg that can activate it?

I don't know that much about Mac to be able to compile a kext

Mieze commented 10 months ago

There is no need to add any code because the driver reads configuration data from the EEPROM and checks the hardware configuration to verify that WoL is supported by the machine. If these checks succeed, WoL support is enabled automatically. Please keep in mind that the driver's responsibility is to program the hardware to generated a wakeup event on reception of magic packet but the event is handled by the BIOS / UEFI and the OS. Therefore your machine also needs proper ACPI data for WoL to work as expected.

MatteoPironi commented 1 month ago

Hi man,

There is no need to add any code because the driver reads configuration data from the EEPROM and checks the hardware configuration to verify that WoL is supported by the machine. If these checks succeed, WoL support is enabled automatically. Please keep in mind that the driver's responsibility is to program the hardware to generated a wakeup event on reception of magic packet but the event is handled by the BIOS / UEFI and the OS. Therefore your machine also needs proper ACPI data for WoL to work as expected.

Hi man, i have tried your kext and work superb even with last Sonoma 14.5 I have a question, WOL works fine if i go to sleep mode, the pc just wake up correctly, but if i shutdown the pc WOL doesn't work, the PCIe Ethernet adapter just turn off completely (as opposed to when i shutdown from Windows)

I've read somewhere that force enable wolCapable and wolActive and recompile kext CAN solve this issue (this helped me previously with IntelMausi kext), but i've tried to edit and build the kext from xCode but it throws me a bunch of errors (no problem with compiling other kexts)

Can you help me to build the kext or if you have already compiled one can just send it to me?

I'm trying with last beta version ofc.

Thanks for all 👍

MatteoPironi commented 1 month ago

Nevermind, i've tried to use VM with Monterey and Xcode 13 and compiled just fine

Unfortunately this doesn't fix the issue on shutdown 😪

MatteoPironi commented 1 month ago

Screenshot 2024-06-22 alle 17 21 29

Ok seems that the problem is gone using detachInterface(netif) instead disable(netif) in the shutdown function.

The only issue that persist is that when i go to sleep mode for first time WOL work fine, if then i go again in sleep mode WOL stop to work. Investigating 👍