Zuifer
Posts: 8
Joined: Mon Apr 16, 2018 11:02 pm

Fixed my zero w system lockups when using the camera

Fri May 04, 2018 7:54 pm

Hello,

I like to share some experience i made regarding the stability issues i had with my zero w and various programs which use the camera.

In the beginning of using my zero w and the camera for streaming via raspivid and vlc i experience various system freezes. After a while after streaming the system stops. Streaming stops and i can't log into the system.

When i use ffmpeg to capture the stream while streaming, the system crashed even faster.

Most of the time kernel oops occured and the logs never gave me information which let me identify the problem.

Same with Rpi Cam Control. When i start record or use motion detection, the system will freeze after while.

I used Raspian lite. So i tested it with fresh install without and with update && upgrade. No change.
Distro.upgrade. Nope. Latest kernel and firmware. Nope.

I changed the Memory split. Nothing. I changed the power source. Got some with enough power and one with volt/ampere display. Nothing. And at this time i only tried to get a stable rtsp streaming, because i gave more or less up and saw the raspberry zero w only as streaming device.

I tried all the above programs with a pi 2b and they were always stable. So i thought it had to be a zero w problem. But the ram or the processing power could not be the problem. All the parameters were ok and i tested the system with 100% cpu usage and it never crashed like this.

So far my story. And now the good ending.
I thought mmmh stability ...stability, volt Volt!. More Power!!!
So i changed the config.txt and added:
over_voltage=4
force_turbo=1

and now it runs stable. Everything Rpi cam control, streaming while recording. Runs for 4 Days.
So i don't know why. My changes are increasing the volts and to increase to 1000mhz which should involve an increasing of the voltage too.
So i stay with a happy mmmh.

Is this a common problem and fix with the zero w or is it just my board?

Greetings

dashrb
Posts: 5
Joined: Tue May 08, 2018 1:59 am

Re: Fixed my zero w system lockups when using the camera

Thu May 10, 2018 1:12 am

I too am searching for a problem to the new instability I'm experiencing with the Zero W's. I like what I read here, but see https://www.raspberrypi.org/documentati ... locking.md

There is a small table showing that for the pi zero, the default setting for over_voltage is 6. So did you effectively lower the voltage?
However, with my Zero W's, I ran:
% sudo vcgencmd get_config over_voltage
over_voltage=0

So I don't know what to believe.

Therefore, I'll try adding your 2 settings and see how it goes on mine. :-)

dashrb
Posts: 5
Joined: Tue May 08, 2018 1:59 am

Re: Fixed my zero w system lockups when using the camera

Sun May 20, 2018 1:18 am

Upon further reflection, I decided to only change one thing at a time. So I only applied the line "over_voltage=6" (based on the link in my previous post). I did NOT apply the force_turbo setting.

My zero's have been stable for almost 2 weeks so far!

dashrb
Posts: 5
Joined: Tue May 08, 2018 1:59 am

Re: Fixed my zero w system lockups when using the camera

Sun Jun 24, 2018 7:47 pm

No, not really. They still crash occasionally. :cry:
I heard RUMINT that the additional voltage flags are ignored unless overclocking is also enabled.

AdrianM
Posts: 21
Joined: Sun Mar 27, 2016 12:50 pm

Re: Fixed my zero w system lockups when using the camera

Wed Aug 29, 2018 10:33 am

I know four months have passed since the last post in this thread but I think the information in this topic is valuable and have some observations to add of my own.

I've also been struggling to get reliable operation of a Pi Zero + camera setup as a security camera using RPi Cam Web Interface. The system would only run for part of a day with various crashes/watchdog resets. It was a kernel oops that finally led me to this topic.

I had eliminated PSU problems as a potential cause as the Pi is powered from a 12V->5V 3A switch-mode regulator located right next to the PCB. I added a 220uF low-Z capacitor in parallel with the 5V O/P just for good measure. My scope confirms a 5.05V supply at the DC input with well under 50mV of noise.

While the OP in this topic refers to a Pi Zero W, mine is without on-board WiFi but I also re-located the WiFi USB dongle to the outside of the metal security camera case as I previously had it behind the front window near the camera and wondered if EMI might be an issue.

Despite this the frequent lock-ups persisted. But having seen this topic, I followed the suggestion to increase core voltage and force turbo on and the system has now behaved perfectly for several days so far. Even if my luck breaks, the changes clearly have a significant bearing on the problem

The over_voltage parameter for the Zero seems to cause a bit of confusion as it is documented that it defaults to 6. This default aready results in a standard supply of 1.2V + 0.025V * 6 = 1.35V and the maximum the voltage regulator subsytem can provide is 1.4V therefore:

Code: Select all

over_voltage=2
- applies the maximum. Higher values just silently clip to 1.4V
However, I'm not convinced that upping the core voltage is what is making the difference to the camera issues.

As I understand the relevant history here, the CPU fab was enhanced to permit significant over-clocking of the Pi Zero and the default core voltage is increased to be already in place for this. I'm thinking that the instability could instead be due to the dynamic changes in clock speed when turbo mode is not forced on.

To test this I've restored the default core voltage and just left:

Code: Select all

force_turbo=1
Could it be that things go wrong with the camera interface when a dynamic clock speed changes takes place? Some more time with this setting in force might tell.

itsmedoofer
Posts: 265
Joined: Wed Sep 25, 2013 8:43 am

Re: Fixed my zero w system lockups when using the camera

Wed Aug 29, 2018 12:01 pm

Hi,

I have a ZeroW mounted on a ZeroView camera mount suck on my living room window, its powered from a prehistoric 1A Siemens phone charger on 2M of flex and I clock up weeks of up-time, the only lockups I have encountered are where the camera flex has moved a bit.

My install is based in the "lite" package and for this application I don't overclock at all, I have 5 days up at the moment after a reboot to finish of an update... I run the excellent RPi Cam Web Interface.

Code: Select all

[email protected]:~ $ uptime
 12:50:20 up 5 days, 15:52,  1 user,  load average: 0.54, 0.37, 0.31
I had another Zero running as a VPN server, I had this over-clocked with the following, with this setup it was very sensitive to the type of SD card, with older class 4 cards it would either lock up or corrupt the card within a day, class 10 seemed to work OK...

Code: Select all

arm_freq=1100
gpu_freq=500
core_freq=500
sdram_freq=500
sdram_schmoo=0x02000020
over_voltage=6 
sdram_over_voltage=2


May not help you but thought I would chip in....

AdrianM
Posts: 21
Joined: Sun Mar 27, 2016 12:50 pm

Re: Fixed my zero w system lockups when using the camera

Wed Aug 29, 2018 2:54 pm

Hi itsmedoofer, that's interesting - what kind of SD card do you have in the Camera Pi? Mine has a 32Gb SanDisk Extreme pro class 10

I can now see that my pet theory about the dynamic clocking alone being a remedy wasn't correct. It crashed out with a kernel oops after just four hours at the default core voltage. Back to 1.4V and turbo forced on to see how long it goes for now. :roll:

itsmedoofer
Posts: 265
Joined: Wed Sep 25, 2013 8:43 am

Re: Fixed my zero w system lockups when using the camera

Wed Aug 29, 2018 7:16 pm

Hi,

Not sure to be honest, it came from 7DayShop but what brand I couldnt say, I took a pic if that helps, all I can really say is it class 10.

If there is nothing sensitive I would be happy to try your image here...
Attachments
20180829_190644 (Medium).jpg
20180829_190644 (Medium).jpg (89.48 KiB) Viewed 379 times

AdrianM
Posts: 21
Joined: Sun Mar 27, 2016 12:50 pm

Re: Fixed my zero w system lockups when using the camera

Thu Aug 30, 2018 8:59 am

Thanks for the offer to try out my image but I have another zero+camera that I'm about to test against a clone and a fresh install.
Anyway, since restoring the core to 1.4V along with turbo forced on, it's back to working perfectly again.
One permutation I've yet to try is leaving the core at 1.4V but turning off force turbo.

Return to “Camera board”