When gnome-software is used to install updates the Installed Updates notification sometimes does not appear after installation. Reproducible: Sometimes Steps to Reproduce: 1. Updates to be installed appear in gnome-software. 2. Updates are installed. 3. Updates Installed notification sometimes does not appear. Actual Results: Updates Installed notification sometimes does not appear after installation of updates. Expected Results: Updates Installed notification should always appear after installation of updates.
Thanks for a bug report. The "Updates are installed", what do you mean precisely, please? Like the gnome-software installed them in the background, without your interaction, or you clicked a button to update some apps in the Updates tab of the gnome-software? The updates are checked for up to once per day, when they can be also installed, but the installation as such happens only for the apps which do not require restart, which are most often Flatpak applications. The package updates are only prepared, they are updated the next machine restart. I mean, it also depends what apps had been updated.
I happens when I click on the Update button. The sequence is: Update->Download->Restart & Update->Restart & Install->system restarts and installs updates->system restarts again->I login->the system shows an Installed Updates notification (sometimes, this is the bug that it does not always appear).
Thanks for the update. I see, then it's for the offline updates (PackageKit in this case). Did the message show up the last time? Or, the next time you'll face this, could you run from a terminal: ``` for key in `gsettings list-keys org.gnome.software | grep timestamp`; do echo -n "$key:"; gsettings get org.gnome.software $key; done ls -l /var/lib/PackageKit/offline-update-competed ``` The gnome-software shows the notification only if the file's timestamp is later than `packagekit-historical-updates-timestamp`, or better said, the updates logged in the file are not considered as new updates when they've been done before the `packagekit-historical-updates-timestamp`.
I don't completely understand your comment 3. I don't remember whether the notification showed up the last time I did a manual update. When should I run the script you provided? What am I supposed to do with the results?
You can run the commands now. What I meant in the comment #3 was to run it when you'll notice the misbehaviour, to see what values the gnome-software uses to determine whether to show the notification about the newly installed apps/packages or not. Having both states, aka before and after, would be a good thing too. The value for the `packagekit-historical-updates-timestamp` should not change unless the updates had been installed. You may verify that (and that no updates had been installed), when you run the commands in the morning, say today and tomorrow, aka in two days, saving the returned values for both days. Then you can run the command again when you'd miss the notification. You might notice when the PackageKit installs the packages, it's part of the machine restart/power off, and if using GNOME you are asked whethr you want to install the updates in the restart/power off dialogs.
Created attachment 2127473 [details] Script output before
Created attachment 2127475 [details] Script output after
I ran your script before and after an update where the problem showed up (no Installed Updates notification). The output was different depending on whether I ran the script as sudo or not. Attached are the outputs run as sudo before and after the update.
Created attachment 2127479 [details] Script output after no sudo I added the script output after update run as a regular user (without sudo).
> The output was different depending on whether I ran the script as sudo or not. Right, I'm sorry I did not mention it before. You run them as a regular user, because it's how the gnome-software is running too. The `gsettings` command reads the values for the logged in user and it shows all zeros for root, because root never ran gnome-software (and it also should not). The /var/lib/.... file is readable by anybody, thus it also does not need root access. The `packagekit-historical-updates-timestamp` value is `1769719638` , which can be converted to a readable time with `date --date="@1769719638"`. I'm surely in a different timezone, it shows 9:47 here, but as the PackageKit's file is 12:47, I guess it's that time. I see the timestamp is used to not show update errors multiple times, otherwise it always provides information about the last update. The `install-timestamp` is `1769644583`, almost 21 hours earlier than the previous time stamp. The `install-timestamp` is updated only if any historical updates are shown. I'm wondering what the content of the `/var/lib/PackageKit/offline-update-competed` is. I do not want to know the list of the packages (it can be very long), but it looks like something failed to update. It's only 447 bytes long, thus either that or only few packages had been updated. You can run from a terminal: gnome-software --mode=updated which is the same as if you'd click on the notification about recently updated apps/packages, to see which they were.
I just figured that plain package updates are skipped from the notification (in contrast to an update which contains an app update, which is a package with AppStream data). It's also filled as bug #2392057 (it's for dnf5 plugin, but I realized the PackageKit plugin behaves the same), thus I'm marking this bug as a duplicate of the older bug. *** This bug has been marked as a duplicate of bug 2392057 ***