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

            Bug ID: 477056
           Summary: Restart does not prompt for authentication and goes
                    black after using it
    Classification: Plasma
           Product: Powerdevil
           Version: 5.27.5
          Platform: Debian stable
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: plasma-b...@kde.org
          Reporter: mikl...@gmail.com
                CC: m...@ratijas.tk, natalie_clar...@yahoo.de
  Target Milestone: ---

SUMMARY
Restart button does not prompt for authentication even if I set PolicyKit to
require admin authentication to restart, and freezes at a black screen after
using it.


STEPS TO REPRODUCE
1. Install the following PolicyKit rules:

polkit.addRule(function(action, subject) {
    if (action.id == "org.freedesktop.login1.power-off" ||
        action.id == "org.freedesktop.login1.power-off-ignore-inhibit" ||
        action.id == "org.freedesktop.login1.power-off-multiple-sessions" ||
        action.id == "org.freedesktop.login1.reboot" ||
        action.id == "org.freedesktop.login1.reboot-ignore-inhibit" ||
        action.id == "org.freedesktop.login1.reboot-multiple-sessions" ||
        action.id == "org.freedesktop.login1.set-reboot-parameter" ||
        action.id == "org.freedesktop.login1.set-reboot-to-firmware-setup" ||
        action.id == "org.freedesktop.login1.set-reboot-to-boot-loader-menu" ||
        action.id == "org.freedesktop.login1.set-reboot-to-boot-loader-entry"
||
        action.id == "org.freedesktop.login1.suspend" ||
        action.id == "org.freedesktop.login1.suspend-ignore-inhibit" ||
        action.id == "org.freedesktop.login1.suspend-multiple-sessions" ||
        action.id == "org.freedesktop.login1.hibernate" ||
        action.id == "org.freedesktop.login1.hibernate-ignore-inhibit" ||
        action.id == "org.freedesktop.login1.hibernate-multiple-sessions"
    ) {
        return polkit.Result.AUTH_ADMIN;
    }
});

2. Verify that it works by issuing `pkcheck -u -p $$ -a
org.freedesktop.login1.reboot; echo $?` in bash in a terminal in the Plasma
desktop environment. It should prompt for an authentication.

3. Restart the system from the start menu

OBSERVED RESULT
It does not prompt for authentication. After choosing the option, the screen
goes black and freezes. It only regains responsiveness by signing into another
terminal and kill plasma-shutdown process.

EXPECTED RESULT
It prompts for authentication, if succeed it restarts the system.


SOFTWARE/OS VERSIONS
Debian GNU/Linux 12
Linux Version: 6.1.0-13-amd64
KDE Plasma Version: 5.27.5
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8
Graphics Platform: X11

ADDITIONAL INFORMATION

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

Reply via email to