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

Runs for a few minutes, then freezes. Errors in dmesg log. #57

Closed
tcouey opened this issue Jul 26, 2023 · 6 comments
Closed

Runs for a few minutes, then freezes. Errors in dmesg log. #57

tcouey opened this issue Jul 26, 2023 · 6 comments

Comments

@tcouey
Copy link

tcouey commented Jul 26, 2023

Trying this because Klipper's Crowsnest stopped working after a recent update. I'm running mailsailos on Raspberry Pi 4 with Raspberry Pi HQ camera connected via ribbon cable. Spyglass runs for a random amount of time (usually less than 5 minutes) and then image hangs. I check dmesg log and see this:

[ +19.760237] bcm2835-codec bcm2835-codec: Failed setting ctrl 00990a67, ret -3
[Jul26 10:36] edt_ft5x06 10-0038: Unable to fetch data, error: -121
[  +1.050539] i2c-bcm2835 fe205000.i2c: i2c transfer timed out
[  +0.000028] edt_ft5x06 10-0038: Unable to fetch data, error: -110

Restarting Spyglass works... but only for a few minutes at most, then errors out again.

NOTE: The first message in the log there happens when it starts, the other two when it freezes.

@mryel00
Copy link
Owner

mryel00 commented Jul 26, 2023

For Crowsnest there is already a "fix" for the problem with camera-streamer not starting. Have a look at this issue, if you got that problem.

Then to spyglass, as crowsnest shouldn't work anyway if spyglass already got problems. Please send the output of journalctl -r -g spyglass, uname -r and do you use a klipper-screen?

edit: Also add your spyglass.conf. That Failed setting ctrl 00990a67, ret -3 error might be something that spyglass tries to set but your cam doesn't support. I don't own that cam, so I can't test what that problem might be.

@tcouey
Copy link
Author

tcouey commented Jul 27, 2023

Sorry, I was in the middle of a 5 hour print earlier so I couldn't do anything requiring a reboot, so I just now got back to working on this.

After disabling spyglass and re-enabling Crowsnest, rebooting (because I'd recompiled earlier) I looked over the crowsnest.log file and noticed: V4L2 Control: No parameters set for [cam 1]. Skipped.

So I tried searching the web for that, which led me to this link: https://www.reddit.com/r/klippers/comments/13ygwum/cant_make_camera_work_with_crownest/

Going off that, in crowsnest.conf, I changed device to: /base/soc/i2c0mux/i2c@1/imx477@1a (in my case), and changed the mode to: camera-streamer.

That fixed it.

Thanks for the quick reply though, I appreciate your assistance.

UPDATE: Well, maybe it's not fixed. The camera feed just crashed again after about 10 minutes. So, maybe something is messed up with the camera now. I just find it strange that this all started happening after I updated things. Restarting Crowsnest through the Mainsail interface fixed the camera again, but who knows for how long.

@tcouey
Copy link
Author

tcouey commented Jul 27, 2023

These are the errors in dmesg that I get when the camera stops working (now in crowsnest, but I was seeing these same errors in spyglass):

[Jul26 16:25] edt_ft5x06 10-0038: Unable to fetch data, error: -121
[  +1.036784] i2c-bcm2835 fe205000.i2c: i2c transfer timed out
[  +0.000051] edt_ft5x06 10-0038: Unable to fetch data, error: -110

Maybe a hardware problem?

@mryel00
Copy link
Owner

mryel00 commented Jul 27, 2023

Like I wrote before

as crowsnest shouldn't work anyway if spyglass already got problems. Please send the output of journalctl -r -g spyglass, uname -r and do you use a klipper-screen?

So please send those things and attach your /boot/config.txt too.

With these other informations, it sounds like you updated from crowsnest v3 to v4, and that can make problems with some cheap/old raspicams, as it will use the new camera stack. That's the one spyglass also uses and the same reason why spyglass has to work, before crowsnest will work too. Spyglass is like a minimum version of the backend crowsnest uses (camera-streamer).

The upgrade from v3 to v4 of crowsnest is documented inside the crowsnest documentation, as well as your problem with the raspicam not detected. But I go to deep into the crowsnest support again 😂

If you need help with crowsnest in the future, join the Mainsail Discord. Me, or someone else of the mainsail-crew, will help you there with such things.

@tcouey
Copy link
Author

tcouey commented Aug 7, 2023

Sorry, I've been busy with work. An EEPROM update on the Raspberry Pi seemed to fix the issue with the crashes. It still sometimes doesn't start on bootup, but a restart on the Crowsnest service usually fixes it. Since I haven't really updated much since I built the printer back in April I'm considering just starting fresh with a clean install of MainsailOS and then seeing what issues remain. My klipper and some other repos are months behind and I'm afraid to update them because I guess I need to go line by line through the commits to look for breaking changes before I update? Is that how that works? I'm still new to this ecosystem. Like I said, I wonder if a clean install is the way to go for now. You can probably just close this. I can provide those logs, but I don't know if they be of any use. I don't even know if I did a 3 -> 4 upgrade like you mentioned, I didn't note the version before I upgraded Crowsnest.

@mryel00
Copy link
Owner

mryel00 commented Aug 8, 2023

If you didn't update for months it's most likely a v3->v4 update. But if the issue is kinda gone now and it's only a problem with crowsnest now, then I would close this issue.
About the updates and breaking changes, there is always some kind of risk, that there is something not working anymore after the update, but I don't think there was such a change except for crowsnest, and maybe klipper, if you are a bit "unlucky". This klipper change would need you to reflash your board, but a fresh installation wouldn't be different if you were "unlucky".

@mryel00 mryel00 closed this as completed Aug 8, 2023
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

2 participants