https://bugs.kde.org/show_bug.cgi?id=528010

--- Comment #3 from Andy <[email protected]> ---
(In reply to Harald Sitter from comment #2)
> I don't understand. The issue is that we are not allowed to reboot so we
> don't reboot on account of not being allowed to reboot?

I don't understand anything either, I'm just a mechanical engineer, not really
into programming, hence the help of AI to generate this bug report in the first
place.
The symptom with openrc-user services enabled is, initiating a reboot or
shutdown from kmenu results in a neverending black screen with a blinking
cursor. 
I used AI to help debug why it's hanging and it turned out that plasma-shutdown
ends up isolated in an elogind background session (see INVESTIGATION/3). It
seems it lacks the permission to send a reboot or poweroff resulting in the
bsod. I can kill the last 3 remaining plasma processes and its landing back in
greetd (or sddm, both tested). Reboot/shutdown manually from greetd/sddm (or
tty) works fine.
I would have to logout of the plasma session and initiate reboot or shutdown
from the display manager. It's okay for a couple of times, but not a long-term
solution.

I'm currently using this polkit rule as a workaround:
polkit.addRule(function(action, subject) {
    if (subject.user !== "=[USERNAME]") {
        return;
    }

    const allowedActions = [
        "org.freedesktop.login1.reboot",
        "org.freedesktop.login1.reboot-multiple-sessions",
        "org.freedesktop.login1.power-off",
        "org.freedesktop.login1.power-off-multiple-sessions"
    ];

    if (allowedActions.indexOf(action.id) !== -1) {
        return polkit.Result.YES;
    }
});

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to