Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

High CPU load on fresh build with SD card installed #7707

Closed
wx4cb opened this issue Dec 31, 2021 · 15 comments
Closed

High CPU load on fresh build with SD card installed #7707

wx4cb opened this issue Dec 31, 2021 · 15 comments

Comments

@wx4cb
Copy link

wx4cb commented Dec 31, 2021

Brand new F765 WSE with a 16 gig UHC3 sd card in the sd card slot, i get 75% cpu usage and cannot get into anything whhen the card is inserted. card removed evrything is fine.

tested with multiple sized and speeds of card, including working BB SD cards from other airframes with the same controller.

thoughts?

@DzikuVx
Copy link
Member

DzikuVx commented Dec 31, 2021

image

More details would be needed. Everything seems to work just fine over here

@DzikuVx
Copy link
Member

DzikuVx commented Dec 31, 2021

image

@wx4cb
Copy link
Author

wx4cb commented Dec 31, 2021

i know, that's whatI dont understand... I can't even get to the CLI when it does it as the configurator just takes absolutely ages. i'm going to try again later today

@DzikuVx
Copy link
Member

DzikuVx commented Dec 31, 2021

@wx4cb it's super important that SD card is correctly placed in the slot. If there is any dirt inside it will cause problems

@clemmmdawg
Copy link

I had a similar issue with my F765 Wing FC this morning. CPU usage was spiking to 1900% and trying to use the SpeedyBee configurator kept giving timeout errors. Here is a video I got of the CLI while I was waiting to be able to type in the "tasks" command to see what was causing the CPU spike.

This was with a fresh 16GB PNY card and the issue was resolved simply by removing the card. The card now has a 0 byte FREESPAC.E file. Could iNav be having an issue with writing to the new card?

@wx4cb
Copy link
Author

wx4cb commented Jan 1, 2022

it could just be that the cpu is tied up writing the freepsace file. I reformatted the card in guiformatter to make sure that it had a valid fat32 filesystem on it, put it back in the FC and just left it run... after about 5 minutes it stopped complaining and usage went back to normal.

This could be just a side effect. but doesn't explain why it was doing ti with a card that was already used for BB from another 765 wing.

@clemmmdawg
Copy link

clemmmdawg commented Jan 1, 2022

put it back in the FC and just left it run... after about 5 minutes it stopped complaining and usage went back to normal

Just did the same thing with the same results. Plugged in via USB and left alone for 5 or so minutes. Came back and everything is working perfectly. I can also confirm the FREESPAC.E file on the card is now 4GB.

@sensei-hacker
Copy link
Collaborator

Should we add a message or something when it's doing this, so the user knows what's going on?
Something like "Creating FREESPAC.E, please wait 5 minutes"?

@wx4cb
Copy link
Author

wx4cb commented Jan 1, 2022

Should we add a message or something when it's doing this, so the user knows what's going on? Something like "Creating FREESPAC.E, please wait 5 minutes"?

that would be an idea, or even just (and i dunno the right term so i'll "linuxify" it) "nice" the process so that it doesn't hog the cpu

@sensei-hacker
Copy link
Collaborator

It would be handy if we could "nice" the process, which tells the scheduler adjust the priority. Unfortunately, there is no process. And there is no scheduler. It looks like similar COULD be done by spawning a protothread and calling PT_YIELD() at the appropriate place.

@0crap
Copy link
Contributor

0crap commented Jan 2, 2022

It would be handy if we could "nice" the process, which tells the scheduler adjust the priority. Unfortunately, there is no process. And there is no scheduler. It looks like similar COULD be done by spawning a protothread and calling PT_YIELD() at the appropriate place.

That would make the mess even worse....

@0crap
Copy link
Contributor

0crap commented Jan 2, 2022

Tested on a Matek F405-STD and I don't see this issue.

# version
# INAV/MATEKF405 4.0.0 Dec 15 2021 / 14:53:05 (c20a9852)
# GCC-10.2.1 20201103 (release)

@Phil-MC
Copy link

Phil-MC commented Dec 8, 2022

I have a user on Discord who is having this problem with INAV 5.1 on a SPEEDYBEE F405 V3. He says the quad flies great on default without the SD card inserted but is unusable as soon as it is inserted. I will see if he has high CPU usage. Perhaps the above solution will work for him...

@Pedrolomel
Copy link

Related issue:

#8733 (comment)

@Phil-MC
Copy link

Phil-MC commented Oct 28, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants