Raspberry Pi4B and sleepy NAS

  • Hello everyone,

    One problem I have with my rPi4 after upgrading to LE 10 is that when trying to play a movie from a NFS-connected NAS, if the NAS HDDs are in sleep mode (which becomes enabled after 30 minutes of inactivity so that the HDDs won't spin continuously), LE doesn't have 'patience' anymore to wait ~10-15s for the HDDs to start spinning again and start sending data ... in such cases LE will throw an error message (something about not being able to play the selected file) and give up ... LE 9.* did not have this issue, it was showing a moving circle icon while was waiting for the NAS the wake up instead of giving up ... further more, sometimes such a request to play a movie from a sleeping NAS will not even trigger the NAS to start to spin the HDDs because if this would be working I could wait 10-15s before retrying to play and by then the NAS would be awake ... if after several timed attempts it still doesn't want to play (because the NAS is still sleeping), I have to go to 'update the library' will seems to always wake up the HDDs and then the play request would work ... how can I fix this?

    Thanks

  • I've split your question into a new thread since it is a bit different from the thread it was placed into initially.

    First of all, a NAS is designed to run 24/7. Having it go into suspend after 30 minutes idle already is quite quick. For example, I've set the my parents' NAS to only full shutdown at midnight. The drives though do not goto sleep once the NAS is active in the afternoon. There is also the question whether "constant" spin-downs and spin-ups are doing harddrives a favor. I have my "NAS" (a pc with a bunch of drives) on 24/7, my choice, and it all works fine (knock on wood).

    The fact that it takes the NAS 10-15 seconds to respond is not Kodi's fault. I prefer myself to have some error msg in a few seconds over an eternally spinning http://wheel.Kodi/LibreELEC has a WOL feature somewhere, but I'm guessing it only works at Kodi's own boot moment (I never used it). Kodi cannot tell in advance whether HDDs in a NAS start to snore. So you may want to revise your 30-minute setting if you tend to watch something on multiple moments per day.

  • I have the exactly same problem at LE10 and 11 Master. I use NFS + unraid.

    Worked like a charm in OE3 -> LE9.2 + NFS + OMV.

    I was not annoyed enough to grep an debug log yet.

  • The NAS is active 24/7, it's just that the hard drives spin down after 30min. of idle time ... it's debatable whether it should be 30min or 1-2-3-n hours, the issue remains that most of the time LE10 will give up waiting for the hard drives to spin up which was not happening with LE8/9.x and rPi2/3 ...

    if instead of trying to quickly play something I start browsing thru the NFS mounts and get into a subdir that was not cached recently, this will trigger the hard drives to spin up and then any play action will start w/o issues ...

    there is a setting to wait for network during booting up, I wish there would be a similar setting for my problem as well ...

  • Quote

    Up until v19, NFS access was "wait forever" but this sometimes causes UI deadlocks. Hence this was changed to a 5s wait by default, and a property added to advancedsettings.xml to allow the user to configure it. See https://github.com/xbmc/xbmc/pull/15686. On my system 5s is way too short, hence I have restored the previous wait forever with the following entry in advancedsettings.xml

  • the NAS is a Synology DS418j running DSM 7.0-41890

    I will test your advices and get back to you, thanks

    later edit: how do I add those lines into /usr/share/kodi/system/advancedsettings.xml ? the file is mounted from a read-only file system

    Edited once, last by Filip (November 3, 2021 at 8:50 PM).

  • if anyone is wondering how it works

    /storage/.kodi/userdata/advancedsettings.xml

    XML
    <?xml version="1.0" encoding="utf-8"?>
    <advancedsettings version="1.0">
      <network>
        <nfstimeout>15</nfstimeout>
      </network>
    </advancedsettings>