User avatar
SyncBerry
Posts: 53
Joined: Sat Sep 21, 2019 11:13 am
Location: France (S-W)

Remote headless Pi4 unresponsive can't reboot

Fri Oct 18, 2019 4:21 pm

Hi
I left my Pi4-4GB working ~ 1 week long. When I came back from school tonight I wanted to go on working with my config but I find the Pi in a nasty status : I can connect with ssh, but no more use VNC server virtual mode which shows a grey screen (I can run it again and use port+1). I can't kill jobs, I can't sudo shutdown -r, I can't sudo su, the terminal hangs or autocompletion or commands fail. See below in very same ssh session the list of commands I typed, which I normally could no be able to, given the first one

Code: Select all

sudo shutdown -r now
[sudo] pw of mypiuser : 
[email protected]:~ $ echo $?
0
[email protected]:~ $ ps ax|grep vnc
 6441 ?        Z      0:00 [Xvnc] <defunct>
 6443 ?        Z      0:00 [Xvnc] <defunct>
 6446 ?        Ss     0:00 vncserver
 6448 ?        D      0:02 /usr/bin/Xvnc-core :1 -auth /home/mypiuser/.Xauthority -pn
 6449 ?        S      0:00 /usr/bin/Xvnc -rootHelper 1000 4
 6464 ?        S      0:00 /usr/bin/dbus-daemon --session --nofork --address=unix:path=/tmp/.vnc-1000/run/session-f1b42d4a469f4c6e/bus --nopidfile --nosyslog
 6466 ?        S      0:00 /bin/sh /etc/vnc/xstartup
 6469 ?        Z      0:00 [Xvnc] <defunct>
 6515 ?        Z      0:01 [vncserverui] <defunct>
 6523 ?        D      0:00 /usr/bin/vncserverui -statusicon 5
 7377 ?        Z      0:00 [Xvnc] <defunct>
 7379 ?        Z      0:00 [Xvnc] <defunct>
 7382 ?        Ss     0:00 vncserver
 7384 ?        D      0:00 /usr/bin/Xvnc-core :1 -auth /home/mypiuser/.Xauthority -pn
 7385 ?        S      0:00 /usr/bin/Xvnc -rootHelper 1000 4
 7404 ?        Z      0:00 [Xvnc] <defunct>
 7406 ?        Z      0:00 [Xvnc] <defunct>
 7409 ?        Ss     0:00 vncserver
 7411 ?        D      0:00 /usr/bin/Xvnc-core :2 -auth /home/mypiuser/.Xauthority -pn
 7412 ?        S      0:00 /usr/bin/Xvnc -rootHelper 1000 4
 7427 ?        S      0:00 /usr/bin/dbus-daemon --session --nofork --address=unix:path=/tmp/.vnc-1000/run/session-0bb168ec8bcc49f3/bus --nopidfile --nosyslog
 7429 ?        S      0:00 /bin/sh /etc/vnc/xstartup
 7432 ?        Z      0:00 [Xvnc] <defunct>
 7478 ?        Z      0:00 [vncserverui] <defunct>
 7486 ?        D      0:00 /usr/bin/vncserverui -statusicon 5
 7549 pts/12   S+     0:00 grep --color=auto vnc
[email protected]:~ $ echo $?
0
[email protected]:~ $
.
Please how can I reboot my Pi

User avatar
HawaiianPi
Posts: 4888
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: Remote headless Pi4 unresponsive can't reboot

Fri Oct 18, 2019 5:06 pm

If you can connect with SSH and sudo reboot doesn't work, then disconnecting power is likely your only option.

If you can connect a keyboard to it you could try the Magic SysRq key reboot. Hold down Alt+SysRq (Print Screen) and hit the following keys in order, waiting a few seconds between keys. R E I S U B (substitute O for B at the end to shutdown instead of reboot).

  • unRaw (take control of keyboard back from X11,
  • tErminate (send SIGTERM to all processes, allowing them to terminate gracefully),
  • kIll (send SIGILL to all processes, forcing them to terminate immediately),
  • Sync (flush data to disk),
  • Unmount (remount all filesystems read-only),
  • reBoot.

Although some Linux distros disable that by default now (not sure about Raspbian).
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

User avatar
rpdom
Posts: 15615
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Remote headless Pi4 unresponsive can't reboot

Fri Oct 18, 2019 6:31 pm

HawaiianPi wrote:
Fri Oct 18, 2019 5:06 pm
Although some Linux distros disable that by default now (not sure about Raspbian).
Still used on Raspbian as far as I know.

A handy way to remember the key sequence is:
Reboot
Even
If
System
Utterly
Broken

User avatar
SyncBerry
Posts: 53
Joined: Sat Sep 21, 2019 11:13 am
Location: France (S-W)

Re: Remote headless Pi4 unresponsive can't reboot

Fri Oct 18, 2019 6:51 pm

Waoo, SysRq... reminds my youth when I worked with as/400.
I'll give a try asap man. I'd like to know if this works as my conf is set to boot to console. So magic there's no way to send this keys sequences from ssh ?
Strange behaviour although, it's the first time a linux machine makes this joke to me... ok let's go, there's always a first time.
Bye bye and thanks for the tip.

Return to “Beginners”