Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [shutdown]

For questions pertaining to shutting down the operating system.

Filter by
Sorted by
Tagged with
0 votes
1 answer
16 views

gpio.shutdown brings shutdown options window

I'm trying to use the gpio-shutdown overlay withe the following code pasted into config.txt dtoverlay=gpio-shutdown,gpio_pin=15 gpio=23=op,dh In my circuit, under normal operations GPIO 15 is high, ...
kubajed's user avatar
  • 19
-2 votes
1 answer
34 views

RPi zero W auto power up / down by available power

I want to run a RPi Zero W on a crude solar panel and battery or supercapacitor. I understand the pi has an input range of 80-120A or so, and needs a minimum of just 2 volts. This makes it ideal for ...
Jodes's user avatar
  • 562
0 votes
2 answers
50 views

RPi randomly shutting down, maybe due to GPIO?

I am running a Rpi 3b+ headless, mostly for Pi-Hole now. Nothing external connected, not even a monitor, a mouse or a keyboard. But because it runs PiHole, and my DHCP clients use it as domain server, ...
unsafe_where_true's user avatar
-1 votes
1 answer
60 views

GPIO 2 Shut Down Not Working

I have a Pi 3B+ with an adafruit matrix bonnet. Im trying to shutdown the Pi with a single pole double throw switch I had laying around. I'm currently able to get the power on working through GPIO 3. ...
VictorC's user avatar
0 votes
0 answers
39 views

Executing a script before shutdown on RPi3b+ running Buster

I am looking at executing a script on a RPi3b+ with Raspbian Buster that is copying some files located on a ramdisk to a persistent folder located on the SD Card before a shutdown or a reboot of the ...
jfh999's user avatar
  • 1
0 votes
0 answers
59 views

add a reboot and shutdown button to top panel

I have just upgraded my Rasp Pi4 from Buster to Bullseye. I had to create a fresh installation but had copies of my previous disk image. I have managed to get most things re-installed but noticed I ...
stain's user avatar
  • 1
-1 votes
1 answer
71 views

How to set up a raspberry pi to shutodown and boot based on whether UPS it is plugged in or not

I am building a golf cart and want to install a raspberry PI as dashboard computer for it. For this purpose I am using a Raspberry Pi 4 model B and I have a RPi UPSPack V3 for a ups. I have it wired ...
richzrich's user avatar
2 votes
1 answer
266 views

Using "dtoverlay=gpio-shutdown" execute a shell command before shutdown

In /boot/config.txt I did put dtoverlay=gpio-shutdown,active_low=1,gpio_pull=up Now if I short GPIO 3 - the Pi does shutdown immediately. But how can I run some shell script before shutting down via ...
VextoR's user avatar
  • 141
2 votes
1 answer
207 views

how to connect to GPIO connectors if they are already occupied

I want to connect 2 wires to the connectors to put pysical shutdown button, like showed here But the connector will be already occpuied by e-paper driver. What would be a recommendation here? Just to ...
VextoR's user avatar
  • 141
0 votes
1 answer
75 views

Maybe did wrong trying to shut down my 2011.12 Pi [closed]

I was trying to shut down my 2011.12 raspberry pie. I am brand new to it and probably don’t have a clue what I’m doing. I saw a place online that said hit Ctrl X followed by y at the prompt. When I ...
Ron's user avatar
  • 11
2 votes
1 answer
217 views

Which GPIOs can I use to shutdown Pi 4?

I am using a Pi 4 with Raspian, writing a program in Python (3.9.2) to do (amongst other things) shutdown of the Pi via a physical button. Based on this link https://linuxhint.com/set-up-shutdown-...
Clóvis Fritzen's user avatar
0 votes
1 answer
95 views

Can I turn a Raspberry Pi server on and off safely? [duplicate]

I want to host my own onion website on my raspberry pi. I managed to get it setup and it worked perfectly. However, I do not want to keep my Pi running all the time. I would like to turn it off ...
LDM31's user avatar
  • 3
-1 votes
2 answers
489 views

Detect shutdown via GPIO

I run one of my Pis with the Geekworm X735 power hat, which adds a button to power on, power down or reboot the Pi, along with a power LED. However, the power board does not seem to be able to detect ...
user149408's user avatar
0 votes
2 answers
128 views

pin state after shutdown

i am on Ubuntu 20.04 on RPI4. I am driving a 4 PWM motor driver using PWM on pins 22,23,26,27. When i turn off the raspberry, the driver being still powered, go off. I suppose some of this pins change ...
Stefano Mutti's user avatar
0 votes
1 answer
264 views

Shutdown safely raspberry pi without keyboard and network

A friend lent me a little used RPi 4B to try it before to buy it. I am not sure to buy it but for now I simply connected a display and powered it. By bad luck I noticed that my only monitor that ...
Le Nain Jaune's user avatar
0 votes
1 answer
156 views

Can the Raspberry Pi detect when the screen turns off for a script?

I’m running a Raspberry Pi in my car with an official screen (link: https://www.amazon.com/dp/B073S3LQ6Q/ref=cm_sw_r_cp_api_i_dl_ZSPC0NJXFQVBZ19PXGCP?_encoding=UTF8&psc=1). It’s for obd. When I ...
Mat's user avatar
  • 1
0 votes
2 answers
1k views

Raspberry Pi Model 4 - Disconnects after a time of inactivity

I am running a small server with 6 docker services on a Raspberry Pi Modell B. After a short time of inactivity (and with that I mean no being connected via ssh) of approximately 20-30 minutes, my ...
David Scholz's user avatar
-1 votes
1 answer
645 views

shutdown/reboot raspberry using GPIO - doesn't work for me

I need my raspberry Pi to turn OFF automatically when I press a button, so I've forked the Adafruit-GPIO-halt project and created a slight modified version of it here. I've modified the C code and the ...
orestino's user avatar
0 votes
0 answers
45 views

Most energy efficient way to perform periodic tasks on RPI ZERO W

I would like to make my Rpi Zero W execute a simple task (which takes an insignificant fraction of time to perform, <1s) using inputs from sensors exactly f times a day. I am wondering whether: ...
Captain Trojan's user avatar
0 votes
2 answers
338 views

reboot raspberry pi supplied after shutdown

My Raspberry Pi is connected to the supply, and after shutting down, it is still connected to the supply and the red led is on. Is it possible to reboot the pi without removing the supply and without ...
mina's user avatar
  • 377
1 vote
3 answers
5k views

How to boot and safely shutdown with a button when WAKE_ON_GPIO=0

1. Description To boot and shutdown my pi I have been using a button shorting GPIO 3 an GND. However after shutting down the pi, the fan shim and HDD keep on running. To solve this I've edited the ...
Pieter Huybrechts's user avatar
1 vote
1 answer
73 views

my Pi-Top 3 wont power down on shutdown [closed]

I am running Noobs, it boots fine and runs fine but when I shut down the screen stays powered on, etc. What shout I tweak? I've already tried shutting down from the console, checked Hardware/software ...
bradly's user avatar
  • 111
1 vote
2 answers
592 views

How safe is sudo halt -f to shutdown a RPi?

I realized that the shutdown process for my RPi sometimes takes a while (like up to 1-2 minutes) before the green ACT LED finally blinks 10 times and the RPi can be unpluged safely. However I am ...
user111029's user avatar
-1 votes
1 answer
387 views

edit UPS HAT safe shutdown script

I write this since I need advice with an RPi Hat that I purchased and the assistance told me to find a solution myself! I purchased an UPS HAT (UPS3 from geekworm). I need to perform some actions ...
nhouse's user avatar
  • 1
1 vote
1 answer
1k views

RPi 4B 4GB: Excessive Shut Down time using the GUI shutdown

I have 5 - 4B-4GB's and 1-8GB systems. One of the 4GB systems is experiencing an excessive shutdown (power off) time of 4.5 minutes. All the other systems take about 15-20 seconds, all my systems ...
Korbendallaz's user avatar
1 vote
0 answers
692 views

CM4 eMMC - safe shutdown / power supply schemes

I'm working on a design that uses a CM4 with eMMC and may (optionally) use an external SD card or USB stick for "user" file storage. The unit could (potentially) be hard powered-down by the ...
John U's user avatar
  • 181
0 votes
0 answers
584 views

RPI connected to a smart plug -> how to auto turn off plug after RPI shutdown?

In short: I was wondering if it is possible to send a command to a smart plug when the pi is good to kill it's power. background I'm running a 3d printer which I'm going to control with a rpi 4 using ...
Tim's user avatar
  • 101
0 votes
1 answer
229 views

Shutdown from C program

I'd love to do a proper shutdown of the Pi from a program (written in C) so that the only thing left to do is pull the power plug. Is this possible?
user120300's user avatar
-1 votes
2 answers
130 views

How to safely shutdown raspberry pi

I have a iono-pi which sits on top of the raspberry pi. I have connected this to a machine so the pi is getting power from the machine. When the machine starts for production, pi also starts and when ...
S Andrew's user avatar
  • 480
0 votes
0 answers
582 views

GPIO17 only works after calling 'GPIO.setup(17, GPIO.IN)'

I have a fresh installed RaspberryPi running Raspberry PI OS Lite (32-bit) from 2020-12-02 with a mounted OnOff-Shim. Starting the Raspberry via button works fine, but the shutdown sequence is not ...
DIF's user avatar
  • 115
2 votes
2 answers
254 views

Upon shutdown of the pi, don't turn off the display until the very last moment?

I notice that a Pi 3B+ with the offcial touchscreen display will black/power off the display the instant that a shutdown command is issued, but it appears the Pi is still busy doing some things (what?)...
Caius Jard's user avatar
1 vote
0 answers
289 views

GPIO input, keep high after button press

Hi was just wondering if there was a way of making a GPIO INPUT (connected to a momentary switch) stay high (for a certain amount of time), no matter how long the switch has been pressed for? The ...
OldGold's user avatar
  • 11
2 votes
1 answer
1k views

Why does my Pi Zero keep shutting down by itself?

I am trying to make a smart plug that activates a relay when it receives a certain message via MQTT. It works, but the Pi shuts down randomly, both when the relay is active and when everything is just ...
makerws's user avatar
  • 41
4 votes
1 answer
696 views

GPIO stuck high after shutdown/halt

I'm new to the world of Raspberry Pi, I'm setting one up as a little PC for a kid. I have a RPi 4 running Raspberry Pi OS, and I've build a case around this heatsink. I have created a simple circuit ...
shane-pi's user avatar
7 votes
2 answers
27k views

Raspberry Pi 4 B GPIO boot and shutdown button(s)

I've been doing some research on power buttons for the Raspberry Pi, but I'm having quite a hard time finding information. Right now, I have button working on GPIO5, and when I connect it to the ...
are_end's user avatar
  • 179
2 votes
2 answers
358 views

Safely unplug raspberry

I have a great software running on my Raspberry Pi 4 and we will send it to customers for production. The image on the SD card is Ubuntu. I would like to know if we can add any security to protect the ...
Ajouve's user avatar
  • 131
1 vote
1 answer
163 views

Pushbutton -> print message and shutdown. Prints message only the first time

I wrote a small script to shutdown the pi once the button is pressed for 2 seconds. It should print a message and after one second shutdown the pi. I also have this script to run automatically on each ...
qeiynn's user avatar
  • 67
-1 votes
1 answer
73 views

Can we make raspberry Pi plug and play type [closed]

I am using raspberry Pi as a webcam server in my windows PC. It is working fine and I am able to use my raspberry Pi camera in Skype, Google meet etc but one thing that I want to improve is ...
Amit Ray's user avatar
  • 142
3 votes
3 answers
2k views

Does Raspberry Pi 4 consume considerable amount of power in soft-off state?

In the Start menu (you know, the fruit button at the top-left corner), I clicked shutdown. I did not unplug the USB-C power cable. The red light was still on, but I thought it was like the sleep light ...
Damn Vegetables's user avatar
0 votes
0 answers
206 views

Remapping a key on a keyboard as dedicated shutdown button

I have a RP4 and want to remap a button from my keyboard to be a dedicated shutdown button. I don't really want to add an external shutdown/power switch to it since my power supply unit has a power ...
Siggi's user avatar
  • 1
1 vote
0 answers
365 views

GPIO Power off on shutdown with retropie

i asked this question before but i have added a diagram to explain it more clearly. I am building a retropie arcade machine with a raspberry pi. I have added a shutdown / startup button to shutdown ...
user avatar
1 vote
0 answers
501 views

How to cut power to gpio pins on shutdown

I am working on a project where i am using a pi running retropie to make a homemade arcade machine. i have wired and coded a startup/shutdown button. i would like to set up the pi n such a way i can ...
user avatar
0 votes
1 answer
261 views

Raspberry Pi 3 Model B: not booting Raspbian after shutdown

I installed the latest Raspbian on an SD card using Imager. The first boot: everything OK. Updates, installs and, rebooting: worked perfectly fine. However, after shutdown, the screen is blank. After ...
mobiuseng's user avatar
  • 109
0 votes
0 answers
79 views

How to get AIY voice project to shutdown with button

Greetings fellow raspberry pi fans! I use this code for AIY VOICE KIT google assistant. This kit uses a raspberry pi to run google assistant. So basicly you can build your own google home and control ...
UNKNOWN's user avatar
  • 79
0 votes
2 answers
4k views

How to add Capacitors to Raspberry Pi

My goal is to add capacitors to the Raspberry Pi power-supply. Currently I have my raspberry Pi plugged straight into a portable 5v battery, this works fine. However, I want to be able to swap from ...
Fecor's user avatar
  • 1
0 votes
1 answer
142 views

My python script does not shutdown when started during startup

So I have a python script that starts as expected during power-on by following: Startup by systemd My Pi has a button connect to GPIO which is used to stop the logger and then shut down the Pi like ...
IgorLopez's user avatar
1 vote
1 answer
7k views

How to schedule raspberry pi to shutdown every day at a certain time?

I’m trying to schedule my pi 3b+ (buster) to shutdown automatically at a certain time, but it’s not listening to me. What am i doing wrong? Sudo crontab -e Then i add (nano) this to bottom of the ...
Fun4stuff's user avatar
1 vote
1 answer
287 views

Automatically shutdown Pi 104 hours after booting?

I have a project where I'd like to plug in (to power) the Raspberry Pi, have it start running a Python program to write data to a USB stick, and shut itself down after 104 hours. It will NOT be ...
Ramblin Wreck's user avatar
2 votes
2 answers
263 views

Running IRSEND through custom service

I am totally new to raspberry pi and I am trying to get the IRSEND command to work in my custom service. My objective is when my pi is about to shutdown or reboot that it would execute a shell script ...
Ikigai99's user avatar
4 votes
1 answer
1k views

Gracefully handle power loss Raspbian on a Pi Zero

I recently installed a Pi Zero running Pi-hole for my folks. They live in a rural area and only have a 4G Modem with a limited data plan. The issue, is that every now and then there are power outages ...
Juan Marco's user avatar