There are multiple things that I have identified that prevent quick boots with systems configured with encrypted swap.
1) resume device is most likely incorrect Steps to mitigate: $ echo RESUME=none | sudo tee -a /etc/initramfs-tools/conf.d/resume $ sudo initramfs-update -u 2) systems, not in fact hanging to boot... I can reproduce and see the timeouts reliably in the log, but they are not causing the system to fail to boot and the systems do come up non- degraged. Specifically eventually during boot and after a few Job Timeouts, the swap does come up and is activated. If you experience this, please switch to tty3 and do: $ systemctl is-system-running $ systemctl list-units --failed If that is "running", and no units are listed, all is good. On the systems I've reproduced the timeout on, they would boot non-degraded without any failed units. I wonder if the system is simply still upgrading... for example, I can see in jibel's logs that e.g. there is a tonne of incomplete upgrades due to .dpkg-new and .dpkg-tmp files: Apr 23 08:46:25 ubuntu gnome-session[1567]: (gnome-software:1734): As-WARNING **: failed to rescan: Failed to parse /usr/share/applications/gnome-sudoku.desktop.dpkg-tmp file: cannot process file of type text/plain Apr 23 08:46:25 ubuntu gnome-session[1567]: (gnome-software:1734): As-WARNING **: failed to rescan: Failed to parse /usr/share/applications/gnome-sudoku.desktop file: cannot process file of type application/x-desktop Apr 23 08:46:26 ubuntu gnome-session[1567]: (gnome-software:1734): As-WARNING **: failed to rescan: Failed to parse /usr/share/applications/gnome-system-log.desktop.dpkg-new file: Error opening file: Permission denied Apr 23 08:46:26 ubuntu gnome-session[1567]: (gnome-software:1734): As-WARNING **: failed to rescan: Failed to parse /usr/share/applications/gnome-system-log.desktop.dpkg-tmp file: cannot process file of type text/plain Apr 23 08:46:26 ubuntu gnome-session[1567]: (gnome-software:1734): As-WARNING **: failed to rescan: Failed to parse /usr/share/applications/gnome-system-log.desktop file: cannot process file of type application/x-desktop Apr 23 08:46:27 ubuntu gnome-session[1567]: (gnome-software:1734): As-WARNING **: failed to rescan: Failed to parse /usr/share/applications/gnome-system-monitor-kde.desktop.dpkg-new file: Error opening file: Permission denied And similar. -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to systemd in Ubuntu. https://bugs.launchpad.net/bugs/1765724 Title: Xenial -> Bionic - System fails to boot after upgrade - gnome- screensaver & gnome-shell fail to start? Status in cryptsetup package in Ubuntu: Invalid Status in gnome-shell package in Ubuntu: New Status in systemd package in Ubuntu: Invalid Bug description: Test Case: 1. Install Xenial Desktop with encrypted home 2. Upgrade to bionic 3. Reboot Actual Result The system appears to fail to start gnome-shell / gnome-screensaver: Apr 23 14:17:12 ubuntu dbus-daemon[1645]: [session uid=121 pid=1645] Activating service name='org.gnome.ScreenSaver' requested by ':1.3' (uid=121 pid=1647 comm="/usr/lib/gnome-session/gnome-session-binary --auto Apr 23 14:17:12 ubuntu org.gnome.ScreenSaver[1645]: Unable to init server: Could not connect: Connection refused Apr 23 14:17:12 ubuntu gnome-screensav[1654]: Cannot open display: Apr 23 14:17:12 ubuntu dbus-daemon[1645]: [session uid=121 pid=1645] Activated service 'org.gnome.ScreenSaver' failed: Process org.gnome.ScreenSaver exited with status 1 Apr 23 14:17:12 ubuntu gnome-session[1647]: gnome-session-binary[1647]: CRITICAL: Unable to create a DBus proxy for GnomeScreensaver: Error calling StartServiceByName for org.gnome.ScreenSaver: GDBus.Error:org.f Apr 23 14:17:12 ubuntu gnome-session-binary[1647]: CRITICAL: Unable to create a DBus proxy for GnomeScreensaver: Error calling StartServiceByName for org.gnome.ScreenSaver: GDBus.Error:org.freedesktop.DBus.Error Apr 23 14:17:12 ubuntu gnome-shell[1656]: Failed to create backend: Could not find a primary drm kms device Apr 23 14:17:12 ubuntu gnome-session[1647]: gnome-session-binary[1647]: WARNING: App 'org.gnome.Shell.desktop' exited with code 1 Apr 23 14:17:12 ubuntu gnome-session-binary[1647]: WARNING: App 'org.gnome.Shell.desktop' exited with code 1 Apr 23 14:17:12 ubuntu gnome-session-binary[1647]: Unrecoverable failure in required component org.gnome.Shell.desktop Apr 23 14:17:12 ubuntu gdm-launch-environment][1627]: pam_unix(gdm-launch-environment:session): session closed for user gdm Apr 23 14:17:12 ubuntu gdm3[1187]: GdmDisplay: display lasted 0.292659 seconds Apr 23 14:17:12 ubuntu systemd-logind[1028]: Removed session c2. Apr 23 14:17:12 ubuntu spice-vdagentd[1186]: Error getting active session: No data available Apr 23 14:17:12 ubuntu spice-vdagentd[1186]: Error getting active session: No data available Apr 23 14:17:12 ubuntu gdm3[1187]: Child process -1643 was already dead. Also the system hangs on boot when it activates the encrypted swap. There are the following entries in the journal: $ journalctl -b-1 -o short-monotonic |grep crypt [ 1.535326] ubuntu kernel: Key type encrypted registered [ 125.637205] ubuntu systemd[1]: Dependency failed for Cryptography Setup for cryptswap1. [ 125.637789] ubuntu systemd[1]: Dependency failed for dev-mapper-cryptswap1.device. [ 125.638311] ubuntu systemd[1]: Dependency failed for /dev/mapper/cryptswap1. [ 125.639351] ubuntu systemd[1]: dev-mapper-cryptswap1.swap: Job dev-mapper-cryptswap1.swap/start failed with result 'dependency'. [ 125.639478] ubuntu systemd[1]: dev-mapper-cryptswap1.device: Job dev-mapper-cryptswap1.device/start failed with result 'dependency'. [ 125.639594] ubuntu systemd[1]: Dependency failed for Local Encrypted Volumes. [ 125.640128] ubuntu systemd[1]: cryptsetup.target: Job cryptsetup.target/start failed with result 'dependency'. [ 125.640266] ubuntu systemd[1]: systemd-cryptsetup@cryptswap1.service: Job systemd-cryptsetup@cryptswap1.service/start failed with result 'dependency'. [ 383.902153] ubuntu systemd[1]: Starting Cryptography Setup for cryptswap1... [ 383.913899] ubuntu systemd-cryptsetup[672]: Set cipher aes, mode xts-plain64, key size 256 bits for device /dev/disk/by-uuid/34ea85fd-854b-4892-95b9-7073dd2dbf7b. [ 384.138596] ubuntu systemd[1]: Started Cryptography Setup for cryptswap1. [ 384.143845] ubuntu systemd[1]: Reached target Local Encrypted Volumes. [ 384.167475] ubuntu systemd[1]: Found device /dev/mapper/cryptswap1. [ 384.171327] ubuntu systemd[1]: Activating swap /dev/mapper/cryptswap1... [ 384.184639] ubuntu kernel: Adding 2093564k swap on /dev/mapper/cryptswap1. Priority:-2 extents:1 across:2093564k FS [ 384.191435] ubuntu systemd[1]: Activated swap /dev/mapper/cryptswap1. But eventually activates, once the device is there. Note this is not a hang, as timeouts are reached "instantly". ProblemType: Bug DistroRelease: Ubuntu 18.04 Package: cryptsetup 2:2.0.2-1ubuntu1 ProcVersionSignature: Ubuntu 4.15.0-15.16-generic 4.15.15 Uname: Linux 4.15.0-15-generic x86_64 ApportVersion: 2.20.9-0ubuntu5 Architecture: amd64 CurrentDesktop: ubuntu:GNOME Date: Fri Apr 20 15:56:52 2018 EcryptfsInUse: Yes InstallationDate: Installed on 2018-04-18 (2 days ago) InstallationMedia: Ubuntu 16.04.4 LTS "Xenial Xerus" - Release amd64 (20180228) ProcEnviron: TERM=xterm-256color PATH=(custom, no user) XDG_RUNTIME_DIR=<set> LANG=fr_FR.UTF-8 SHELL=/bin/bash SourcePackage: cryptsetup UpgradeStatus: Upgraded to bionic on 2018-04-20 (0 days ago) cmdline: BOOT_IMAGE=/boot/vmlinuz-4.15.0-15-generic root=UUID=ba774fed-a987-4070-9571-0e4790b08680 ro recovery nomodeset crypttab: cryptswap1 UUID=34ea85fd-854b-4892-95b9-7073dd2dbf7b /dev/urandom swap,offset=1024,cipher=aes-xts-plain64 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cryptsetup/+bug/1765724/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp