Bug 436924 - Become aware of offline updates and offer opt out
Summary: Become aware of offline updates and offer opt out
Status: RESOLVED DUPLICATE of bug 435845
Alias: None
Product: plasmashell
Classification: Plasma
Component: Theme - Breeze (show other bugs)
Version: 5.27.5
Platform: Other Linux
: HI wishlist
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2021-05-11 12:58 UTC by Harald Sitter
Modified: 2023-05-17 17:23 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Harald Sitter 2021-05-11 12:58:25 UTC
SUMMARY
discover allows offline updates but currently we offer incredibly poor control over it.

the logout dialog should do a number of things:

a) hint that the next startup will do offline updates
b) offer an opt-out "reboot without updates" possibly as a drowndown button sort of thing
c) same for shutdown since updates may actually be applied either on "reboot" or "power-off". the former would reboot after the update and the latter would power-off, such that when using power-off and triggering a reboot you'd effectively apply the update before the actual power-off, rather than on next boot up

NB: not exactly a ksmserver concern I suppose, but on next boot up the updates should probably be re-staged, not sure where that best fits, possibly discover? if there are no new updates it could simply re-stage or if there are new updates ask the user to add them to the stage

https://github.com/hughsie/PackageKit/blob/master/docs/offline-updates.txt
Comment 1 Nate Graham 2021-05-11 14:19:10 UTC
The logout screen itself lives in plasma, which is where the UI would need to be added. However kmserver is probably where the code to expose these features would need to be added, if they don't already exist.
Comment 2 Nate Graham 2021-05-11 14:32:09 UTC
*** Bug 435971 has been marked as a duplicate of this bug. ***
Comment 3 David Redondo 2021-05-12 08:45:00 UTC
Couldn't you do it "just" in the logout greeter?
Comment 4 Harald Sitter 2021-05-12 09:13:08 UTC
I'm not sure what just means here. I'll also not pretend to have looked at either code base in years though ^^
Roughly we'll need: backendy bits talk to packagekit over dbus to figure out whether offline updates are staged (a), to set a different trigger type (c), to disable the offline trigger (b). Unrelated to packagekit we need to present a poweroff action that indeed behind the scenes triggers a reboot, not a poweroff (c).

Ignoring re-staging after an opt-out for now, as IMO that had been better solved by discover anyway, if we can easily talk to PK from the greeter than I'd agree with this being doable there rather than ksmserver.
Comment 5 David Edmundson 2021-05-12 09:50:29 UTC
Can we be a lot more sparing with the "VHI" flag. It has already become completely meaningless.  

In terms of logout order of events is:

 - user clicks button in kickoff this makes a DBus call
 - This DBus call auto-activates logout-greeter, this shows a prompt
 
 - On clicking confirm it makes a new DBus call
 - This DBus call auto-activates a helper binary called plasma-shutdown

 - This binary calls into ksmserver to ask apps to quit (which they can cancel)


logout-greeter is the only visual one, though it's worth pointing out it can be skipped and the call in kickoff can go straight to plasma-shutdown based on user preferences.
Comment 6 Nate Graham 2021-05-12 12:59:40 UTC
side note:
If this isn't a VHI issue I don't know what is. The UX that this bug report tracks fixing is generating significant negativity among our users in bug reports and social media. We risk losing users over it. It may not be a crash or a bug per se, but the consequences to not improving the situation here would be just as severe IMO.
Comment 7 Tobias G. 2021-10-18 14:07:38 UTC
(In reply to David Edmundson from comment #5)
> Can we be a lot more sparing with the "VHI" flag. It has already become
> completely meaningless.  
> 
> In terms of logout order of events is:
> 
>  - user clicks button in kickoff this makes a DBus call
>  - This DBus call auto-activates logout-greeter, this shows a prompt
>  
>  - On clicking confirm it makes a new DBus call
>  - This DBus call auto-activates a helper binary called plasma-shutdown
> 
>  - This binary calls into ksmserver to ask apps to quit (which they can
> cancel)
> 
> 
> logout-greeter is the only visual one, though it's worth pointing out it can
> be skipped and the call in kickoff can go straight to plasma-shutdown based
> on user preferences.

Hi there,

I'm working on a custom script to update my system at shutdown.
The script itself is working, but it needs to be called before shutdown.
I already tried to create a systemd script, but systemd shuts down services the script needs before it finishes, but I don't know which exactly are required.
So, I had the idea to get the shutdown call by Plasma to redirect it to my script.
Replacing the plasma-shutdown executable with my script worked, but it's also called when the system is rebooted. Is there any way to make the script just being called at shutdown?
Which command is sent by plasma that actually shuts down the system?
Do you know that?

I'd be glad if you could help me here!
Comment 8 Tobias G. 2021-10-18 14:11:46 UTC
What I've done so far can be found here:
https://github.com/TobiPeterG/kubuntu_automatic_updates
Comment 9 Nate Graham 2023-05-17 17:22:39 UTC
I'm looking into this and it seems feasible. Will try to fix this as well as Bug 435845.
Comment 10 Nate Graham 2023-05-17 17:23:29 UTC
On second look, this is a duplicate of that, which is in the wrong place.

*** This bug has been marked as a duplicate of bug 435845 ***