Support for the Pi-Desktop Power Button?

  • Hello community,

    the Raspberry Pi (model 3B+) is an always-on board by design - it has no power button. This will make LE sending a permanent video signal to my TV. When I turn the TV on, it will instantly switch to the active video signal input (LE), and doesn't stay in TV mode. This is bad, and I want to find a solution.

    The first idea was to temporary switch off the HDMI signal by the command "tvservice -o". Unfortunately the command to switch HDMI on again "tvservice -p" doesn't work on LE.

    The next idea is to put the Raspberry Pi in a case with a power button. I have found the Pi-Desktop case by Element14 on the market. To make the power button work, it needs an additional Debian package "pidesktop-base.deb". The source code for this package is available on Github.

    Is there any add-on or another solution to make the Pi-Desktop power button work on LE?

    PS: I have been found this thread, which is still unsolved and has a "maybe too old" warning. If someone made it work from there, please give me a notice.

    Flexin' vinyl, jammin' break beats.:thumbup:

    Edited 3 times, last by Da Flex ().

  • You could try This to power on/off your device

    I have been tried this, and it partially works. (edit config.txt, shortcut GPIO 3 and GND as power button)

    The power on works fine.

    The power off will let the shutdown menu appear (power off, power off timer, reboot).

    Do you know a trick how to avoid that menu and instantly power off?

    Flexin' vinyl, jammin' break beats.:thumbup:

  • This might also help

    I followed those instructions and did that:

    - set config.txt back to original (no "dtoverlay=gpio-shutdown")

    - installed "Raspberry Pi Tools" from repository

    - created the "" and ""

    - set both files as executable (chmod +x)

    GPIO3 now still works as power on (it always does), but the next trigger to power off does nothing.

    The python script ("") looks OK:

    - the necessary lib from "Raspberry Pi Tools" exists (/storage/.kodi/addons/virtual.rpi-tools/lib/

    - the pin mode "GPIO.BCM" is correct for my model 3b+ with GPIO3 power button

    Any hints?

    PS: The command line response when starting from ssh ("sh /storage/.config/") is this:

    1. Traceback (most recent call last):
    2. File "/storage/scripts/", line 6, in <module>
    3. import syss
    4. ImportError: No module named syss

    Flexin' vinyl, jammin' break beats.:thumbup:

    Edited once, last by Da Flex ().

  • 8ugger :@ formatting issues again.


    1. import sys.path.append('/storage/.kodi/addons/virtual.rpi-tools/lib')


    1. import syss
    2. ys.path.append('/storage/.kodi/addons/virtual.rpi-tools/lib')
  • Still an error at line 6:

    1. File "/storage/scripts/", line 6
    2. import sys.path.append('/storage/.kodi/addons/virtual.rpi-tools/lib')
    3. ^
    4. SyntaxError: invalid syntax

    Flexin' vinyl, jammin' break beats.:thumbup:

  • Success! GPIO3 power on/off triggers the expected results now! :)

    Thank you very much, Iridium!:thumbup:

    I can use a cheap case now, and install my own power button - problem solved.

    Flexin' vinyl, jammin' break beats.:thumbup: