I have disabled the “countdown timer” that is shown by default when shutting down (or logging off), but there is still a noticeable delay between clicking on shutdown or pressing the power button (which is configured to shut down the computer) and the actual shutdown itself. It takes about 2 to 3 seconds before the system starts the shutdown.
When using shutdown now on the command line the computer shuts down immediately.
Is this a configuration things? I have search a bit, but all questions I found where related to the (visible) countdown timer that is shown by KDE (which - as I said - I have successfully disabled).
Any way to make the system react immediately when shutting down through the GUI?
Theres the whole question of state in that, like what state are my apps in? Has my drive finished a write of recently saved files? More items of relevance for properly shutting a computer off. It’s not like turning off a light switch.
Okay so when you shutdown with the DE Power Button, in a Gnome session for instance, this calls gnome-session-quit --power-off for shutdown, gnome-session-quit --reboot for restart, etc … What this does and why you may want to continue to do that type of shutdown is that it shuts down your DE session (shell) then calls systemctl poweroff (the real command behind shutdown). Why you may want to shut down your DE session properly is to keep state mostly. Well, and other clean up activities that could be beneficial to startup for instance.
As I wrote, I am using KDE, so there is no Gnome session.
I also disabled KDE’s option to restore my current session, so there is nothing to save.
A visual feedback that something is happening would at least be nice. But currently, nothing happens for 2 or 3 seconds, and then the computer shuts down.
First is an immediate (unclean and potentially risky) command done with the shutdown now command. This shuts down the system and does not allow any running processes to finish up and close open files. Files can become corrupted.
The second is the clean shutdown that occurs normally. It tells the different processes to end and close all open file so there is minimal risk of any corruption. Doing this does require a timeout to allow processes to close gracefully, which is the normal delay between the command and the actual power off.
For prevention of potential system corruption of files, (including process lock files that may be left hanging, etc.) please accept the usually minimal delay and do normal shutdowns.
Normal shutdowns are a designed feature that have been around for many many years and are for system protection. This is a very low level feature of the OS but can be bypassed if the user accepts the risk to their system.
It’s the first time I hear that shutdown in Linux is not a clean shutdown. I guess I have been shutting down all the servers I have been working with in an unsafe manner the last years.
However, if KDE needs more time to cleanly shut down then a headless system, then I would at least expect some visual feedback (a modal dialog or something) that says “Shutting down” right after clicking the shutdown button.
This is a controlled shutdown that starts NOW, it is not an uncontrolled power off. The shutdown command has no option to do a power off as you claim.
See man shutdown
Also shutdown on Fedora is the same as systemctl poweroff
See systemctl —help for all the shut down commands.
You can tell the kernel to power off, by passing all shutdown logic, by writing into a special file in the /sys or /proc file system, I forget which.
I think that is the one way to by pass controlled shutdown.
Sorry, I misspoke there.
Shutdown does do a (somewhat) clean shutdown.
Halt, reboot, or poweroff with the -f or --force option is what I was thinking of as that does not unmount the filesystems during the halt. This from the manpage for reboot
-f, --force
Force immediate power-off, halt, or reboot. If specified, the command does not contact the init system. In most
cases, filesystems are not properly unmounted before shutdown. For example, the command reboot -f is mostly
equivalent to systemctl reboot -ff, instead of systemctl reboot -f.
There are distinct differences between shutting down a server that is not a gui interface and a workstation that has the gui interface, and many differing processes that will be running and need a graceful shutdown time.
As I already wrote: I have disabled that 30 seconds timeout.
But there still is a substantial delay where nothing happens after clicking on shutdown (or pressing the power button, which I have configured to shut down the system)
In Fedora 39 (KDE 5) I can click the shutdown button and immediately get a response in the form of a changed screen. Both on shutdown and on restart, both with and without logoff screen.
In Fedora 40 with (KDE 6) I have this delay on shutdown and reboot, both with and without logoff screen.
I have created a video for comparison. Fedora 39 and 40 on the same Proxomox host with identical parameters.
In the video it is Fedora 40 after a new installation. Even after installing all updates, the problem with the delay still exists.
The delay is about 3 seconds in the Proxmox VMs. On my laptop the delay is about 7 seconds. That’s really annoying. You don’t even know if you’ve clicked the button.
I wanted to chime in, I have a Dell Inspiron 7559 laptop that’s fully updated on Fedora 40. When I press the “Shutdown” button in the KDE Application Launcher and start counting I get to two when I see the shutdown scroll already (KDE desktop has disappeared and I’m seeing the console scroll of services shutting down). By “3” it’s powered off.
So it’s not a fundamental speed problem in KDE. My kernel is 6.10.5-200 and KDE version is 6.1.4
I have the same problem and this (the lag between clicking on “shutdown” and any feedback that I did so) is independent whether I opened Discover during that session or not.