Kitz Forum

Computers & Hardware => Other Technologies & Hardware => Topic started by: tiffy on July 23, 2020, 07:59:01 PM

Title: RPi 4B Anomaly
Post by: tiffy on July 23, 2020, 07:59:01 PM
Have been messing about with my 2Gb RAM RPi 4B in preparation for use on future projects.
Experiencing an issue which I have not had to date with any previous RPi models or program software.

Running the latest Raspberry Pi OS (based on Dabian Buster I belive), full desktop program version, running on either a 16Gb. SD card or a 120Gb. SSD with suitable USB-3/SATA adaptor.
Also using a Pimoroni "Fan Shim" cooling fan with associated SW loaded to control the fan operation at pre-set temperatures.
Static LAN and Wi-Fi IP addresses are configured.
Samba is installed and configured to make the RPi visable on my Win 10 desktop PC via explorer.
VNC and SSH options are also activated for "headless" operation.

With the exceptions of adopting the Raspberry PI OS operating system and the cooling fan temperature control software, nothing I have not done before on previous RPi models without any issues.
Did previously change the "boot loader" FW to a beta revision which was a requirement at the time to enable native USB booting & running from a USB-3 attached SSD (via SATA adaptor), have since changed this to a "stable" current version boot loader which now supports this function.

The issue I'am experiencing:
The RPi appears to "lock up" after quite a long time of idle operation, usually occurs after 24 to 36 hrs of running.
Occurs when running on SD card or SSD.
Won't boot up again after power down or re-boot.
Only solution to restore is re-loading of SD or SSD images which I had kept after initial configurations.

In order to try and find the issue, have re-loaded an SD card, fully program updated and only installed static IP configuration & Samba, under longer term testing at present.

Can't find any record of any such issue on the RPi forums, wondering if anyone has had any recent similar experience ?
Title: Re: RPi 4B Anomaly
Post by: Alex Atkin UK on July 24, 2020, 08:01:46 AM
Linux locking up then failing to boot (although you should see it start to boot but fail to finish) is often due to the root partition having filled up, which can easily happen with logs or memory dumps from things crashing. (core dumps)  Does the Pi write the logs to the permanent storage?

If it isn't full, you you still might find something in /var/log/messages just as it crashes if it does save that file to permanent storage.

I'm not sure how to get at the filesystem from Windows, but you should be able to if you boot a Linux live USB stick.

Title: Re: RPi 4B Anomaly
Post by: tiffy on July 24, 2020, 12:20:41 PM
@Alex Atkin UK:
Many thanks for your input, all noted.

As you very likely know, the RPi 4B did not initially support native USB booting when first released, there were a number of work arounds available to achieve this but most required retention of an SD memory card for the initial boot sequence.
Native USB booting/running option, without the requirement for SD memory card, became available around June by way of a bootloader update which was initially a "beta" release which appears to have been changed to "stable" at a later date.

I was initially running the beta bootloader then changed to the stable version when available, both certainly permit native USB booting/running with SD card.
However, have started to notice the anomalies as recorded in my original post which I think may be associated with the bootloader revisions.

Have now migrated back to the stable, April bootloader version which won't support USB native booting/running but should prove one way or the other if the recorded anomalies remain or disappear.
This recent post is relevant and contains a link to the original information source also.
https://forum.kitz.co.uk/index.php/topic,24893.msg418601.html#msg418601
   
Title: Re: RPi 4B Anomaly
Post by: tiffy on July 25, 2020, 10:53:54 AM
Having reverted back to the stable April bootloader, which does not support native USB booting/running, my RPi 4B has been rock steady now for close to 48 hours all be it running in idle mode, can only conclude that the later bootloader revisions were the cause of the issues reported earlier in this post.

Will work through the later bootloader revisions which support native USB booting/running as time permits running on SD card only to try and establish if/when the issue returns.

There are other options available of course for running on a USB SSD/HD/Pen Drive but these require retaining a SD card as part of the initial boot sequence, the native USB booting is just a lot more tidy.
The RPi 4B bootloader is now configurable but have currently not tried any settings other than default.
Title: Re: RPi 4B Anomaly
Post by: Alex Atkin UK on July 25, 2020, 01:50:10 PM
That's really strange as you wouldn't think the bootloader has any impact once actually booted.
Title: Re: RPi 4B Anomaly
Post by: tiffy on July 25, 2020, 07:26:24 PM
That's really strange as you wouldn't think the bootloader has any impact once actually booted.

Yes, agreed, strange indeed.
However, the RPi 4B bootloader is different from earlier RPi's, see this reference:
https://www.raspberrypi.org/documentation/hardware/raspberrypi/booteeprom.md
When running the "Is the bootloader working correctly?" test while running the later bootloader I did not get the correct green LED blinking pattern even though I could still boot with an SD card when re-inserted at that stage, may have suffered some corruption during one of the bootloader change operations.

Also found it strange that with the original issue as reported re-flashing the SD card or SSD (had imaged both after configuration), restored normal operation until next lock-up occured ! 

Will start to carefully work through the later bootloader revisions to see if there is actually an issue or did I just suffer some corruption while re-loading revisions.
Title: Re: RPi 4B Anomaly
Post by: tiffy on July 28, 2020, 10:24:47 AM
Now back on the latest stable July bootloader version which is booting & running with no issues on both SD card and USB SSD, did run the stable June revision for a few days which also booted & ran without any issues.

So, looks like I may have suffered some program corruption in my earlier attempts to upgrade the bootloader or indeed it may have been "operator error" on my part.

With the RPi 4B now being capable of native USB booting/running without a SD card it makes it a more attractive proposition for many available applications with their USB-3 ports and Gb. LAN capability.
Title: Re: RPi 4B Anomaly
Post by: Alex Atkin UK on July 28, 2020, 04:23:27 PM
The switch to a proper PCIe bus is certainly more appealing.  Now they just need to add M.2 support. ;)

Is the RPi 4 using USB-C PD now?  It seems like that's the direction they will have to move in if they aren't as the power consumption is spiralling out of control.
Title: Re: RPi 4B Anomaly
Post by: tiffy on July 28, 2020, 05:04:38 PM
The power connector has changed to USB-C and the associated PSU power rating has been upgraded.

There can be temperature issues with the GPU & CPU chips especially in some of the enclosed cases, I'am currently using the Pimoroni Fan Shim miniature fan in an open case with associated temperature control software, works very well, very easily fitted, very quiet in operation and is very reasonably priced, only possible issue being that it may prohibit or make more difficult the fitting of some further GPIO pins attached hardware should this be a requirement.
Title: Re: RPi 4B Anomaly
Post by: Weaver on July 28, 2020, 08:56:23 PM
I would like that little fan but i’m not running Raspbian (on my Pi 3) 32-bit, rather Debian Buster AAarch64 thanks to a kitizen friend of mine here who set it up for me, see earlier thread if I can find it.

Perhaps it could be recompiled for AArch64 though, but being a device driver might it be rather distro-dependant ?
Title: Re: RPi 4B Anomaly
Post by: tiffy on July 29, 2020, 11:32:11 AM
I'am currently running on Raspberry Pi OS (32-bit) which is a derivitive of Dabian Buster I believe, using the "with desktop" program version as I prefer the friendly GUI which works very well headless to my Win 10 desktop PC via VNC.

The Pimoroni control software installs in "fanshim-python" directory and the associated files are *.py and *.sh.
I'am certainly not a Linux expert so can't say what the implications would be on your 64-bit operating system.
Why not download the Pimoroni utility and have a look, it's free.
The fan kit is £9.90 + modest Royal Mail P&P so won't break the bank if you wish to give it a try.

Just noted that Amazon supply the unit as well so that's free P&P to prime subscribers.
Title: Re: RPi 4B Anomaly
Post by: Alex Atkin UK on July 30, 2020, 01:47:12 AM
So that fan is temperature controlled?  Seems overkill as a Pi shouldn't get hot enough to need more than a heatsink and constant airflow, even then probably only if overclocking.

I have a Terasic DE-10 I use for Amiga emulation and on that I just slapped on a 12V fan I had lying around and ran it off the 5V pins.
Title: Re: RPi 4B Anomaly
Post by: tiffy on July 30, 2020, 10:50:52 AM
I have run all currently available RPi models, never over-clocked and have only ever used passive heat sinks, however, the RPi 4B GPU & CPU chips do run at a higher temperature even in idle mode, see testing reports.
https://www.youtube.com/watch?v=AVfvhEJ9XD0
https://www.youtube.com/watch?v=e6mWImsF9iI
https://www.youtube.com/watch?v=VJC6OpGpq0Y

I did test RPi 4B operation with a large heat sink covering the GPU & CPU chips, this did slow the rate of temperature rise under testing but also decreased the rate of temperature fall when idle again due to the large heat sink area heat retention.
Found that active cooling without any heat sinks was much more effective, I chose to use the Pimoroni Fan Shim with it's simple & free temperature control software, many alternatives are available.

Use or non use of active cooling is up to the user with due consideration to the application being run, perceived over-clocking requirement, mounting enclosure etc...
Title: Re: RPi 4B Anomaly
Post by: vic0239 on August 01, 2020, 12:12:28 PM
@tiffy. Inspired by your success, I decided to proceed with these changes to my own 4B. My situation was a little different as I had already moved the operating system partition (rootfs) to a USB device, so my challenge was to reunite the two.
I started by applying the latest updates:
Code: [Select]
sudo apt update
sudo apt full-upgrade
and then changed the FIRMWARE_RELEASE_STATUS value from "critical" to "stable in  /etc/default/rpi-eeprom-update, and stalled the new bootloader.
Code: [Select]
sudo rpi-eeprom-update -d -a

vcgencmd bootloader_version
Jul 16 2020 16:15:46
version 45291ce619884192a6622bef8948fb5151c2b456 (release)
timestamp 1594912546
At this point I just had to copy the boot partition from the SD card to the USB drive which I struggled with for a while, but eventually did it from my Windows system using AOMEI Partition Assistant. Fortunately there was space at the start of the USB disk for this partition. Lastly, I needed to check and amend the PARTUUID value in /boot/cmdline.txt and /etc/fstab.
Code: [Select]
blkid
/dev/sda1: LABEL_FATBOOT="BOOT" LABEL="BOOT" UUID="0916-C21D" TYPE="vfat" PARTUUID="417fcd9e-01"
/dev/sda2: LABEL="rootfs" UUID="6ead9b69-967c-4c44-ac59-11075ed8e9a7" TYPE="ext4" PARTUUID="417fcd9e-02"
Powered off and removed the SDcard and rebooted  :fingers: - successfully from the USB drive.  :yay:

Many thanks.  :thumbs:
Title: Re: RPi 4B Anomaly
Post by: tiffy on August 01, 2020, 01:10:18 PM
@vic0239:

Congratulations, well done.

Don't really know why I had the initial issues reported earlier, crashing on SD card or USB/SSD running, can only assume that it was some form of corruption which occured while messing about with the bootloader revisions.
It's good to know that the bootloader is recoverable with the RPi 4B should the worst scenario occur, see here:
https://www.raspberrypi.org/documentation/hardware/raspberrypi/booteeprom.md
Have verified the recovery process using an old 8Gb SD card, works fine.

Now on the latest "stable" bootloader revision and booting/running perfectly on either a 16Gb SD card or a USB/SSD with suitable USB-3/SATA adaptor.

Just need to decide on an application now !
Title: Re: RPi 4B Anomaly
Post by: vic0239 on August 01, 2020, 02:14:41 PM
Just need to decide on an application now !
Indeed. I have 4 of the little beasties, but only one is in full-time use (I now run DSLstats in a VM on my NAS).

Last year I treated myself to a Samsung soundbar, but could not integrate it properly into my Logitech Harmony system. The inputs of the Samsung can not be selected discretely and the Harmony tried to cycle through them to find the correct one, but mostly unsuccessfully.  I read on the internet that you could send a URL to the Samsung with a discrete code for HDMI1/2 etc., so I set up one of them to facilitate that. I installed a USB IR receiver and used Xbindkeys to capture certain keystrokes which in turn runs a command to send the appropriate URL to the soundbar and thus the correct input is set. I coded these keystrokes into the Harmony - works a treat! :cool:
Title: Re: RPi 4B Anomaly
Post by: tiffy on August 01, 2020, 03:25:18 PM
Quote
Indeed. I have 4 of the little beasties

They can indeed become addictive.
When a new model is launched I just can't resist.
Used to use my oldest RPi 1B on DSLStats but using Webserver data uploading max'ed out the CPU so now utilise the 3B for this, the old 1B has retired.

I still use 2 RPi ZW's remotely on my son's and daughter's VDSL-2 lines but without Webserver data uploading, work perfectly and I can keep an eye on their lines using VNC.
These may soon become redundant too as both their areas have recently become FTTP enabled.

Very interesting on your Logitech Harmony, soundbar adaption, there's always a project out there somewhere, just a matter of finding it.
Title: Re: RPi 4B Anomaly
Post by: Alex Atkin UK on August 01, 2020, 05:41:44 PM
I have a 3B and a Zero, but never really found that use for them.  One of the things I was considering was putting humidity/temperature sensors around the house, which I also considered with Arduino based units but that's so much more awkward due to having to compile the code.

Partly why I didn't end up needing the Pi so much as having OpenWRT running on various re-purposed routers, so I already have Linux on self-contained units I can use for stuff that doesn't need GPIO pins.  Also sticking a touch screen on my server/NAS so it does double-duty as a system monitoring display / stupidly powerful tablet.

Still I'm getting that itch with the Pi 4 8GB, just to see how it performs with a full Linux OS as it seems like it wouldn't be nearly as sluggish as the Pi 3 especially booting off a USB SSD.