[systemd-devel] RFC: enable suspend to idle

Oliver Neukum oneukum at suse.com
Thu Mar 1 14:25:40 UTC 2018


Am Donnerstag, den 01.03.2018, 15:17 +0100 schrieb Lennart Poettering:
> On Do, 01.03.18 14:40, Thomas Blume (Thomas.Blume at suse.com) wrote:

> > As a proof of concept, I have created below udev rule and helper script, which
> > works on my testmachine.
> > Obviously, like that it isn't portable to other distros, but I'd like to get
> > comments whether this is the way to go.
> > If I get positive feedback, I'll try a portable approach using a binary helper.
> > 
> > udev rule:
> > 
> > -->
> > ACTION=="add",  ATTR{power/wakeup}=="disabled", IMPORT{program}="/usr/lib/udev/get-wakeup-devices.sh %p"
> > ENV{RESUME_FROM_IDLE}=="1", ATTR{power/wakeup}="enabled"
> 
> Not following here. This doesn't appear like something where userspace
> should be involved. We generally avoid udev rules whose only job is to
> "shortcut" kernel events back into the kernel. Why doesn't the kernel
> set this up properly anyway on its own?

The kernel must not set policy on what is a source of wake ups. Setting
this up so that we do not get a regression in functionality compared
to old style S3 (whose policy is in firmware) falls to user space,
more specifically udev.

	Regards
		Oliver



More information about the systemd-devel mailing list