User avatar
TheSplund
Posts: 19
Joined: Tue Dec 10, 2013 5:30 pm

Model B with camera/SSH enabled stuck booting

Thu Oct 29, 2020 1:30 pm

I (foolishly?) decided to update the OS on my Model B Pi (to match my Pi v3) but once I enable SSH and the Camera interface and reboot it just hangs.
It was working fine with Jessie* on my 32GB card but I've tried several times to install the latest, recommended, Raspbian OS (with GUI) firstly using Imager1.4 (3 or 4 times) and with NOOBS. The initial vanilla install works fine but I've had no success when I enable the camera&SSH interfaces and reboot - blackscreen with Imager install & splashscreen with NOOBS install - I can leave this for several hours with no change though using the Imager method I was able to PuTTY into the Pi even though it appeared frozen - no such luck with the NOOBs install (why should both methods even give different results?!).
As I say, both methods successfully install a stable vanilla OS with GUI; it worked fine with Jessie (I shoudl have backed that install up); all the LEDs are there (one green intermitant flicker) - I'm beginning to suspect the the OS isn't suitable for use with camera/SSH on a model B.
I'm pushing on with trying to figure out what is going on but is there something obvious that is causing my problem?
Thanks
**I tried the ugrade from Jessie to Stretch first but I had problems with it hanging

pcmanbob
Posts: 12830
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Model B with camera/SSH enabled stuck booting

Thu Oct 29, 2020 2:19 pm

TheSplund wrote:
Thu Oct 29, 2020 1:30 pm
I'm beginning to suspect the the OS isn't suitable for use with camera/SSH on a model B.
The raspberry pi OS should work on any pi, so which version are you trying to install / use ?

Desktop with recommended software
Desktop
Lite

on exactly which pi as you posted version Model B would suggest it an original pi with only 512Mb of ram and 26 gpio pins.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

User avatar
TheSplund
Posts: 19
Joined: Tue Dec 10, 2013 5:30 pm

Re: Model B with camera/SSH enabled stuck booting

Thu Oct 29, 2020 11:27 pm

pcmanbob wrote:
Thu Oct 29, 2020 2:19 pm
TheSplund wrote:
Thu Oct 29, 2020 1:30 pm
I'm beginning to suspect the the OS isn't suitable for use with camera/SSH on a model B.
The raspberry pi OS should work on any pi, so which version are you trying to install / use ?

Desktop with recommended software
Desktop
Lite

on exactly which pi as you posted version Model B would suggest it an original pi with only 512Mb of ram and 26 gpio pins.
Er 'the latest' version of Raspbian, as installed by NOOBS and Imager - some form of Buster I guess though NOOBS gave me the option of a Desktop only so I chose that. And this Pi has 26 gpio pins - and I guess a 'Raspberry Pi 1 Model B' (revision 1.2?) - https://en.wikipedia.org/wiki/Raspberry ... B_rev2.svg
Edit: I am just redoing the card now with the 'Imager' installer and I see that the default install is a 'Desktop' and that further options allow extra software (that I'm not interested in at this point)

pcmanbob
Posts: 12830
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Model B with camera/SSH enabled stuck booting

Fri Oct 30, 2020 9:05 am

Then if its an original pi B I would suggest running the current desktop on it will be slow due to its lack of ram and single processor core.

If you don't need the desktop ( you said you were trying to activate SSH ) the you might be better trying the lite version of raspberry pi OS which is command line only.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

User avatar
TheSplund
Posts: 19
Joined: Tue Dec 10, 2013 5:30 pm

Re: Model B with camera/SSH enabled stuck booting

Fri Oct 30, 2020 9:22 am

pcmanbob wrote:
Fri Oct 30, 2020 9:05 am
Then if its an original pi B I would suggest running the current desktop on it will be slow due to its lack of ram and single processor core.

If you don't need the desktop ( you said you were trying to activate SSH ) the you might be better trying the lite version of raspberry pi OS which is command line only.
But why is the Desktop is stable and running fine but then not booting once I add the camera and SSH interfaces?
I may simply drop the Desktop as suggested but it doesn't explain why the latest OS is less compatible with the old PI than Jessie was - I may repost this as a different question (ie 'old Pi and Buster problems')

pcmanbob
Posts: 12830
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Model B with camera/SSH enabled stuck booting

Fri Oct 30, 2020 9:29 am

Then I suggest you try enabling SSH first then reboot, if your pi boots ok then try enabling the camera.

what memory split have you got set ?

https://www.raspberrypi.org/documentati ... /memory.md
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

User avatar
DougieLawson
Posts: 42142
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK

Re: Model B with camera/SSH enabled stuck booting

Fri Oct 30, 2020 10:19 am

pcmanbob wrote:
Fri Oct 30, 2020 9:29 am
Then I suggest you try enabling SSH first then reboot, if your pi boots ok then try enabling the camera.

what memory split have you got set ?

https://www.raspberrypi.org/documentati ... /memory.md
My old 512MB 1B with a the camera has 128MB for GPU memory. I run it headless with motion driving the camera.
Languages using left-hand whitespace for syntax are ridiculous

DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.

The use of crystal balls and mind reading is prohibited.

User avatar
TheSplund
Posts: 19
Joined: Tue Dec 10, 2013 5:30 pm

Re: Model B with camera/SSH enabled stuck booting

Fri Oct 30, 2020 11:12 am

pcmanbob wrote:
Fri Oct 30, 2020 9:29 am
Then I suggest you try enabling SSH first then reboot, if your pi boots ok then try enabling the camera.

what memory split have you got set ?

https://www.raspberrypi.org/documentati ... /memory.md
Not fiddled with memory split - what would Imager or NOOBS set it to as a default? Difficult to determine it now given that NOOBS has rendered it unbootable ;-) (even holding 'Shift' as instructed by the GUI won't get it to boot). That said, I have now installed motioneyos (this Pi is destined for a lowlight/night camera project) but I will dig around for another SD card and give it another go...
(update)... Installed 'release 3.4 August 2020 (with Desktop) onto another card using the Pi Imager.
vgcencmd says 192M/64M arm/gpu split so I've got a 256M version - /boot/config.txt shows no entry relating to mem allocation
I skipped the 'check for updates' part and just enabled SSH - rebooted fine (and quickly too).
Enabled Camera and rebooted...
...yawn - it's stuck again partway through the bootup checks before the GUI - experience tells me that if I wait it will gradually work it's way through some more but clearly it's really not going to be any better.
Now going to reformat the card and do the same with a Desktop install but try rebooting to the CLI instead and if that fails then may teh Lite (no Desktop) version or give up and play with motioneyos on this Pi and a full environment on my Pi 3. Whatever, I'm not impressed with the alleged compatibility of this release of the OS given that a camera is a fairly common add-on.
Last edited by TheSplund on Fri Oct 30, 2020 12:17 pm, edited 2 times in total.

pcmanbob
Posts: 12830
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Model B with camera/SSH enabled stuck booting

Fri Oct 30, 2020 11:22 am

It would not be imager or noobs that would set the GPU memory, but what has been set as the default in the OS,

my guess would be 64MB that's what it used to be, try using Dougie's suggestion of 128MB
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

User avatar
TheSplund
Posts: 19
Joined: Tue Dec 10, 2013 5:30 pm

Re: Model B with camera/SSH enabled stuck booting

Fri Oct 30, 2020 1:42 pm

pcmanbob wrote:
Fri Oct 30, 2020 11:22 am
It would not be imager or noobs that would set the GPU memory, but what has been set as the default in the OS,

my guess would be 64MB that's what it used to be, try using Dougie's suggestion of 128MB
Thanks - not sure how it'll act if the CPU only has 128M but here goes another try with 128M to the GPU...
...a lot of time passes...
... well after a very long reboot I got to an almost unresponive Desktop with a cursor and nothing else (though after 10 mins I did see an empty taskbar appear) I SSH'ed into the Pi to change to a CLI boot instead though the reboot took another fair chunk of time (and the command line was slow to respont too). A subsequent reboot from the CLI was still far slower than before I enabled the camera - bascially not good.

Dropped the gpu memory to 64M, disabled the camera and re-enabled the Desktop and rebooted - pretty quick. So I can only assume that the camera is not happy with Buster and an early Pi (even though they're both meant to be compatible with all Pi variants).
Going to try this now with Stretch and Jessie and then consider reporting it formally as an issue, though I have no idea as to how to do this - any thoughts?

pcmanbob
Posts: 12830
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Model B with camera/SSH enabled stuck booting

Fri Oct 30, 2020 1:48 pm

I doubt anything can or will be done about it after all the pi hardware specifications have moved on in leaps and bounds what from the original pi had and the OS has grown accordingly to take advantage of this and all the other hardware that is available.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

User avatar
TheSplund
Posts: 19
Joined: Tue Dec 10, 2013 5:30 pm

Re: Model B with camera/SSH enabled stuck booting

Fri Oct 30, 2020 2:10 pm

pcmanbob wrote:
Fri Oct 30, 2020 1:48 pm
I doubt anything can or will be done about it after all the pi hardware specifications have moved on in leaps and bounds what from the original pi had and the OS has grown accordingly to take advantage of this and all the other hardware that is available.
Growing an OS and andvertising full backwards compatibility is the domain of Sony/MS etc! :D
Anyway, I've just gone back to a full Desktop version of Stretch and it works perfectly - clearly Buster has issues with older PIs - any suggestions as to how I report this?

pcmanbob
Posts: 12830
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Model B with camera/SSH enabled stuck booting

Fri Oct 30, 2020 2:14 pm

As I said I doubt anything can or will be done about,

as for reporting it sorry I have no idea.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

User avatar
TheSplund
Posts: 19
Joined: Tue Dec 10, 2013 5:30 pm

Re: Model B with camera/SSH enabled stuck booting

Fri Oct 30, 2020 11:01 pm

Ah no worries - thanks for your input though :-)

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 12823
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Model B with camera/SSH enabled stuck booting

Sun Nov 01, 2020 6:57 pm

Enabling the camera via raspi-config increases gpu_mem from the default non-camera setting of 64MB to 128MB, so on a 256MB Pi B the ARM will be very tight on memory and may start trying to swap (which is incredibly slow on SD cards).

You've got a trade off - the GPU needs some more memory to run the camera, but still want to run the GUI. Very few people try running the GUI on a Pi 0 or 1 as it is generally pretty slow, but for headless operation they are more than adequate.
Your camera use case may be possible to run with lower gpu_mem. Try it at gpu_mem=80 or 96 and see what you get.
For the generic case it is safer to use 128MB, and indeed with the HQ camera there are some use cases that need more than that.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

User avatar
TheSplund
Posts: 19
Joined: Tue Dec 10, 2013 5:30 pm

Re: Model B with camera/SSH enabled stuck booting

Mon Nov 02, 2020 2:47 pm

6by9 wrote:
Sun Nov 01, 2020 6:57 pm
Enabling the camera via raspi-config increases gpu_mem from the default non-camera setting of 64MB to 128MB, so on a 256MB Pi B the ARM will be very tight on memory and may start trying to swap (which is incredibly slow on SD cards).

You've got a trade off - the GPU needs some more memory to run the camera, but still want to run the GUI. Very few people try running the GUI on a Pi 0 or 1 as it is generally pretty slow, but for headless operation they are more than adequate.
Your camera use case may be possible to run with lower gpu_mem. Try it at gpu_mem=80 or 96 and see what you get.
For the generic case it is safer to use 128MB, and indeed with the HQ camera there are some use cases that need more than that.
It seems sound in principle but, from my very recent experience, not using Buster release is the far better/easier option which is my point - Stretch and Jessie were fine so IMO there's something wrong with this so-called compatibility of the latest OS release across ALL models of Pi.
I also see that the V2 standard and NOIR cameras will work 'with all models of Raspberry Pi 1, 2, 3 and 4' https://www.raspberrypi.org/products/pi ... rType=home - no caveat saying that if you have a 256MB Pi 1 Model B then you have to lose the GUI in that statement. I doubt that Simon Long et al have actually tried this

spl23
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 459
Joined: Fri Dec 26, 2014 11:02 am

Re: Model B with camera/SSH enabled stuck booting

Mon Nov 02, 2020 3:44 pm

TheSplund wrote:
Mon Nov 02, 2020 2:47 pm
I doubt that Simon Long et al have actually tried this
Did someone use my name...? ;)

You're trying to run a version of the desktop which is at least 4 generations newer than that which was available when the Pi you are using was launched. Frankly, I'm somewhat surprised the Buster desktop even starts with only 256MB of RAM on the board. Yes, we do advertise Buster as compatible with the Pi 1 - and indeed it is; it runs ok (for some value of ok, i.e. it's very slow...) on the 512MB Pi 1, but trying to run the latest GUI on an 8 year old Pi with a memory footprint that we retired relatively quickly is a bit optimistic. Backwards-compatibility has its limits, and I think you need to face up to having hit them! We've done our best not to orphan old platforms, and indeed the Pi 1 256MB will run perfectly well with Raspberry Pi OS Buster Lite, but the GUI experience on any of the low-memory single core platforms isn't great.

There is probably some memory split setting which will make the camera and desktop both work - really slowly - on a 256MB Pi 1, but really, if you want to use the latest GUI, then get a more up-to-date Pi, or do as you are doing and run an older release of the OS, which is why we still keep the older versions available.

User avatar
TheSplund
Posts: 19
Joined: Tue Dec 10, 2013 5:30 pm

Re: Model B with camera/SSH enabled stuck booting

Mon Nov 02, 2020 11:32 pm

I'll grudgingly accept your reply as the best I'm going to to get! :) but thankyou nonetheless. I suspect that no split will work but I will try the few options there are before I go back to Jessie/Stretch, drop the GUI or use another custom OS. I'll obviously be using Buster on my Pi3B (and maybe even snap up a P400 for fun at some point) but my Pi1 has a degree of use/expendability that I cannot factor out (and if it ain't broke, don't fix/replace it).
Thanks again for the reply

User avatar
TheSplund
Posts: 19
Joined: Tue Dec 10, 2013 5:30 pm

Re: Model B with camera/SSH enabled stuck booting

Tue Nov 03, 2020 4:45 pm

spl23 wrote:
Mon Nov 02, 2020 3:44 pm
TheSplund wrote:
Mon Nov 02, 2020 2:47 pm
I doubt that Simon Long et al have actually tried this
Did someone use my name...? ;)

You're trying to run a version of the desktop which is at least 4 generations newer than that which was available when the Pi you are using was launched. Frankly, I'm somewhat surprised the Buster desktop even starts with only 256MB of RAM on the board. Yes, we do advertise Buster as compatible with the Pi 1 - and indeed it is; it runs ok (for some value of ok, i.e. it's very slow...) on the 512MB Pi 1, but trying to run the latest GUI on an 8 year old Pi with a memory footprint that we retired relatively quickly is a bit optimistic. Backwards-compatibility has its limits, and I think you need to face up to having hit them! We've done our best not to orphan old platforms, and indeed the Pi 1 256MB will run perfectly well with Raspberry Pi OS Buster Lite, but the GUI experience on any of the low-memory single core platforms isn't great.

There is probably some memory split setting which will make the camera and desktop both work - really slowly - on a 256MB Pi 1, but really, if you want to use the latest GUI, then get a more up-to-date Pi, or do as you are doing and run an older release of the OS, which is why we still keep the older versions available.
Hi again - I was going to walk away from this but I've just discovered the following:
1) build new Buster OS on SSD with NOOBS
2) boot it
3) Enable Camera in the Interfaces pane and nothing else (but note that 64M is shown as the GPU memory allocation in Performance)
4) reboot - in my case wait forever, but I escaped and rebooted and checked the /boot/config.txt file and voila! NOOBS* had set the memory to 128M even though the Preferences pane had shown 64M before enablign the Camera (if you check this before rebooting then I woudl have seen it had auto-changed the memory allocation).
5) set it to something less and make coffee

*I say NOOBS has, because it's been added below the NOOBS Auto-generated Settings where this really isn't the case as OOTB NOOBS doesn't set anything on first boot (if I'm not mistaken)
Last edited by TheSplund on Tue Nov 03, 2020 5:25 pm, edited 1 time in total.

User avatar
DougieLawson
Posts: 42142
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK

Re: Model B with camera/SSH enabled stuck booting

Tue Nov 03, 2020 5:20 pm

TheSplund wrote:
Tue Nov 03, 2020 4:45 pm

Hi again - I was going to walk away from this but I've just discovered the following:
1) build new Buster OS on SSD with NOOBS
Your failure starts at step #1. Stop using NOOBS, it's way past its use-by date and causes more problems than it solves. If you need multi-boot use PINN, if you just want plain old RaspiOS just write to your boot media with the RPi imager tool.
Languages using left-hand whitespace for syntax are ridiculous

DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.

The use of crystal balls and mind reading is prohibited.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 12823
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Model B with camera/SSH enabled stuck booting

Tue Nov 03, 2020 5:27 pm

TheSplund wrote:
Tue Nov 03, 2020 4:45 pm
Hi again - I was going to walk away from this but I've just discovered the following:
1) build new Buster OS on SSD with NOOBS
2) boot it
3) Enable Camera in the Interfaces pane and nothing else (but note that 64M is shown as the GPU memory allocation in Performance)
4) reboot - in my case wait forever, but I escaped and rebooted and checked the /boot/config.txt file and voila! NOOBS had set the memory to 128M even though the Preferences pane had shown 64M.
5) set it to something less and make coffee
Enabling the camera in raspi-config has set gpu_mem to 128M, not NOOBS. Exactly as I had written in viewtopic.php?p=1752218#p1752218

Source code is https://github.com/RPi-Distro/raspi-con ... nfig#L1638

Code: Select all

    CUR_GPU_MEM=$(get_config_var gpu_mem $CONFIG)
    if [ -z "$CUR_GPU_MEM" ] || [ "$CUR_GPU_MEM" -lt 128 ]; then
      set_config_var gpu_mem 128 $CONFIG
    fi
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

User avatar
TheSplund
Posts: 19
Joined: Tue Dec 10, 2013 5:30 pm

Re: Model B with camera/SSH enabled stuck booting

Mon Nov 09, 2020 2:07 pm

6by9 wrote:
Tue Nov 03, 2020 5:27 pm
...
Enabling the camera in raspi-config has set gpu_mem to 128M, not NOOBS. Exactly as I had written in viewtopic.php?p=1752218#p1752218

Totally get it now - though I will mention it was slighlty misleading that the 128M entry was underneath the NOOBS entry int he config.txt file even though the setting had been created by the GUI after first boot.

Source code is https://github.com/RPi-Distro/raspi-con ... nfig#L1638

Code: Select all

    CUR_GPU_MEM=$(get_config_var gpu_mem $CONFIG)
    if [ -z "$CUR_GPU_MEM" ] || [ "$CUR_GPU_MEM" -lt 128 ]; then
      set_config_var gpu_mem 128 $CONFIG
    fi
Thanks to all that have pointed out the error of my ways

Return to “Troubleshooting”