Have a small question, I use a command to force logout by quickly closing GUI session
sudo systemctl restart sddm
Since Plasma Login Manager will be available upcoming Stable update, is this command gonna change or remain same if I use PLM? Since PLM still uses systemd in backend…
Also If anyone knows why this command should be normally avoided, and loginctl should be used, please reply, that’d be nice to know.
I only use this supposedly nuclear option very rarely when nothing important is running and system is starting to freeze to something like accidentally opening/starting heavy process and I know hard power off would be only option to recover due to HDD swap slowness.
For a clean and tidy logout, I find the best command is: qdbus6 org.kde.Shutdown /Shutdown logout
Though personally I like to tidily close all the open windows (as much as possible) before my logout script issues that command.
Restarting SDDM (with auto-login enabled) is, however, a great way to automate logging in in the first place when the computer’s sitting at the login screen. My home automation system uses that to bring up my desktop when I’ve been out and come back into the house (as well as first thing in the morning).
You can also put your machine to sleep without logging out of Plasma:
systemctl suspend
Or, hibernate it:
systemctl hibernate
Please note that the following commands are not the correct way to exit a Plasma session. Logout scripts won’t be run, and open applications may not be closed correctly. Unsaved data may be lost.
To shutdown a systemd-based system (such as Manjaro) the same way as shutdown now: