
Tim Connors wrote:
I remember the good old days when you could chuck scripts in /etc/pm.d or something similar to get it to do things prior and aft suspend. Hah! I hadn't figured out how to do it again as of about 2 years ago. And it's probably gotten worse since. It sounded to me like a DE wasn't optional for that to pretend to work.
FTR, acpi-support and acpi-support-base provide the default policy for this... but by default, they say something like "if there's an X session, and it's not locked, and gnome-power-manager or kwhatever is running, then DO NOTHING AND ASSUME THEY WILL". The code that actually *does* the workarounds is pm-utils or so; the ACTUAL suspending is usually done by that echoing "mem" or "disk" or "mem disk" into /sys/something, which makes the kernel do the basic suspending. Doing things around AC insert/remove is plain acpid & /etc/acpi/events. That's as at sid around twelve months ago, when I last looked through it. The detection code made me a big queasy. Ah, glancing at the source, it looks like it also/instead now checks for upowerd. Remember hal, that everyone hated? AFAICT the parts that didn't move into udev, got rebranded as "upower" and "udisks" and are just as terrible as before, and made by the same people. Oh yeah, here's the code in debian/patches/policy-funcs.diff and lib/policy-funcs (acpi-support package). Yuk. Don't read this without a stiff drink handy.