Skip to main content
Topic: Power management (i.e. hibernation/shutdown) hangs on forever. (Read 305 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Power management (i.e. hibernation/shutdown) hangs on forever.

I have no idea why or how but my computer won't:
- Shutdown. (keyboard and mice keep being powered on, and so does the computer. Only way to shut down at that point is to force it)
- Suspend / Hibernate (same as above, but i can't resume no matter what)

I tried:
- Configuring elogind properly (OpenRC)
- Enabling resume hooks (for mkinitcipio.conf) and the resume=UUID=[...] as a kernel parameter.
- Pointing to the swap partition in the fstab
- Using hibernator
- Using a different kernel (yes that includes linux-lts)
At the end of everything, hold onto anything.

Re: Power management (i.e. hibernation/shutdown) hangs on forever.

Reply #1
In order the system to be able to resume from hibernation, the following has to be added at your boot grub line, like below:

Code: [Select]
linux	/boot/vmlinuz-linux root=UUID=00d4563d-e8d8-4695-8e95-3570400b330c rw net.ifnames=0 quiet iommu=pt resume=/dev/sdx/

x: your drive device, where swap partition exists

Re: Power management (i.e. hibernation/shutdown) hangs on forever.

Reply #2
Also, did you try the following on a terminal?

Code: [Select]
loginctl hibernate

Re: Power management (i.e. hibernation/shutdown) hangs on forever.

Reply #3
Also, did you try the following on a terminal?

Code: [Select]
loginctl hibernate

Ah my bad, i should have also included some extra info:

fstab:
https://pastebin.com/1sLUnZ01

/etc/default/grub (trimmed):
Code: [Select]
GRUB_DEFAULT="Artix-LTS"
GRUB_TIMEOUT="2"
GRUB_DISTRIBUTOR="Artix"
GRUB_CMDLINE_LINUX_DEFAULT="amdgpu.ppfeaturemask=0xffffffff resume=/dev/sdb2 amd_iommu=on iommu=soft"
GRUB_CMDLINE_LINUX="net.ifnames=0"

/etc/elogind/logind.conf:
Code: [Select]
[Login]
#KillUserProcesses=no
#KillOnlyUsers=
#KillExcludeUsers=root
#InhibitDelayMaxSec=5
#HandlePowerKey=poweroff
#HandleSuspendKey=suspend
#HandleHibernateKey=hibernate
#HandleLidSwitch=suspend
#HandleLidSwitchExternalPower=suspend
#HandleLidSwitchDocked=ignore
#PowerKeyIgnoreInhibited=no
#SuspendKeyIgnoreInhibited=no
#HibernateKeyIgnoreInhibited=no
#LidSwitchIgnoreInhibited=yes
#HoldoffTimeoutSec=30s
#IdleAction=ignore
#IdleActionSec=30min
#RuntimeDirectorySize=10%
#RuntimeDirectoryInodes=400k
#RemoveIPC=yes
#InhibitorsMax=8192
#SessionsMax=8192

[Sleep]
AllowSuspend=yes
AllowHibernation=yes
AllowSuspendThenHibernate=yes
AllowHybridSleep=yes
AllowPowerOffInterrupts=yes
BroadcastPowerOffInterrupts=yes
AllowSuspendInterrupts=no
BroadcastSuspendInterrupts=yes
HandleNvidiaSleep=no
SuspendState=mem standby freeze
SuspendMode=suspend
HibernateState=disk
HibernateMode=platform shutdown
HybridSleepState=disk
HybridSleepMode=suspend platform shutdown
#HibernateDelaySec=5
#HibernateDelaySec=10800

And i did just try loginctl hibernate but nothing changed (my machine keeps being powered, resuming impossible without a reset) Same applies for powering off, sans peripherals powering off.
Any ideas on how i could debug this?
At the end of everything, hold onto anything.


Re: Power management (i.e. hibernation/shutdown) hangs on forever.

Reply #5
And i did just try loginctl hibernate but nothing changed (my machine keeps being powered, resuming impossible without a reset) Same applies for powering off, sans peripherals powering off.
Any ideas on how i could debug this?

Yup. I got a fresh installation on a VM with OpenRC today, w/o Btrfs - but with XFS, and the elogind problem can be reproduced, as shown below



Steps to reproduce it:
  • Download weekly ISO artix-xfce-openrc-20210201-x86_64.iso
  • Install it on a VM
  • Update it
  • Reboot


Therefore, please wait for a fix, or any other relevant information

Re: Power management (i.e. hibernation/shutdown) hangs on forever.

Reply #6
Yup. I got a fresh installation on a VM with OpenRC today, w/o Btrfs - but with XFS, and the elogind problem can be reproduced, as shown below



Steps to reproduce it:
  • Download weekly ISO artix-xfce-openrc-20210201-x86_64.iso
  • Install it on a VM
  • Update it
  • Reboot


Therefore, please wait for a fix, or any other relevant information

How did you resume after "suspending" or powering off? (as shown in the screenshot)
Also it's kinda weird that i suddenly can't power off or suspend to RAM after adding the swap partition and stuff... Before that i couldn't hibernate, but everything else worked fine.
At the end of everything, hold onto anything.

Re: Power management (i.e. hibernation/shutdown) hangs on forever.

Reply #7
How did you resume after "suspending" or powering off? (as shown in the screenshot)
Also it's kinda weird that i suddenly can't power off or suspend to RAM after adding the swap partition and stuff... Before that i couldn't hibernate, but everything else worked fine.
There was no reaction from the VM, to any of the above loginctl commands.

Re: Power management (i.e. hibernation/shutdown) hangs on forever.

Reply #8
[Update]:

My bad @endlessthorium, I forgot to check swap mounting on the VM.

I updated the VM, I fixed swap mounting at /etc/fstab, resume=/dev/sdx on the grub command line, updated grub, gave the command
Code: [Select]
swapon /dev/sdx
rebooted, and hibernation works.

Therefor, can you check that your have accomplished all steps, as mentioned above?

Re: Power management (i.e. hibernation/shutdown) hangs on forever.

Reply #9
[Update]:

My bad @endlessthorium, I forgot to check swap mounting on the VM.

I updated the VM, I fixed swap mounting at /etc/fstab, resume=/dev/sdx on the grub command line, updated grub, gave the command
Code: [Select]
swapon /dev/sdx
rebooted, and hibernation works.

Therefor, can you check that your have accomplished all steps, as mentioned above?
Yeah i did everything and also rechecked. Nothing changed. What's weird that the moment i touched elogind's config i can't even shutdown anymore, no matter what, even if i revert to the original config.
At the end of everything, hold onto anything.

Re: Power management (i.e. hibernation/shutdown) hangs on forever.

Reply #10
[Update]:

My bad @endlessthorium, I forgot to check swap mounting on the VM.

I updated the VM, I fixed swap mounting at /etc/fstab, resume=/dev/sdx on the grub command line, updated grub, gave the command
Code: [Select]
swapon /dev/sdx
rebooted, and hibernation works.

Therefor, can you check that your have accomplished all steps, as mentioned above?

I should also note that i added the swap partition AFTER a month old installation, so i'm not entirely sure if that could play a role.
At the end of everything, hold onto anything.

Re: Power management (i.e. hibernation/shutdown) hangs on forever.

Reply #11
[Update]:

My bad @endlessthorium, I forgot to check swap mounting on the VM.

I updated the VM, I fixed swap mounting at /etc/fstab, resume=/dev/sdx on the grub command line, updated grub, gave the command
Code: [Select]
swapon /dev/sdx
rebooted, and hibernation works.

Therefor, can you check that your have accomplished all steps, as mentioned above?

So i did some testing, and i can't quite point my finger on the issue...  ...yet:

- I tried a fresh, weekly ISO install on a VM, installed without a swap partition (with Artix on BTRFS of course) and added it later, done everything like you said and there's no issue, i can resume from suspending to ram (although hibernation powers off the VM, but that's not an Artix problem (more like of a virtualbox problem), as i think it means it works anyway.)
- I did NOT touch elogind's config this time, yet it works on the VM; so maybe i screwed up the syntax on my main machine Turns out i can just delete logind.conf to reset to defaults.
- Although i installed the XFCE version (on the VM), i highly doubt it might be a Cinnamon problem.
- I just reverted to mesa from mesa-git and also re-created the swap partition (with Gparted), and added the UUID entry to the fstab; i have yet to see if that did anything
- I can only speculate at this point that there's some daemon or program that is misbehaving and refusing to shutdown.

At the end of everything, hold onto anything.