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)
In order the system to be able to resume from hibernation, the following has to be added at your boot grub line, like below:
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
Also, did you try the following on a terminal?
loginctl hibernate
Ah my bad, i should have also included some extra info:
fstab:
https://pastebin.com/1sLUnZ01
/etc/default/grub (trimmed):
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:
[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?
https://wiki.archlinux.org/index.php/Power_management/Suspend_and_hibernate#Hibernation_into_swap_file_on_Btrfs
help you not?
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
(https://imgur.com/iKI0LT3.png)
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.
There was no reaction from the VM, to any of the above loginctl commands.
[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
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.
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.
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 (addendum: it didn't)
- I can only speculate at this point that there's some daemon or program that is misbehaving and refusing to shutdown.
I am not sure how that is supposed to help, since i'm trying to suspend to a
partition.
for any n00bs like me who have no idea what "boot grub line" is, it's the string value of
GRUB_CMDLINE_LINUX_DEFAULT in
/etc/default/grubalso i was able to get hibernation working with this setting
GRUB_CMDLINE_LINUX_DEFAULT="resume=/dev/sda1 rw net.ifnames=0 quiet iommu=pt loglevel=3 quiet"
/dev/sda1 is my swap partition, it may be different for you, check it with lsblk
if you were dumb like me 2 years ago and forgot to make a swap partition, i wrote this tutorial a long time ago on how to set up hibernation without a swap partition using a swap file https://www.reddit.com/r/linux/comments/ds9w9e/straightforward_tutorial_on_how_to_set_up/
posting all this here since this thread comes up early in the internet search results for "hibernate to swap partition artix", and it seems these days the arch wiki and other online tutorials are recommending using some "high level" systemd interface to do this, so hopefully this post will show up and help people who are using distros without systemd