Pi4 headless shutdown

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Hi all,
I just assembled a raspberry-pi with these items:
- pi4 board (4gb ram)
- 16gb microsd card (with archlinux-arm 64bit on);
- X832 board (to attach a 3.5 HDD);
- 12V power supply (as needed by X832).


The system started as soon as I plugged in the power adapter to the wall
socket (red and blue lights blinking)
This is a headless configuration (no monitor, no keyboard, no mouse),
so I managed to ssh to the archlinux OS, configure pacman keyring and
then was dinner time :)

To shutdown the system I sent this command via ssh:
systemctl poweroff

The ssh connection was closed, but the raspberry had red lights still
on, and I could hear a fan spinning.

I waited 5 minutes without visible changes, then I pulled the plug off
the socket.

Can you please confirm I shuted down the system the proper way?

Thanks in advance, bye!
--  
Tilt


Re: Pi4 headless shutdown
Quoted text here. Click to load it

The red LED beside the USB-C power socket on both a Pi3 and a Pi4 seems to
indicate that the Pi is connected to power, not that it is booted up. I've
often thought that it would be a good idea if the LED indicated (by going
out) that the Pi had shutdown and it was safe to pull the power lead out, as
for a Windows PC - but that's not the case. I tend to rely on a lack of
flickering of the green LED to indicate that the Pi is safely turned off.
It's difficult to be certain when the only way you communicate with the Pi
is by a network connection (eg VNC or SSH); at least with a monitor
connected to the HDMI, you can look for the monitor image disappearing when
the power is off. But even though the Pi is connected to a monitor (my TV),
it's a pain to have to turn the TV on and set it to the correct HDMI input
to verify when the Pi is off. (*)

I wonder if the CPU fan is powered directly from the USB-C input, and not by
the CPU being powered on, and that's why it stays on.

By the way, I see the other light, the one that flickers, as being green
rather than blue. But everyone's colour vision is different!



(*) Given that you are operating the Pi headless and haven't said that it
won't boot, I take it you've discovered the "hdmi_force_hotplug=1 # allow Pi
to boot with no monitor connected" line in /boot/config! Another useful line
is "hdmi_mode82% # force 1920x1080x60 even though monitor can't be
auto-detected" if you intend to connect to the Pi by VNC: it makes sure that
the clietn which is viewing the Pi sees a full 1920x1080 desktop rather its
size defaulting to whatever it feels like.  


Re: Pi4 headless shutdown
On 28/10/2020 20:49, Tilt from Arch wrote:
Quoted text here. Click to load it

Can you try:

# nohup systemctl poweroff


--  
Ottavio Caruso

Re: Pi4 headless shutdown
Ottavio Caruso in data 28/10/2020 22:59 ha scritto:

Quoted text here. Click to load it

nohup: ignoring input and appending output to 'nohup.out'
Connection to x.x.x.x closed by remote host
Connection to x.x.x.x closed.
--  
Tilt


Re: Pi4 headless shutdown
On Wed, 28 Oct 2020 20:49:38 +0000, Tilt from Arch wrote:

Quoted text here. Click to load it

Being 'old school' I tend to use
  sudo shutdown -h now

There is also information available about how to use a push button wired  
to a couple of pins and some software to make a shutdown switch.

Stuff powered by the usb-c port will still have power, but it is safe to  
pull the plug.

Re: Pi4 headless shutdown
ray carter wrote:

Quoted text here. Click to load it

Absolutely. There are so many options one can use with shutdown. I
sometime use the direct reboot option with sudo shutdown -r now.

B. Alabay

Re: Pi4 headless shutdown
ray carter in data 29/10/2020 01:42 ha scritto:

Quoted text here. Click to load it

I'm considering a case with a power button, but I prefer  
to configure the raspberry first (mount hard disks, setup nfs and so
on), thanks :)

--  
Tilt


Re: Pi4 headless shutdown
On Thu, 29 Oct 2020 17:55:51 +0000, Tilt from Arch wrote:

Quoted text here. Click to load it

Just make sure it does a clean shutdown before it cuts power.

Re: Pi4 headless shutdown
Quoted text here. Click to load it

bah humbug - sudo init 0  :-0


Re: Pi4 headless shutdown
On 28/10/2020 20:49, Tilt from Arch wrote:
Quoted text here. Click to load it

I added these lines to /etc/rc.local on my PIs:

echo none > /sys/class/leds/led1/trigger
echo 0 > /sys/class/leds/led1/brightness

Now the red LED extinguishes when the Pi has finished booting, and comes  
on again when it is fully shut down.
--  
Dave


Re: Pi4 headless shutdown
On 29/10/2020 10:19, Dave wrote:
Quoted text here. Click to load it

How do know its on? Assuming you don't have a noisy fan.

---druck

Re: Pi4 headless shutdown
On 29/10/2020 15:25, druck wrote:
Quoted text here. Click to load it

Presumably working webservers, ssh and ping. That's how I know mine are  
on.

Re: Pi4 headless shutdown
On 29/10/2020 15:39, Pancho wrote:
Quoted text here. Click to load it

If you can't tell its on, it isn't doing anything useful is it?


--  
Of what good are dead warriors? ? Warriors are those who desire battle  
more than peace. Those who seek battle despite peace. Those who thump  
We've slightly trimmed the long signature. Click to see the full one.
Re: Pi4 headless shutdown
On 29/10/2020 15:39, Pancho wrote:
Quoted text here. Click to load it

That's how you know, others may say "well there was no lights on, so I  
borrowed the cable to charge my phone".

---druck

Re: Pi4 headless shutdown
Quoted text here. Click to load it
  

Site Timeline