I’ve had this on numerous occasions: I’m asking Fedora to shut down, and it either takes a while for it to obey my command, or it outright refuses. Most UIs aren’t exactly forthcoming about the reasons, by the command line interface has today told me that there’s a way to find out what might be blocking it.
The answer is the systemd-inhibit
When typed with no parameters, it gave me a list like this:

Here we can see that no less than 4 processes need to do some work before the shutdown command can be honoured, with the first one outright blocking it from happening. From what I understand, “delay” means it will happen once the process has given its OK (for example, disconnecting cleanly from storage devices or network connections), whereas “block” means that an operation is currently running that could potentially compromise system integrity were it to stop prematurely.
Now THAT’S what I want from an operating system! Data safety first, plus a reasonable explanation as to why things might be happening. Well done Fedora!
In my case, the mdraid-check-job was related to a weekly data integrity check on a large RAID volume. Unfortunately it takes about 12+ hours for the system to perform this, so I guess I’ll leave the system on while it’s heating up my office 😄
Alternatively, the command also shows an option to override the blocks and do a restart anyway via systemctl reboot -i or systemctl shutdown -i respectively (do so at your own risk of course, but if a shutdown is unavoidable, I’d rather let the command handle it than the long-press of a power button).