Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 4 of 4
  1. #1
    Junior Member
    Join Date
    Jul 2020

    PiCorePlayer shutdown hangs at unmounting NAS filesystem


    I'm a new piCorePlayer user, and am astounded by the software. It is great! Thanks to all the contributors!

    I am running piCorePlayer 6.0.0 on a Raspberry Pi with LMS installed on the Pi. I'm also using the 7" LCD and HiFiBerry DAC+.

    LMS is configured to mount my music from the NAS drive to /mnt/nas. I'm using WiFi, rather than a wired connection.

    I built the power switch described here: othermod.com/raspberry-pi-soft-onoff-circuit/ (I had to remove the http part since this is my first post)

    Everything works great, except that the shutdown would hang after displaying "Unmounting all filesystems". Since the shutdown didn't complete, the TXD pin (GPIO14 / pin 8) would never go low, so power to the Pi would not cut off.

    After some troubleshooting, I found that the "Terminating all processes" step would kill the wpa_supplicant process, causing the later NFS unmount of /mnt/nas to hang.

    I added

    pgrep wpa_supplicant >> /var/tmp/k5_skip

    to the "User commands" section of the Tweaks page so that process would be excluded from the killall5. Shutdown now completes successfully and power is cut to the Raspberry Pi at the end of the shutdown.

    So this works, but I think I'm missing a better/easier way to handle this. Googling around, I didn't find a mention of this kind of problem, but I may have just used the wrong magic words.

    Any suggestions?


  2. #2
    Senior Member Greg Erskine's Avatar
    Join Date
    Sep 2006
    Sydney, Australia
    Great detective work mike_b,

    I think this issue has not arisen before because we have told people not to use wifi for LMS. If I understand you correctly, you have mounted your NAS via wifi?

    In the past, having 2 wifi hops during playback was asking for problems, so I would guess most people use wired networking for their LMS.

    Having said that, times change, technology advances, in your circumstances it may work fine.

    As far as I know, during shutdown, piCorePlayer just uses the same process as piCore. So it must be an old, underlying issue.

    We could just include your fix so you don't have worry about it!

    I hope Paul might add some more info here, I haven't attached a network drive this century.


  3. #3
    Senior Member paul-'s Avatar
    Join Date
    Jan 2013
    The piCore way is a bit convoluted, but create a script. /opt/shutdown.sh. Put any commands in there that you want to happen before actual shutdown.

    Then call. exitcheck.sh reboot. Or exitcheck.sh shutdown

    However inittab and rc.shutdown fully respects the k5_skip method......so that is probably the easiest route
    piCorePlayer a small player for the Raspberry Pi in RAM.
    Homepage: https://www.picoreplayer.org

    Please donate if you like the piCorePlayer

  4. #4
    Junior Member
    Join Date
    Jul 2020
    Thanks a lot, Greg / Paul.

    I wasn't aware of the recommendation to use a wired LMS connection. It then occurred to me that I hadn't actually tried the performance over wifi since switching from a wired connection.

    I'm doing that now, and wifi seems to work well for me. I am using Google Wifi mesh here, with a CanaKit 11g USB dongle plugged into the RPi2. Nothing special. I think I'll stick with the wireless until I either have problems or install another piCorePlayer and want a centralized LMS.

    As best I can tell, I can't easily install LMS directly on my old NAS box (Synology DS209 that is a bit over 10 years old), so I'd probably need to set up a little RPi for LMS.

    My NAS is using a wired connection.

    I'll also stick with the k5_skip method, as that is working reliably. If it ain't broke...

    Thanks again!


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts