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


Groups > linux.debian.kernel > #82711

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

From Francesco Poli <invernomuto@paranoici.org>
Newsgroups linux.debian.bugs.dist, linux.debian.kernel
Subject Bug#894906: linux-cpupower: provide a systemd service and a default config file
Date 2024-06-12 22:20 +0200
Message-ID <IOCBQ-2sbV-13@gated-at.bofh.it> (permalink)
References <vBcuZ-4Bk-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Cross-posted to 2 groups.

Show all headers | View raw


[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

Back to linux.debian.kernel | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

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

csiph-web