From: "John B. Wyatt IV" <jwyatt@redhat.com>
To: Thorsten Leemhuis <linux@leemhuis.info>
Cc: "Francesco Poli (wintermute)" <invernomuto@paranoici.org>,
linux-pm list <linux-pm@vger.kernel.org>,
Thomas Renninger <trenn@suse.com>, Shuah Khan <shuah@kernel.org>,
John Kacur <jkacur@redhat.com>
Subject: Re: [PATCH v2] cpupower: add a systemd service to run cpupower
Date: Wed, 14 May 2025 13:53:11 -0400 [thread overview]
Message-ID: <aCTYhzqYFNX6D9Vm@thinkpad2024> (raw)
In-Reply-To: <16ad2364-0161-4724-90e1-b57559168843@leemhuis.info>
On Wed, May 14, 2025 at 02:41:35PM +0200, Thorsten Leemhuis wrote:
> Hi Francesco! Many thx for addressing the issues I brought up earlier
> which now landed in -next, much appreciated.
>
> Sadly with those fixes in I noticed another issue I missed earlier. One
> from the "small differences between different Linux distributions that
> make all our lives hard". :-/media/
>
> On 25.04.25 17:07, Francesco Poli (wintermute) wrote:
> > One of the most typical use cases of the 'cpupower' utility works as
> > follows: run 'cpupower' at boot with the desired command-line options
> > and then forget about it.
>
> > diff --git a/tools/power/cpupower/Makefile b/tools/power/cpupower/Makefile
> > index 835123add0ed..9c2b5f71fee1 100644
> > [...]
> > @@ -302,6 +305,14 @@ install-tools: $(OUTPUT)cpupower
> > $(INSTALL_PROGRAM) $(OUTPUT)cpupower $(DESTDIR)${bindir}
> > $(INSTALL) -d $(DESTDIR)${bash_completion_dir}
> > $(INSTALL_SCRIPT) cpupower-completion.sh '$(DESTDIR)${bash_completion_dir}/cpupower'
> > + $(INSTALL) -d $(DESTDIR)${confdir}default
> > + $(INSTALL_DATA) cpupower.default '$(DESTDIR)${confdir}default/cpupower'
> > + $(INSTALL) -d $(DESTDIR)${libexecdir}
> > + $(INSTALL_PROGRAM) cpupower.sh '$(DESTDIR)${libexecdir}/cpupower'
> > + $(INSTALL) -d $(DESTDIR)${libdir}/systemd/system
>
> That last line to the best of my knowledge is wrong on distributions
> like Fedora, where ${libdir} expands to /usr/lib64/ -- which is the
> right path for libraries, but the wrong one for systemd units, as they
> are always stored in /usr/lib/systemd/system (at least on Fedora). Not
> sure what the right fix it, it might be something like defining
>
> unitdir ?= /usr/lib/systemd/system
>
> earlier in the Makefile and then using it in the last quoted line above.
>
> Ciao, Thorsten
>
Checked the Arch pkgs and my Ubuntu 22.04 install.
Both of them copy service files to that folder as well. The Debian package
is difficult to read at a glance.
The problem is that Fedora installs libraries to lib64; Arch and Ubuntu
(22.04 & likely Debian) do not from what I can tell. This likely is the
reason for that issue I had-I thought I misconfigured something or it
was a bug in cpupower logic.
That unitdir looks like it would be a good suggestion as a quick fix,
but Shuah, how are you feeling about these patches?
I am on mobile data right now due to an internet issue so my ability to
test is limited right now.
--
Sincerely,
John Wyatt
Software Engineer, Core Kernel
Red Hat
next prev parent reply other threads:[~2025-05-14 17:53 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-25 15:07 [PATCH v2] cpupower: add a systemd service to run cpupower Francesco Poli (wintermute)
2025-04-29 20:59 ` John B. Wyatt IV
2025-05-02 15:53 ` Francesco Poli
2025-05-02 16:41 ` Shuah Khan
2025-05-02 19:55 ` Shuah Khan
2025-05-03 10:59 ` Francesco Poli
2025-05-05 16:06 ` Thorsten Leemhuis
2025-05-05 20:55 ` Francesco Poli
2025-05-06 4:40 ` Thorsten Leemhuis
2025-05-07 8:07 ` Thorsten Leemhuis
2025-05-07 22:18 ` Francesco Poli
2025-05-08 8:02 ` Thorsten Leemhuis
2025-05-08 16:22 ` John B. Wyatt IV
2025-05-08 22:22 ` Francesco Poli
2025-05-14 12:41 ` Thorsten Leemhuis
2025-05-14 17:53 ` John B. Wyatt IV [this message]
2025-05-14 20:39 ` Francesco Poli
2025-05-14 20:23 ` Francesco Poli
2025-05-15 6:12 ` Thorsten Leemhuis
2025-05-21 21:23 ` Francesco Poli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aCTYhzqYFNX6D9Vm@thinkpad2024 \
--to=jwyatt@redhat.com \
--cc=invernomuto@paranoici.org \
--cc=jkacur@redhat.com \
--cc=linux-pm@vger.kernel.org \
--cc=linux@leemhuis.info \
--cc=shuah@kernel.org \
--cc=trenn@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.