Hi my Raspberry Pi has frozen, and I am not sure what is the safest way to restart/shut down without doing any damage.
You did not indicate of you where in the terminal or GUI and what you were doing when the Raspberry Pi became frozen. Sometimes the GUI or even the terminal can freeze, but the operating system is still running, fully functional.
What you can do is to switch to a "backup" text terminal. Pressing CTRL+ALT+F1 will switch to one of the "backup" terminals offered by the kernel.
You can then log in and kill the offending process that cause the GUI or terminal to freeze. In your case you can then do
sudo halt or
sudo reboot to restart if that is all you want to do.
I opt for this when my Pi freezes an I don't want to risk filesystem corruption.
Be aware, if the CPU is being used 100% the switch may take more than a minute to take effect.
To switch back to the GUI, press CTRL+ALT+F7.
If you have access to SSH or Putty try logging in via this method. If you need to recover your local console I recommend rebooting the pi by calling
sudo reboot from the SSH/Putty console. For reference the default user in Raspbian is
pi and the default password is
raspberry. SSH is on by default.
YES! I saved my little RPI3 from a CPR.
With me - the CPU is running above %90, I have attached: HDMI, 1 keybaord and 1 USB wireless mouse. I also have SSH opened from my Mac and a 1-hour software install.
My RPI randomly paused, I think the time on the screen moved. I saved it by removing all USB and the HDMI devices. I blew air into the board and chip.
I then tried to see if I could get a light response from the board. I attempted to connect to VNC and SSH simultaneously. Each time I attempted to SSH in terminal, the green light would flicker.
I gave it a few minutes (about 5) and it began to process slow, then back to normal speeds.
BEST of luck!
What worked for me was holding down Alt+PrtSc while pressing R, E, I, S, B.
- R = Switch keyboard from raw mode
- E = Send the SIGTERM signal to all processes except init
- I = Send the SIGKILL signal to all processes except init
- S = Sync all mounted filesystems
- B = Immediately reboot the system, without unmounting or syncing filesystems
This is too long for a comment, but it was a combination of answers that worked for me. I'm guessing that the processing graphics was taking up a lot of cpu, although I could not confirm since it was frozen. In my case, three browser tabs were open with one containing a higher quality youtube video. In my experience, freezing on the Raspberry Pi 3 is usually a case of having too many browser tabs open with one or more containing youtube videos. It froze so much that the clock did not update and the cursor would not move.
Turn off the monitor and remove the HDMI cable, then reinsert the HDMI and turn the monitor on again. This got things moving, but very slowly. Switch to another virtual terminal by holding CTRL+ALT+F1. I have experienced this on other lxde environments as well where you need to hold these keys to succeed in switching the virtual terminal.
In my case, once focus was changed to another virtual terminal, it was still sluggish at first, but after logging in and running
htop, whatever process was hogging the cpu was no longer doing so. This is likely because the GUI environment did not need much processing since it was not running in the current virtual terminal. This gave it enough of a break that switching back to tty7 CTRL+ALT+F7 where the GUI desktop is running allowed the environment to continue functioning as normal.