Bug V21 Kodi / Windows 11 NAS - KODI Wake On Lan MAC discovery issue
#1
To see the details of what I think the bug is, please go down to post #3

----------------------------------------------------------------

Hi folks,

tl/dr:  error -->  MAC Address Discover Failed

Details:  Just upgraded my Win10 home server / NAS to Win 11.  After successfully migrating all functions as expected, I seem to have discovered a Kodi Wake On Lan issue in my KODI v21 installation.

Problem is that when in KODI I select Wake On Lan "on", I get a "MAC Address Discover Failed" message.

a) Yes, it did work before the Win11 upgrade.  Same computer woke fine before.
b) Yes, Kodi recognizes both the SMB server name and the fixed IP address.  Just doesn't seem to get the MAC.

Please see the attached log file.  Start looking at line 1631:  https://paste.kodi.tv/etifafijex

Edit:  Here's the kicker -- looking at my wakeonlan.xml I see that the MAC address is the correct one already.  
This is verified by opening a command prompt on my NAS box and executing ipconfig /all, and then comparing the MAC results there with the one in the wakeonlan.xml.

That wakeonlan.xml was copied over from a different device (copied the entire contents of Roaming/Kodi before loading KODI v21), so it "should" work.  But doesn't.

Also:  My initial problem was looking on my Kodi client running on a small Beelink box running win11.  I also just checked a Microsoft surface 3 Kodi client (also running win11).  That also has a MAC discovery failure if I attempt to turn Wake On Lan On.
Reply
#2
Update:  Often, especially when doing upgrades and changes, a recommendation would be:  get rid of the old, and try a fresh install, because there may be some old "stuff" causing a problem.

SO:  Tried that, kept it as simple as possible (copying only a few xml files that point to where my NAS source files are located).  AND....  same results:   MAC Address Discover failed.

Since they are EAXCTLY the same results as my first port, please do refer the log there.
Reply
#3
I think I may have found a bug with Kodi v21 and Windows 11.

The issue:  If I try to set up WOL in KODI, the discovery fails ("MAC Discovery Failed for (machine name)" and "MAC Discovery Failed for (IP Address)")

Why I believe it is a KODI issue:

STEP 1: Upgraded homemade Win10 NAS to Win11  (my NAS: just a bunch of huge disks, shared).  Saw that KODI client WOL failed.  (examples:  Movie stops mid-play, Music would not go to the next song).  Had to go to the headless box and swipe across the keyboard touchpad to wake.  

Attempted to make sure that the KODI WOL feature was "on" in the client, and in doing so found the "MAC Discovery Failed" issue.

STEP 2:   Verified that my NAS box BIOS setting was set for ACPI S3 (this setting was unchanged from when it was running Win10).  Also made sure that in my NIC driver properties, under the "Power Management" tab, that both "Allow this device to wake the computer" and "Only allow a magic packet to wake the computer" were selected.

STEP 3:  On the Win11 box / homemade NAS (w/ Realtek RTL8111E chip providing ethernet, "Realtek PCIE GbE Family Controller") I have tried to replace the default Microsoft Win11 provided driver with the Realtek provided driver.  Behavior remains the same.  (I tested both the "power saving" and "no power saving versions" from https://www.realtek.com/Download/List?cate_id=584 ).  

Result of replacing and testing various drivers on NAS:  KODI client still had "MAC Discovery Failed" issue.   ALSO, I was able to replicate this error message behavior on several KODI client devices.

STEP 4:  Ensured I did a complete deinstallation of all Realtek drivers on NAS box, rebooted and allowed Win11 to reinstall default NIC driver.  

Result - Not surprisingly still a "MAC Discovery Failed" issue.

Step 5:  From a same client device that had a "MAC Discovery Failed" issue in KODI, I downloaded and loaded my favorite WOL tool ("wakeonlangui.exe" from depicus.com).  Manually entered MAC address and IP address.  Manually put the NAS box in sleep mode, and then ran the Depicus WOL GUI executable from the client. 

Result - Et voila, the NAS box wakes as expected.  As a result, this is NOT a WOL failure of the NAS box or of Win11.

Step 6:  WORKAROUND ATTEMPT #1 - I download the Advanced WOL add-on for KODI from https://repo.kodinerds.net/ , load the add-on zip and manually entered my IP and MAC address, and then select it to wake my NAS on KODI start, it successfully wakes my NAS.   (edit:  sadly, not every time.  hit-and-miss. )

Of course, this is really strange behavior as the Adv WOL client relies on the same WOL functionality that KODI provides...  so, it appears (and that is a big assumption) that the inherent KODI WOL feature DOES work...  but that the discovery function of KODI's v21 implementation is borked.  (no MAC found, no wakie.)

Step 7:  WORKAROUND ATTEMPT #2 - Just turn sleep off on my NAS until a resolution is found.  (drawback: uses more energy)

----

SUMMARY: 

a) I have eliminated the possibility of failure of WOL on the NAS box.  The Win11 WOL feature works as expected.
b) On Win11 w/ KODI v21, WOL discovery consistently fails.
c) This can be consistently replicated. 
d) The log file in the first post applies to this issue.

If I am wrong, please feel free to tell me.  If I'm right, please suggest next steps.
Reply
#4
Hi folks!

As no one has stepped up in the usual lightning fast KODI Forum solution... I must venture to say that I have found a real bug.

So, this issue has now been reported on Github:  Wake On Lan - MAC discovery problem with KODI running in Windows 11 with Kodi v21 · Issue #25058 · xbmc/xbmc (github.com)

https://github.com/xbmc/xbmc/issues/25058
Reply
#5
Additional info:

On a Win10 v21 KODI client running on the same LAN, I attempted to set system/power savings/wake-on-lan/on.

It also could not get the MAC address of the Win11 NIC of my JBOD NAS

So, the Challange of setting up wake-on-lan in v21 is not limited to just Win11, but has problems in both the Win11 and Win10 clients.


I think that the challenge may be that POSSIBLY  Win11 has changed how it handles requests for MAC addresses. 

Just a wild-assed guess, but if Win11 decided to make that somehow more secure, it could be that the KODI request for the MAC address info just doesn't pass the security requirements of Win11.


Probably thinks that KODI is attempting to hack the computer.
Reply
#6
Do you have IPv6 enabled on either boxes?

edit: nevermind, it's much easier, an API call has been broken for years. Fix submitted for review https://github.com/xbmc/xbmc/pull/25111.
Always read the Kodi online-manual, the FAQ and search the forum before posting.
Do not e-mail Kodi Team members directly asking for support. Read/follow the forum rules (wiki).
For troubleshooting and bug reporting please make sure you read this first.
Reply
#7
Hi @CrystalP 

I saw the updated code.  I'm glad I had a small part in bringing it to the development community's attention.

QUESTION:  Is the change now in the v22 nightly code?  V21 nightly code?  Which do you suggest?

Thanks, and I look forward to your reply.

--------------------

edit:  Not in v21 May 4th nightly.  Mac still not found in that.
Reply
#8
Yes it's in the v22 nightlies. Confirmation of the fix would be good, then I could start a backport to v21.
Always read the Kodi online-manual, the FAQ and search the forum before posting.
Do not e-mail Kodi Team members directly asking for support. Read/follow the forum rules (wiki).
For troubleshooting and bug reporting please make sure you read this first.
Reply
#9
Cool.  I'll try it shortly.
Reply
#10
Here are the results of my v22 mac discovery test:   It WORKED and woke the server...  but it didn't exactly work as expected.  

WHY:  Apparently, I must have my NAS defined by both IP address in some places and SMB server name in another.

When selecting wake:

* When it looked for "192.168.15.14", KODI now found the MAC address.

* However, when it looked for "zebraitisserv2", the mac discovery failed.

So:   IP address works...  Samba name does not.
Reply

Logout Mark Read Team Forum Stats Members Help
V21 Kodi / Windows 11 NAS - KODI Wake On Lan MAC discovery issue0