Not a massive deal, but using either the shutdown or reboot options in the UI on a pi2 do not cause a reboot.
The UI basically freezes and only the red LED is lit on the board.
Not a massive deal, but using either the shutdown or reboot options in the UI on a pi2 do not cause a reboot.
The UI basically freezes and only the red LED is lit on the board.
Seen the same thing. I end up having to pulled the plug and after that it did not boot again, just a red LED turned on.
[EDIT] Removed my workaround as it seems like it was a one off.
When it freezes can you still ping osmc and log into it with ssh ?
By far the most common reason for a Kodi freeze on reboot or shutdown is misbehaving and poorly written addons - and it’s quite a common issue.
To confirm this you can temporarily rename your .kodi folder so that a fresh, empty one is created, then see whether it hangs on reboot or shutdown. To do this log in remotely with ssh and do the following:
Stop Kodi running:
sudo systemctl stop mediacenter
Rename the .kodi folder (contains userdata/addons etc)
mv .kodi .kodi.bak
Now restart Kodi:
sudo systemctl start mediacenter
Now test Kodi to see whether you can restart or shutdown reliably without hanging. If you can it points towards a problem with addons or userdata settings.
To restore your old .kodi folder:
sudo systemctl stop mediacenter
rm -rf .kodi
mv .kodi.bak .kodi
sudo systemctl start mediacenter
Now try to capture a log file when it hangs. Before doing so enable debugging in Settings->System->Debugging, then try to reboot or shutdown and wait a couple of minutes after it seems to have hung.
Assuming you can still log in with ssh run the following command to upload your kodi.log:
paste-log .kodi/temp/kodi.log
Then paste the URL provided by the paste-log command here on the forum. Even with a log file finding this sort of problem can sometimes just be a process of elimination - removing recently installed addons (especially service addons) one by one until it stops hanging.
Hi,
Thanks for the advice but no dice. Did the backup according to your steps.
But, I cannot log in to it when it has reached the shutdown state so I cannot provide any log at the moment. Best i can do right now is provide a picture of what’s on the screen.
http://goo.gl/P0jczM
Question: Is the old log saved after a reboot? If so i will provide this evening when i get back from work.
[EDIT] ( need to copy the link. It seems like the hyperlink is broken when it’s clicked.
The log from the previous session is saved as kodi.old.log
Thanks Diligaf.
I’ll restore my binaries now and upload the pastebin.
[EDIT as new users can only reply 3 times…]
My PI did not restore this time, so i’ll have to do a re-install tonight. But until then i have access to the complete system so if there is any more logs etc you need to look at, please give me a heads up.
[EDIT 2]
Locks at shutdown, display state according to earlier image.
New log provided via my google drive. File is 4.3 MB and i cannot post it on pastebin.
kodi.log : http://goo.gl/QtQFvB
Can you post your /etc/fstab ?
The required mount options in osmc (based on Debian Jessie with systemd) are different than what you would have used on Raspbmc. (based on Debian Wheezy with upstart)
From the details you’ve given now your hang on reboot is most likely NFS related.
Sure. BTW, pretty handy that you guys host your own pastebin now!
http://paste.osmc.io/zeduyehaje.cpp
Yes the paste-log command is very handy.
I’m not sure if it’s your issue, but you do need to change some of your nfs mount options to be compatible with systemd. Please see my post in the following thread:
Try that first.
Hi.
I finally had the time to test this. This indeed solved the issue.
Still takes about 1-2 minutes for it to reboot after it has reached the shutdown state (“reached target shutdown”). But at least now it reboots and I can use it as my daily system without fearing lock ups every time i shut it down.
Bad of me not finding this in the forum, but then again never thought my NFS mounts would make the system not shutdown properly either.
Thanks for all the help guys!
Glad that helped - however 1-2 minutes is still a bug that needs fixing.
Most likely in the shutdown process the network is being taken down before NFS is unmounted, or NFS is not being unmounted at all, which needs fixing.
If you can take a picture of your screen and post a link here could you try this for me ? Edit your /boot/cmdline.txt file:
sudo nano /boot/cmdline.txt
Make a note of where the word quiet is and remove it, save and reboot. This will disable the splash screen and instead show the normal linux startup/shutdown text.
Now try to shut down and wait until it seems to be hanging for 1-2 minutes and take a picture of all the shutdown text on the screen. This will help us see what order services have shut down and where it is stuck.
You can add the word quiet back to the cmdline.txt to go back to normal. Thanks!
Yeah, came to the same conclusion. I’m just happy it works.
Never really turn it off anyways, it’s just now during the initial setup.
Hopefully I will have the time to tests this tonight, else i’ll do it tomorrow morning before work.
Hi. Seems like it the nfs share that’s slow to unmount sometimes. ( that is, issue does not occur on every reboot, but now and then). The lock is always ~2-3 minutes. So it’s fair to think it’s a timeout that is reached.
I have filmed the event in the end stages. (issue has already occurred, and will be resolved in second 18)
http://goo.gl/f8Awbi
Image of indication of issue:
printout of current fstab.
http://paste.osmc.io/nekawulure.pl
Thanks for the debug information, we will look into this.
Just to add, I have exactly the same problem:
I have a NFS folder that is mounted at boot time using /etc/fstab
mynas.local:/nfs /mnt/mynasfolder nfs x-systemd.automount,noauto,noatime,nolock,nfsvers=3,intr,tcp,actimeo=1800 0 0
When trying to shutdown or reboot, my raspeberry pi 2 hangs for about 2 or 3 minutes.
I have been able to reproduce the issue in the screenshot above, albeit only sporadically.
I think I have fixed it and will let you know when an update is available for testing.
Hi,
Please try updating using the OSMC settings addon updater, afterwards check that you have version 1.2.7 or later of network-osmc:
dpkg -l | grep network-osmc
Please let me know if this solves the NFS related hang on reboot demonstrated in the photo above.
Nice.
Now it works perfectly.
Thanks DBMandrake.
Hi.
Tried a couple of reboots (10). And I cannot reproduce the “image”-issue anymore.
EDIT: Pi did not want to reboot via Power menu after fix was applied.
But my NFS shares where offline causing the pi to halt and the cpu was at 102 percent ( checked with TOP). So i had to reboot via CLI. Everything returned to normal after shares where back online. Is this expected behavior?
Hi,
Yes this is the expected behaviour if your NFS server is down, unless you use the right mount options. I would recommend you add:
soft,retrans=2
Which enables “soft fail” and reduces the default number of retries. Thus if your server is turned off after you have already connected to it it will only hang for approx 30 seconds before shutting down.