[sf-lug] sudo abuse, suspend/shutdown, and polkit
Rick Moen
rick at linuxmafia.com
Tue Feb 19 13:09:28 PST 2019
Quoting Akkana Peck (akkana at shallowsky.com):
[snip]
> And it may be that systemd's suspend
> and shutdown services require polkit to work:
> man systemd-logind.service suggests they may be joined at the hip.
I'm pretty sure that's the case. My frequent characterisation is that
systemd, PolKit, upower, udisks2 (in particular) are a dependency
hairball of Freedesktop.org codebases. They're written to require each
other (a large part of why I want to avoid them).
The old-school way of doing shutdown has always been:
$ su -
# shutdown -h now
_Or_ for lazy people like me, you do Ctrl-Alt-F1 to change to a text
console, do ctrl-alt-del to initiate orderly shutdown and reboot, but
then shut off the power switch before reboot gets very far. (Thus, just
two keystrokes.)
I guess the old-school way of entering suspend-to-RAM is with
$ su -
# echo 2 > /proc/acpi/sleep
(Above is according to
https://github.com/torvalds/linux/blob/master/Documentation/power/swsusp.txt ,
but I'm not sure.
The pm-utils scripts (power management utilities) traditionally handled
such things prior to the Freedesktop.org people deciding to stop
maintaining those and force-upgrade everyone to upower. I'm not clear
on whether those are still a best-of-breed option; possibly. (I mostly
run Linux on servers, and don't do suspend.)
You might want to find out how the Devuan Project does suspend-to-RAM /
suspend-to-disk. They'd know.
More information about the sf-lug
mailing list