Views:
8,521β
Votes: 5β
Tags:
login
reboot
authentication
Link:
π See Original Answer on Ask Ubuntu β§ π
URL:
https://askubuntu.com/q/1187756
Title:
New message when rebooting from login screen: Authentication is required for rebooting the system while an application asked to inhibit it
ID:
/2019/11/10/New-message-when-rebooting-from-login-screen_-Authentication-is-required-for-rebooting-the-system-while-an-application-asked-to-inhibit-it
Created:
November 10, 2019
Edited: May 27, 2024
Upload:
September 15, 2024
Layout: post
TOC:
false
Navigation: false
Copy to clipboard: false
You can get a list of all systemd inhibitors with this:
$ systemd-inhibit --list
Who: rick (UID 1000/rick, PID 2358/unity-settings-)
What: sleep
Why: GNOME needs to lock the screen
Mode: delay
Who: rick (UID 1000/rick, PID 2358/unity-settings-)
What: handle-power-key:handle-suspend-key:handle-hibernate-key
Why: GNOME handling keypresses
Mode: block
Who: NetworkManager (UID 0/root, PID 1189/NetworkManager)
What: sleep
Why: NetworkManager needs to turn off networks
Mode: delay
Who: Unattended Upgrades Shutdown (UID 0/root, PID 1372/unattended-upgr)
What: shutdown
Why: Stop ongoing upgrades or perform upgrades before shutdown
Mode: delay
Who: rick (UID 1000/rick, PID 2358/unity-settings-)
What: handle-lid-switch
Why: Multiple displays attached
Mode: block
5 inhibitors listed.
However the list isnβt dynamic. For example, the list doesnβt change when you open a file for editing. Editing a file will inhibit rebooting.
This is how you can see inhibits due to files that need saving:
$ dbus-send --print-reply --dest=org.gnome.SessionManager /org/gnome/SessionManager org.gnome.SessionManager.GetInhibitors
method return time=1573403207.555584 sender=:1.49 -> destination=:1.1853 serial=7743 reply_serial=2
array [
]
$ gedit temp &
# Now type some text into gedit but don't save the file
$ dbus-send --print-reply --dest=org.gnome.SessionManager /org/gnome/SessionManager org.gnome.SessionManager.GetInhibitors
method return time=1573403241.678869 sender=:1.49 -> destination=:1.1855 serial=7747 reply_serial=2
array [
object path "/org/gnome/SessionManager/Inhibitor1727"
]
In the first dbus
command there are no inhibitor locks. Then gedit
is used to modify a new file. In the second dbus
command an inhibitor exists.