diff --git a/data/do-release-upgrade.8 b/data/do-release-upgrade.8
index ea3dd8f..9873d6f 100644
--- a/data/do-release-upgrade.8
+++ b/data/do-release-upgrade.8
@@ -11,12 +11,18 @@ This is the preferred command if the machine has no graphic environment or if th
 .SH "OPTIONS"
 .TP 
 \fB\-h\fR, \fB\-\-help\fR
-show help message and exit
-.TP 
+show this help message and exit
+.TP
+\fB\-V\fR, \fB\-\-version\fR
+Show version and exit
+.TP
 \fB\-d\fR, \fB\-\-devel\-release\fR
-If using the latest supported release, upgrade to
-the development release
-.TP 
+If using the latest supported release, upgrade to the
+development release
+.TP
+\fB\-\-data\-dir\fR=\fI\,DATA_DIR\/\fR
+Directory that contains the data files
+.TP
 \fB\-p\fR, \fB\-\-proposed\fR
 Try upgrading to the latest release using the upgrader
 from Ubuntu\-proposed
@@ -25,8 +31,23 @@ from Ubuntu\-proposed
 Run in a special upgrade mode. Currently "desktop" for
 regular upgrades of a desktop system and "server" for
 server systems are supported.
-.TP 
-\fB\-f\fR FRONTEND, \fB\-\-frontend\fR=\fIFRONTEND\fR
+.TP
+\fB\-f\fR FRONTEND, \fB\-\-frontend\fR=\fI\,FRONTEND\/\fR
 Run the specified frontend
+.TP
+\fB\-c\fR, \fB\-\-check\-dist\-upgrade\-only\fR
+Check only if a new distribution release is available
+and report the result via the exit code
+.TP
+\fB\-\-allow\-third\-party\fR
+Try the upgrade with third party mirrors and
+repositories enabled instead of commenting them out.
+.HP
+\fB\-q\fR, \fB\-\-quiet\fR
+.TP
+\fB\-e\fR ENV, \fB\-\-env\fR=\fI\,ENV\/\fR
+A comma\-seprated list of environment variables (e.g.
+VAR1=VALUE1,VAR2=VALUE2) that should be set during the
+upgrade.
 .SH "SEE ALSO"
 \fBupdate\-manager\fR(8), \fBapt\-get\fR(8)
diff --git a/debian/changelog b/debian/changelog
index b95ff88..9169537 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+ubuntu-release-upgrader (1:22.04.9) UNRELEASED; urgency=medium
+
+  * do-release-upgrade: Preserve env vars needed for screen lock prevention (LP: #1968607).
+
+ -- Nick Rosbrook <nick.rosbrook@canonical.com>  Tue, 12 Apr 2022 15:00:49 -0400
+
 ubuntu-release-upgrader (1:22.04.8) jammy; urgency=medium
 
   [ Brian Murray ]
diff --git a/do-release-upgrade b/do-release-upgrade
index 44680c4..a395bc1 100755
--- a/do-release-upgrade
+++ b/do-release-upgrade
@@ -110,6 +110,10 @@ if __name__ == "__main__":
                             "instead of commenting them out."))
   parser.add_option ("-q", "--quiet", default=False, action="store_true",
                      dest="quiet")
+  parser.add_option ("-e", "--env",
+                     help=_("A comma-seprated list of environment variables "
+                            "(e.g. VAR1=VALUE1,VAR2=VALUE2) that should be set "
+                            "during the upgrade."))
 
   (options, args) = parser.parse_args()
 
@@ -216,6 +220,15 @@ if __name__ == "__main__":
     # the env variable is used by code in the dist-upgrader tarball
     os.environ["RELEASE_UPGRADER_ALLOW_THIRD_PARTY"] = "True"
 
+  if options.env:
+      for env in options.env.split(','):
+          parts = env.split('=')
+          if len(parts) < 2:
+              continue
+
+          # The value itself may contain '='.
+          os.environ[parts[0]] = '='.join(parts[1:])
+
   # GTK 3 fetcher starts setting up the the GUI and KDE GUI needs to start GUI
   # later, too.
   if (options.frontend in {"DistUpgradeViewGtk3", "DistUpgradeViewKDE"} and
@@ -225,6 +238,16 @@ if __name__ == "__main__":
     # this is needed because pkexec doesn't pass on the env
     if 'RELEASE_UPGRADER_ALLOW_THIRD_PARTY' in os.environ:
         sys.argv.append('--allow-third-party')
+
+    # Some extra environment variables need to be passed, but we need
+    # to do this explicitly with do-release-upgrade because pkexec
+    # does not provide such functionality.
+    extra_env_vars = [
+        'DBUS_SESSION_BUS_ADDRESS=%s' % os.getenv('DBUS_SESSION_BUS_ADDRESS', ''),
+        'XDG_SESSION_TYPE=%s' % os.getenv('XDG_SESSION_TYPE', ''),
+    ]
+    sys.argv.append('--env=%s' % ','.join(extra_env_vars))
+
     os.execv("/usr/bin/pkexec", ["pkexec"] + sys.argv)
 
   fetcher = get_fetcher(options.frontend, m.new_dist, options.data_dir)
