Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.kernel > #82711 > unrolled thread

Bug#894906: linux-cpupower: provide a systemd service and a default config file

Started byFrancesco Poli <invernomuto@paranoici.org>
First post2024-06-12 22:20 +0200
Last post2024-07-13 13:10 +0200
Articles 5 — 2 participants

Back to article view | Back to linux.debian.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Bug#894906: linux-cpupower: provide a systemd service and a default config file Francesco Poli <invernomuto@paranoici.org> - 2024-06-12 22:20 +0200
    Processed: Re: linux-cpupower: provide a systemd service and a  default config file "Debian Bug Tracking System" <owner@bugs.debian.org> - 2024-06-12 22:40 +0200
    Bug#894906: linux-cpupower: provide a systemd service and a default config file Francesco Poli <invernomuto@paranoici.org> - 2024-06-15 17:00 +0200
      Bug#894906: linux-cpupower: provide a systemd service and a default config file Francesco Poli <invernomuto@paranoici.org> - 2024-07-04 23:30 +0200
        Bug#894906: linux-cpupower: provide a systemd service and a default config file Francesco Poli <invernomuto@paranoici.org> - 2024-07-13 13:10 +0200

#82711 — Bug#894906: linux-cpupower: provide a systemd service and a default config file

FromFrancesco Poli <invernomuto@paranoici.org>
Date2024-06-12 22:20 +0200
SubjectBug#894906: linux-cpupower: provide a systemd service and a default config file
Message-ID<IOCBQ-2sbV-13@gated-at.bofh.it>

[Multipart message — attachments visible in raw view] — view raw

Control: tags -1 + patch


On Thu, 05 Apr 2018 14:38:37 +0200 Pavel Kreuzt <pkreuzt@gmail.com> wrote:
[...]
> linux-cpupower should be run at boot time, but no systemd service
> is installed, nor default config file is present in /etc/default.
> At least an example config should be provided as in cpufrequtils package.

Dear Debian Kernel Team,
cpufrequtils is going to be removed from Debian, and linux-cpupower is
a good replacement, see the comment in bug [#877016].

[#877016]: <https://bugs.debian.org/877016#54>

The only missing piece in linux-cpupower seems to be a systemd service
unit and a configuration file in /etc/default/ .

I took a look at how this is done in the [Arch Linux package]

[Arch Linux package]: <https://gitlab.archlinux.org/archlinux/packaging/packages/linux-tools>

It seems to me that three files (released under "GPL-2.0-or-later"
terms) can be used with trivial modifications.

The attached files are working fine on my system, where I purged
cpufrequtils and installed linux-cpupower and then I issued the
following commands:

  # cp cpupower.default /etc/default/cpupower
  # chown root:root /etc/default/cpupower
  # chmod 644 /etc/default/cpupower
  # cp cpupower.systemd /usr/libexec/cpupower
  # chown root:root /usr/libexec/cpupower
  # chmod 755 /usr/libexec/cpupower
  # cp cpupower.service /usr/lib/systemd/system/ 
  # chown root:root /usr/lib/systemd/system/cpupower.service
  # chmod 644 /usr/lib/systemd/system/cpupower.service
  # systemctl daemon-reload
  # systemctl enable cpupower.service

The systemd service runs at boot and sets everything needed with
cpupower (as configured in /etc/default/cpupower ).


Is there room for improvement?
Yes, I think there is.
For instance, the script /usr/libexec/cpupower could be translated to
POSIX shell, getting rid of its bashisms.
However, even with room for improvement, I think it's better than
nothing.

I believe it's time to fill this gap for good.
Please accept the "patch" and incorporate the files (or enhanced
versions of them) into linux-cpupower.

Thanks for your time and dedication!
Bye.



-- 
 http://www.inventati.org/frx/
 There's not a second to spare! To the laboratory!
..................................................... Francesco Poli .
 GnuPG key fpr == CA01 1147 9CD2 EFDF FB82  3925 3E1C 27E1 1F69 BFFE

[toc] | [next] | [standalone]


#82712 — Processed: Re: linux-cpupower: provide a systemd service and a default config file

From"Debian Bug Tracking System" <owner@bugs.debian.org>
Date2024-06-12 22:40 +0200
SubjectProcessed: Re: linux-cpupower: provide a systemd service and a default config file
Message-ID<IOCVb-2sik-15@gated-at.bofh.it>
In reply to#82711
Processing control commands:

> tags -1 + patch
Bug #894906 [linux-cpupower] linux-cpupower: provide a systemd service and a default config file
Added tag(s) patch.

-- 
894906: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=894906
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems

[toc] | [prev] | [next] | [standalone]


#82726

FromFrancesco Poli <invernomuto@paranoici.org>
Date2024-06-15 17:00 +0200
Message-ID<IPD2N-38un-9@gated-at.bofh.it>
In reply to#82711

[Multipart message — attachments visible in raw view] — view raw

On Wed, 12 Jun 2024 22:09:10 +0200 Francesco Poli wrote:

[...]
> Is there room for improvement?
> Yes, I think there is.
> For instance, the script /usr/libexec/cpupower could be translated to
> POSIX shell, getting rid of its bashisms.

Here we go, I modified the script by translating it to POSIX shell,
dropping a couple of options that seem to no longer exist in cpupower,
and by making ignore all other frequency options, if FREQ is set.

I correspondingly modified the defaults file.

Please find attached the three updated files.

Tested on one of my systems, where I purged cpufrequtils and installed
linux-cpupower and then I issued the following commands:

  # install -m 644 cpupower.default /etc/default/cpupower
  # install -m 755 cpupower.sh /usr/libexec/cpupower
  # install -m 644 cpupower.service /usr/lib/systemd/system/
  # systemctl daemon-reload
  # systemctl enable cpupower.service

The systemd service runs at boot and sets everything needed with
cpupower (as configured in /etc/default/cpupower ).

Once again, please accept the "patch" and incorporate the files (or
further enhanced versions of them) into linux-cpupower.

Thanks for your time and dedication!
Bye.


-- 
 http://www.inventati.org/frx/
 There's not a second to spare! To the laboratory!
..................................................... Francesco Poli .
 GnuPG key fpr == CA01 1147 9CD2 EFDF FB82  3925 3E1C 27E1 1F69 BFFE

[toc] | [prev] | [next] | [standalone]


#82926

FromFrancesco Poli <invernomuto@paranoici.org>
Date2024-07-04 23:30 +0200
Message-ID<IWCbE-7HPx-15@gated-at.bofh.it>
In reply to#82726

[Multipart message — attachments visible in raw view] — view raw

On Sat, 15 Jun 2024 16:48:58 +0200 Francesco Poli wrote:

[...]
> Please find attached the three updated files.
> 
> Tested on one of my systems, where I purged cpufrequtils and installed
> linux-cpupower and then I issued the following commands:
> 
>   # install -m 644 cpupower.default /etc/default/cpupower
>   # install -m 755 cpupower.sh /usr/libexec/cpupower
>   # install -m 644 cpupower.service /usr/lib/systemd/system/
>   # systemctl daemon-reload
>   # systemctl enable cpupower.service
> 
> The systemd service runs at boot and sets everything needed with
> cpupower (as configured in /etc/default/cpupower ).

I am now using these three files on two distinct systems: they work as
intended, with no issues at all.

> 
> Once again, please accept the "patch" and incorporate the files (or
> further enhanced versions of them) into linux-cpupower.

Have you had a chance to take a look at the three files I sent?
Could you test them?

I really hope they can soon be incorporated into the official
linux-cpupower Debian package...

> 
> Thanks for your time and dedication!
> Bye.

Again thanks for reading so far and for your consideration.


-- 
 http://www.inventati.org/frx/
 There's not a second to spare! To the laboratory!
..................................................... Francesco Poli .
 GnuPG key fpr == CA01 1147 9CD2 EFDF FB82  3925 3E1C 27E1 1F69 BFFE

[toc] | [prev] | [next] | [standalone]


#82969

FromFrancesco Poli <invernomuto@paranoici.org>
Date2024-07-13 13:10 +0200
Message-ID<IZINz-1NiI-7@gated-at.bofh.it>
In reply to#82926

[Multipart message — attachments visible in raw view] — view raw

On Thu, 4 Jul 2024 23:21:32 +0200 Francesco Poli wrote:

> On Sat, 15 Jun 2024 16:48:58 +0200 Francesco Poli wrote:
[...]
> > Once again, please accept the "patch" and incorporate the files (or
> > further enhanced versions of them) into linux-cpupower.
> 
> Have you had a chance to take a look at the three files I sent?
> Could you test them?
> 
> I really hope they can soon be incorporated into the official
> linux-cpupower Debian package...

Another version of linux-cpupower (along with the other binary packages
from src:linux, of course) migrated to Debian testing.

Still, no feedback about the three files I sent to address this bug
(#894906)...
Please take a look at the files, test them, and incorporate them into
the official linux-cpupower Debian package.
Or, if there's something that is not right about them, please let me
know, and help me to improve them.

Package cpufrequtils has been [removed] from Debian on 16 June 2024,
and the three files I sent are the only missing piece (as far as I
know) for linux-cpupower to be a perfect replacement.
I guess many users are waiting for this feature.

[removed]: <https://tracker.debian.org/news/1537421/removed-008-2-from-unstable/>

Let's fill this gap once and for all!

Thanks for your time.


-- 
 http://www.inventati.org/frx/
 There's not a second to spare! To the laboratory!
..................................................... Francesco Poli .
 GnuPG key fpr == CA01 1147 9CD2 EFDF FB82  3925 3E1C 27E1 1F69 BFFE

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.kernel


csiph-web