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
#11
I don't reproduce that issue. With or without name server on the network, Windows boxes find each over. But I only have Windows 10, no 11, can't test exactly like you.
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
#12
Did rebuilding your servers and clients help with this?
I'm looking for a sign that the fix works and that a backport would provide a benefit in a future 21.1.
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
#13
@CrystalP - Funny that you ask that...  I was planning to test that today.

I have already verified that the media server will sleep and wake properly via magic packet using a third-party program (https://www.depicus.com/wake-on-lan/wake-on-lan-gui) by sending that command from my laptop.  (Both running Win11)

The next test was to see if I could wake the media server by selecting "try to wakeup remote servers on access" in my KODI install on a Beelink Mini S12 Pro.

HOWEVER...  I ask for clarification:

As I fell back to 21.0 GA release (due to the playing AVI issue), have you added that WOL fix into that GA version?   Or are you asking me to test the WOL on that version just to see if my re-build may have somehow fixed the issue as it may not been KODI related?

---------------------------------------------------------------- I

Updated results:

OK, in short, the rebuild of my Win11 media server and reload of 21.0 on the endpoint did not resolve the WOL issue.  

When I selected "Try to wake up remote servers on access" I received these two error messages:
"Mac discovery Failed for ZebServ"
"Mac Discovery Failed for 192.168.15.14"

As I have just spent the last week rebuilding this (as I wiped all data and created a larger NAS RAID 0 Drive which took a long time to remirror data), I am hesitant in trying a development build (due to the avi files not playing issue)...

BUT...   I will if you specifically tell me which build you would want me to test.

Let me know.
Reply
#14
The fix is only in v22 at this time and has been there for a while, so a recent nightly will do.

Your previous test with v22 nightly was successful with IP address but not with server name and I wasn't able to reproduce that. Maybe the rebuild took care of things on your end.

The AVI problem is a bit mysterious at this point, though another user reported something similar, which came and went away in the v22 nightlies it seems.
https://forum.kodi.tv/showthread.php?tid=378041

You don't have to stay on v22 after the test. There is minimal impact on the server, there will be a video database migration, which can be deleted afterwards, and you can use a portable v22 install to minimize the impact on your clean boxes and easily remove.
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
#15
OK, will go with  July 7th nightly  KodiSetup-20240705-d212b0a6-master-x64.exe

I will keep my roaming/kodi files there so it can run in the environment that I would expect it to...  but I've made a backup of my roaming/kodi folder, just to be sure.   I'll do a windows uninstall of Kodi, and then reinstall.

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

Results:

I'm sorry to say that it is still having a problem with the SMB server name. 

Build 22.0-Alpha1 (21.90.700) Git:20240705-d212b0a657,  Win11 23H

"Mac Discovery Found 192.168.15.14"
"MAC Discovery Failed for ZebServ"

Information for 192.168.15.14 is written into the wakeonlan.xml  

Log file:  https://paste.kodi.tv/vazaquzupa.kodi

2024-07-07 13:14:28.566 T:9716 info <general>: WakeOnAccess - Enabled:TRUE
2024-07-07 13:14:28.570 T:9664 info <general>: CWakeOnAccess::SaveMACDiscoveryResult - Mac discovered for host '192.168.15.14' -> '50:E5:49:40:DF:6D'
2024-07-07 13:14:28.570 T:9664 info <general>: CWakeOnAccess::SaveMACDiscoveryResult - Create new entry for host '192.168.15.14'
2024-07-07 13:14:28.607 T:9716 debug <general>: ------ Window Init (DialogNotification.xml) ------
2024-07-07 13:14:28.680 T:9636 error <general>: CMACDiscoveryJob::DoWork - can't determine ip of 'ZebServ' 2
024-07-07 13:14:28.680 T:9636 error <general>: CWakeOnAccess::OnJobComplete - Mac discovery failed for host 'ZebServ'


(note:  I did not check if it would actually wake the server, due to the error message.  That was the test.)


Just a wild guess:  Could it be this?  https://www.xda-developers.com/microsoft...indows-11/ 


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

On a more positive note, the AVI file played successfully in 22.0 A1...  so there's that.

Falling back to v21.0 GA
Reply

Logout Mark Read Team Forum Stats Members Help
V21 Kodi / Windows 11 NAS - KODI Wake On Lan MAC discovery issue0
This forum uses Lukasz Tkacz MyBB addons.