On Tue, 2024-08-27 at 08:01 +0100, Barry wrote:
Sync is not used on shutdown. It is the action of umount that causes all data to be flushed out to the disk. As you say that may take a while if the disk is slow, USB, or has just had a huge amount of data written to it just before shutdown us triggered.
However it has always been user services that are slow to exit, and often are timed out, that are the cause of slow shutdowns in my experience.
I used to get the impression that some user things don't pay any attention to being told to shutdown.
A long time ago the biggest pain I had when trying to get something to shutdown, but couldn't, was when something had started swapping. That was usually a web browser which had suddenly barfed on some badly designed website, or one with badly encoded video streaming content.
I would still get something similar back in Fedora 36 era with some badly encoded video MPEG files. Suddenly the player would start making a mess on the screen, and if you weren't quick enough to kill the player immediately you might have to pull the power plug out to stop it.