On Tue, Oct 2, 2012 at 8:03 AM, Tom Gundersen <teg@jklm.no> wrote:
On Tue, Oct 2, 2012 at 1:28 PM, Heiko Baums <lists1@baums-on-web.de> wrote:
The way I read it is that the sort of problems you would typically workaround with suspend hooks are best solved somewhere else, probably in the kernel driver.
[...]
Now the Linux kernel is blamed for the systemd insufficiencies and bugs.
In case there are still people out there who might take what Heiko writes seriously:
The advice about trying to avoid scripts in systemd-sleep is not about passing the blame, nor is it due to bugs in systemd.
The systemd-sleep logic provides the same features as the equivalent pm-utils hooks did, this means that we are no worse than before. No new bugs, no regressions, no missing features.
That said, it is obvious by looking at what kind of hooks were written for pm-utils, that they are all hacks/workarounds for bugs that should have been fixed elsewhere. For this reason, we want to discourage people from using these hooks, and rather fix the bugs they are used to work around
If it turns out that there are examples that are not actually bugs, but a valid use of these hooks (I have yet to see one), then the functionality is still there. Same if you just like using the hooks for silly things, or if fixing the relevant bugs is too hard for you. The functionality is there. There is really nothing to complain about.
My apologies if I was unclear in my first email, and I hope that this leaves no room for misinterpretation.
Cheers,
Tom
Exactly, for example I need to use a systemd-sleep hook to workaround a bug in the kernel ehci_hcd driver. It had already been reported upstream (and it looks like it may be finally fixed in kernel 3.6!), but it took years for upstream to fix it, so I've always had to use a pm-utils or systemd-sleep hook. A local hack to workaround a bug until it was fixed upstream. I've had no problems so far with systemd-sleep hooks compared to pm-utils hook, it seems to have all the same functionality. I only had to change 2 lines on my pm-utils hook to make it work with systemd too.