Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 877465 - sys-power/tlp-1.5.0: wrong path for elogind system-sleep hook
Summary: sys-power/tlp-1.5.0: wrong path for elogind system-sleep hook
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Jay Faulkner
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2022-10-17 15:20 UTC by Alexander Danilov
Modified: 2022-11-03 19:13 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 Alexander Danilov 2022-10-17 15:20:15 UTC
When installing sys-power/tlp, the elogind sleep-resume hook goes to wrong path: /lib/elogind/system-sleep/49-tlp-sleep
On a system with active elogind, this hook does not start after sleep/resume cycle. The correct path on amd64 machine is /lib64/elogind/system-sleep/

Reproducible: Always

Steps to Reproduce:
1. Configure TLP to change disk APM level, e.g. DISK_APM_LEVEL_ON_AC="254"
2. Start TLP, and check APL level with "tlp-stat -d"
3. Suspend and resume.
4. Check APL level with "tlp-stat -d"

Actual Results:  
Before resume:   APM Level  = 254
After resume:    APM Level  = 128


Expected Results:  
After moving hook from /lib/elogind/system-sleep/49-tlp-sleep to /lib64/elogind/system-sleep/ the APM level is correctly restored.

Possible workaround for ebuild:
--- a/sys-power/tlp/tlp-1.5.0.ebuild
+++ b/sys-power/tlp/tlp-1.5.0.ebuild
@@ -26,6 +26,7 @@ src_install() {
 	emake \
 		DESTDIR="${D}" \
 		TLP_NO_INIT=1 \
+		TLP_ELOD="/$(get_libdir)/elogind/system-sleep" \
 		TLP_WITH_ELOGIND=1 \
 		TLP_WITH_SYSTEMD=1 \
 		install install-man
Comment 1 Duje Mihanović 2022-10-18 08:29:45 UTC
I was able to reproduce this bug. I have also put up a PR to fix it: https://github.com/gentoo/gentoo/pull/27830
Comment 2 Larry the Git Cow gentoo-dev 2022-11-03 19:13:46 UTC
The bug has been closed via the following commit(s):

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

commit fa3f072ee74b95a1ac88e4f269bc39f2979f6f1e
Author:     Duje Mihanović <duje.mihanovic@skole.hr>
AuthorDate: 2022-10-18 08:21:45 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-11-03 19:13:08 +0000

    sys-power/tlp: install elogind sleep hook correctly
    
    Closes: https://bugs.gentoo.org/877465
    Signed-off-by: Duje Mihanović <duje.mihanovic@skole.hr>
    Closes: https://github.com/gentoo/gentoo/pull/27830
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-power/tlp/{tlp-1.5.0.ebuild => tlp-1.5.0-r1.ebuild} | 1 +
 1 file changed, 1 insertion(+)