RPi3 randomly rebooting

  • I'm not looking for a solution (but if there is one I'd like it) but rather some pointers so I can investigate a bit.

    2 x RPi3B running LE9.2.8

    1 running TVHeadend server, cabled ethernet, Hauppague dual USB tuner, recording to the 128GB MicroSSD LE boots from

    1 cabled ethernet, 6TB powered USB HDD, wifi keyboard dongle, hdmi connection to TV

    At random intervals, by which I mean could happen two days in succession then nothing for a week, a month or a few months, then several on one day.

    Both Pis are left running when the TV is switched off and a reboot NEVER happens when the TV is on and a film is being played from the 6TB HDD. It also doesn't seem to happen when something is being recorded. Generally it happens overnight whilst we are sleeping but has happened during the day.

    Living in the Scottish Highlands my prime suspect is power - enough of a fluctuation to turn the Pis off and on but not impact on a PC being used at the time, or even since I use powerline ethernet, a signal hitting the ethernet cable.

    Does anyone have any other suggestions, preferably with some way to test them before I go and spend money on a UPS?

  • Is there anything showing up in any logs. Any low voltage condition will restart your PC too. It’s only power backup is a CMOS battery. Are your PI’s connected via a power strip. If there’s any doubt about a continuous and clean power supply UPS is your only way forward. Plenty of cheap options both pre made and DIY.

  • Most of my PCs are laptops and even their somewhat depleted batteries would handle a short power fluctuation. The one desktop PC is my wife's. On the rare occasion when the Pi has rebooted itself her PC, if turned on, hasn't been affected which is why power is my main suspect but I'm looking for alternatives.

  • A lot of Multimeters (like the Fluke 87) have a MIN/MAX Record position for just this problem. If you don't have a Multimeter, maybe you could borrow one to test your line voltage variations. Leave the multimeter plugged in for 24 or more hours and then press the min/max button to see the recorded low and high voltage readings. It's really simple.

    Note: The more expensive Multimeters like the Fluke have a much faster sampling rate (250 uS), so if the house voltage variation is 250 microseconds or more, it will be recorded. If the voltage spike or drop is smaller than 250 microseconds, the only instrument capable of measuring the voltage variation would be a scope.

    Search YouTube for "multimeter min max function" for videos on this subject

    Edited 3 times, last by blueribb (May 3, 2023 at 2:51 PM).

  • Most of my PCs are laptops and even their somewhat depleted batteries would handle a short power fluctuation. The one desktop PC is my wife's. On the rare occasion when the Pi has rebooted itself her PC, if turned on, hasn't been affected which is why power is my main suspect but I'm looking for alternatives.

    Well you can rule out your laptops for obvious reasons. Didn’t know that little detail when answering earlier.

    Waste of time second guessing this one. Logs as Da Flex suggested will take away the guesswork.

    In the absence of any further detail UPS will be the way forward with this one.

  • blueribb

    Interesting, but unfortunately my meter is a bit more primitive, actually make that a lot more.

    Da Flex

    If I manage to remember the next time it does it I will

    petediscrete

    When we moved to the Highlands I bought 3 small UPS systems, over the years their batteries wore out and were replaced then, when I retired, I decided losing the odd email I was typing wasn't a major problem and as they died they weren't replaced. Now looking I don't see any under £200 I'd trust. I have thought of the Pi UPS hat solution which would also mean new cases.

  • Make your own cases. Sheet of plexiglass and some basic home craft tools and you get a bespoke case nobody else has. I’ve made loads of them for friends and family and they love them.

    Remember the RPI is a tinkering board ideal for DIY’ers. Perfect for those retired up in the highlands of Scotland. In fact you’re ideally located for wind power generation. Some very interesting equipment out there to achieve this too https://m-eur.vevor.com/reviews/010267513082.html

  • you’re ideally located for wind power generation

    Which I'm sure would work well when its the right sort of windy. We have several wind farms near us and they seem to spend a large percentage of their time doing nothing. Tesco when they build their store in Wick had wind turbines on the roof - they're all gone now.

    Its the 50th anniversary of "The Wicker Man" and it would be fitting to introduce wind farm supporters to it <G>

  • Da Flex

    Crash log http://ix.io/4vrI

    Kodi log http://ix.io/4vrJ

    Kodi.old log http://ix.io/4vrK

    The reboot happened just after I deleted a recording c10am 8/5/2023 (uk format). The deletion went OK and I was just navigating back to videos when the system froze for a while and then rebooted.

    Configuration is 2 RPi3Bs both running LE9.2.8 one headless running TVHeadend server and the other as the main video / tv recording watcher.

    I tried running paste from the TVHeadend server Pi but was told there was nothing to send, copied them to my PC via FileZilla and the kodi.old.log and the last line consisted of loads of NULLNULL

  • Once you put the system under load ie any disk activity, deletion etc low voltage will cause an immediate system reboot. Unlikely you will even see a log for this.

    The only true way to confirm this is by attaching an external power monitoring device to your power supply with an audible warning alarm in the event this condition occurs. Hardly worth the time and the expense.

    I’m sure you’ve done all your googling on this subject but again here’s a typical scenario on the subject https://www.techdim.com/raspberry-pi-3-keeps-rebooting/

    Ultimately it’s a UPS and ensure any peripherals attached to the boards are fit for purpose including the power supply.

  • I agree with most of what you say. However, in my view the ultimate solution is dump the Pi and buy a NUC or something similar. I'm currently negotiating with SWMBO

  • As I mentioned before the RPI and many other SBCs are tinkering projects by nature. With tinkering comes all the relevant caveats. Decide if you want to tinker or want something bullet proof and make your purchasing decision on that basis.

    Personally I use many different hardware platforms for LE/Kodi. My favourite SBC for LE is the Rock64. Bought a job lot of 6 of them back pre Covid days for €100. Reason was community development was down to a trickle. In stepped Covid and LE on the RK3328 and I can now sell one of those units for €100.

    Two pieces of plexi glass, four galvanised coach bolts and you have a home brew case and you have a fully fledged HTPC PVR UHD media centre. Cheap as chips too.

    For full fat Kodi it’s an HP EliteDesk 800 G3 SFF 256gb SSD 16gb memory with onboard Intel HD 630 graphics. €90 refurbished and came with Windows 10 which I removed immediately and replaced with Ubuntu.

    Basically there’s a lot of bargains out there that can do what you want at very reasonable prices. You need to decide what direction you are going in first.

  • petediscrete

    HP EliteDesk 800 G3 SFF is the sort of thing I'm considering. Did you buy from eBay or is there a better source?

    Are you running TVHeadend as well as Kodi?

    Final question - what version of Kodi are you running on Ubuntu?

  • Just bought it locally from a surplus reseller. The used market is awash with them. From the spec it’s important you select the Kaby Lake generation as minimum (Intel HD630 iGPU) to avail of HDR. While Skylake will do HDR in Windows it’s done via hybrid drivers but won’t work in Linux.

    I’ve both TVH server and Next PVR installed that feed full Kodi Nexus. TVH is compiled locally to allow for transcoding. All operating on top of Ubuntu 22.04 lts.

  • Locally - hmmm - Scottish Highlands - we don't do locally.

    Joking aside thanks for the tips


    If I may a couple of extra questions

    1. does it turn the TV on and select the appropriate HDMI AV like the RPi?

    2. does the TV remote work with it?

    Edited once, last by LybsterKodi: Merged a post created by LybsterKodi into this post. (May 9, 2023 at 2:03 PM).

  • Crash log http://ix.io/4vrI

    The reboot happened just after I deleted a recording c10am 8/5/2023 (uk format). The deletion went OK and I was just navigating back to videos when the system froze for a while and then rebooted.

    That log shows a Kodi segmentation fault right before rebooting. So we found the error, but hard to say what happened inside Kodi.

    I'll give our RPi devs a hint. Maybe they know what to do next. I think it's in the Kodi code, not in ours.

  • Locally - hmmm - Scottish Highlands - we don't do locally.

    Joking aside thanks for the tips

    That’s what I was referring to as locally v some nondescript location somewhere in the world. Other than a few sheep I strongly doubt you’ll procure something like this in the Highlands area although you will see similar on offer in the UK general area. Maybe I’m wrong there and apologies if I am.

    https://touch.adverts.ie/desktops/hp-elitedesk-800-g3-intel-i5-7500-sff-desktop-pc-for-sale/29656251?notification=d7a42b0b862fee1b09c4394e747facc8-1683227733&utm_campaign=AdWatchCommented&utm_medium=link&utm_source=email

    I stopped buying on eBay a long time ago and Amazon UK is not worth it when you add all the extras as an EU buyer purchasing from a non EU country.

    Keep an eye out on local online publications media that may target your area