Is it possible? I do not use elogind.
Is there something else maybe?
It seems not looking https://wiki.archlinux.org/title/Acpid.
I use "echo disk > /sys/power/state" to hibernate.
It probably can be done using a combination of acpid and pm-utils(AUR).
I first came across this as a fix for 'suspend when closing the lid' on my chromebook.
https://archlinuxarm.org/wiki/Samsung_Chromebook.
pm-utils has not been updated since 2017 but still builds.
And I'm fairly sure it still works. I'd have to update the chromebook to check.
There could be other methods ?
When I press the button or use a lid only acpid should work.
But if send the command to hibernate via a keyboard shortcut how can I do something?
I think that it would be nice to have some dedicated daemon.
I found out that before e/logind people used to use https://github.com/ConsoleKit2/ConsoleKit2, that it's in the AUR.
It is used by FreeBSD.
I was not planning to communicate this yet but as I a see more and more related topics in our forum I'll make a start now:
It's not available for use yet but lately I have been working on a new repo that provides packages like consolekit2, pm-utils and quite a few more to be able to run some custom Xorg and Wayland desktops with neither elogind nor libelogind, but makes use of seatd, turnstile and basu.
These are some currently known limitations:
- This will not be a drop-in replacement for elogind.
- This will not work for all desktops.
- This will not work for all packages.
- It is experimental, so not suited to be used for any daily driver.
- This repo will not be supported in any way by Artix Linux.
- This will result in polkit no longer working for the login1/session actions (reboot/shutdown/suspend/hibernate).
A word of caution related to the original post: don't suspend/hibernate by writing directly to /sys/power/state; this will cause drivers to miss state change interrupts and crash, causing devices to no longer work when the system is resumed unless re-acitvated by a module unload/reload or rescan. Use pm-utils instead.
During the coming weekend I hope to be able to provide more information.
artist
I don't quite get what your problem is.
Anyway check etc/acpi/handler.sh. Especially this part:
button/lid)
case "$3" in
close)
logger 'LID closed'
;;
open)
logger 'LID opened'
;;
*)
logger "ACPI action undefined: $3"
;;
esac
It's not properly configured by default.
Please, consider naming it [world-clown].
As I stated:
Correct me if I am wrong .
Good to know.
I did now about pm-utils back when I was using elogind, it did not work (loginctl hibernate) so I was writing directly.
Is there something else besides consolekit that should I use? I still have to learn what's that.
I am running bspwm right now.
According to https://web.archive.org/web/20200928212358if_/https://wiki.gentoo.org/wiki/ConsoleKit:
So not it's not really useful for me.
Basu
Will Artix keep to having packages depending on elogind?
Alpine does not installed elogind for networkmanager etc. there are UIs like sxmo that works fine without.
A clown world.
Due to set backs this has been put on hold.
artist
I found out that I have elogind-daemon running and it is needed for Xorg I think, killing it kills the UI.
So I disabled acpid since I just press the power button and that is handled by the elogind-daemon process.
According to htop it is started by dinit so it is not clear.
There is no service:
dinitctl list | grep elogind