Open MizterB opened 7 months ago
This seems to solve my shutdown issue as well using nfs4, I just added this line and it shuts down cleanly.
Thank you for this, it was driving me nuts that reboot would just hang. It works now!
once you modify the command in /etc/init.d/S11share it looks like you have to run the command batocera-save-overlay to make this persist past a single reboot. I was able to do this and rechecked the file and it still shows the modified code which should help with reboots getting hung up on the nfs share. Hope this helps.
Batocera build version
39 2024/02/27 21:48
Your architecture
X86_64
Your Graphic Processor Unit(s) (GPU)
AND Radeon RX580
Issue description
When I mount my NAS via NFS, rebooting or shutting down my system takes 8-10 minutes. This occurs with any of the standard NAS mount locations. Disabling the NAS shares results in a reboot of 20-30 seconds.
Detailed reproduction steps
Once rebooted, shut down or reboot again via ES or the
reboot
command. Screen will go blank and appear to 'hang' for up to 10 minutes before completing (likely due to timeout).Details of any attempts to fix this yourself
After much trial end error, I stumbled across this Discord message: https://discord.com/channels/357518249883205632/357954026916151298/1111606380898570270
This led me to discover that NFS is not being unmounted in the shutdown sequence.
In
/etc/init.d/S11share
, the unmount command is:umount -l -a -t nfs
If run manually, you will see that NFS shares are NOT unmounted. This is because the mount type is not
nfs
- it is actuallynfs4
!Changing the command to
umount -l -a -t nfs4
resolves the slow shutdown/reboot issue.I am unsure of the most appropriate solution to this problem - switch the existing umount command to
nfs4
, or keep it asnfs
, and add another umount specifically fornfs4
. I'll defer to the developers.Details of any modifications you have made to Batocera.
To debug this, I worked from a fresh install of Batocera.
Logs and data
No response