• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

Prevent shutdown when pressing the power button

Scheduled Pinned Locked Moved Hardware
7 Posts 5 Posters 1.6k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J
    jkiel
    last edited by jkiel Oct 12, 2019, 1:14 AM Oct 12, 2019, 12:49 AM

    Couldn't find a bios option to disable the power button on the device I'm using to run pfsense, but I ran across this old thread explaining how to disable the power button in pfsense. Unfortunately those instructions wouldn't work.

    However, what did work for me is, in case anyone is interested:
    Diagnostics > Edit File
    Path to file: /boot/loader.conf.local
    Click Load to load the existing file, if there is one.

    Add the following:

    hw.acpi.power_button_state=NONE
    

    Save.
    Reboot.

    1 Reply Last reply Reply Quote 0
    • J
      johnpoz LAYER 8 Global Moderator
      last edited by johnpoz Oct 12, 2019, 1:41 AM Oct 12, 2019, 1:40 AM

      And why would you want to do this? Just curious..

      Do you have little kids around your router that like to push buttons?

      An intelligent man is sometimes forced to be drunk to spend time with his fools
      If you get confused: Listen to the Music Play
      Please don't Chat/PM me for help, unless mod related
      SG-4860 24.11 | Lab VMs 2.8, 24.11

      1 Reply Last reply Reply Quote 0
      • S
        stephenw10 Netgate Administrator
        last edited by Oct 12, 2019, 1:48 PM

        Yeah, some devices have power buttons that are all too easy to press.
        hw.acpi.power_button_state=NONE is the correct way to disable it but you can enter that as a sysctl it doesn't have to be a loader varible. That way it is saved in the config.

        Steve

        1 Reply Last reply Reply Quote 0
        • J
          jkiel
          last edited by Oct 12, 2019, 5:24 PM

          @stephenw10 said in Prevent shutdown when pressing the power button:

          you can enter that as a sysctl it doesn't have to be a loader varible. That way it is saved in the config.

          Thanks for tip!

          @johnpoz said in Prevent shutdown when pressing the power button:

          And why would you want to do this? Just curious..

          Do you have little kids around your router that like to push buttons?

          I actually do have a rambunctious little toddler that likes to push all kinds of buttons, both figuratively and literally. But in this case it's to prevent anyone, including myself, from accidentally pressing the power button when fumbling with other equipment near the router. Much like the ONT, Switch, Access Point and VoIP Gateway it's installed next to lack momentary power buttons to prevent this very thing.

          1 Reply Last reply Reply Quote 0
          • C
            chpalmer
            last edited by Oct 12, 2019, 5:35 PM

            Glue a bottle cap over the button.. :)

            Triggering snowflakes one by one..
            Intel(R) Core(TM) i5-4590T CPU @ 2.00GHz on an M400 WG box.

            1 Reply Last reply Reply Quote 0
            • J
              jkiel
              last edited by jkiel Oct 12, 2019, 6:30 PM Oct 12, 2019, 6:30 PM

              A sysctl setting is a little easier than messing around with glue. ;)

              1 Reply Last reply Reply Quote 0
              • L
                luckman212 LAYER 8
                last edited by Jul 11, 2020, 11:20 PM

                Just came here to say thanks for this tip. My wife has on more than one occasion accidentally hit the power button while moving stuff around in our closet and caused our SG-5100 to promptly shut down. Grr!

                I used the System Tunable method. Problem solved! 👍

                93838b45-f0a1-4de5-aec1-6a88ae271767-image.png

                1 Reply Last reply Reply Quote 1
                • First post
                  Last post
                Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                  This community forum collects and processes your personal information.
                  consent.not_received