screen became locked during release upgrade
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ubuntu-release-upgrader (Ubuntu) |
Fix Released
|
Critical
|
Unassigned | ||
Focal |
Fix Released
|
Critical
|
Unassigned | ||
Impish |
Fix Released
|
Critical
|
Unassigned | ||
Jammy |
Fix Released
|
Critical
|
Unassigned |
Bug Description
[Impact]
This bug prevents the screen lock inhibitor logic when the Gtk3 or KDE
frontends are used for release upgrades. This leaves users at risk of
encountering an issue where the lock screen cannot be unlocked, if it was
locked during upgrade.
This is needed in the stable releases because it affects upgrades to jammy.
[Test Plan]
To reproduce on impish or focal, do the following:
* For ease of testing, set your screen lock timeout to 1 minute.
* Start an upgrade to jammy using the Gtk3 frontend:
$ do-release-upgrade -d -f DistUpgradeViewGtk3
* Click the 'Upgrade' button when the release notes are displayed. When
prompted, click 'Start Upgrade'. Observe that there is no information message
indicating the screen lock has been disabled (nor is there a message
indicating that we failed to disable the screen lock).
* Idle long enough to allow the screen lock to kick in.
Note: dbus-monitor "interface=
monitor any attempts to disable the screen lock.
[Where problems could occur]
This patch introduces new environment variables to the upgrade that were not
previously set when the KDE or Gtk3 frontends were used. Regressions could
occur if any existing code (besides the screen lock inhibitor code) had
different behavior based on these variables.
[Original Description]
I was upgrading from Ubuntu 21.10 to Ubuntu 22.04 this morning when my lock screen became enabled. My screen is set to blank after 5 minutes. Looking at the main release upgrade log file I noticed the following:
2022-04-11 06:55:10,389 INFO release-upgrader version '22.04.7' started
...
2022-04-11 06:58:10,297 DEBUG inhibit screensaver
Then in /var/log/auth.log I found:
Apr 11 07:06:24 godspeed gdm-password]: gkr-pam: unlocked login keyring
I don't recall when I last responded to a dialog from ubuntu-
2022-04-11 06:56:18,259 DEBUG About to apply the following changes
So that would only be a couple of minutes of inactivity before the screensaver was inhibited, so I don't think it worked. Additionally, I never saw a message about the screen lock being disabled.
ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: ubuntu-
ProcVersionSign
Uname: Linux 5.15.0-25-generic x86_64
ApportVersion: 2.20.11-0ubuntu80
Architecture: amd64
CasperMD5CheckR
CrashDB: ubuntu
CurrentDesktop: ubuntu:GNOME
Date: Mon Apr 11 11:07:56 2022
InstallationDate: Installed on 2022-01-07 (94 days ago)
InstallationMedia: Ubuntu 21.10 "Impish Indri" - Release amd64 (20211012)
PackageArchitec
SourcePackage: ubuntu-
Symptom: ubuntu-
UpgradeStatus: Upgraded to jammy on 2022-04-11 (0 days ago)
VarLogDistupgra
Related branches
- William Wilson: Approve
-
Diff: 15961 lines (+3307/-2521)129 files modifiedDistUpgrade/DistUpgradeVersion.py (+1/-1)
debian/changelog (+7/-0)
do-release-upgrade (+23/-0)
po/af.po (+26/-20)
po/am.po (+26/-20)
po/an.po (+26/-20)
po/ar.po (+26/-20)
po/ast.po (+26/-20)
po/az.po (+26/-20)
po/be.po (+26/-20)
po/bg.po (+26/-20)
po/bn.po (+26/-20)
po/bo.po (+26/-20)
po/br.po (+26/-20)
po/bs.po (+26/-20)
po/ca.po (+26/-20)
po/ca@valencia.po (+26/-20)
po/ce.po (+26/-20)
po/ceb.po (+26/-20)
po/ckb.po (+26/-20)
po/crh.po (+26/-20)
po/cs.po (+26/-20)
po/csb.po (+26/-20)
po/cv.po (+26/-20)
po/cy.po (+26/-20)
po/da.po (+26/-20)
po/de.po (+26/-20)
po/dv.po (+26/-20)
po/el.po (+26/-20)
po/en_AU.po (+26/-20)
po/en_CA.po (+26/-20)
po/en_GB.po (+26/-20)
po/eo.po (+26/-20)
po/es.po (+26/-20)
po/et.po (+26/-20)
po/eu.po (+26/-20)
po/fa.po (+26/-20)
po/fi.po (+26/-20)
po/fil.po (+26/-20)
po/fo.po (+26/-20)
po/fr.po (+26/-20)
po/fr_CA.po (+26/-20)
po/fur.po (+26/-20)
po/fy.po (+26/-20)
po/ga.po (+26/-20)
po/gd.po (+26/-20)
po/gl.po (+26/-20)
po/gu.po (+26/-20)
po/gv.po (+26/-20)
po/he.po (+26/-20)
po/hi.po (+26/-20)
po/hr.po (+26/-20)
po/hu.po (+26/-20)
po/hy.po (+26/-20)
po/ia.po (+26/-20)
po/id.po (+26/-20)
po/is.po (+26/-20)
po/it.po (+26/-20)
po/ja.po (+26/-20)
po/jv.po (+26/-20)
po/ka.po (+26/-20)
po/kk.po (+26/-20)
po/km.po (+26/-20)
po/kn.po (+26/-20)
po/ko.po (+26/-20)
po/ku.po (+26/-20)
po/ky.po (+26/-20)
po/lb.po (+26/-20)
po/ln.po (+26/-20)
po/lo.po (+26/-20)
po/lt.po (+26/-20)
po/lv.po (+26/-20)
po/mhr.po (+26/-20)
po/mjw.po (+26/-20)
po/mk.po (+26/-20)
po/ml.po (+26/-20)
po/mn.po (+26/-20)
po/mnw.po (+26/-20)
po/mr.po (+26/-20)
po/ms.po (+26/-20)
po/mus.po (+26/-20)
po/my.po (+26/-20)
po/nb.po (+26/-20)
po/nds.po (+26/-20)
po/ne.po (+26/-20)
po/nl.po (+26/-20)
po/nn.po (+26/-20)
po/oc.po (+26/-20)
po/om.po (+26/-20)
po/pa.po (+26/-20)
po/pam.po (+26/-20)
po/pl.po (+26/-20)
po/ps.po (+26/-20)
po/pt.po (+26/-20)
po/pt_BR.po (+26/-20)
po/qu.po (+26/-20)
po/ro.po (+26/-20)
po/ru.po (+26/-20)
po/rw.po (+26/-20)
po/sc.po (+26/-20)
po/sco.po (+26/-20)
po/sd.po (+26/-20)
po/se.po (+26/-20)
po/shn.po (+26/-20)
po/si.po (+26/-20)
po/sk.po (+26/-20)
po/sl.po (+26/-20)
po/sq.po (+26/-20)
po/sr.po (+26/-20)
po/sv.po (+26/-20)
po/szl.po (+26/-20)
po/ta.po (+26/-20)
po/ta_LK.po (+26/-20)
po/te.po (+26/-20)
po/tg.po (+26/-20)
po/th.po (+26/-20)
po/tl.po (+26/-20)
po/tr.po (+26/-20)
po/ubuntu-release-upgrader.pot (+26/-20)
po/ug.po (+26/-20)
po/uk.po (+26/-20)
po/ur.po (+26/-20)
po/uz.po (+26/-20)
po/vi.po (+26/-20)
po/xh.po (+26/-20)
po/zh_CN.po (+26/-20)
po/zh_HK.po (+26/-20)
po/zh_TW.po (+26/-20)
po/zu.po (+26/-20)
- Brian Murray: Approve
-
Diff: 16494 lines (+3440/-2571)132 files modifiedDistUpgrade/DistUpgradeVersion.py (+1/-1)
data/mirrors.cfg (+72/-50)
debian/changelog (+7/-0)
do-release-upgrade (+23/-0)
po/af.po (+26/-20)
po/am.po (+26/-20)
po/an.po (+26/-20)
po/ar.po (+26/-20)
po/ast.po (+26/-20)
po/az.po (+26/-20)
po/be.po (+26/-20)
po/bg.po (+26/-20)
po/bn.po (+26/-20)
po/bo.po (+26/-20)
po/br.po (+26/-20)
po/bs.po (+26/-20)
po/ca.po (+26/-20)
po/ca@valencia.po (+26/-20)
po/ce.po (+26/-20)
po/ceb.po (+26/-20)
po/ckb.po (+26/-20)
po/crh.po (+26/-20)
po/cs.po (+26/-20)
po/csb.po (+26/-20)
po/cv.po (+26/-20)
po/cy.po (+26/-20)
po/da.po (+26/-20)
po/de.po (+26/-20)
po/dv.po (+26/-20)
po/el.po (+26/-20)
po/en_AU.po (+26/-20)
po/en_CA.po (+26/-20)
po/en_GB.po (+26/-20)
po/eo.po (+26/-20)
po/es.po (+26/-20)
po/et.po (+26/-20)
po/eu.po (+26/-20)
po/fa.po (+26/-20)
po/fi.po (+26/-20)
po/fil.po (+26/-20)
po/fo.po (+26/-20)
po/fr.po (+26/-20)
po/fr_CA.po (+26/-20)
po/fur.po (+26/-20)
po/fy.po (+26/-20)
po/ga.po (+26/-20)
po/gd.po (+26/-20)
po/gl.po (+26/-20)
po/gu.po (+26/-20)
po/gv.po (+26/-20)
po/he.po (+26/-20)
po/hi.po (+26/-20)
po/hr.po (+26/-20)
po/hu.po (+26/-20)
po/hy.po (+26/-20)
po/ia.po (+26/-20)
po/id.po (+26/-20)
po/is.po (+26/-20)
po/it.po (+26/-20)
po/ja.po (+26/-20)
po/jv.po (+26/-20)
po/ka.po (+26/-20)
po/kk.po (+26/-20)
po/km.po (+26/-20)
po/kn.po (+26/-20)
po/ko.po (+26/-20)
po/ku.po (+26/-20)
po/ky.po (+26/-20)
po/lb.po (+26/-20)
po/ln.po (+26/-20)
po/lo.po (+26/-20)
po/lt.po (+26/-20)
po/lv.po (+26/-20)
po/mhr.po (+26/-20)
po/mjw.po (+26/-20)
po/mk.po (+26/-20)
po/ml.po (+26/-20)
po/mn.po (+26/-20)
po/mnw.po (+26/-20)
po/mr.po (+26/-20)
po/ms.po (+26/-20)
po/mus.po (+26/-20)
po/my.po (+26/-20)
po/nb.po (+26/-20)
po/nds.po (+26/-20)
po/ne.po (+26/-20)
po/nl.po (+26/-20)
po/nn.po (+26/-20)
po/oc.po (+26/-20)
po/om.po (+26/-20)
po/pa.po (+26/-20)
po/pam.po (+26/-20)
po/pl.po (+26/-20)
po/ps.po (+26/-20)
po/pt.po (+26/-20)
po/pt_BR.po (+26/-20)
po/qu.po (+26/-20)
po/ro.po (+26/-20)
po/ru.po (+26/-20)
po/rw.po (+26/-20)
po/sc.po (+26/-20)
po/sco.po (+26/-20)
po/sd.po (+26/-20)
po/se.po (+26/-20)
po/shn.po (+26/-20)
po/si.po (+26/-20)
po/sk.po (+26/-20)
po/sl.po (+26/-20)
po/sq.po (+26/-20)
po/sr.po (+26/-20)
po/sv.po (+26/-20)
po/szl.po (+26/-20)
po/ta.po (+26/-20)
po/ta_LK.po (+26/-20)
po/te.po (+26/-20)
po/tg.po (+26/-20)
po/th.po (+26/-20)
po/tl.po (+26/-20)
po/tr.po (+26/-20)
po/ubuntu-release-upgrader.pot (+26/-20)
po/ug.po (+26/-20)
po/uk.po (+26/-20)
po/ur.po (+26/-20)
po/uz.po (+26/-20)
po/vi.po (+26/-20)
po/xh.po (+26/-20)
po/zh_CN.po (+26/-20)
po/zh_HK.po (+26/-20)
po/zh_TW.po (+26/-20)
po/zu.po (+26/-20)
utils/demoted.cfg (+34/-0)
utils/demoted.cfg.focal (+27/-0)
- Brian Murray: Pending requested
-
Diff: 105 lines (+43/-10)3 files modifiedDistUpgrade/DistUpgradeController.py (+12/-10)
debian/changelog (+8/-0)
do-release-upgrade (+23/-0)
- Brian Murray: Approve
-
Diff: 160 lines (+72/-17)4 files modifiedDistUpgrade/DistUpgradeController.py (+12/-10)
data/do-release-upgrade.8 (+28/-7)
debian/changelog (+9/-0)
do-release-upgrade (+23/-0)
I have tested this with both the DistUpgradeViewGtk3 and DistUpgradeViewText frontends. Using Gtk3, the screen lock prevention code fails, and no failure is reported in the logs. Using the text frontend, the screen lock prevention code works as expected.
I believe the issue is that for the Gtk3 and KDE frontends, the dist-upgrade script is not invoked in a way that preserves the user's environment variables [1], namely `DBUS_SESSION_ BUS_ADDRESS` etc. So, the DBus call fails and the failure is not reported because `XDG_SESSION_TYPE` is not set either [2].
[1] https:/ /git.launchpad. net/ubuntu- release- upgrader/ tree/do- release- upgrade# n221 /git.launchpad. net/ubuntu- release- upgrader/ tree/DistUpgrad e/DistUpgradeCo ntroller. py#n2079
[2] https:/