Hot answers tagged

7 votes
Accepted

Raspberry Pi 3 Freezes

I/O failure is a common cause of this; processes suffering from such are stuck in an uninterruptible sleep. If this is widespread and includes critical processes, the entire system will stutter and ...
user avatar
  • 55.8k
6 votes

What's different about a crontab reboot?

As I understand your question: You have a cron job to reboot your RPi every night at 01:00; e.g. 0 1 * * * sudo reboot (#or something similar; e.g. shutdown -r now) You have a 2nd cron job to ...
user avatar
  • 17.8k
6 votes

Reboot unresponsive pi

If it has hung because you dropped something conductive on it (something that conducts electricity) which has bridged some tracks on the board, then one reason for not pulling the plug, the risk of ...
user avatar
6 votes

Powering Raspberry Pi via battery pack and buck converter - how to solve low voltage reboot issues

You've not explained or shown how you have your batteries arranged, nor provided any specs on them. But it seems likely they are in series - thereby providing ~ 9V output. Batteries in series can ...
user avatar
  • 17.8k
5 votes
Accepted

Raspberry Pi random reboots (Raspi 3B+)

A charger isn't a PSU. Also the cable quality can make a big difference. In this case with a RPI3+ I would say the power supply is the most plausible cause of the reboots. Also check after some time ...
user avatar
  • 1,396
3 votes

How do I trigger a task to run when the system starts to reboot?

I assume you are using an operating system like Raspbian since version Jessie. Then you can use a simple systemd Unit file to run a script at shutdown. Just create a new service with: rpi ~$ sudo ...
user avatar
  • 39.6k
3 votes

Raspbian: run command or script only once in next reboot

You are using the old style SysV init system, but that is deprecated since years and not really installed. For compatibility it is only emulated by the new systemd init system. If you really want to ...
user avatar
  • 39.6k
2 votes

How can I do a force restart?

Try CtrlAltF1-6. At least one of this should take you to a plain text login. From there you should be able to get the PID of the Kodi process -- presuming it's called kodi, which I don't know: ps -...
user avatar
  • 55.8k
2 votes
Accepted

Black Screen after changing .config/lxsession/LXDE-pi/autostart

If you had SSH, you could go back and rewrite it back to the original. If you can access your files, back them up on a USB, and reinstall your version of Raspbian. I would like it for you to provide ...
user avatar
  • 168
2 votes
Accepted

Rpi 3 reboots on opening chrome

it just reboots sometimes even 3 or 4 times. That certainly isn't because of Chrome. If it rebooted once when you opened Chrome, it might be, but it could not cause it to repeat the process unless ...
user avatar
  • 55.8k
2 votes

Raspberry Pi does not reboot with powered external HDD attached

I ended up solving this by soldering in diodes in the usb cable. I wanted to run a dual HDD USB RAID NAS but the boot failure (back powering issue) got me flummuxed for a bit. Didn't want to use try ...
user avatar
  • 21
2 votes

Python script run from crontab does not recognize USB drive mounted later

crontab (or anything else run at boot) does not know where python3 is - use full paths
user avatar
  • 53.5k
2 votes
Accepted

RaspberryPi keeps rebooting after i changed rc.local file

You can repair most such problems on the Pi by rebooting to a root shell. Append init=/bin/sh at the end of cmdline.txt and reboot. (This needs to be performed by mounting the SD Card on another ...
user avatar
  • 53.5k
2 votes
Accepted

Run a script before blank screen on shutdown/reboot

Your service file looks good, except for the Before=multi-user.target line. That should be After=multi-user.target, because services get stopped in the inverted order they got started. There's no ...
user avatar
  • 1,079
2 votes

How to automatically run a script on boot / startup?

A simple solution. Append your commands to rc.local execute this command in the console sudo nano /etc/rc.local and add your command to the file. further reading here Note: Usage of /etc/rc.local ...
user avatar
  • 101
2 votes
Accepted

Raspberry PI @reboot open xterm windows

The answer is in the error message. DISPLAY is not set. Cron is not a part of your desktop environment, so it does not know where to display the xterm. If you open an xterm normally, and ask echo $...
user avatar
  • 2,031
2 votes

Raspberry pi 3 keeps rebooting

It reboots because there is not enough power. Find a better power supply.
user avatar
  • 66.5k
2 votes

Raspberry Pi random reboots (Raspi 3B+)

Maybe your power supply is failing. The power supply in your link appears to have an inline power switch on the 5V side. These are a bad idea and can cause voltage drop. I suggest you buy the official ...
user avatar
  • 6,161
2 votes
Accepted

Powering Raspberry Pi via battery pack and buck converter - how to solve low voltage reboot issues

From experience I bet the problem is a not-powerful-enough converter (I remember a question asked earlier, where an even smaller converter was put to test and failed miserably, killing the Pi in the ...
user avatar
2 votes

Raspbian: run command or script only once in next reboot

End your script with a line which deletes it. For a bash script which is run from the directory where it resides, the self-delete command is simply rm $0 Most autorun systems will ignore a non-...
user avatar
2 votes

Modbus to USB stops working after a few days

Try setting force_turbo=1 in config.txt. This will disable dynamic frequency scaling of the CPU. I have had four devices (all my three Zero W devices and one Raspi 4) which used to freeze, the Zeros ...
user avatar
  • 133
2 votes

Troubleshooting cron job to restart broken internet connection

Not sure exactly what's causing the issue, but a couple of things to try: the cron environment uses sh instead of bash AFAIR. Add SHELL=/bin/bash to crontab just before invoking your script. I think ...
user avatar
  • 17.8k
2 votes

pi4 Only 4B fails to reboot

A failed reboot is either due to a failure to shutdown, or a failure to start again. A watchdog should help with the failure to shutdown: simply touch /dev/watchdog to start a countdown if you don't ...
user avatar
1 vote
Accepted

Mounting USB-HDD with NTFS filesystem on Raspbian boot

To automount your USB drives to a directory of your choosing: In accordance w/ man fstab: The second field (fs_file). This field describes the mount point (target) for the ...
user avatar
  • 17.8k
1 vote
Accepted

How to clear the screen and auto-mount device on startup?

To mount the hard drive on boot up you can just add an entry into /etc/fstab, something like: LABEL=hard-drive /media/hard-drive ext4 defaults 0 0 Instead of ext4 you may have to use the ...
user avatar
  • 39.6k
1 vote

How to automatically run a script on boot / startup?

A quick observation: Are you sure using /dev/sda works? It is much more likely to be /dev/sda1, which I'll use here. If you are positive the stick was formatted without partitions, then it would be /...
user avatar
  • 55.8k
1 vote

Raspbian OS reboot issues with A83T processor system

The problem, as indicated by the comments, could be that Raspian is specific for Raspberry Pis. Although you might get it running on a different system, it is likely that you run into problems, ...
user avatar
  • 2,031
1 vote
Accepted

ssh, shutdown problem, pi 3B+

If you specify now to shutdown or call for reboot, then the command take immediate effect. Among other things it stops the ssh services and you can / will get cold-dropped like that. If you want to ...
user avatar
  • 1,357
1 vote

RaspberryPi keeps rebooting after i changed rc.local file

this script is monitoring files in a folder. If 2 minutes have passed and there are no new files being generated then reboot the system To debug this you would need to print flagTime and currentTime ...
user avatar
  • 55.8k
1 vote

Need help with running terminal commands on startup

You should use the command sudo crontab -e and make cron start a bash file that contains your fm_transmitter -f 104.0 -r song.wav. So make a bash file like /home/pi/fm_transmitter -f 104.0 -r song....
user avatar
  • 488

Only top scored, non community-wiki answers of a minimum length are eligible