Score:0

Unknown reason for shutdown after suspend

cn flag

I have a Dell Inspiron 16 Plus 7620 running Kubuntu 23.04. It suspends as expected, but if the laptop lid is closed for a while the system powers off. It should stay asleep but never does.

There's no BIOS setting that seems to affect this. I've tried every setting of HandleLidSwitch in logind.conf. I also tried IgnoreLid=true in UPower.conf.

journalctl output below seems to indicate that it's not going through the normal shutdown process but the hardware is powering off after suspend.

May 13 17:29:37 matt-inspiron-16 systemd[1]: Reached target sleep.target - Sleep.
May 13 17:29:37 matt-inspiron-16 systemd[1]: Starting grub-common.service - Record successful boot for GRUB...
May 13 17:29:37 matt-inspiron-16 systemd[1]: Starting systemd-suspend.service - System Suspend...
May 13 17:29:37 matt-inspiron-16 systemd-sleep[33807]: Entering sleep state 'suspend'...
-- Boot 3f65a17e06fb4088b791e7224b42b75a --
May 14 08:13:27 matt-inspiron-16 kernel: microcode: microcode updated early to revision 0x429, date = 2023-01-11
May 14 08:13:27 matt-inspiron-16 kernel: Linux version 6.2.0-20-generic (buildd@lcy02-amd64-035) (x86_64-linux-gnu-gcc-12 (Ubuntu 12.2.0-17ubuntu1) 12.2.0, GNU ld (GNU Binutils for Ubuntu) 2.40) #20-Ubuntu SMP PREEMPT_DYNAMIC Thu Apr  6 07:48:48 UTC 2>
May 14 08:13:27 matt-inspiron-16 kernel: Command line: BOOT_IMAGE=/boot/vmlinuz-6.2.0-20-generic root=UUID=6b865555-985f-4052-b452-813657be2501 ro quiet splash i915.enable_psr=0 vt.handoff=7

How do I get the laptop to stay asleep and not power off when the lid is closed?

ec flag
**Welcome to the Ask Ubuntu community.** You might want to review logs for errors as they might provide some clues regarding the current behavior. Run `sudo dmesg` to view activity after running `sudo systemctl suspend` to force you machine into suspend mode. Also, how long does your machine stay in suspend mode? I'm pretty sure that suspend state will power off if battery levels reach a min value.
Matt S avatar
cn flag
@richbl `dmesg` is showing a lot of output. I see things like `Freezing user space processes`. What should I look for? Battery is not getting low at all so I'm certain it's not that.
ec flag
You're looking for anything that's generating warnings/errors (likely ACPI or PM). I'd also suggest reviewing boot logs (`sudo journalctl -b`) after rebooting from a power off state induced by sleep. Please post both the `dmesg` and `journalctl` output (just the interesting bits) directly in your question. Finally, can you please define "for a while" (the time before your laptop powers off. Is it seconds, minutes, hours, days?
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.