Powertop systemd service failed to load











up vote
2
down vote

favorite












After my installing of powertop and calibrating it, I create systemd service with following text:



[Unit]
Description=Powertop tunings

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

[Install]
WantedBy=multi-user.target


After system load I get this log:



nikon-laptop powertop[615]: Load 55 measurement
nikon-laptop powertop[615]: Error opening terminal: unknown.
nikon-laptop powertop[615]: Cannot load from file /var/cache/powertop/saved_parameters.powertop
nikon-laptop powertop[615]: RAPL device for cpu 0
nikon-laptop powertop[615]: RAPL device for cpu 0
nikon-laptop powertop[615]: Cannot load from file /var/cache/powertop/saved_parameters.powertop
nikon-laptop systemd[1]: powertop.service: main process exited, code=exited, status=1/FAILURE
nikon-laptop systemd[1]: Failed to start PowerTop.
nikon-laptop systemd[1]: Unit powertop.service entered failed state.
nikon-laptop systemd[1]: powertop.service failed.


and all tunes bad again (if I run auto-tune after system load in my term all tunes stay good). How to fix that.










share|improve this question


























    up vote
    2
    down vote

    favorite












    After my installing of powertop and calibrating it, I create systemd service with following text:



    [Unit]
    Description=Powertop tunings

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

    [Install]
    WantedBy=multi-user.target


    After system load I get this log:



    nikon-laptop powertop[615]: Load 55 measurement
    nikon-laptop powertop[615]: Error opening terminal: unknown.
    nikon-laptop powertop[615]: Cannot load from file /var/cache/powertop/saved_parameters.powertop
    nikon-laptop powertop[615]: RAPL device for cpu 0
    nikon-laptop powertop[615]: RAPL device for cpu 0
    nikon-laptop powertop[615]: Cannot load from file /var/cache/powertop/saved_parameters.powertop
    nikon-laptop systemd[1]: powertop.service: main process exited, code=exited, status=1/FAILURE
    nikon-laptop systemd[1]: Failed to start PowerTop.
    nikon-laptop systemd[1]: Unit powertop.service entered failed state.
    nikon-laptop systemd[1]: powertop.service failed.


    and all tunes bad again (if I run auto-tune after system load in my term all tunes stay good). How to fix that.










    share|improve this question
























      up vote
      2
      down vote

      favorite









      up vote
      2
      down vote

      favorite











      After my installing of powertop and calibrating it, I create systemd service with following text:



      [Unit]
      Description=Powertop tunings

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

      [Install]
      WantedBy=multi-user.target


      After system load I get this log:



      nikon-laptop powertop[615]: Load 55 measurement
      nikon-laptop powertop[615]: Error opening terminal: unknown.
      nikon-laptop powertop[615]: Cannot load from file /var/cache/powertop/saved_parameters.powertop
      nikon-laptop powertop[615]: RAPL device for cpu 0
      nikon-laptop powertop[615]: RAPL device for cpu 0
      nikon-laptop powertop[615]: Cannot load from file /var/cache/powertop/saved_parameters.powertop
      nikon-laptop systemd[1]: powertop.service: main process exited, code=exited, status=1/FAILURE
      nikon-laptop systemd[1]: Failed to start PowerTop.
      nikon-laptop systemd[1]: Unit powertop.service entered failed state.
      nikon-laptop systemd[1]: powertop.service failed.


      and all tunes bad again (if I run auto-tune after system load in my term all tunes stay good). How to fix that.










      share|improve this question













      After my installing of powertop and calibrating it, I create systemd service with following text:



      [Unit]
      Description=Powertop tunings

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

      [Install]
      WantedBy=multi-user.target


      After system load I get this log:



      nikon-laptop powertop[615]: Load 55 measurement
      nikon-laptop powertop[615]: Error opening terminal: unknown.
      nikon-laptop powertop[615]: Cannot load from file /var/cache/powertop/saved_parameters.powertop
      nikon-laptop powertop[615]: RAPL device for cpu 0
      nikon-laptop powertop[615]: RAPL device for cpu 0
      nikon-laptop powertop[615]: Cannot load from file /var/cache/powertop/saved_parameters.powertop
      nikon-laptop systemd[1]: powertop.service: main process exited, code=exited, status=1/FAILURE
      nikon-laptop systemd[1]: Failed to start PowerTop.
      nikon-laptop systemd[1]: Unit powertop.service entered failed state.
      nikon-laptop systemd[1]: powertop.service failed.


      and all tunes bad again (if I run auto-tune after system load in my term all tunes stay good). How to fix that.







      power-management systemd powertop






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Aug 31 '15 at 16:29









      user2010633

      113




      113






















          4 Answers
          4






          active

          oldest

          votes

















          up vote
          3
          down vote













          Powertop needs a TTY attached even when in auto-tune mode. You can use screen to fake it for the purposes of startup scripts like this:



          screen -d -m powertop --auto-tune





          share|improve this answer





















          • I am kind of disappointed that this is the solution but it works. Seems like PowerTOP should either not require a TTY or Systemd should be able to provide one.
            – nnutter
            Mar 25 '16 at 22:28




















          up vote
          1
          down vote













          Try adding the following:



          [Service]
          StandardOutput=tty
          ....





          share|improve this answer




























            up vote
            0
            down vote













            This issue is as of this writing still relevant under CentOS/RHEL and other OS's, that are relying on older versions of powertop.



            The most elegant workaround I've seen for this is to set:



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


            Setting a dumb terminal will prevent powertop's bailing out.






            share|improve this answer




























              up vote
              0
              down vote













              I realize the question is old and this may have changed since, but your ExecStart line was:
              ExecStart=/usr/bin/powertop



              However, the executable is in /usr/sbin, not /usr/bin, at least on Ubuntu 18.10:



              $ ls /usr/bin/powertop
              ls: cannot access '/usr/bin/powertop': No such file or directory

              $ which powertop
              /usr/sbin/powertop





              share|improve this answer





















                Your Answer








                StackExchange.ready(function() {
                var channelOptions = {
                tags: "".split(" "),
                id: "89"
                };
                initTagRenderer("".split(" "), "".split(" "), channelOptions);

                StackExchange.using("externalEditor", function() {
                // Have to fire editor after snippets, if snippets enabled
                if (StackExchange.settings.snippets.snippetsEnabled) {
                StackExchange.using("snippets", function() {
                createEditor();
                });
                }
                else {
                createEditor();
                }
                });

                function createEditor() {
                StackExchange.prepareEditor({
                heartbeatType: 'answer',
                convertImagesToLinks: true,
                noModals: true,
                showLowRepImageUploadWarning: true,
                reputationToPostImages: 10,
                bindNavPrevention: true,
                postfix: "",
                imageUploader: {
                brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
                contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
                allowUrls: true
                },
                onDemand: true,
                discardSelector: ".discard-answer"
                ,immediatelyShowMarkdownHelp:true
                });


                }
                });














                draft saved

                draft discarded


















                StackExchange.ready(
                function () {
                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f667798%2fpowertop-systemd-service-failed-to-load%23new-answer', 'question_page');
                }
                );

                Post as a guest















                Required, but never shown

























                4 Answers
                4






                active

                oldest

                votes








                4 Answers
                4






                active

                oldest

                votes









                active

                oldest

                votes






                active

                oldest

                votes








                up vote
                3
                down vote













                Powertop needs a TTY attached even when in auto-tune mode. You can use screen to fake it for the purposes of startup scripts like this:



                screen -d -m powertop --auto-tune





                share|improve this answer





















                • I am kind of disappointed that this is the solution but it works. Seems like PowerTOP should either not require a TTY or Systemd should be able to provide one.
                  – nnutter
                  Mar 25 '16 at 22:28

















                up vote
                3
                down vote













                Powertop needs a TTY attached even when in auto-tune mode. You can use screen to fake it for the purposes of startup scripts like this:



                screen -d -m powertop --auto-tune





                share|improve this answer





















                • I am kind of disappointed that this is the solution but it works. Seems like PowerTOP should either not require a TTY or Systemd should be able to provide one.
                  – nnutter
                  Mar 25 '16 at 22:28















                up vote
                3
                down vote










                up vote
                3
                down vote









                Powertop needs a TTY attached even when in auto-tune mode. You can use screen to fake it for the purposes of startup scripts like this:



                screen -d -m powertop --auto-tune





                share|improve this answer












                Powertop needs a TTY attached even when in auto-tune mode. You can use screen to fake it for the purposes of startup scripts like this:



                screen -d -m powertop --auto-tune






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Sep 18 '15 at 3:47









                Lispnik

                1311




                1311












                • I am kind of disappointed that this is the solution but it works. Seems like PowerTOP should either not require a TTY or Systemd should be able to provide one.
                  – nnutter
                  Mar 25 '16 at 22:28




















                • I am kind of disappointed that this is the solution but it works. Seems like PowerTOP should either not require a TTY or Systemd should be able to provide one.
                  – nnutter
                  Mar 25 '16 at 22:28


















                I am kind of disappointed that this is the solution but it works. Seems like PowerTOP should either not require a TTY or Systemd should be able to provide one.
                – nnutter
                Mar 25 '16 at 22:28






                I am kind of disappointed that this is the solution but it works. Seems like PowerTOP should either not require a TTY or Systemd should be able to provide one.
                – nnutter
                Mar 25 '16 at 22:28














                up vote
                1
                down vote













                Try adding the following:



                [Service]
                StandardOutput=tty
                ....





                share|improve this answer

























                  up vote
                  1
                  down vote













                  Try adding the following:



                  [Service]
                  StandardOutput=tty
                  ....





                  share|improve this answer























                    up vote
                    1
                    down vote










                    up vote
                    1
                    down vote









                    Try adding the following:



                    [Service]
                    StandardOutput=tty
                    ....





                    share|improve this answer












                    Try adding the following:



                    [Service]
                    StandardOutput=tty
                    ....






                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Jun 19 '16 at 13:59









                    Felix

                    112




                    112






















                        up vote
                        0
                        down vote













                        This issue is as of this writing still relevant under CentOS/RHEL and other OS's, that are relying on older versions of powertop.



                        The most elegant workaround I've seen for this is to set:



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


                        Setting a dumb terminal will prevent powertop's bailing out.






                        share|improve this answer

























                          up vote
                          0
                          down vote













                          This issue is as of this writing still relevant under CentOS/RHEL and other OS's, that are relying on older versions of powertop.



                          The most elegant workaround I've seen for this is to set:



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


                          Setting a dumb terminal will prevent powertop's bailing out.






                          share|improve this answer























                            up vote
                            0
                            down vote










                            up vote
                            0
                            down vote









                            This issue is as of this writing still relevant under CentOS/RHEL and other OS's, that are relying on older versions of powertop.



                            The most elegant workaround I've seen for this is to set:



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


                            Setting a dumb terminal will prevent powertop's bailing out.






                            share|improve this answer












                            This issue is as of this writing still relevant under CentOS/RHEL and other OS's, that are relying on older versions of powertop.



                            The most elegant workaround I've seen for this is to set:



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


                            Setting a dumb terminal will prevent powertop's bailing out.







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered Mar 17 '17 at 20:09









                            nodonttakethose

                            963




                            963






















                                up vote
                                0
                                down vote













                                I realize the question is old and this may have changed since, but your ExecStart line was:
                                ExecStart=/usr/bin/powertop



                                However, the executable is in /usr/sbin, not /usr/bin, at least on Ubuntu 18.10:



                                $ ls /usr/bin/powertop
                                ls: cannot access '/usr/bin/powertop': No such file or directory

                                $ which powertop
                                /usr/sbin/powertop





                                share|improve this answer

























                                  up vote
                                  0
                                  down vote













                                  I realize the question is old and this may have changed since, but your ExecStart line was:
                                  ExecStart=/usr/bin/powertop



                                  However, the executable is in /usr/sbin, not /usr/bin, at least on Ubuntu 18.10:



                                  $ ls /usr/bin/powertop
                                  ls: cannot access '/usr/bin/powertop': No such file or directory

                                  $ which powertop
                                  /usr/sbin/powertop





                                  share|improve this answer























                                    up vote
                                    0
                                    down vote










                                    up vote
                                    0
                                    down vote









                                    I realize the question is old and this may have changed since, but your ExecStart line was:
                                    ExecStart=/usr/bin/powertop



                                    However, the executable is in /usr/sbin, not /usr/bin, at least on Ubuntu 18.10:



                                    $ ls /usr/bin/powertop
                                    ls: cannot access '/usr/bin/powertop': No such file or directory

                                    $ which powertop
                                    /usr/sbin/powertop





                                    share|improve this answer












                                    I realize the question is old and this may have changed since, but your ExecStart line was:
                                    ExecStart=/usr/bin/powertop



                                    However, the executable is in /usr/sbin, not /usr/bin, at least on Ubuntu 18.10:



                                    $ ls /usr/bin/powertop
                                    ls: cannot access '/usr/bin/powertop': No such file or directory

                                    $ which powertop
                                    /usr/sbin/powertop






                                    share|improve this answer












                                    share|improve this answer



                                    share|improve this answer










                                    answered Nov 25 at 13:21









                                    Knuckles

                                    565




                                    565






























                                        draft saved

                                        draft discarded




















































                                        Thanks for contributing an answer to Ask Ubuntu!


                                        • Please be sure to answer the question. Provide details and share your research!

                                        But avoid



                                        • Asking for help, clarification, or responding to other answers.

                                        • Making statements based on opinion; back them up with references or personal experience.


                                        To learn more, see our tips on writing great answers.





                                        Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                                        Please pay close attention to the following guidance:


                                        • Please be sure to answer the question. Provide details and share your research!

                                        But avoid



                                        • Asking for help, clarification, or responding to other answers.

                                        • Making statements based on opinion; back them up with references or personal experience.


                                        To learn more, see our tips on writing great answers.




                                        draft saved


                                        draft discarded














                                        StackExchange.ready(
                                        function () {
                                        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f667798%2fpowertop-systemd-service-failed-to-load%23new-answer', 'question_page');
                                        }
                                        );

                                        Post as a guest















                                        Required, but never shown





















































                                        Required, but never shown














                                        Required, but never shown












                                        Required, but never shown







                                        Required, but never shown

































                                        Required, but never shown














                                        Required, but never shown












                                        Required, but never shown







                                        Required, but never shown







                                        Popular posts from this blog

                                        Category:香港粉麵

                                        List *all* the tuples!

                                        Channel [V]