Kodi Community Forum
Automatic WakeOnLan upon accessing MySql or FileShares - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: OS independent / Other (https://forum.kodi.tv/forumdisplay.php?fid=228)
+---- Thread: Automatic WakeOnLan upon accessing MySql or FileShares (/showthread.php?tid=124340)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38


RE: Automatic WakeOnLan upon accessing MySql or FileShares - bilbonvidia - 2012-10-25

(2012-10-25, 09:12)t4_ravenbird Wrote: @bilbonvidia, @kricker, @anybody ..

Here is the latest patch-file as I have it after our changes. There is a different approach to solve the chrash on linux so if you could check it out it would be great
http://www64.zippyshare.com/v/86662060/file.html

Code:
AR      xbmc/cores/paplayer/paplayer.a
LD      xbmc.bin
xbmc/settings/settings.a(GUIWindowSettingsCategory.o): In function `CGUIWindowSe                                                                                                 ttingsCategory::OnSettingChanged(CBaseSettingControl*)':
/home/billy/attempt2/xbmc/settings/GUIWindowSettingsCategory.cpp:1998: undefined                                                                                                  reference to `CWakeOnAccess::Get()'
/home/billy/attempt2/xbmc/settings/GUIWindowSettingsCategory.cpp:2000: undefined                                                                                                  reference to `CWakeOnAccess::QueueMACDiscoveryForAllRemotes()'
xbmc/settings/settings.a(Settings.o): In function `CSettings::UpdateShare(CStdSt                                                                                                 r<char> const&, CStdStr<char>, CMediaSource const&)':
/home/billy/attempt2/xbmc/settings/Settings.cpp:1231: undefined reference to `CW                                                                                                 akeOnAccess::Get()'
/home/billy/attempt2/xbmc/settings/Settings.cpp:1231: undefined reference to `CW                                                                                                 akeOnAccess::QueueMACDiscoveryForShare(CMediaSource const&)'
xbmc/settings/settings.a(Settings.o): In function `CSettings::AddShare(CStdStr<c                                                                                                 har> const&, CMediaSource const&)':
/home/billy/attempt2/xbmc/settings/Settings.cpp:1324: undefined reference to `CW                                                                                                 akeOnAccess::Get()'
/home/billy/attempt2/xbmc/settings/Settings.cpp:1324: undefined reference to `CW                                                                                                 akeOnAccess::QueueMACDiscoveryForShare(CMediaSource const&)'
xbmc/settings/settings.a(Settings.o): In function `CSettings::Load()':
/home/billy/attempt2/xbmc/settings/Settings.cpp:183: undefined reference to `CWa                                                                                                 keOnAccess::Get()'
/home/billy/attempt2/xbmc/settings/Settings.cpp:183: undefined reference to `CWa                                                                                                 keOnAccess::LoadFromXML()'
xbmc/dbwrappers/dbwrappers.a(mysqldataset.o): In function `dbiplus::MysqlDatabas                                                                                                 e::connect(bool)':
/home/billy/attempt2/xbmc/dbwrappers/mysqldataset.cpp:123: undefined reference t                                                                                                 o `CWakeOnAccess::Get()'
/home/billy/attempt2/xbmc/dbwrappers/mysqldataset.cpp:123: undefined reference t                                                                                                 o `CWakeOnAccess::WakeUpHost(CStdStr<char> const&, std::basic_string<char, std::                                                                                                 char_traits<char>, std::allocator<char> > const&)'
xbmc/filesystem/filesystem.a(DirectoryFactory.o): In function `XFILE::CDirectory                                                                                                 Factory::Create(CStdStr<char> const&)':
/home/billy/attempt2/xbmc/filesystem/DirectoryFactory.cpp:127: undefined referen                                                                                                 ce to `CWakeOnAccess::Get()'
/home/billy/attempt2/xbmc/filesystem/DirectoryFactory.cpp:127: undefined referen                                                                                                 ce to `CWakeOnAccess::WakeUpHost(CURL const&)'
xbmc/filesystem/filesystem.a(FileFactory.o): In function `XFILE::CFileFactory::C                                                                                                 reateLoader(CURL const&)':
/home/billy/attempt2/xbmc/filesystem/FileFactory.cpp:117: undefined reference to                                                                                                  `CWakeOnAccess::Get()'
/home/billy/attempt2/xbmc/filesystem/FileFactory.cpp:117: undefined reference to                                                                                                  `CWakeOnAccess::WakeUpHost(CURL const&)'
collect2: ld returned 1 exit status
make: *** [xbmc.bin] Error 1
billy@htpc:~/attempt2$

I recloned the whole thing from scratch, I presume this was the right thing to to?


RE: Automatic WakeOnLan upon accessing MySql or FileShares - t4_ravenbird - 2012-10-25

(2012-10-25, 18:18)bilbonvidia Wrote: I recloned the whole thing from scratch, I presume this was the right thing to to?

Yes, except you need to make the modification in the "makefile" manually again (That is still not incuded in my patch, sorry)
And a little warning ; some of the fixes for the issues we had are not identical to what we did last, so there might be issues again.. but we will sort it out


RE: Automatic WakeOnLan upon accessing MySql or FileShares - kricker - 2012-10-25

I'm going to try to make a new windows build now.


RE: Automatic WakeOnLan upon accessing MySql or FileShares - kricker - 2012-10-25

New Windows build:
XBMCSetup-20121025-93b9549-WOA



RE: Automatic WakeOnLan upon accessing MySql or FileShares - bilbonvidia - 2012-10-27

waking server on resume from suspend does not appear to be working, does not wake up but in log:

11:44:30 T:3007063872 INFO: LIRC Initialize: sucessfully started
11:44:30 T:3007063872 NOTICE: OnWake: Restarting lcd
11:44:30 T:3007063872 NOTICE: UpdateLibraries - Starting video library startup scan
11:44:30 T:3007063872 DEBUG: WakeOnAccess [192.168.0.2] trigged by accessing : MySQL : MyVideos69
11:44:30 T:3007063872 DEBUG: GetFirstConnectedInterface no connected interface found - requery list
11:44:30 T:3007063872 DEBUG: DialogProgress::StartModal called
11:44:30 T:3007063872 DEBUG: ------ Window Init (DialogProgress.xml) ------
11:44:30 T:3007063872 INFO: Loading skin file: DialogProgress.xml, load type: KEEP_IN_MEMORY
11:44:32 T:3007063872 DEBUG: Load DialogProgress.xml: 2134.66ms
.
The screen goes black with an x in the middle the reappears with the progress bar


RE: Automatic WakeOnLan upon accessing MySql or FileShares - kricker - 2012-10-27

It says WakeOnAccess triggered, but shouldn't we see the actual WOL command sent from XBMC as well?


RE: Automatic WakeOnLan upon accessing MySql or FileShares - t4_ravenbird - 2012-10-27

(2012-10-27, 12:55)bilbonvidia Wrote: waking server on resume from suspend does not appear to be working, does not wake up but in log:

11:44:30 T:3007063872 INFO: LIRC Initialize: sucessfully started
11:44:30 T:3007063872 NOTICE: OnWake: Restarting lcd
11:44:30 T:3007063872 NOTICE: UpdateLibraries - Starting video library startup scan
11:44:30 T:3007063872 DEBUG: WakeOnAccess [192.168.0.2] trigged by accessing : MySQL : MyVideos69
11:44:30 T:3007063872 DEBUG: GetFirstConnectedInterface no connected interface found - requery list
11:44:30 T:3007063872 DEBUG: DialogProgress::StartModal called
11:44:30 T:3007063872 DEBUG: ------ Window Init (DialogProgress.xml) ------
11:44:30 T:3007063872 INFO: Loading skin file: DialogProgress.xml, load type: KEEP_IN_MEMORY
11:44:32 T:3007063872 DEBUG: Load DialogProgress.xml: 2134.66ms
.
The screen goes black with an x in the middle the reappears with the progress bar

Was this with a new build from my patch-file? Is this a different behavior than the previous build? Is it repeatable?

Could you supply more from the log.. I think there must be more happening later...
what seems to happen is ;
- wake on access kicks in..
- network is not connected
- wake wants to display the progress dialog
- for some reason, progress dialog is unloaded and must be loaded .. this takes 2,1 seconds (!)
.. and then the log ends so we dont know what more happens



RE: Automatic WakeOnLan upon accessing MySql or FileShares - bilbonvidia - 2012-10-27

yes new build

http://pastebin.com/6DVn1PBu

See more log above, I took the kids swimming around tweleve and on return around three woke xbmc again but it did not wake anything. Once it is up an running I see the intermittent progress bar as expected.


RE: Automatic WakeOnLan upon accessing MySql or FileShares - t4_ravenbird - 2012-10-27

WakeOnAccess kicks in and first thing it does is to wait for network to initialize while displaying the progress dialog until timeout OR dialog is cancelled, in which case the wakeup will be skipped and control returns to whatever kicked the wakeup (mysql in this case)

There seems to be some strange behavior with the progress dialog here that I know too little about .. from the log it seems the dialog is not pre-loaded and must be loaded - strange, but OK (it takes 2 seconds++ to load, is that normal?).
Then there is the error at 11:44:33 CheckDisplayEvents .. dont know what it is but it looks bad, it comes from WinSystemX11.cpp here ;
Code:
void CWinSystemX11::CheckDisplayEvents()
{
#if defined(HAS_XRANDR)
  bool bGotEvent(false);
  bool bTimeout(false);
  XEvent Event;
  while (XCheckTypedEvent(m_dpy, m_RREventBase + RRScreenChangeNotify, &Event))
  {
    if (Event.type == m_RREventBase + RRScreenChangeNotify)
    {
      CLog::Log(LOGDEBUG, "%s: Received RandR event %i", __FUNCTION__, Event.type);
      bGotEvent = true;
    }
    XRRUpdateConfiguration(&Event);
  }

  // check fail safe timer
  if (m_dpyLostTime && CurrentHostCounter() - m_dpyLostTime > (uint64_t)3 * CurrentHostFrequency())
  {
    CLog::Log(LOGERROR, "%s - no display event after 3 seconds", __FUNCTION__);
    bTimeout = true;
  }
...

It looks to me like the progress-dialog returns "cancelled" (as if the user hit "cancel" -button) and then the wakeonAccess indeed cancels ..
It almost looks like the progress-dialog gives up because the underlying display-system fails to get ready in time.. at this time I need help from someone who knows the architecture of xbmc in order to find out how to deal with this.
It may be somehow provoked by the WakeOnAccess function, but I dont know
(Also I dont understand how this would happen now and not in the previous build you made - as far as I can see everything up to this point should have been equal)



RE: Automatic WakeOnLan upon accessing MySql or FileShares - bilbonvidia - 2012-10-27

I rebuilt the old version to check and it is doing the same thing. I think I had accidentally forgot to disable my wakeonlan script again when I tested previously and hence though it was working. Sorry.


RE: Automatic WakeOnLan upon accessing MySql or FileShares - t4_ravenbird - 2012-10-28

If you want to test by increasing the timeout (3 seconds) before the X11-window-system fails, then goto :
WinSystemX11.cpp : line 494 and change the number '3' in the section ..(uint64_t)3 .. to something higher .. (that might 'fix' the problem)


RE: Automatic WakeOnLan upon accessing MySql or FileShares - t4_ravenbird - 2012-10-28

Other posts mentioning the 'CheckDisplayEvents' log-message ..

This could indicate a low-end cpu/gpu may be the root of this issue? ;
http://forum.xbmc.org/showthread.php?tid=141338&highlight=CheckDisplayEvents

Avoid Ubuntu 12.04 ?
http://forum.xbmc.org/showthread.php?tid=129582&pid=1088098&highlight=CheckDisplayEvents#pid1088098 <- see post #15 !

and these ..
http://forum.xbmc.org/showthread.php?tid=129625&highlight=CheckDisplayEvents
http://forum.xbmc.org/showthread.php?tid=130485&highlight=CheckDisplayEvents



RE: Automatic WakeOnLan upon accessing MySql or FileShares - bilbonvidia - 2012-10-28

Ok, I I have a GT430 and pentium e5200 2 gigs ram. I think most likely a 12.04 issue then? Maybe I'll wait for some upgrades to come down and try again rather than rollback, but I have to admit I always dread an ubuntu update as something always breaks, usually it is the sound. :-\

There must be someone else following this thread on xbmcbuntu who has applied this patch who can input?




RE: Automatic WakeOnLan upon accessing MySql or FileShares - sw4y - 2012-10-28

Just wanted to let you know, that the latest Windows Build works like a charm!
Even if the server goes to sleep, when there are no actions on the xbmc client, it wakes up immediately with no errors.

Maybe it's nothing special, but I just wanted to say thank you t4 & kricker for the work you did and the time you spent the last weeks!



RE: Automatic WakeOnLan upon accessing MySql or FileShares - t4_ravenbird - 2012-10-28

(2012-10-28, 12:28)bilbonvidia Wrote: ..
There must be someone else following this thread on xbmcbuntu who has applied this patch who can input?
Maybe you could share your build for others to try?

(2012-10-28, 13:57)sw4y Wrote: Just wanted to let you know, that the latest Windows Build works like a charm!
..
Thanks, of course it is essential to get actual usability feedback!