Score:0

Hibernate - seems to work but now the screen stays on?

us flag

Ubuntu 22.04.2 LTS

5.19.0-32-generic #33~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon Jan 30 17:03:34 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

For a long time I've been able to do sudo systemctl hibernate and have my laptop (Dell XPS17) go into hibernation mode. Usually it takes a few seconds, the screen blanks, and then the keyboard backlight goes off and the machine is basically "off" until I wake it up later.

Recently, something has changed, maybe something that was installed as part of system maintenance, and now hibernate does something weird.

When I issue the command, it does what it usually does, the screen then goes blank, and then about a second later the screen returns to what it was showing, with the same backlight level, but the mouse cursor is frozen (or missing), and the keyboard is non-responsive. It's like the machine is in hibernate, but the screen didn't turn off.

If I hold the power button for ~10 seconds, it powers off the screen, but the weird thing is that when I power it back on later, it's as if it had hibernated - I get back to where I was, rather than a cold boot.

So I'm thinking something has changed in the way the screen is handled - any ideas?

I tried with a Linux virtual console and the same thing happens - the blinking cursor stops after a few seconds but the screen remains on.

Here's my dmesg after a sudo systemctl hibernate:

[82037.130237] PM: hibernation: hibernation entry
[82037.136832] Filesystems sync: 0.005 seconds
[82037.136836] Freezing user space processes ... (elapsed 0.002 seconds) done.
[82037.139194] OOM killer disabled.
[82037.139449] PM: hibernation: Marking nosave pages: [mem 0x00000000-0x00000fff]
[82037.139452] PM: hibernation: Marking nosave pages: [mem 0x0009f000-0x000fffff]
[82037.139454] PM: hibernation: Marking nosave pages: [mem 0x5aa9f000-0x5aa9ffff]
[82037.139455] PM: hibernation: Marking nosave pages: [mem 0x5aaae000-0x5ab26fff]
[82037.139457] PM: hibernation: Marking nosave pages: [mem 0x5abd8000-0x5abd8fff]
[82037.139458] PM: hibernation: Marking nosave pages: [mem 0x5f77a000-0x63ffefff]
[82037.139656] PM: hibernation: Marking nosave pages: [mem 0x64000000-0xffffffff]
[82037.140818] PM: hibernation: Basic memory bitmaps created
[82037.141791] PM: hibernation: Preallocating image memory
[82041.930053] PM: hibernation: Allocated 3200064 pages for snapshot
[82041.930055] PM: hibernation: Allocated 12800256 kbytes in 4.78 seconds (2677.87 MB/s)
[82041.930057] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
[82041.932177] printk: Suspending console(s) (use no_console_suspend to debug)
[82044.109104] ACPI: EC: interrupt blocked
[82044.128094] ACPI: PM: Preparing to enter system sleep state S4
[82044.144776] ACPI: EC: event blocked
[82044.144778] ACPI: EC: EC stopped
[82044.144779] ACPI: PM: Saving platform NVS memory
[82044.152148] Disabling non-boot CPUs ...
[82044.154299] smpboot: CPU 1 is now offline
[82044.159695] smpboot: CPU 2 is now offline
[82044.161962] smpboot: CPU 3 is now offline
[82044.164446] smpboot: CPU 4 is now offline
[82044.166920] smpboot: CPU 5 is now offline
[82044.169465] smpboot: CPU 6 is now offline
[82044.171983] smpboot: CPU 7 is now offline
[82044.176620] smpboot: CPU 8 is now offline
[82044.178608] smpboot: CPU 9 is now offline
[82044.180314] smpboot: CPU 10 is now offline
[82044.182275] smpboot: CPU 11 is now offline
[82044.184166] smpboot: CPU 12 is now offline
[82044.186001] smpboot: CPU 13 is now offline
[82044.187809] smpboot: CPU 14 is now offline
[82044.190045] smpboot: CPU 15 is now offline
[82044.191935] PM: hibernation: Creating image:
[82044.496503] PM: hibernation: Need to copy 3159714 pages
[82044.496505] PM: hibernation: Normal pages needed: 3159714 + 1024, available pages: 5158353

Update July 2023

Selecting the 5.15.0-75-generic kernel works around this problem. Now, when hibernate is initiated, the screen goes blank for 10-20 seconds, then briefly displays again, and then the laptop powers off properly. Waking up from hibernation is a bit slower, with the screen remaining blank for ~30 seconds, but it's all working.

I have only tried alternating between 5.15 and 5.19, so I'm not sure which version introduced this regression, but based on other comments I've seen, it seems likely to have been introduced in 5.16.

cyberbrain avatar
cn flag
When you hold the power button for some seconds, this is a "forced power off", like if you pulled the plug for a system not running on battery. So it seems that the system crashes during powering off. Did you try to leave it on for some minutes to see if it recovers?
davidA avatar
us flag
@guiverc ah, right, sorry I was in a hurry - details added. I'm not sure exactly when it changed as I haven't hibernated for a while due to a change in working situation, but if I had to guess it would be in the last month or two. I'm not using any special kernels or development versions, etc.
davidA avatar
us flag
@cyberbrain yes, I've left it for almost 20 minutes to see if it would eventually power off, but it does not. The screen is frozen so it's definitely not running anything. It's essentially exactly as if it was in hibernate but the screen is active and lit up. Nothing else works, no capslock light, etc.
davidA avatar
us flag
I've added the relevant section of `dmesg` to my question.
guiverc avatar
cn flag
Ubuntu 22.04.1 only recently switched to 22.04.2, meaning the 5.15 kernel was recently switched to 5.19 for users using the HWE kernel stack (*default if you're using Ubuntu 22.04 Desktop*). I'd suggest selecting a 5.15 kernel on next boot (*I'm assuming you still have one installed here*) and seeing if that fixes your issue; as 5.15 is still a *supported* kernel (the more stable GA kernel stack option) & thus maybe a dead easy fix for you... https://wiki.ubuntu.com/Kernel/LTSEnablementStack though I'd also wait for other suggestions from users here too...
guiverc avatar
cn flag
FYI: Both GA & HWE kernel stacks can co-exist on an install (*as outlined in the wiki/doc I provided, as it says to test until you're happy before removing the other stack*), though if using closed-source proprietary kernel modules (*such as Nvidia*) they can prevent that; but if all open-source code they'll co-exist. (*Michael Larabel of Phoronix recently suggested users use GA/5.15 for stability reasons, though I can't recall why; just remember that comment in one of his articles on 22.04.2 I think it was*)
davidA avatar
us flag
Thanks for the suggestion, I will try an older kernel.
davidA avatar
us flag
@guiverc As you suggested, I've found that the problem does not occur with the 5.15 kernel, so I will use that for now. I'll update my question with new info.
I sit in a Tesla and translated this thread with Ai:

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.