[SOLVED] systemd service file for powertop

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

[SOLVED] systemd service file for powertop

Postby daniewicz » Jul 25th, '16, 20:55

Running Mageia 5 on a MacBook Pro with KDE.

I created a file powertop.service and placed it in /etc/systemd/system. It looks like this:
Code: Select all
[Unit]
Description=Powertop tunings

[Service]
Type=oneshot
ExecStart=/usr/sbin/powertop --auto-tune

[Install]
WantedBy=multi-user.target


I enabled the service with:
systemctl enable powertop

I rebooted but the powertop service did not work properly.

Code: Select all
# systemctl status powertop
● powertop.service - Powertop tunings
   Loaded: loaded (/etc/systemd/system/powertop.service; enabled)
   Active: failed (Result: exit-code) since Mon 2016-07-25 13:41:48 CDT; 2min 27s ago
  Process: 864 ExecStart=/usr/sbin/powertop --auto-tune (code=exited, status=1/FAILURE)
 Main PID: 864 (code=exited, status=1/FAILURE)

Jul 25 13:41:47 localhost powertop[864]: Loaded 67 prior measurements
Jul 25 13:41:48 localhost powertop[864]: Error opening terminal: unknown.
Jul 25 13:41:48 localhost powertop[864]: Cannot load from file /var/cache/powertop/saved_para...top
Jul 25 13:41:48 localhost powertop[864]: RAPL device for cpu 0
Jul 25 13:41:48 localhost powertop[864]: RAPL device for cpu 0
Jul 25 13:41:48 localhost powertop[864]: Cannot load from file /var/cache/powertop/saved_para...top
Jul 25 13:41:48 localhost systemd[1]: powertop.service: main process exited, code=exited, st...LURE
Jul 25 13:41:48 localhost systemd[1]: Failed to start Powertop tunings.
Jul 25 13:41:48 localhost systemd[1]: Unit powertop.service entered failed state.
Jul 25 13:41:48 localhost systemd[1]: powertop.service failed.
Hint: Some lines were ellipsized, use -l to show in full.
Last edited by doktor5000 on Jul 27th, '16, 15:31, edited 2 times in total.
Reason: adjusted thread title
The dude abides.
User avatar
daniewicz
 
Posts: 224
Joined: Feb 10th, '13, 03:37

Re: powertop

Postby doktor5000 » Jul 25th, '16, 21:27

daniewicz wrote:Jul 25 13:41:48 localhost powertop[864]: Error opening terminal: unknown.
Jul 25 13:41:48 localhost powertop[864]: Cannot load from file /var/cache/powertop/saved_para...top
Jul 25 13:41:48 localhost powertop[864]: RAPL device for cpu 0
Jul 25 13:41:48 localhost powertop[864]: RAPL device for cpu 0
Jul 25 13:41:48 localhost powertop[864]: Cannot load from file /var/cache/powertop/saved_para...top
Jul 25 13:41:48 localhost systemd[1]: powertop.service: main process exited, code=exited, st...LURE
Jul 25 13:41:48 localhost systemd[1]: Failed to start Powertop tunings.


Not sure what the failing part is, the missing TERM variabe set or that it cannot load the config file /var/cache/powertop/saved_para...
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18056
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: powertop

Postby daniewicz » Jul 25th, '16, 21:45

Disappointing. I followed the approach outlined by the archlinux folks...

https://wiki.archlinux.org/index.php/powertop
The dude abides.
User avatar
daniewicz
 
Posts: 224
Joined: Feb 10th, '13, 03:37

Re: powertop

Postby daniewicz » Jul 26th, '16, 20:45

This powertop.service file works!

Code: Select all
[Unit]
Description=Powertop tunings

[Service]
Type=idle
Environment="TERM=dumb"
ExecStart=/usr/sbin/powertop --auto-tune

[Install]
WantedBy=multi-user.target
The dude abides.
User avatar
daniewicz
 
Posts: 224
Joined: Feb 10th, '13, 03:37

Re: [SOLVED] systemd service file for powertop

Postby doktor5000 » Jul 27th, '16, 15:39

You might as well open a feature request in our bugzilla and propose that such a systemd service file should be added to our package in cauldron.

And FWIW, same as in the battery status thread, please try to use more meaningful thread titles, just using the program name as thread title is not that helpful for people searching for solutions.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18056
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest