"cannot refresh whilst network offline"in plasma-discover
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
packagekit (Ubuntu) |
Fix Released
|
Medium
|
Julian Andres Klode | ||
Focal |
Invalid
|
Undecided
|
Unassigned | ||
Hirsute |
Invalid
|
Undecided
|
Unassigned | ||
Impish |
Fix Released
|
Medium
|
Julian Andres Klode |
Bug Description
[Impact]
In Ubuntu Impish, an issue has been noted in regards to refreshing packages in Plasma Discover for upgrade or installation. An error appears upon initialization of the Discover interface:
"cannot refresh whilst network offline"
This will happen regardless of if a system is online or not.
I identified a race condition in which this is occurring on systems where packagekitd is initialized before the network service is online. This was a relatively easy fix and required adding one line to the packagekit.service file:
Wants=network-
This ensures that packagekitd is not initialized prior to being online. If the 90 second deadline isn't met, then packagekitd will simply not start as a background process until the user connects to the network and initializes it via a graphical utility, such as with GNOME Software or Plasma Discover, both of which initialize packagekitd on a user level.
The attached patch will easily apply the fix via normal Debian packaging methods.
[Test Plan]
* Install Kubuntu or Ubuntu Studio
* While connected to network, Run Discover
* Discover will complain about "cannot refresh whilst offline", which is being communicated from PackageKit. All functionality in Discover is hindered from this point forward. This is due to a hung packagekitd process which sees the network offline, even though this is false.
[Where problems could occur]
* packagekitd's systemd service will time-out after 90 seconds if systemd finds no network, which means any update notifications will not automatically start until packagekitd is manually started. Luckily, Discover and GNOME Software both attempt to start packagekitd for the user when run. I'd consider this to be expected behavior for an offline system. The fix is mostly to prevent the false-negative of the system being offline when it's really not.
[Other Info]
* This fix has been accepted upstream by the PackageKit maintainers as a sane workaround for when gio misbehaves or otherwise. It's a decent safety net. https:/
ProblemType: Bug
DistroRelease: Ubuntu 21.10
Package: packagekit 1.2.2-2ubuntu1 [modified: lib/systemd/
ProcVersionSign
Uname: Linux 5.13.0-
NonfreeKernelMo
ApportVersion: 2.20.11-0ubuntu68
Architecture: amd64
CasperMD5CheckR
CurrentDesktop: KDE
Date: Thu Sep 9 16:34:12 2021
InstallationDate: Installed on 2021-03-20 (172 days ago)
InstallationMedia: Ubuntu-Studio 21.04 "Hirsute Hippo" - Alpha amd64 (20210320)
SourcePackage: packagekit
UpgradeStatus: Upgraded to impish on 2021-06-13 (88 days ago)
tags: | added: patch |
tags: | added: rls-ii-incoming |
tags: | removed: rls-ii-incoming |
tags: | added: fr-1721 |
Changed in packagekit (Ubuntu Impish): | |
status: | New → Fix Committed |
description: | updated |
Changed in packagekit (Ubuntu Impish): | |
status: | In Progress → Fix Committed |
summary: |
- "cannot refresh whilst network offline" bug + [SRU] "cannot refresh whilst network offline"in plasma-discover |
summary: |
- [SRU] "cannot refresh whilst network offline"in plasma-discover + "cannot refresh whilst network offline"in plasma-discover |
The packagekit maintainer (Richard Hughes) has requested this patch as a pull request, so this will be in packagekit upstream very, very soon. https:/ /github. com/PackageKit/ PackageKit/ issues/ 336#issuecommen t-916666713