KDE one-click shutdown

Hi all,
I have had the Lock/Logout widget in my lower taskbar since years. When I click it the computer shuts down, without asking any question about what I want to do: Leave, or lock, reboot or anything and certainly not: are you sure.
This has worked for many years in several distro’s, including Tumbleweed.
Since a few weeks I need to confirm I want to shutdown. When I click the applet I see either, depending on a KDE system setting, 3 or 5 choices of which Shutdown is pre-selected. It will countdown from 30 seconds to zero before it actually does that.
Did something change in that part of KDE, or could it be a setting which changed? The only one I can find is in the KDE system settings Startup and Shutdown > Desktop Session > General.
I would love to have my one-click shutdown again, makes life so much nicer.

Perhaps the widget is using legacy code which has been deprecated?

As far as I recall the countdown timer has always been there when using the “Leave” options, even if “Confirm logout” is unchecked in “System Settings -> Startup and Shutdown -> Desktop Session”

You could try this from within a konsole window:

qdbus-qt5 org.kde.Shutdown /Shutdown org.kde.Shutdown.logoutAndShutdown

If it works, (there are a few edge cases where shutdown/reboot aren’t working as expected https://bugs.kde.org/show_bug.cgi?id=422870 ) then you could create a new menu entry with that as the command, which could be pinned to the taskbar or placed on the desktop, whatever…

System Settings > Startup and Shutdown > Desktop Session > General > Uncheck both Confirm logout and Offer shutdown options. Apply new settings and click Leave. You are offered two options: OK (CR) and Cancel (ESC).

Yes, that is exactly what I get now, but … it used to be, until a few weeks ago, that clicking the widget the PC would shutdown in one go. No more buttons to click on, no choices to make, just click and … dead.
So something must have changed in this regards but I have no idea what, and where to look for it.

There is also a default shutdown without confirmation hot-key

Ctrl + Alt + Shift + Pg Down.

Funny fact, I configured my Virtuals Desktops to move its windows up-down-left… with Ctrl + Alt + Shift + arrow keys and My Lenovo laptops have Page up/down to either side of the up arrow keys and I used to curse everytime I accidentally prssed the shutdown key without confirmation. I have it disabled but you can use it for your advantage.

I just did a dup that gave me 20200620. Context click desktop menu selecting leave produces no response whatsoever.

# inxi -Sxxx
System:    Host: big41 Kernel: 5.6.14-1-default x86_64 bits: 64 compiler: gcc v: 10.1.1 Desktop: KDE Plasma 5.19.1
           tk: Qt 5.15.0 wm: kwin_x11 dm: N/A Distro: openSUSE Tumbleweed 20200620

:frowning:

Leave from main menu does logout. Shutdown from main menu works too.

As I describe in my post to this other similar thread,

https://forums.opensuse.org/showthread.php/540525-Reboot-and-shutdown-in-Kde-Plasma-don-t-work-anymore?p=2938990#post2938990

Various Desktops intentionally insert a pause to dumbly provide time for processes to be allowed to terminate naturally before shutting down the system.
This is a long standing issue, I don’t know that Desktops have ever been able to know for sure that long running data writes haven’t completed. If a system shuts down in the middle of someone writing to a network share or an insert or update is being executed in a database, the data may be corrupted and in some cases could corrupt far more than just the changinng data itself.

So, the general solution has been to simply delay the shutdown by some arbitrary amount of time that it would be very unlikely a write could still be in progress.

Best practice of course is to manually shutdown anything that supports a long running write.
After that, you can initiate a forced shutdown a number of ways, one I described in my referenced post.

TSU

I’m familiar with pauses to allow writes to complete, but mine was a session open only a minute or so, and I had nothing open except Konsole doing nothing. Nothing should have been writing related to anything Plasma does or can do.

I rebooted, started Plasma, and desktop leave still results in no response. Opening top in Konsole shows nothing obvious that might prevent session ending.

Yes, same here on two TW installs after 20200620

Leave from main menu does logout.

ditto

Shutdown from main menu works too.

Not for me due to bug: 422870 – Reboot and shutdown result in logout

User @BingMyBong has raised a bug report 2020-06-23 11:32:39 423391 – Logout function no longer works for this issue.

Hi,
I see that others have (had?) the same issue as I had. Yes, had. I also received the update some 10 days ago which made the widget in my panel do absolutely nothing. Then miraculously I received another KDE updates 3 days ago and that fixed it all. Now it is a one-click shutdown again as I had for years. If you wait long enough things just solve themselves. Well, I’m sure somebody did a great job fixing it and I am very thankful for that.

In other words this thread is closed cause it solved by the update of 20200627 (28?)
Thank you all for reading and answering, trying to help. Great to see the forum does that.

And thanks for reporting back that it is solved now.