Bug 447245 - Auto updates do not work
Summary: Auto updates do not work
Status: RESOLVED DUPLICATE of bug 471548
Alias: None
Product: Discover
Classification: Applications
Component: Updates (offline) (show other bugs)
Version: 5.23.4
Platform: Other Linux
: NOR major
Target Milestone: ---
Assignee: Dan Leinir Turthra Jensen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-12-19 22:40 UTC by Elias
Modified: 2024-09-16 14:29 UTC (History)
16 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Elias 2021-12-19 22:40:25 UTC
Hi, I try to get auto updates working on a machine that I don't want to babysit that often. The problem is that they work very unreliable. I had them working only once in all the time I have the auto update setting enabled in the system settings. But most times, the machine ends up on very old software, because the auto updates do not get run.


STEPS TO REPRODUCE
1. Use Kubuntu 21.10 or 22.04 (dev branch)
2. Enable auto updates in system settings
3. Use the machine for work

OBSERVED RESULT

Auto updates nearly never get run.

EXPECTED RESULT

Auto updates should work reliably.


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Kubuntu 22.04
(available in About System)
KDE Plasma Version: 5.23.4
KDE Frameworks Version: 5.89
Qt Version: 5.15.2

ADDITIONAL INFORMATION

I already have a guess why this works so bad. Haven't found documentation for how exactly this works (should be added btw) so I had a look at the source code.
Here:
https://invent.kde.org/plasma/discover/-/blob/5ad26c9c66cd2b8913e2ee8bfaa93f9fa76d65c0/notifier/UnattendedUpdates.cpp#L33-36

It seems that it waits for an idle moment of 15 minutes (even tho the comment says 1 hour, should be corrected and also made configurable).
I don't know what exactly "an idle moment" is. But if it means something like no user input (no mouse movement or keyboard presses) for 15 minutes then this may be the reason for my problem.
The machine I try to get auto updates working on is nearly never that long unused while powered on. Usually it is booted, someone gets work done, and it gets shut down again. Yeah, sometimes we get something to drink/eat in between or go to the toilet, but this never takes 15 minutes, so there are no 15 minutes idles and this is most likely why auto updates never get triggered.

If my assumption is true, this could be fixed by changing from 15 minutes of idle to for example just 15 minutes after boot.
Also, I think 15 minutes is a little long. Would recommend changing it to 10 minutes as default to make it more reliable in more cases, and also make it configurable for those who have to adopt it to their usage.
Comment 1 Elias 2021-12-21 16:11:44 UTC
Btw. on Debian+Ubuntu there is an addational bug wich prevents auto updates from working. Not Discovers fault, but wanted to note that, for anyone testing.
The deb/ubuntu package for packagekit currently contains a patch which disallows offline updates for non admin users and without a password prompt. This makes offline updates never get triggered. You have to change `/usr/share/polkit-1/actions/org.freedesktop.packagekit.policy` to get it working.
See:
https://bugs.launchpad.net/ubuntu/+source/packagekit/+bug/1955489

---

Also, adding to this I wrote before:

> If my assumption is true, this could be fixed by changing from 15 minutes of idle to for example just 15 minutes after boot.

Instead of 'xx minutes after boot' maybe 'xx minutes after updates were found' would be the better choice here.
Comment 2 John 2022-04-05 16:27:20 UTC
I can confirm this!

I'm on:
Operating System: KDE neon 5.24
KDE Plasma Version: 5.24.4
KDE Frameworks Version: 5.92.0
Qt Version: 5.15.3
Kernel Version: 5.13.0-39-generic (64-bit)
Graphics Platform: X11


I have Discover configured to auto-update.
I was expecting Discover to check on updates (All kinds of updates that do not fit OS Upgrades) and that it would silently install them in the background.

That never happens! 
I Always have to fire up discover and order it to "update all/everything" manually
Comment 3 John 2022-04-05 17:22:52 UTC
(In reply to John from comment #2)

> That never happens! 
> I Always have to fire up discover and order it to "update all/everything"
> manually

let me just scratch that!!!

It apparently works, but only after 15min in idle, as Elias pointed out.
I do agree we should be able to set it to auto-update after 15min of boot, however!
Comment 4 Aleix Pol 2022-04-08 14:51:25 UTC
You mean to get the updates happen even while you're using the system?
Comment 5 John 2022-04-11 14:57:33 UTC
Yes.

Has long as they only get installed on ShutDown or at BootUp, i don't understand why they can't be downloaded while i'm using the system.

Even if i have to manually set it to do that, i should be able to say "i want my system to download the updates as soon as it can"
Comment 6 Bug Janitor Service 2022-09-11 22:09:45 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/discover/-/merge_requests/369
Comment 7 Johannes Fleisch 2023-04-27 08:58:19 UTC
For me, the automatic updates start just as little often, so i don`t use it. But for casual users who never update themselves, it is important that there is a well-functioning automatic update system. But I don't think that more setting options are necessary for the update process. In my opinion, only the automatic update process should be adjusted.
Comment 8 PK 2023-07-23 05:41:20 UTC
I totally agree with Johannes in comment 7. I recently installed Plasma on a laptop from plm. 2014. Windows (10) is really becoming too heavy on such a laptop so Plasma seemed a sensible choice. I was pleasantly surprised that it was love at first site with Plasma, especially after I showed Kpat!
But I have no hope at all that the owner of this laptop will periodically update her machine.
For her, automatic update would be a great option. I really don't see why automatic update should wait for anything at all! In my opinion it should grab every opportunity to do it's job.
Comment 9 postix 2023-11-21 10:48:11 UTC
I also face this issue with the Fedora 38 (now 39) machines of parents. Despite having auto update enabled, they remain at the same state when I last time manually updated them.

Automatically checking for updates and installing them on shutdown (bug #436928) - maybe once in a week at least - would greatly enhance the situation imo.
Comment 10 pikesquare 2023-12-18 20:44:12 UTC
I face the same issue currently on fedora 39. I have it running on two different computers but on both the auto updates don't work. It stays the same unless you update manually.
Comment 11 kleiner 2024-03-08 17:57:01 UTC
I am also facing this issue on fedora 39, manually starting the update in discover works perfectly, however auto updates are never done by themselves.
Comment 12 tombrown9501 2024-03-11 22:07:36 UTC
I also would like this feature to work! Updates will never install automatically.
Comment 13 tombrown9501 2024-03-11 23:21:35 UTC
The importance of this bug needs to be updated to Major to reflect the severity based on KDE guidelines.

Major	Like Normal, but with no known workaround, or the workaround is painful and difficult
Normal	Something isn't working the way it was designed to work, with a known workaround that isn't too painful

Thanks!
Comment 14 nutzloserwerbemuell 2024-04-06 00:19:05 UTC
I do agree as well, this bug should get a higher priority and be fixed soon -  epecially since the KDE team does actively promote offline updates ( https://discuss.kde.org/t/why-doesnt-discover-notifier-enable-offline-updates-by-default-if-theyre-recommended/3336/14?u=rokejulianlockhart ). 

The average user sees the option to enable automatic updated right next to offline updates in KDE system settings, is happy about it, activates it - and never looks for updates again.  This menas then the bug noted here causes updates to be effectively disabled...
Comment 15 nutzloserwerbemuell 2024-04-06 00:21:53 UTC
(edit: I just noted the bug already got a higher priority. Sorry for that...)
Comment 16 John 2024-07-04 15:45:49 UTC
I've been thinking about this...

I think Plasma is misleading users if they set update settings to

Apply System Updates: Immediately

And it only does so "after 15 minutes of idle" (which may never occur!).

When set to "Immediately" it should indeed apply them "Immediately" and not after XX Minutes of Idle.
Having it "delayed" misleads the user.

So either the idle time is removed or, ideally, a solution like Elias said: allowing user to set it manually (to, e.g.: 0min, 15min, 30 min) - where the 15min could be the default value...
Comment 17 John 2024-07-04 15:48:23 UTC
BTW, i think the option to apply updates as soon as possible (e.g.: after 0min) is an important option!
Comment 18 Timothée Ravier 2024-09-09 12:30:07 UTC
This is likely a duplicate of https://bugs.kde.org/show_bug.cgi?id=471548
Comment 19 Nate Graham 2024-09-16 14:29:53 UTC

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