How can I reboot a crashed Linux target system?
The best way to reboot a Linux target system is from its desktop environment or with the reboot command. If you can't do that because the Linux target system has crashed, you may still be able to safely reboot it using a magic SysRq key combination. TinyPilot can send the REISUB key combination for you using a script.
Note: It isn't possible to send magic SysRq key combinations from TinyPilot using the physical or on-screen keyboards.
Adding the "send-reisub" script
To add the "send-reisub" script, connect to your device over SSH and run the following snippet:
sudo mkdir -p /usr/bin/tinypilot-user-scripts && \ sudo touch /usr/bin/tinypilot-user-scripts/send-reisub && \ sudo chmod 755 /usr/bin/tinypilot-user-scripts && \ sudo chmod 744 /usr/bin/tinypilot-user-scripts/send-reisub && \ sudo tee /usr/bin/tinypilot-user-scripts/send-reisub > /dev/null << 'EOF' #!/bin/bash echo -ne "\x04\x00\x46\x15\x00\x00\x00\x00" > /dev/hidg0 echo -ne "\x04\x00\x46\x08\x00\x00\x00\x00" > /dev/hidg0 echo -ne "\x04\x00\x46\x0C\x00\x00\x00\x00" > /dev/hidg0 echo -ne "\x04\x00\x46\x16\x00\x00\x00\x00" > /dev/hidg0 echo -ne "\x04\x00\x46\x18\x00\x00\x00\x00" > /dev/hidg0 echo -ne "\x04\x00\x46\x05\x00\x00\x00\x00" > /dev/hidg0 echo -ne "\x00\x00\x00\x00\x00\x00\x00\x00" > /dev/hidg0 EOF
Using the "send-reisub" script
Once you've installed the "send-reisub" script, you can run it by opening the "Scripts" menu and clicking "send-reisub". The script will immediately send the relevant commands to the target computer, which should reboot after a short delay.
Removing the "send-reisub" script
If you no longer need to REISUB key combination with "send-reisub", you can remove the script by connecting to your device over SSH and running the following command:
sudo rm /usr/bin/tinypilot-user-scripts/send-reisub