Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 939216 - sys-auth/elogind-255.5: custom hooks are no longer executed since hook directory changed without notice
Summary: sys-auth/elogind-255.5: custom hooks are no longer executed since hook direct...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Andreas Sturmlechner
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks: 943566
  Show dependency tree
 
Reported: 2024-09-07 08:11 UTC by Holger Hoffstätte
Modified: 2024-11-24 10:29 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Holger Hoffstätte 2024-09-07 08:11:13 UTC
Been running 252.6 since forever with custom suspend hooks in /lib64/elogind/system-sleep. After update to 255.5 I noticed that these were no longer invoked. As it turns out the configured hook directory has changed to /usr/lib/elogind/system-sleep without notice.

This is especially confusing in light of related bugs:
https://bugs.gentoo.org/923258
https://bugs.gentoo.org/939042


Reproducible: Always

Steps to Reproduce:
1. update from elogind-252.6 to 255.5
2. fix suspend config (#939042)
3. perform suspend/resume

Actual Results:  
Suspend/resume hooks are no longer invoked.
Comment 1 Holger Hoffstätte 2024-09-07 08:12:48 UTC
Sorry, list of related bugs should be:

https://bugs.gentoo.org/693384
https://bugs.gentoo.org/939042
Comment 2 Ionen Wolkens gentoo-dev 2024-09-07 08:17:50 UTC
ftr there's plans[1] to have nvidia-drivers install its own hook now, it'll be done in both directory for backward compat until 255.5 is stable for a while (I find the new path a lot better honestly).

Help is welcome in testing [1], it's on hold until I get enough feedback for it to work right, can't easily test it myself.

That aside users should instead be using /etc/elogind/system-sleep for their hooks rather than system paths though.

[1] https://github.com/gentoo/gentoo/pull/38482
Comment 3 Holger Hoffstätte 2024-09-07 08:33:35 UTC
As discussed in the nvidia-drivers PR I can confirm that with 255.5 either
/usr/lib/elogind/system-sleep or /etc/elogind/system-sleep for suspend hooks works.
Comment 4 Ionen Wolkens gentoo-dev 2024-09-07 10:43:51 UTC
It probably wouldn't hurt to at least have a ewarn/log message before stabilizing this version, message could suggest /etc/elogind/system-sleep

Either once w/ ver_test, or always if /lib64/elogind/system-sleep/* has files. Albeit the aforementioned nvidia PR will install a single temporary "nvidia" symlink in there which users shouldn't be warned about.
Comment 5 Andreas Sturmlechner gentoo-dev 2024-09-07 10:45:09 UTC
Why did you link to bug 923258 which is 252.9 stabilisation?
Comment 6 Holger Hoffstätte 2024-09-07 11:28:25 UTC
(In reply to Andreas Sturmlechner from comment #5)
> Why did you link to bug 923258 which is 252.9 stabilisation?

Just general Saturday morning confusion.
Comment 7 Zentoo 2024-10-03 09:47:39 UTC
Some personal notes about elogind-255.5 on ~amd64:

Xorg+Elogind+Nvidia-drivers here: sleep finally works back after some struggle with sys-auth/elogind-255.5:

- elogind-uaccess-command path have changed and so I have need to fix the kernel initramfs to include the new path of this command (in my case dracut).
- the default sleep method have changed from deep to s2idle. I have need to configure elogind to explicitly use deep method to really have a sleeping system.
- If I use as usual echo "mem" > /sys/power/state: I got a dmesg error that show that the nvidia hook haven't been used and so sleep don't work this way any more. I have to use the elogind way: loginctl suspend that is working.
Comment 8 Andreas Sturmlechner gentoo-dev 2024-11-14 19:49:45 UTC
(In reply to Ionen Wolkens from comment #4)
> It probably wouldn't hurt to at least have a ewarn/log message before
> stabilizing this version, message could suggest /etc/elogind/system-sleep
> 
> Either once w/ ver_test, or always if /lib64/elogind/system-sleep/* has
> files. Albeit the aforementioned nvidia PR will install a single temporary
> "nvidia" symlink in there which users shouldn't be warned about.
Any volunteers to implement such a thing?
Comment 9 Larry the Git Cow gentoo-dev 2024-11-24 10:24:33 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d8924b16afe3668e70dea2aac86e24f3f616d1a5

commit d8924b16afe3668e70dea2aac86e24f3f616d1a5
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2024-11-24 00:03:45 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2024-11-24 10:24:18 +0000

    sys-auth/elogind: ewarn about hooks in obsolete path
    
    Bug: https://bugs.gentoo.org/939216
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 sys-auth/elogind/elogind-255.5-r1.ebuild | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)