Thanks a lot for pointing me in the right direction
Indeed, there appears to be a solution provided by Jonas Malhaco Filho here FS#63697 : [systemd] 243.0-1 poweroff/reboot umount errors
the issue does appear to be caused by the nvidia modules: unloading them with a
/usr/lib/systemd/system-shutdown/*
script does prevent it
So what does that mean?
Create a script with the following contents
#!/bin/sh
# Remove all Nvidia modules on shutdown
# to avoid errors like
# [35509.312925] sd-umoun[56020]: Failed to unmount /oldroot: Device or resource busy
# [35509.317505] sd-umoun[56021]: Failed to unmount /oldroot/sys: Device or resource busy
# [35509.322349] shutdown[1]: Failed to finalize file systems, ignoring.
#
for MODULE in nvidia_drm nvidia_modeset nvidia_uvm nvidia
do
rmmod $MODULE
done
Name this script, for example, nvidia.shutdown
, make it executable as usual and place it in /usr/lib/systemd/system-shutdown
.
Another version of this script was provided by Ivan Layapunov: FS#63697 : [systemd] 243.0-1 poweroff/reboot umount errors
Done. Error messages gone