How to set the PackageKit uptdate time

gnome 47 wayland

Gnome, somewhere, decides to run Packagekit to update the system, usually about 9:45am. Not a good time.

I thought that enabling and setting the time using /usr/lib/systemd/system/packagekit-background.timer was the ticket to success. Hah! Not so. It runs; it does nothing. Gnome still runs its version of packagekit at an inconvenient time.

How do I set the Gnome time for this to happen?

I have this on KDE as well, I can stop it with systemctl as root but not any other way

Disable packagekit.

TW should be updated at a CLI using “zypper dup”.

How would we do that? package kit is only displayed in systemd while it is active, after that it disapears.

This is something that is started by Gnome itself:

2024-11-27T09:42:01-07:00 sma-station14l systemd[1]: Starting PackageKit Daemon...
2024-11-27T09:42:02-07:00 sma-station14l PackageKit[154636]: daemon start
2024-11-27T09:42:02-07:00 sma-station14l systemd[1]: Started PackageKit Daemon.
2024-11-27T09:42:02-07:00 sma-station14l PackageKit[154636]: uid 1000 is trying to obtain org.freedesktop.packagekit.system-sources-refresh auth (only_trusted:0)
2024-11-27T09:42:02-07:00 sma-station14l PackageKit[154636]: uid 1000 obtained auth for org.freedesktop.packagekit.system-sources-refresh

There is more after this that is downloading updates, and that is irrelevant. Gnome is doing this. How do I stop it?

@40476 I use;

systemctl disable --now packagekit-background.service packagekit-offline-update.service packagekit-background.timer packagekit.service
systemctl mask packagekit-background.service packagekit-offline-update.service packagekit-background.timer packagekit.service
1 Like

You cannot. gnome-software checks for updates every hour and it is not configurable.

$ sudo systemctl disable --now packagekit-background.service packagekit-offline-update.service packagekit-background.timer packagekit.service
[sudo] password for root: 
Removed '/etc/systemd/system/timers.target.wants/packagekit-background.timer'.
Disabling 'packagekit-background.service', but its triggering units are still active:
packagekit-background.timer
$ sudo systemctl mask packagekit-background.service packagekit-offline-update.service packagekit-background.timer packagekit.service
Created symlink '/etc/systemd/system/packagekit-background.service' → '/dev/null'.
Created symlink '/etc/systemd/system/packagekit-offline-update.service' → '/dev/null'.
Created symlink '/etc/systemd/system/packagekit-background.timer' → '/dev/null'.
Created symlink '/etc/systemd/system/packagekit.service' → '/dev/null'.

Of course! This was so obvious! [slaps forehead]

Every hour? That seems ridiculous.
Since the system journal shows PK running once a day, I am inclined to doubt your statement.

@arvidjaar Looks like it can be disabled?

gsettings get org.gnome.software allow-updates
true
gsettings set org.gnome.software allow-updates 'false'

Yes, it was not quite correct. GNOME Software runs every hour and triggers checks once a day. Which is not configurable either :slight_smile: nor is period when it performs the checks (it will be after approximately 6am plus some random offset).

In the past I configured GNOME Software to only check without downloading. This provided notifications and updates have been loaded when I started GNOME Software. It did not work reliably - often the first attempt to download failed and I had to restart it. Since then I switched to using Tumbleweed snapshots and stopped caring.

Hmm. If I try this, how do I revert it?

1 Like

should be able to replace disable with enable and it should work in reverse

@jimbobrae reverse order and change mask to unmask and then disable --now to enable --now and should be back to the default :wink:

1 Like