Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Starting powertop --auto-tune from systemd

114 views
Skip to first unread message

Rainer Dorsch

unread,
Mar 10, 2018, 1:20:04 PM3/10/18
to
[Please follow-up to debian-user]

Hello,

I run

/usr/bin/powertop --auto-tune

to optimize the power consumption of my system. Running it manually works
nicely. When I try to run from systemd, I see no effect :-/

I followed

https://wiki.archlinux.org/index.php/Powertop#Apply_settings

added

root@master:~# cat /etc/systemd/system/powertop.service
[Unit]
Description=Powertop tunings

[Service]
ExecStart=/usr/bin/powertop --auto-tune
RemainAfterExit=true

[Install]
WantedBy=multi-user.target
root@master:~#

enabled it for systemd and got

root@master:~# systemctl status powertop.service
● powertop.service - Powertop tunings
Loaded: loaded (/etc/systemd/system/powertop.service; enabled; vendor
preset: enabled)
Active: active (exited) (Result: exit-code) since Sat 2018-03-10 18:29:53
CET; 22min ago
Process: 642 ExecStart=/usr/bin/powertop --auto-tune (code=exited,
status=203/EXEC)
Main PID: 642 (code=exited, status=203/EXEC)
Tasks: 0 (limit: 4915)
CGroup: /system.slice/powertop.service

Mar 10 18:29:53 master systemd[1]: Started Powertop tunings.
Mar 10 18:29:53 master systemd[1]: powertop.service: Main process exited,
code=exited, status=203/EXEC
root@master:~#

powertop still report that the parameters are "Bad". Runnung

# powertop --auto-tune

makes them all good (and reduces the power consumption).

Any idea is welcome :-)

Thanks
Rainer

--
Rainer Dorsch
http://bokomoko.de/

bw

unread,
Mar 10, 2018, 3:40:04 PM3/10/18
to


On Sat, 10 Mar 2018, Rainer Dorsch wrote:

> I followed
>
> https://wiki.archlinux.org/index.php/Powertop#Apply_settings
>
> added
>
> root@master:~# cat /etc/systemd/system/powertop.service
> [Unit]
> Description=Powertop tunings
>
> [Service]
> ExecStart=/usr/bin/powertop --auto-tune

Yes, the arch wiki often has different paths for tools. I have been
bitten by that several times.

# which powertop
/usr/sbin/powertop

David Wright

unread,
Mar 10, 2018, 8:40:04 PM3/10/18
to

Rainer Dorsch

unread,
Mar 11, 2018, 2:10:05 PM3/11/18
to
Many thanks, that indeed solves the problem.

bw

unread,
Mar 11, 2018, 3:00:06 PM3/11/18
to
I don't understand why powertop would be in /bin on arch even after
reading David's links about usrmerge. If I saw something like this in
debian's wiki, I'd probably look into it and let someone know.

On the powertop --autotune thing, I really don;t see any reason to do this
when on ac power? Instead, I have found that laptop-mode-tools implements
some of the solutions already, and can be persuaded to implement the
others when running on battery power with a couple of simple scripts.

L8r,
bw

Michael Biebl

unread,
Mar 11, 2018, 4:30:04 PM3/11/18
to
systemct tells you there was a problem trying to execute the binary.
Possibly because it's the wrong path?
$ whereis powertop
powertop: /usr/sbin/powertop /usr/share/man/man8/powertop.8.gz

(note bin vs sbin)
--
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?

signature.asc

David Wright

unread,
Mar 11, 2018, 7:20:04 PM3/11/18
to
On Sun 11 Mar 2018 at 14:36:09 (-0400), bw wrote:
>
>
> On Sun, 11 Mar 2018, Rainer Dorsch wrote:
>
> > Am Samstag, 10. März 2018, 15:16:29 CET schrieb bw:
> > > On Sat, 10 Mar 2018, Rainer Dorsch wrote:
> > > > I followed
> > > >
> > > > https://wiki.archlinux.org/index.php/Powertop#Apply_settings
> > > >
> > > > added
> > > >
> > > > root@master:~# cat /etc/systemd/system/powertop.service
> > > > [Unit]
> > > > Description=Powertop tunings
> > > >
> > > > [Service]
> > > > ExecStart=/usr/bin/powertop --auto-tune
> > >
> > > Yes, the arch wiki often has different paths for tools. I have been
> > > bitten by that several times.
> > >
> > > # which powertop
> > > /usr/sbin/powertop
> >
> > Many thanks, that indeed solves the problem.
> >
> > Rainer
> >
> > --
> > Rainer Dorsch
> > http://bokomoko.de/
> >
> >
>
> I don't understand why powertop would be in /bin on arch even after
> reading David's links about usrmerge. If I saw something like this in
> debian's wiki, I'd probably look into it and let someone know.

Ahem—arch has no /bin, /sbin or /usr/sbin to put anything into.
So it's hardly surprising that they put powertop into /usr/bin.

Cheers,
David.
0 new messages