+++ This bug was initially created as a clone of Bug #419055 +++ SUMMARY Even when the user sets a lower frequency of automatic updates (e.g. weekly) in the Software Sources dialog, Discover nevertheless checks for updates daily. This means that effectively the user has no control over automatic update frequency. STEPS TO REPRODUCE 1. In Discover, click on "Sources" -> "Software Sources". Provide the password if required. 2. In the "Software Sources" dialog that opens, click on "Updates". Make sure the "Check for updates" checkbox is checked, and choose a frequency other than "Daily" (e.g. "Weekly") in the corresponding dropdown. Click on "Close". OBSERVED RESULT Update notifications appear in the notifications area multiple times a week, presumably on every startup if updates are available. EXPECTED RESULT Update notifications appear at most once a week. SOFTWARE/OS VERSIONS Linux/KDE Plasma: 6.2.1-arch1-1 (64-bit) KDE Plasma Version: 5.27.1 KDE Frameworks Version: 5.103.0 Qt Version: 5.15.8 ADDITIONAL INFORMATION SUMMARY Even when the user sets a lower frequency of automatic updates (e.g. weekly) in the Software Sources dialog, Discover nevertheless checks for updates daily. This means that effectively the user has no control over automatic update frequency. STEPS TO REPRODUCE 1. In Discover, click on "Sources" -> "Software Sources". Provide the password if required. 2. In the "Software Sources" dialog that opens, click on "Updates". Make sure the "Check for updates" checkbox is checked, and choose a frequency other than "Daily" (e.g. "Weekly") in the corresponding dropdown. Click on "Close". OBSERVED RESULT Update notifications appear in the notifications area multiple times a week. EXPECTED RESULT Update notifications appear at most once a week. SOFTWARE/OS VERSIONS Linux/KDE Plasma: Ubuntu 19.10 (available in About System) KDE Plasma Version: 5.16.5 KDE Frameworks Version: 5.62.0 Qt Version: 5.12.4 ADDITIONAL INFORMATION This is a follow up to bug 401810 (Phabricator patch D17375) and bug 337752. Unfortunately, it appears that the issue wasn't resolved (at least not on my system). My analysis shows that Discover's PackageKitNotifier attempts to check the frequency set in software-properties by running "apt-config dump" and looking for the "Apt::Periodic::Update-Package-Lists" property in its output. However, on my system the property name starts with uppercase "APT" rather than "Apt", and ends with a semicolon. Therefore PackageKitNotifier fails to find the correct property value, and falls back to the default of a daily check.
Confirmed. The setting seems to have been moved to System Settings -> Software Update OBSERVED RESULT For me it's set to "Weekly". The notifier told me updates were available so I installed them and rebooted, then the notifier came up again within a few hours EXPECTED RESULT After installing some updates, the notifier doesn't come up again until the selected period has expired (maybe an exception should be made for security updates)
P.S. I'm on KDE Neon User edition, v5.27, with no Snaps or Flatpaks installed
What output do you get for "apt-config dump"? Asking specifically for "Apt::Periodic::Update-Package-Lists"
paul@neon-user:~$ apt-config dump|grep -i Periodic paul@neon-user:~$ i.e. that config item isn't set
That's the setting that Software Sources sets and where Discover looks for it. We cannot follow a setting that doesn't exist. :(
I'm using the "kcm_updates" KCM to change the value of "Notification Frequency"; that setting isn't in the Software Sources section of Discover. The value I set is remembered between invocations, but it does not ask for a password or set "Apt::Periodic::Update-Package-Lists" and it does not seem to affect the frequency of update notifications.
Can I add here that I have the same bug in Fedora which uses dnf as a package manager instead of apt? Or should I create a new bug?
I think that's probably the same bug.
Same issue in Fedora - KDE. Cant even find the option "Check for updates" to uncheck in mine. Discover 5.27.8 KDE Framework 5.109.0 Qt 5.15.10
Same issue here on opensuse tumbleweed with plasma 6.0.3. I've set it to weekly but discover comes up daily. Previously I had discover deinstalled+blacklisted, update to plasma6 ignored that blacklistingand installed it again. I always manually updated the system, but wanted to give discover a chance.
https://invent.kde.org/plasma/discover/-/blob/master/notifier/DiscoverNotifier.cpp#L128 if (earliestNextNotificationTime.isValid() && earliestNextNotificationTime > QDateTime::currentDateTimeUtc()) { return false; } Just an idea. In case earliestNextNotificationTime is NOT valid an updat notification is triggered. Played with python: >>> from PyQt6.QtCore import QDateTime >>> c = QDateTime.fromString("2024,4,7,12,36,49.994") >>> c.isValid() False I could not figure out in a reasonable amount of time how this whole kconf thing works and how it reads/writes DateTime objects, so this might turn out to be wrong.
This still doesn't work with KDE 6.0.5 (Fedora if that matters)
Are we talking here about just the SystemTray icon or also about notifications (as in these small windows which pop up)?
A possibly relevant merge request was started @ https://invent.kde.org/plasma/discover/-/merge_requests/886
(In reply to Khanich from comment #13) > Are we talking here about just the SystemTray icon or also about > notifications (as in these small windows which pop up)? I opened a MR that makes the tray icon follow the notification icon timing, because I am pretty sure that's what people are complaining about. Even if not, it is confusing behaviour anyway.
(In reply to Thomas Duckworth from comment #15) > (In reply to Khanich from comment #13) > > Are we talking here about just the SystemTray icon or also about > > notifications (as in these small windows which pop up)? > > I opened a MR that makes the tray icon follow the notification icon timing, > because I am pretty sure that's what people are complaining about. > > Even if not, it is confusing behaviour anyway. That's why I asked because I would have done this too, if that's the problem.
Git commit f98a9e3fd6ad44e1ace8ba436918afa918297a2c by Aleix Pol Gonzalez, on behalf of Thomas Duckworth. Committed on 30/07/2024 at 22:42. Pushed by apol into branch 'master'. Only show the tray notifier on next notification time This makes it follow the behaviour of the updates notification. It will only appear once per the timeframe specified in the KCM. M +4 -4 notifier/DiscoverNotifier.cpp M +2 -2 notifier/DiscoverNotifier.h M +5 -0 notifier/NotifierItem.cpp https://invent.kde.org/plasma/discover/-/commit/f98a9e3fd6ad44e1ace8ba436918afa918297a2c