Sleep inhibition was introduced as a response to LP:40697.

Then the inhibition call was switched to use Logind in LP:1566141, in
commit edc8556fd9de9c6e76158bc1b7b9[1], thereat introducing shutdown
inhibition as well. This new behavior was not supported by the bug
report nor is it mentioned in the commit or in-line comments, which
indeed continue to say

+    Send a dbus signal to logind to not suspend
+    the system, it will be released when the return
+    value drops out of scope

So I think we have a clear case to drop shutdown inhibition. Indeed, Apt
already does that during an installation operation:

  % gdbus call -y -o /org/freedesktop/login1 -d org.freedesktop.login1 -m 
org.freedesktop.login1.Manager.ListInhibitors
  ([... ('shutdown', 'APT', 'APT is installing or removing packages', 'block', 
0, 170914)],)

So Update-Manager's shutdown inhibition is redundant.

I additionally argue that the sleep operation too should not be handled
by Update-Manager, which is merely a front-end. I wouldn't say it needs
to be inhibited at all, but in any case this argument should be made
with Apt if desired, so I'll submit a merge request to entirely remove
the shutdown and sleep inhibition from Update-Manager.

[1]https://git.launchpad.net/update-
manager/commit/?id=edc8556fd9de9c6e76158bc1b7b9

** Changed in: update-manager (Ubuntu)
       Status: Triaged => In Progress

** Merge proposal linked:
   
https://code.launchpad.net/~nteodosio/update-manager/+git/update-manager/+merge/497846

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2133012

Title:
  The "Restart Now" button in Software Updater does not restart the
  system

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/update-manager/+bug/2133012/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to