Kodi Community Forum

Full Version: XBMC Freezing after resume
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I have an acer revo running the latest build of xbmc. It accesses the files from a nas device.

If I start the revo from complete off then it boots up xmbc and everything works fine.

However if I suspend the revo then resume it intermittently (although regularly) freezes.

I have noticed that it freezes when it tries to rescan the library (at which point it stays on 0% forever) and then I try to play a film.

It also sometimes comes up with an message asking me if I want to delete the film from the library (although this is less common).

I can not work out if it is my nas or xbmc which is the issue or even both. However once it has frozen if I restart the revo the library update box says "Preparing 0%" and stays like that. Then if I try to play a film xbmc freezes again. If I then restart the Nas xbmc remains frozen so to rectify the issue I have to restart both the nas and the revo.

This has only started happening since I upgraded to frodo.

The log is at http://xmbclogs.com/show.php?id=76758

This log shows the events after a resume and then trying to play a film while the scanning library message showed 0%
Clearly networking service is not resuming gracefully, try to make a script to kill and restart networking and this will probably be fixed. Search in the inter-webs and you shall find.
(2013-10-29, 18:06)uNiversal Wrote: [ -> ]Clearly networking service is not resuming gracefully, try to make a script to kill and restart networking and this will probably be fixed. Search in the inter-webs and you shall find.

Just out of interest, which item in the log shows that the network service is not restarting?
(2013-10-29, 18:06)uNiversal Wrote: [ -> ]Clearly networking service is not resuming gracefully, try to make a script to kill and restart networking and this will probably be fixed. Search in the inter-webs and you shall find.

I have tried a few scripts but non have worked.

I have one slight issue with this theory though. When I resume the machine it sits with the message preparing 0% permanently. If I restart the machine (which should surely restart the network service) then it still sits there with preparing 0%. If however I turn the machine off then restart my nas and then turn the machine back on again, everything is back to normal again.
Clearly networking issues, its not the first time I read similar things. So it is networking related, I in addition would disable updating library on start-up as well, if the network isn't up immediately it will do exactly what you say and hang at 0% preparing. As for the NAS power cycling resolves it then it clearly is Networking related though you need to look at hdd spindown and does it also respond to other machines to trigger wake ups.
Ok I have disconnected my nas and am now using a weston digital mybook live. I no longer seem to get xbmc freezing on updating the library, however after a resume it still will not play movies and tells me that it can't find them. If I browse to the film on my smart tv it plays it fine. What is odd is that after a resume, anywhere between 1 and 2 mins it seems to crash and displays the splash screen (the one that says frodo). It then reloads and I can then play movies as normal (when it did this connected to the nas it would hang updating the library until both xbmc and the nas were rebooted). This leads me to think that xbmc was locking up the nas connection somehow and the mybook live does not seem to be affected so much. Why on earth is xbmc rebooting though? Note that I have only experienced any of these issues since upgrading to frodo, it has worked perfectly fine for years before this on various different xbmc versions.
Yes like I said its the networking service, when XBMC crashes it essentially reloads XBMC and perhaps kicking the network service which was probably not ready when XBMC was ready, i.e. XBMC starts faster then Network is available on resume.

The solution seems simple, add a delay to XBMC startup on resume/thaw, this is all over the interwebs.

Ive repeated myself often enough and Im sure if we look at dmesg and other system logs we will find exactly that,...

Please stop trying to compare what worked for years before, this is not going to help any as things change, xbmc changed and likely other updates to system also cause this.
Right, I have added the following script

#!/bin/bash
case "$1" in
hibernate)
;;
suspend)
;;
thaw)
sleep 5
;;
resume)
sleep 5
;;
*)
;;
esac
exit $?

to /etc/pm/sleep.d/00resume

and then ran sudo chmod a+x /etc/pm/sleep.d/00resume

This does not seem to have had any effect. Do I need to do anything else?
I have added the following line into the suspend case of the /etc/pm/sleep.d/00resume file

NFSConnection:Big GrineInit()

this appeared to fix the issue. However on closer inspection I realised that my machine never actually suspends anymore. when I press power off on the remote the screen flickers but stays on, this suggests to me that adding that line interferes with the suspend process and actually causes it to fail, leaving the machine on as normal.......

There is clearly an issue here as this thread suggests. http://forum.xbmc.org/showthread.php?tid=155303&page=2

Where is the best place put this code as the information in the thread appears to be identical to my issue. There is a bug report filed but clearly no fix has been applied as of yet for frodo (although it does say the fix has been applied to gotham). It is driving me mad so I can't really wait for Gotham to appear before xbmc becomes usable again.
Those patches need to be compiled in, you could grab xbmc Frodo 12.3 pre and see if it makes a difference and that was referencing also Openelec , so all you can do is try.

See http://forum.xbmc.org/showthread.php?tid=176721
(2013-11-11, 09:04)uNiversal Wrote: [ -> ]Those patches need to be compiled in, you could grab xbmc Frodo 12.3 pre and see if it makes a difference and that was referencing also Openelec , so all you can do is try.

See http://forum.xbmc.org/showthread.php?tid=176721

Unfortunately there does not appear to be a xbmcbuntu test build......
No you upgrade from ppa..https://launchpad.net/~wsnipex/+archive/xbmc-prestable
(2013-11-12, 01:11)uNiversal Wrote: [ -> ]No you upgrade from ppa..https://launchpad.net/~wsnipex/+archive/xbmc-prestable

I have now done this. It upgraded a lot but is still on version 12.2 and has not fixed the issue......
Not possible

Do

Code:
sudo add-apt-repository ppa:wsnipex/xbmc-prestable
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install xbmc xbmc-bin

You should then have 12.3 installed

If any issues continue and 12.3 Pre doesnt resolve, consider asking at http://forum.xbmc.org/showthread.php?tid=176721
(2013-11-12, 14:15)uNiversal Wrote: [ -> ]Not possible

Do

Code:
sudo add-apt-repository ppa:wsnipex/xbmc-prestable
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install xbmc xbmc-bin

You should then have 12.3 installed

If any issues continue and 12.3 Pre doesnt resolve, consider asking at http://forum.xbmc.org/showthread.php?tid=176721

I have followed your instructions and it tells me that there are no new packages to install. Xbmc is the latest version and xbmc-bin is already the latest version. In system info it says 12.2 git:0536B03 compiled nov 03 2013
Pages: 1 2