Black Lives Matter - Action and Equality. ... Adafruit is part of the Stop Hate for Profit campaign. Adafruit is open and shipping.
0

Revisited: PyPortal stuck in soft reboot loop
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Revisited: PyPortal stuck in soft reboot loop

by viennamike on Thu Oct 31, 2019 11:19 pm

I just started working with my PyPortal today and I'm having the same problem as posted in the now locked "PyPortal stuck in soft reboot loop thread." It does a soft reboot constantly. I tried the power only test, and indeed, it doesn't reboot then, making it seem like something else is trying to write to the USB port on my PC.
Running Windows 10, built in (Windows Defender) running.
I run Acronis backup, but it shouldn't be backing up or trying to backup to that usb port. Acronis "Active Protection" is turned off.

I temporarily turned off Windows Real-Time protection, with no change, still continual soft reboot.

Same thing happens on both my desktop and laptop (of course, they are running pretty much the same setup).

What can I do? Thanks!

viennamike
 
Posts: 13
Joined: Tue Feb 12, 2013 6:49 pm

Re: Revisited: PyPortal stuck in soft reboot loop

by dastels on Fri Nov 01, 2019 11:37 am

You're on the right track I think. it sounds like something in routinely touching something on the flash file system. If you get into the REPL, you can turn off the auto-reload feature:

Code: Select all | TOGGLE FULL SIZE
>>> import supervisor
>>> supervisor.disable_autoreload()


Dave

dastels
 
Posts: 2802
Joined: Tue Oct 20, 2015 3:22 pm

Re: Revisited: PyPortal stuck in soft reboot loop

by viennamike on Fri Nov 01, 2019 12:33 pm

dastels wrote:You're on the right track I think. it sounds like something in routinely touching something on the flash file system. If you get into the REPL, you can turn off the auto-reload feature:

Code: Select all | TOGGLE FULL SIZE
>>> import supervisor
>>> supervisor.disable_autoreload()


Dave

Many thanks! This is working fine as a work-around. I'd love to know what's causing the issue and have a better fix for it, if anyone has any ideas on how I can track it down.

viennamike
 
Posts: 13
Joined: Tue Feb 12, 2013 6:49 pm

Re: Revisited: PyPortal stuck in soft reboot loop

by dastels on Fri Nov 01, 2019 12:54 pm

The downside is that you have to CTRL-C and CTRL_D to restart manually.

dastels
 
Posts: 2802
Joined: Tue Oct 20, 2015 3:22 pm

Re: Revisited: PyPortal stuck in soft reboot loop

by pkourany on Thu Nov 28, 2019 2:33 pm

Is there any way to PERMANENTLY disable the auto reboot feature which I find incredibly annoying?

pkourany
 
Posts: 51
Joined: Wed Nov 27, 2013 12:57 pm

Re: Revisited: PyPortal stuck in soft reboot loop

by dastels on Thu Nov 28, 2019 3:12 pm

You could put that disable_autoreload code in boot,py which gets run whenever the runtime starts up.

Dave

dastels
 
Posts: 2802
Joined: Tue Oct 20, 2015 3:22 pm

Re: Revisited: PyPortal stuck in soft reboot loop

by viennamike on Mon Dec 16, 2019 11:47 pm

I'm not seeing boot.py in my CircuitPython directory. How do I find it?

viennamike
 
Posts: 13
Joined: Tue Feb 12, 2013 6:49 pm

Re: Revisited: PyPortal stuck in soft reboot loop

by danhalbert on Mon Dec 16, 2019 11:50 pm

boot.py is optional, so it doesn't exist until you create it. It's just another file.

It is likely that Acronis Backup is touching CIRCUITPY in some way that is writing data to the drive, even if it is only metadata (access time, etc.) in that filesystem. Here's one of several reports of it causing issues: viewtopic.php?f=60&t=135400

danhalbert
 
Posts: 2035
Joined: Tue Aug 08, 2017 12:37 pm

Re: Revisited: PyPortal stuck in soft reboot loop

by viennamike on Tue Dec 17, 2019 12:19 am

Thanks! I'm new to CircuitPython and the supported devices.
I started a ticket with Acronis just to see if there is some way to get it to stop touching particular USB drives. I'm not hopeful, but I'll post what I find out.

viennamike
 
Posts: 13
Joined: Tue Feb 12, 2013 6:49 pm

Re: Revisited: PyPortal stuck in soft reboot loop

by spersels on Tue May 26, 2020 8:48 pm

pkourany wrote:Is there any way to PERMANENTLY disable the auto reboot feature which I find incredibly annoying?


I had the same problem and ended up forking and cloning CircuitPython and building my own version commenting out autreload_enable() in main.c

// autoreload_enable();

One of these days I'll look for a more elegant way to turn it on and off.

But perhaps before that happens some bright young hacker will figure out why this happens and a) fix it and b) add the ability to turn it on and of more easily and also define a startup configuration parameter that will allow it be OFF by default if that's what I want - and I want.

BTW I also use Acronis and it does seem like one of the Acronis services might be touching the USB drive - one of these days I'll need to look more deeply into the logic that determines a changes thats occured to the drive is sufficient to cause a restart. Perhaps this could also be configurable :)

The other thing that's annoying - not sure if anyone else sees this (could be related) but any time I have the USB drive mounted about 18% of my CPU gets used by windows system services. As soon as I unmount the USB drive, I get my CPU back. These things are all possibly related.


Shawn
Always being Positive and Constructive :)

spersels
 
Posts: 3
Joined: Tue May 26, 2020 12:56 am

Re: Revisited: PyPortal stuck in soft reboot loop

by danhalbert on Tue May 26, 2020 10:54 pm

To repeat what dastels said, you can put this in boot.py to disable autoreload:
Code: Select all | TOGGLE FULL SIZE
import supervisor
supervisor.disable_autoreload()


See the documentation here:
https://circuitpython.readthedocs.io/en ... autoreload

danhalbert
 
Posts: 2035
Joined: Tue Aug 08, 2017 12:37 pm

Please be positive and constructive with your questions and comments.