How to turn off an RPI cleanly?

Hi,
I just installed the IQaudio RC7 Roon Bridge image on my RasPi2/DAC-Pi+ combo.
The installation/setup was easy and fast and works like a charm.
Now, how do I turn the Pi off without damaging/corrupting the SD card?
Is it enough to “Disable” the Pi on the Roon remote app and then unplug it?
Please advise and TIA,
Jose

Jose, No you need to shut it down… I do not use DietPi… Is there a WebUI? If not You can initiate the shutdown command via ssh.

Hi,
AFIK there is no WebInt or there is? That would be ideal. On the other hand, is it possible to ssh from an iPad? If not it is a deal breaker because, besides the iPad, there are no other means to do it in the room where the Pi is at.
Thanks,
Jose

I just pull the power. I’ve never had a problem.

Same here. Or leave it on more usually.
That’s the advantage of Dietpi - nothing to damage by just powering off.

Hu?

Of course things can Damage… SD Cards and MicroSD have come along way but they are not exempted from data corruption. I have all 3 Pi’s I have seen SD Cards go out. I have not seen MicroSD yet but for sure sd cards, Specially the cheap ones…

@Jose_de_los_Santos Just curious… Why do you need to power off?. Pi’s usually run on all the time. I Only power mine off when I need to work with the hardware other than that they stay on all the time.

Dietpi doesn’t write anything to the SD card - it’s all in memory, even logs.

You are wrong.

Yes it “try’s” to do minimal things to the SD Card but it still writes to it. Applications are no exempt to this.

Edit:

By the way, Let me be clear… The OS does not dictate data corruption (For most cases)… Not caring how you handle syncs and shut downs to your Pi will… Is not common but it happens…

OK. Thanks for letting me know.

To be honest I don’t care enough about that sort of stuff so won’t read the link - a 5 quid micro SD card is worth the risk. Never had any issues personally.

I understand you not caring… for each his own right? But passing wrong information to others is just wrong. The link is from DietPi’s website them self. Take care and good luck.

Because that Pi is the source for my headphone ring which I only use occasionally. The “green” part of me feels better that way.
Back to the issue at hand, can the Pi be accessed, ssh’ed and shutdown using an iPad?
Thanks

My favourite ssh client on iOS is Prompt 2 by Panic Software.

If you just want to send a shutdown command to your Raspberry Pi you should take a look at the Workflow App.
You can create a small workflow which will send the shutdown command to your Raspberry Pi and have this action pinned to your widget area.

Another solution, if you really want to shutdown your pi safely, is to get one UPS board for the pi. It will safely power down your Pi as soon as the power is removed. To do that it has a battery to keep the alive for the duration of the shutdown process. UPS Pico would be one of those boards. But this requires some additional command line configuration. If you also use an audio board with your pi, you have to check that both boards won’t use the same GPIO pins.

1 Like

Thanks crieke! That app seems to be the ticket if only I could make it work.
Took me a while to get the how to but, it does not work. :confounded:
Except for the host IP address entry I am not sure about the rest:

Port: 22 ?
User: pi ?
Password: raspberry ?
Command: sudo shutdown -h now ?

Please advice

Why is everyone banging on about Dietpi when the OP is using the IQAudio image?

Anyway ssh to your pi using user pi and password raspberry and issue

sudo shutdown -P now
to shutdown and then power down your pi

I am not 100% sure about this, but I think you don’t need sudo for the shutdown command.

If you are still unlucky, you might want to try it without sudo as well (but keep the full path!):

/sbin/shutdown -h now

Nope, did not work either.
Thanks

log in again and try

systemctl halt

Did not work.
Thanks

did you try

shutdown -P now

Note the uppercase P