Power off and reboot buttons












0















I'm a newbie in Ubuntu and I have just installed it. Problem is that power off and reboot buttons don't work. I'm turn off my PC by long push off POWER button on my laptop. How fix this?










share|improve this question



























    0















    I'm a newbie in Ubuntu and I have just installed it. Problem is that power off and reboot buttons don't work. I'm turn off my PC by long push off POWER button on my laptop. How fix this?










    share|improve this question

























      0












      0








      0


      1






      I'm a newbie in Ubuntu and I have just installed it. Problem is that power off and reboot buttons don't work. I'm turn off my PC by long push off POWER button on my laptop. How fix this?










      share|improve this question














      I'm a newbie in Ubuntu and I have just installed it. Problem is that power off and reboot buttons don't work. I'm turn off my PC by long push off POWER button on my laptop. How fix this?







      shutdown interface






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 4 '16 at 19:52









      Andrey CheremkinAndrey Cheremkin

      112




      112






















          1 Answer
          1






          active

          oldest

          votes


















          0














          1) To shutdown type the following command:



          sudo poweroff


          or:



          sudo shutdown -h now 


          to reboot type:



          sudo reboot


          2) Edit /etc/acpi/events/powerbtn



          Open terminal and type:



          nano /etc/acpi/events/powerbtn


          It will be something like:



          # /etc/acpi/events/powerbtn
          # This is called when the user presses the power button and calls
          # /etc/acpi/powerbtn.sh for further processing.

          # Optionally you can specify the placeholder %e. It will pass
          # through the whole kernel event message to the program you've
          # specified.

          # We need to react on "button power.*" and "button/power.*" because
          # of kernel changes.

          event=button[ /]power
          action=/etc/acpi/powerbtn.sh


          To save type Ctrl + O and hit enter
          To exit type Ctrl + X



          Edit /etc/acpi/powerbtn.sh and add the following lines:



          # If all else failed, just initiate a plain shutdown.
          /sbin/shutdown -h now "Power button pressed"


          Save , exit and type:



          sudo service acpid restart





          share|improve this answer


























          • In addition, if you want to type a command, you can either go to tty by pressing Ctrl+Alt+F1-F6 and login, or start a terminal emulator on your desktop by pressing Ctrl+Alt+T.

            – bfrguci
            Mar 4 '16 at 20:08












          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',
          autoActivateHeartbeat: false,
          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%2f742164%2fpower-off-and-reboot-buttons%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          1) To shutdown type the following command:



          sudo poweroff


          or:



          sudo shutdown -h now 


          to reboot type:



          sudo reboot


          2) Edit /etc/acpi/events/powerbtn



          Open terminal and type:



          nano /etc/acpi/events/powerbtn


          It will be something like:



          # /etc/acpi/events/powerbtn
          # This is called when the user presses the power button and calls
          # /etc/acpi/powerbtn.sh for further processing.

          # Optionally you can specify the placeholder %e. It will pass
          # through the whole kernel event message to the program you've
          # specified.

          # We need to react on "button power.*" and "button/power.*" because
          # of kernel changes.

          event=button[ /]power
          action=/etc/acpi/powerbtn.sh


          To save type Ctrl + O and hit enter
          To exit type Ctrl + X



          Edit /etc/acpi/powerbtn.sh and add the following lines:



          # If all else failed, just initiate a plain shutdown.
          /sbin/shutdown -h now "Power button pressed"


          Save , exit and type:



          sudo service acpid restart





          share|improve this answer


























          • In addition, if you want to type a command, you can either go to tty by pressing Ctrl+Alt+F1-F6 and login, or start a terminal emulator on your desktop by pressing Ctrl+Alt+T.

            – bfrguci
            Mar 4 '16 at 20:08
















          0














          1) To shutdown type the following command:



          sudo poweroff


          or:



          sudo shutdown -h now 


          to reboot type:



          sudo reboot


          2) Edit /etc/acpi/events/powerbtn



          Open terminal and type:



          nano /etc/acpi/events/powerbtn


          It will be something like:



          # /etc/acpi/events/powerbtn
          # This is called when the user presses the power button and calls
          # /etc/acpi/powerbtn.sh for further processing.

          # Optionally you can specify the placeholder %e. It will pass
          # through the whole kernel event message to the program you've
          # specified.

          # We need to react on "button power.*" and "button/power.*" because
          # of kernel changes.

          event=button[ /]power
          action=/etc/acpi/powerbtn.sh


          To save type Ctrl + O and hit enter
          To exit type Ctrl + X



          Edit /etc/acpi/powerbtn.sh and add the following lines:



          # If all else failed, just initiate a plain shutdown.
          /sbin/shutdown -h now "Power button pressed"


          Save , exit and type:



          sudo service acpid restart





          share|improve this answer


























          • In addition, if you want to type a command, you can either go to tty by pressing Ctrl+Alt+F1-F6 and login, or start a terminal emulator on your desktop by pressing Ctrl+Alt+T.

            – bfrguci
            Mar 4 '16 at 20:08














          0












          0








          0







          1) To shutdown type the following command:



          sudo poweroff


          or:



          sudo shutdown -h now 


          to reboot type:



          sudo reboot


          2) Edit /etc/acpi/events/powerbtn



          Open terminal and type:



          nano /etc/acpi/events/powerbtn


          It will be something like:



          # /etc/acpi/events/powerbtn
          # This is called when the user presses the power button and calls
          # /etc/acpi/powerbtn.sh for further processing.

          # Optionally you can specify the placeholder %e. It will pass
          # through the whole kernel event message to the program you've
          # specified.

          # We need to react on "button power.*" and "button/power.*" because
          # of kernel changes.

          event=button[ /]power
          action=/etc/acpi/powerbtn.sh


          To save type Ctrl + O and hit enter
          To exit type Ctrl + X



          Edit /etc/acpi/powerbtn.sh and add the following lines:



          # If all else failed, just initiate a plain shutdown.
          /sbin/shutdown -h now "Power button pressed"


          Save , exit and type:



          sudo service acpid restart





          share|improve this answer















          1) To shutdown type the following command:



          sudo poweroff


          or:



          sudo shutdown -h now 


          to reboot type:



          sudo reboot


          2) Edit /etc/acpi/events/powerbtn



          Open terminal and type:



          nano /etc/acpi/events/powerbtn


          It will be something like:



          # /etc/acpi/events/powerbtn
          # This is called when the user presses the power button and calls
          # /etc/acpi/powerbtn.sh for further processing.

          # Optionally you can specify the placeholder %e. It will pass
          # through the whole kernel event message to the program you've
          # specified.

          # We need to react on "button power.*" and "button/power.*" because
          # of kernel changes.

          event=button[ /]power
          action=/etc/acpi/powerbtn.sh


          To save type Ctrl + O and hit enter
          To exit type Ctrl + X



          Edit /etc/acpi/powerbtn.sh and add the following lines:



          # If all else failed, just initiate a plain shutdown.
          /sbin/shutdown -h now "Power button pressed"


          Save , exit and type:



          sudo service acpid restart






          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Mar 4 '16 at 20:25

























          answered Mar 4 '16 at 19:59









          GAD3RGAD3R

          1,523821




          1,523821













          • In addition, if you want to type a command, you can either go to tty by pressing Ctrl+Alt+F1-F6 and login, or start a terminal emulator on your desktop by pressing Ctrl+Alt+T.

            – bfrguci
            Mar 4 '16 at 20:08



















          • In addition, if you want to type a command, you can either go to tty by pressing Ctrl+Alt+F1-F6 and login, or start a terminal emulator on your desktop by pressing Ctrl+Alt+T.

            – bfrguci
            Mar 4 '16 at 20:08

















          In addition, if you want to type a command, you can either go to tty by pressing Ctrl+Alt+F1-F6 and login, or start a terminal emulator on your desktop by pressing Ctrl+Alt+T.

          – bfrguci
          Mar 4 '16 at 20:08





          In addition, if you want to type a command, you can either go to tty by pressing Ctrl+Alt+F1-F6 and login, or start a terminal emulator on your desktop by pressing Ctrl+Alt+T.

          – bfrguci
          Mar 4 '16 at 20:08


















          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.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f742164%2fpower-off-and-reboot-buttons%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

          How to reconfigure Docker Trusted Registry 2.x.x to use CEPH FS mount instead of NFS and other traditional...

          is 'sed' thread safe

          How to make a Squid Proxy server?