Score:0

Ubuntu Focal freezes and does not resume after suspend (e.g. laptop close)

ph flag

When I close my laptop and re-open it (or it auto sleeps after inactivity), the machine will not resume correctly. The screen will show the sleep screen -- a brief description of the suspend activity -- and the fans will start blowing like a 747 taking off. The only recourse is to hard-boot (hold power button for 4 seconds).

This used to work OK with Bionic (which became unstable after too many experiments with various hardware hacking), so I'm a bit baffled.

There is a reference in dmesg to hibernation:

[   30.198017] Lockdown: systemd-logind: hibernation is restricted; see man kernel_lockdown.7

But it's not clear to me how to resolve this issue. man kernel_lockdown discusses the disabled "unencrypted" hibernation, which implies an encrypted hibernation is possible, but does not provide further detail.

Ubuntu docs on Enable Hibernate With Encrypted Swap does supply some instructions, but does not seem to work. This implies that lvm must be in use, which in my case it is not (I opted for the zfs root directory during install, which does not use lvm).

I thought for a while this was related to the nvidia drivers (currently 460) not resuming state correctly, but I've tried all the settings (including forcing the intel chipset) with no change.

The syslog output from just before reboot is as follows. I don't think I see anything interesting here, but I might not know what to look for.

Jul 25 12:04:49 xenon wpa_supplicant[2208]: nl80211: deinit ifname=p2p-dev-wlp4s0 disabled_11b_rates=0
Jul 25 12:04:49 xenon systemd-sleep[165210]: Suspending system...
Jul 25 12:04:49 xenon kernel: [ 3360.130627] PM: suspend entry (deep)
Jul 25 12:04:49 xenon wpa_supplicant[2208]: nl80211: deinit ifname=wlp4s0 disabled_11b_rates=0
Jul 25 12:04:51 xenon gnome-shell[17784]: [17775:17977:0725/120451.785183:ERROR:connection_factory_impl.cc(429)] Failed to connect to MCS endpoint with error -106
Jul 25 12:04:54 xenon kernel: [ 3364.649231] Filesystems sync: 4.519 seconds
Jul 25 12:04:54 xenon /usr/lib/gdm3/gdm-x-session[3482]: (**) Option "fd" "44"
Jul 25 12:04:54 xenon /usr/lib/gdm3/gdm-x-session[3482]: (II) event3  - Power Button: device removed
Jul 25 12:04:54 xenon /usr/lib/gdm3/gdm-x-session[3482]: (**) Option "fd" "47"
Jul 25 12:04:54 xenon /usr/lib/gdm3/gdm-x-session[3482]: (II) event6  - Video Bus: device removed
Jul 25 12:04:54 xenon /usr/lib/gdm3/gdm-x-session[3482]: (**) Option "fd" "48"
Jul 25 12:04:54 xenon /usr/lib/gdm3/gdm-x-session[3482]: (II) event7  - Video Bus: device removed
Jul 25 12:04:54 xenon /usr/lib/gdm3/gdm-x-session[3482]: (**) Option "fd" "49"
Jul 25 12:04:54 xenon /usr/lib/gdm3/gdm-x-session[3482]: (II) event0  - Power Button: device removed
Jul 25 12:04:54 xenon /usr/lib/gdm3/gdm-x-session[3482]: (**) Option "fd" "50"
Jul 25 12:04:54 xenon /usr/lib/gdm3/gdm-x-session[3482]: (II) event1  - Sleep Button: device removed
Jul 25 12:04:54 xenon /usr/lib/gdm3/gdm-x-session[3482]: (**) Option "fd" "51"
Jul 25 12:04:54 xenon /usr/lib/gdm3/gdm-x-session[3482]: (II) event8  - Chicony USB 2.0 Camera: Chicony: device removed
Jul 25 12:04:54 xenon /usr/lib/gdm3/gdm-x-session[3482]: (**) Option "fd" "52"
Jul 25 12:04:54 xenon /usr/lib/gdm3/gdm-x-session[3482]: (II) event4  - AT Translated Set 2 keyboard: device removed
Jul 25 12:04:54 xenon /usr/lib/gdm3/gdm-x-session[3482]: (**) Option "fd" "53"
Jul 25 12:04:54 xenon /usr/lib/gdm3/gdm-x-session[3482]: (II) event5  - SynPS/2 Synaptics TouchPad: device removed
Jul 25 12:04:54 xenon /usr/lib/gdm3/gdm-x-session[3482]: (II) systemd-logind: got pause for 13:69
Jul 25 12:04:54 xenon /usr/lib/gdm3/gdm-x-session[3482]: (II) systemd-logind: got pause for 13:64
Jul 25 12:04:54 xenon kernel: [ 3364.965699] rfkill: input handler enabled
Jul 25 12:04:54 xenon /usr/lib/gdm3/gdm-x-session[3482]: (II) systemd-logind: got pause for 13:71
Jul 25 12:04:54 xenon /usr/lib/gdm3/gdm-x-session[3482]: (II) systemd-logind: got pause for 226:0
Jul 25 12:04:54 xenon /usr/lib/gdm3/gdm-x-session[3482]: (II) systemd-logind: got pause for 13:68
Jul 25 12:04:54 xenon /usr/lib/gdm3/gdm-x-session[3482]: (II) systemd-logind: got pause for 13:65
Jul 25 12:04:54 xenon /usr/lib/gdm3/gdm-x-session[3482]: (II) systemd-logind: got pause for 13:70
Jul 25 12:04:54 xenon /usr/lib/gdm3/gdm-x-session[3482]: (II) systemd-logind: got pause for 13:67
Jul 25 12:04:54 xenon /usr/lib/gdm3/gdm-x-session[3482]: (II) systemd-logind: got pause for 13:72

What have I not checked?

Nate T avatar
it flag
Check secure boot in bios settings. Needs to be disabled
Nate T avatar
it flag
The kernel is going into lockdown mode, but I am guessing you already knew that..
Score:1
it flag

This is (can be) a symptom of running Ubuntu in SecureBoot mode. See here for more detail.

According to this (at least as I understand it), your error message is telling you that hibernation is not allowed in your system, as it is trying to comply with secure boot standards.

To disable SecureBoot, you need to boot into the BIOS settings menu. The process for opening the BIOS menu and for locating this setting are machine dependant. If you do not already know the process, a quick google search of:

<laptop-make-&-model> BIOS settings

...will give detailed instructions. Substituting or adding the word "SecureBoot" will tell you where at in the menu the option is hiding, although it is usually fairly easy to locate. Often, it is located under a 'security' tab or somethinng similar.

As far as the nvidia card/driver, I am running the same setup, and the only issue I have come across was with sway, and that ended up being minor.

PaulProgrammer avatar
ph flag
I was afraid of that. I did try the secureboot settings this time, figuring that it's been a good few years to account for this feature, but alas it looks like this isn't the case.
Nate T avatar
it flag
Its mostly a "microsoft wants you running a windows only machine" ordeal. That's why it is still like this. SecureBoot more or less looks for applications to be signed by Microsoft. If they aren't, their security restrictions are tightened, at the lowest level, to the point that they don't work. The workaround is basically to forgery. That is how RHEL and some others do it. Ubuntu decided not to, I guess. They do, however, give DIY instructions on their website, in case you want to attempt it yourself.
Nate T avatar
it flag
I can dig up the link if you'd like. The issue, as you know, manifests in various ways, though, so you'd likely be doing it more than once. Imo, SecureBoot isn't really about security, anyway. It is more about MS putting the squeeze on the open-source community. I don't see any connection between an app being secure and being signed by MS. That is why I am comfortable just to disable it. I'd advise researching the issue. I oversimplified. Also, I am going off memory, and it has been a while since I looked into it. So take all of this with a grain of salt. : )
Score:0
sz flag

in reference to

Jul 25 12:04:51 xenon gnome-shell[17784]: [17775:17977:0725/120451.785183:ERROR:connection_factory_impl.cc(429)] Failed to connect to MCS endpoint with error -106

I had that problem long ago due to some package conflict with Kubuntu components I had mistankenly added so you can check for that. See this related bug report for more details.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.