This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Dangerous and confusing shutdown / reboot behaviour

Tags: None
(comma "," separated)
User avatar
K-Fuchs
Registered Member
Posts
13
Karma
0
OS
Dear all,

yesterday a lovely thing happened to me again: I was booting up my machine, a bit surprised that after grub it looked more like a resume from S4, only to get a still open dialogue and, finally, my system shutting down right after I booted into it.

What happened? The thing is: Plasma does not shutdown or restart if there is still a dialogue open. While in some cases this can make sense (e.g. "your document has unsaved changes, would you like to save them?"), in other cases it simply doesn't (e.g. a crash dialogue "drkonqi" will also prevent a shutdown, and as some software, including plasma, has and had known bugs that lead to crashes on shutdown ...).

The bigger problem, however, is: If you are, like me, a laptop user, you initiate shutdown, close the lid and put the laptop in your backpack, chances are that it

- drains the battery which, depending on the configuration, leads to data loss
- might overheat the laptop, which can lead from data loss to actual hardware failures
- might not be great if you have a spinning disk instead of an SSD, which can lead to data corruption, data loss or hardware failures

In my opinion if the user did initiate a shutdown or reboot, the system should do what it was told to. In order to solve the problem of unsaved documents and the likes, a similar behaviour to Windows could be made, where you have a screen giving you a list of still open programs that require your action and the possibility to cancel the shutdown / reboot. However, a countdown would be ticking (30 seconds, 60 seconds ...) after which the system will, if the user doesn't cancel it, force the shutdown / reboot.

Summary:

Motivation: The current shutdown / reboot process is confusing as the system does not do what it is told to, it is dangerous as it can lead to data corruption, data loss or even defective hardware.

Solution: Give the user the possibility to cancel shutdown / reboot in case of applications still needing user interaction (e.g. save open documents), but force shutdown / reboot if no action is taken within a given time period.

Advantages: Prevents the risk of an empty battery, of data corruption and data loss and even hardware failures. The system does what the user expects, as it does what it was instructed to do.

Disadvantages: If the user closes the lid / turns of the monitor before seeing this dialogue, he might miss the fact that some programs have documents with unsaved changes, which could lead to data loss. However, the same would happen if then the power is lost (e.g. battery empty or power bar turned off) or when the user shuts down via other means, e.g. the shutdown command. Thus I'd say that the downsides of preventing shutdown / reboot at all are far bigger than the small amount of cases where it saves data.


Other ideas: yesterday on IRC a couple more ideas where mentioned:

- Implement some sort of autosave in such cases: while it is a nice idea (if done in a temporary location, to not overwrite a document without the user explicit order), this would require all applications, cross desktop, toolkit etc., to implement an interface for it. This is very unlikely to happen. Only doing it for half the applications is dangerous, as this would lead to unexpected behaviour and, in the end, data loss.

- Add a shortcut / way to force shutdown (similar to what Apple does in OS X): That has the downside of only offering either a forced shutdown with no check at all, or the current behaviour. The solution mentioned above combines the advantages from both, as it still offers the user a possibility to cancel and save his documents.


Thanks in advance for further ideas and hopefully in the end this being implemented.

Kind regards,

Fuchs


Bookmarks



Who is online

Registered users: bancha, Bing [Bot], Evergrowing, Google [Bot], lockheed, mesutakcan