Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 900901

Summary: sys-power/power-profiles-daemon: Could not save configuration file '/var/lib/power-profiles-daemon/state.ini'
Product: Gentoo Linux Reporter: Julien Roy <julien>
Component: Current packagesAssignee: Pacho Ramos <pacho>
Status: RESOLVED FIXED    
Severity: normal Keywords: PullRequest
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://github.com/gentoo/gentoo/pull/30166
Whiteboard:
Package list:
Runtime testing required: ---

Description Julien Roy 2023-03-12 00:29:56 UTC
The power-profiles-daemon process tries to save the current state to /var/lib/power-profiles-daemon/state.ini
But if that folder does not exist, it gives a warning, and does not create the folder by itself.

The workaround is to manually create the /var/lib/power-profiles-daemon directory, but this should be done by the ebuild, for instance:

src_install() {
	...
	keepdir /var/lib/power-profiles-daemon
}
Comment 1 Pacho Ramos gentoo-dev 2023-03-12 19:13:11 UTC
It is created by the systemd service file , how are you running it?
Comment 2 Julien Roy 2023-03-12 19:18:05 UTC
On openrc, I first ran it manually (and got the error message), then wrote a simple init script
Comment 3 Pacho Ramos gentoo-dev 2023-03-16 08:35:47 UTC
Then I guess the best idea would be to add an init.d script that also creates the dir when needed... for the case you have one... 

Thanks!
Comment 4 Julien Roy 2023-03-16 22:34:01 UTC
I opened https://github.com/gentoo/gentoo/pull/30166 for this
Comment 5 Larry the Git Cow gentoo-dev 2023-03-19 16:56:43 UTC
The bug has been closed via the following commit(s):

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

commit 40417f0c131cb66e15dc4442a3104a4cfd295a91
Author:     Julien Roy <julien@jroy.ca>
AuthorDate: 2023-03-16 22:29:38 +0000
Commit:     Pacho Ramos <pacho@gentoo.org>
CommitDate: 2023-03-19 16:56:32 +0000

    sys-power/power-profiles-daemon: add openrc init script
    
    Closes: https://bugs.gentoo.org/900901
    Signed-off-by: Julien Roy <julien@jroy.ca>
    Closes: https://github.com/gentoo/gentoo/pull/30166
    Signed-off-by: Pacho Ramos <pacho@gentoo.org>

 .../files/power-profiles-daemon.initd              | 14 +++++
 .../power-profiles-daemon-0.12-r1.ebuild           | 73 ++++++++++++++++++++++
 2 files changed, 87 insertions(+)