New 'Camera Stack UpToDate build' (1.0.0-1.9.0-20230523124648) Raspi cam V2 not working (Klipper build)

With Klipper?

For what it's worth, I know the multicam plugin is patched and there is an rc version available that is working during my testing, but may require a bugfix version 1.9.1 that will be released soon to be completely functional.

That however shouldn't effect what I'm seeing in the logs of timeouts trying to access the direct stream on port 8080 which I assume is during the process of pressing the test button.

Well yes, eventually. But in this case i did it after testing cams, and they act the saem as with klipper installed on previous machine, so then yes i installed klipper. Both machine work just fine on this build, and on both i can get the USB cams to work no problem, but on both machines the raspi cams dont work. One i am sure is a V2 cam, pretty sure the other is as well, but it may be a V1.

Looking at the systeminfo bundle, it's not showing any cameras are connected, but you have said that there is one. So for the RPi camera, it is a case of checking the connections and the cable, because the system doesn't think it has a camera connected. You can run libcamera-hello yourself on the terminal to see it's output, but note the RPi cameras are not really hotpluggable and you should shut down the Pi to connect them then turn power back on.

This animation shows the orientation the cable should go:

Animation of how to connect the Raspberry Pi Camera Module

1 Like

I have just seen I replied at the top of this topic already once before - I had forgotten that...

When you ran vcgencmd get_camera before, you showed it said supported=1, detected=1, libcamera interfaces = 0. This I think is the result for the legacy camera system being enabled. On my Pi (admittedly with a Pi Cam V3) it shows supported=1, detected=0, libcamera interfaces=1.

For it to work on your system with the new camera stack we need a libcamera interface for the camera. Your file /boot/config.txt should have camera_auto_detect=1 present, not 0, and this should be fine on the OctoPi new camera stack build, but it is worth verifying.

Seems fine, i never changed it.

arm_64bit=0
# For more options and information see
# http://rpf.io/configtxt
# Some settings may impact device functionality. See link above for details

# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1

# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
#overscan_left=16
#overscan_right=16
#overscan_top=16
#overscan_bottom=16

# uncomment to force a console size. By default it will be display's size minus
# overscan.
#framebuffer_width=1280
#framebuffer_height=720

# uncomment if hdmi display is not detected and composite is being output
#hdmi_force_hotplug=1

# uncomment to force a specific HDMI mode (this will force VGA)
#hdmi_group=1
#hdmi_mode=1

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
#hdmi_drive=2

# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
#config_hdmi_boost=4

# uncomment for composite PAL
#sdtv_mode=2

#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800

# Uncomment some or all of these to enable the optional hardware interfaces
dtparam=i2c_arm=on
dtparam=i2s=on
dtparam=spi=on

# Uncomment this to enable infrared communication.
#dtoverlay=gpio-ir,gpio_pin=17
#dtoverlay=gpio-ir-tx,gpio_pin=18

# Additional overlays and parameters are documented /boot/overlays/README

# Enable audio (loads snd_bcm2835)
dtparam=audio=on

# Automatically load overlays for detected cameras
start_x=1

# Automatically load overlays for detected DSI displays
display_auto_detect=1

# Enable DRM VC4 V3D driver
#dtoverlay=vc4-kms-v3d
max_framebuffers=2

# Disable compensation for displays with overscan
disable_overscan=1

[cm4]
# Enable host mode on the 2711 built-in XHCI USB controller.
# This line should be removed if the legacy DWC2 controller is required
# (e.g. for USB device mode) or if USB support is not required.
otg_mode=1

[all]

[pi4]
dtoverlay=vc4-fkms-v3d
# Run as fast as firmware / board allows
arm_boost=1

As of now i have a USB camera working on both machines, but still no Raspi cams. Sysbundles attached. Keep in mind for two different machine/Pi's/Printers, but same situation on both.

octoprint-systeminfo-20230605191728.zip (337.5 KB)

octoprint-systeminfo-20230605191653.zip (289.4 KB)

Pretty sure physically everything is fine. Both machines Raspi Cams worked with older builds. Obviously cant be 100% sure of this at any given moment, but both did work, and nothing has changed, and the fact it is both of them acting the same suggests its software related.

I don't know if this is relevant, but i do have very long ribbon cables on both Raspi-Cams, 1 meter i believe they are. Being as they are not twisted pairs, i understand these are more susceptible to noise, but again they worked before.

this one seems odd, that would be starting a local desktop would it not?

and I don't see this one in your config.txt file at all.

Hmm so this is interesting - I have the same OctoPi-UpToDate build flashed (1.0.0-1.9.0-20230523124648) and yet somehow my config.txt is different.

Yours doesn't have the line I mentioned that I believe is required to enable the libcamera cameras - swap start_x=1 to camera_auto_detect=1 Edit: as just pointed out at the same time by @jneilliii :slightly_smiling_face:

A diff against my file vs. yours in the screenshot below (sorry, I hate screenshots of text, but it's not critical) - I am wondering where the differences have come from.

(Left yours, right mine)

It actually used to enable the old camera stack... Confusing name. I think it should probably also be removed from being in the bottom of my config.txt that has come straight from the image. If you enable legacy stack in raspi-config then it replaces camera_auto_detect with start_x, which might be what's happened here?

Thats probably exactly what it is. I always go into Raspi-config and enable all interfaces, even those that are already on. Never know how different builds will act, and i use 1-wire temp sensors, etc, so need some of them at least. At work right now, will try it when i get home.

So when i do a fresh flash of the build, and boot it with no changes, go through intial Octopi setup, raspicam works, left USB cam unplugged to this point, no changes at all. Also i get an exact replica of your config.txt file. So something in my setup of plugins or klipper breaks it. Going to try to NOT enable 'legacy camera' in raspi-config and see what happens. Ill report back. Love having a spare PI.

EDITS:

  1. I got your plugin installed, and the raspi cam shows on both the camera streamer tab, and the classic webcam tab of your plugin. Only a few other plugins to this point. No USB cam to this point. No Klipper anything to this point.

  2. Got the USB camera working as well now. Both work, raspicam on the camera-streamer tab, and USB camera on the classic webcam tab of the plugin. No Klipper yet, no other plugins yet.

  3. All my preferred plugins installed, and configured. updated and upgraded and so far all is well. No Klipper anything yet, that's next.

  4. Klipper and OctoKlipper plugin installed, and so far so good. Moonraker next.

  5. Moonraker done, and still all is well.

  6. KlipperScreen installed, and success. Both cameras still work.

All this was only on one machine, my CR-10S machine. But i imagine i can duplicate on my other machine. I did try to edit the config.txt file back into compliance on my Ender machine, and it didn't fix it. Going to reflash it as well.

What i deduce out of all this is that setting the legacy camera to enabled in Raspi-config breaks it. I'll post how it goes on my other machine, maybe tomorrow.

Hopefully this helps someone else in the future. Thank you all for your help, and feel free to ask questions if needed.

EDIT: Same results on my Ender setup, all works, not enabling legacy camera in raspi-config seems to be the cause, again thanks for all your help.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.