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

Debian 12 Bookworm / Raspberry Pi 5 support #823

Closed
guysoft opened this issue Oct 27, 2023 · 48 comments
Closed

Debian 12 Bookworm / Raspberry Pi 5 support #823

guysoft opened this issue Oct 27, 2023 · 48 comments

Comments

@guysoft
Copy link
Owner

guysoft commented Oct 27, 2023

Hey,
I haven't had the time to test the nighties with bookworm - has anyone happen to test it?

Also I have no Raspberry Pi 5 to test since they did not arrive to my county. If anyone could update on that it would help too.

@idaband
Copy link

idaband commented Nov 23, 2023

will test the nightly this weekend. I'll let you know if you haven't already figured it out

@NewsGuyTor
Copy link

will test the nightly this weekend. I'll let you know if you haven't already figured it out

Any updates? Anyone?

@idaband
Copy link

idaband commented Dec 8, 2023

Didn't work.

Been having heck of time with bookworm and pi 5.

Still don't have working arducam with camera-streamer too ( different issue) but would still want to use that on the pi 5.

@InsaneNemesis
Copy link

I am running 2023-12-05_2023-10-10-octopi-bookworm-arm64-lite-1.1.0.zip on my Pi 5. Seems to be fairly stable. Only issue i am having is i cant get the camera resolution to change. It seems to be stuck on 640x480.

@idaband
Copy link

idaband commented Dec 10, 2023

Are you using the new streaming service too?

@kristofferR
Copy link

I am running 2023-12-05_2023-10-10-octopi-bookworm-arm64-lite-1.1.0.zip on my Pi 5. Seems to be fairly stable. Only issue i am having is i cant get the camera resolution to change. It seems to be stuck on 640x480.

Same issue here. Using the default streaming service.

@adam5zki
Copy link

I am trying to get a OV5647 wide angle camera to work on a Pi5 with the Octopi Nightly 20.12. Does not even list the camera. 64bit bookworm lite did show the camera, but I could not figure out how to stream it - neither ustreamer nor camera-streamer seemed to work (at least not in a way I could figure out). Since I used octo-deploy there, it felt like the whole thing was funny, so I switched over to the nightly. USB camera works like a charm, except I would prefer the OV5647 with the wider FOV. Not sure what I am doing differently :/

@kristofferR
Copy link

kristofferR commented Dec 27, 2023

I am running 2023-12-05_2023-10-10-octopi-bookworm-arm64-lite-1.1.0.zip on my Pi 5. Seems to be fairly stable. Only issue i am having is i cant get the camera resolution to change. It seems to be stuck on 640x480.

Fixed it. Octopi.txt isn't active at all, it's not linked properly.

Login to the pi on ssh, then

sudo ln -s /boot/firmware/octopi.txt /boot/octopi.txt ; sudo reboot

@InsaneNemesis
Copy link

I am running 2023-12-05_2023-10-10-octopi-bookworm-arm64-lite-1.1.0.zip on my Pi 5. Seems to be fairly stable. Only issue i am having is i cant get the camera resolution to change. It seems to be stuck on 640x480.

Fixed it. Octopi.txt isn't active at all, it's not linked properly.

Login to the pi on ssh, then

sudo ln -s /boot/firmware/octopi.txt /boot/octopi.txt ; sudo reboot

This does fix the camera resolution issue for me. Im able to run 1280x720 at 20fps. Testing other resolutions now.

@guysoft
Copy link
Owner Author

guysoft commented Jan 15, 2024

Ok got to add that, there is a similar issue in FullPageOS with /boot moving to /boot/firmware:
guysoft/FullPageOS#497 (comment)

@apbarratt
Copy link

Joining the thread. I had to commandeer my Pi4 for another project so bought a Pi5 8GB for OctoPi (figured dual cameras could be nice).
I'm about to download the 64bit nightly for 2024-01-15 21:52, will keep you posted how I get on.
I'm still awaiting long camera cables for the smaller fitting, so I won't have news on that front immediately I'm afraid.

@apbarratt
Copy link

It seems to be working well for me so far and restored from my backup perfectly.
I'll try and test cameras tomorrow.

One thing I am noticing is that the install desktop script does not appear to have been updated in seven years.
https://github.com/guysoft/OctoPi/blob/devel/src/modules/octopi/filesystem/home/pi/scripts/install-desktop

I'm quite certain I read when Pi OS bookworm was announced that there's been some fairly heavy work done in the desktop environment. I do wonder if this install-desktop will need to be revisited to bring it up to spec with whatever PiOS is providing out of the box these day.

@apbarratt
Copy link

New ribbon cables for cameras arrives last night so testing today.

@guysoft Is there anything in particular you're needing tested?
I see above the editing of the octopi.txt file for camera settings will be one thing to check. Anything else?

On inspection of that install-desktop script, it looks like it's fairly universal for getting whatever Pi has released so you can likely ignore me on the notion that it might need updating :)

@apbarratt
Copy link

hmmm, I'm having no luck getting the camera to show up.

pi@octopi:~ $ libcamera-hello --list-cameras
No cameras available!

I have one of these night vision 160° cameras with the OV thingy at the start of its sensor name. I see @adam5zki is reporting a similar experience :/

Will quickly try the second port, but not looking good so far...

61aBgvFM6hL AC_SL1001

@apbarratt
Copy link

Confirmed no different on the second camera port. Not that I really expected it to make a difference :/

@apbarratt
Copy link

apbarratt commented Jan 19, 2024

Okay, I used sudo nano /boot/config.txt and changed
camera_auto_detect=0 to camera_auto_detect=1
and rebooted. Still no stream however:

pi@octopi:~ $ libcamera-hello --list-cameras
Available cameras
-----------------
0 : ov5647 [2592x1944 10-bit GBRG] (/base/axi/pcie@120000/rp1/i2c@80000/ov5647@36)
    Modes: 'SGBRG10_CSI2P' : 640x480 [58.92 fps - (16, 0)/2560x1920 crop]
                             1296x972 [43.25 fps - (0, 0)/2592x1944 crop]
                             1920x1080 [30.62 fps - (348, 434)/1928x1080 crop]
                             2592x1944 [15.63 fps - (0, 0)/2592x1944 crop]

@apbarratt
Copy link

Does the nightly come with the new camera stack? I see in the downloads folder there were extra files involving imaging. Perhaps I am meant to be doing something with those?

Screenshot 2024-01-19 at 13 05 28

@apbarratt
Copy link

Hmmm, no, that ffmpeg seems to match what's already in the nightly.

@apbarratt
Copy link

Hmmm, running libcamera-jpeg -o test.jpg confirms that the camera is in fact working (after I've added that camera_auto_detect=1, which I note is enabled by default on stock PiOS).
It's just not showing up in Octoprint and visiting http://octopi.local/webcam/?action=stream is presenting me with a The webcam server is currently not running page, with instructions on rebooting/switching to USB camera.
I'd thought once I got the auto-detect working it'd resolve but it seems not. Most odd.

Here's the output of sudo systemctl status webcamd.service

● webcamd.service - the OctoPi webcam daemon with the user specified config
     Loaded: loaded (/etc/systemd/system/webcamd.service; enabled; preset: enabled)
     Active: active (running) since Fri 2024-01-19 16:03:28 GMT; 5h 1min ago
   Main PID: 750 (webcamd)
      Tasks: 2 (limit: 9262)
        CPU: 4.670s
     CGroup: /system.slice/webcamd.service
             ├─ 750 /bin/bash /root/bin/webcamd
             └─5363 sleep 120

Jan 19 21:02:00 octopi mjpg_streamer[5329]: MJPG-streamer [5329]: TV-Norm...........: DEFAULT
Jan 19 21:02:00 octopi mjpg_streamer[5329]: MJPG-streamer [5329]: init_VideoIn failed
Jan 19 21:04:01 octopi mjpg_streamer[5360]: MJPG-streamer [5360]: starting application
Jan 19 21:04:01 octopi mjpg_streamer[5360]: MJPG-streamer [5360]: MJPG Streamer Version.: 2.0
Jan 19 21:04:01 octopi mjpg_streamer[5360]: MJPG-streamer [5360]: Using V4L2 device.: /dev/video0
Jan 19 21:04:01 octopi mjpg_streamer[5360]: MJPG-streamer [5360]: Desired Resolution: 640 x 480
Jan 19 21:04:01 octopi mjpg_streamer[5360]: MJPG-streamer [5360]: Frames Per Second.: 10
Jan 19 21:04:01 octopi mjpg_streamer[5360]: MJPG-streamer [5360]: Format............: JPEG
Jan 19 21:04:01 octopi mjpg_streamer[5360]: MJPG-streamer [5360]: TV-Norm...........: DEFAULT
Jan 19 21:04:01 octopi mjpg_streamer[5360]: MJPG-streamer [5360]: init_VideoIn failed

Though with this being MJPG stuff, I'm a little confused as to where the new camera stack stuff is hiding or if it's even installed :/

@apbarratt
Copy link

Okay, I've finally found some brief mention in another ticket that the nightlies do not include camera-streamer, though where they saw that written I've no idea. So perhaps I'm just wasting my time. Perhaps this was the wrong thread, it'd be nice to be told by someone if I am in the wrong place or if I'm just shouting into the wind :(

@3driffs
Copy link

3driffs commented Jan 24, 2024

It seems to be working well for me so far and restored from my backup perfectly. I'll try and test cameras tomorrow.

One thing I am noticing is that the install desktop script does not appear to have been updated in seven years. https://github.com/guysoft/OctoPi/blob/devel/src/modules/octopi/filesystem/home/pi/scripts/install-desktop

I'm quite certain I read when Pi OS bookworm was announced that there's been some fairly heavy work done in the desktop environment. I do wonder if this install-desktop will need to be revisited to bring it up to spec with whatever PiOS is providing out of the box these day.

Looks like the answer is yes, tried the desktop install on the last nightly and after a reboot, system hangs with a rapid blinking cursor in upper left of the screen. left it for hours, and no change, so something's definitely broken.

On the bright side, before the desktop install, the nightly 'just worked' with the USB webcam.

@3driffs
Copy link

3driffs commented Jan 24, 2024

In case others want to install the desktop, here's what worked for me:

Install the latest nightly of octopi
sudo tasksel
Select the default desktop (top option)
sudo apt install raspberrypi-ui-mods
raspi-config
Change it to launch desktop with password
reboot

And then you have a desktop running on pi 5/bookworm. Note that RealVNC isn't supported, and TigerVNC has issues.

@tsh-xx
Copy link

tsh-xx commented Feb 3, 2024

I didn't plan to be on the cutting edge, but I bought a Pi5 and it needs to be running octoprint for now.

I tired 2024-01-16_2023-12-11-octopi-bookworm-arm64-lite-1.1.0.zip but this complains about needing os_check==0, and not having the right dtb. I satisfied these two, and I get a blank screen. What am I doing wrong?

@guysoft
Copy link
Owner Author

guysoft commented Feb 5, 2024

It might be that Rpi changed the device tree because they sourced different components for different Rpi 5 builds.
I just saw the nightly is broken, will fix that and you can try it.

@3driffs
Copy link

3driffs commented Feb 25, 2024

Just an update - Had one hard crash in the middle of a print, rebooted and it's been stable. But while octoprint is still working, the desktop is non-responsive. Definitely bleeding edge here :-)

@guysoft
Copy link
Owner Author

guysoft commented Feb 25, 2024

@3driffs People are reporting the nightly is working for them (though I didn't test it, this weekend was FullPagOS, will try another weekend to test OctoPi and prepare an RC)

@3driffs
Copy link

3driffs commented Feb 26, 2024

Octoprint works- it’s the desktop that froze. Have you updated the desktop install script that I missed?

@guysoft
Copy link
Owner Author

guysoft commented Feb 28, 2024

@foosel AFAIK you are enforcing 32bit kernel on OctoPi-UpToDate. Where is the new camera stack image built? I could move it in to OctoPi's nightlies.

@foosel
Copy link
Collaborator

foosel commented Mar 6, 2024

I'm not sure you really want to move that into the nightlies. First of all I first need to swap the apt key (and that looks like it's harder than I thought at first, which is why I didn't manage to do it before my surgery last week from which I'm still recovering), there's still a stability issue with the camera-streamer server itself for which I'm waiting for feedback from upstream, and all in all I'd prefer to not have that forked at this point because that will make updates & support for me even trickier.

In case you want to look at it however: https://github.com/OctoPrint/OctoPi-UpToDate/tree/camera-streamer

@guysoft
Copy link
Owner Author

guysoft commented Mar 6, 2024

Thanks for the info and hope you have a speedy recovery!

@cp2004
Copy link
Contributor

cp2004 commented Mar 7, 2024

There is also the slightly added complication that the RPi 5 does not have the hardware encoder that camera-streamer was designed for - I am not sure what would happen if you tried to build it targeting the HW encoder and then ran that on a Pi 5. Maybe it would just work, I don't know. Adds another nice dimension to upgrading camera streaming setup in general.

@lpla
Copy link

lpla commented Apr 25, 2024

ustreamer project seems to be more mature than camera-streamer in this aspect: pikvm/ustreamer#248

@blair287
Copy link

blair287 commented May 19, 2024

Nighties just seem broken for me installed several different ones all boot connect to wifi but octoprint server never starts

Pi 5 been out for a year how is it so badly supported is the pi4 and 3 still even in production I see they are out of stock lots of places.

@guysoft
Copy link
Owner Author

guysoft commented May 26, 2024

@blair287 Are you using the nightly from rpi imager? Where from?
The nighties should work.

guysoft added a commit that referenced this issue May 31, 2024
@guysoft
Copy link
Owner Author

guysoft commented Jun 4, 2024

Related, wpa-supplicant option does not work anymore
guysoft/CustomPiOS#219

@geerlingguy
Copy link

geerlingguy commented Jun 7, 2024

@guysoft - I just installed the nightly on my Pi 5 (64 bit lite), 2024-06-07_2024-03-15-octopi-bookworm-arm64-lite-1.1.0.zip from http://unofficialpi.org/Distros/OctoPi/nightly-arm64/ — it wasn't entirely clear from reading this thread, but it sounds like the Pi camera streaming functionality might not be working in this image quite yet? (At least on Pi 5.)

Right now would running something like go2rtc be the best bet to pass through the Pi camera as a 'standard webcam' locally?

To set that up, I tried following (mostly) this guide:

wget https://github.com/AlexxIT/go2rtc/releases/download/v1.9.3/go2rtc_linux_arm64
chmod +x go2rtc_linux_arm64

---

# Put the following inside go2rtc.yaml
streams:
  picam_h264: exec:rpicam-vid -t 0 --codec h264 -o -
  picam_mjpeg: exec:rpicam-vid -t 0 --codec mjpeg -o -

---

# Then run go2rtc:
./go2rtc_linux_arm64

But when I visit http://PI_IP_HERE:1984/ and try one of the streams, I get an error:

Screenshot 2024-06-07 at 5 43 57 PM

So should I take this up with the go2rtc project's issue queue, or are you working on a different method of supporting the Pi camera on the Bookworm/64-bit/Pi 5? I would be happy to help a bit, would be nice to get it working out of the box!

@geerlingguy
Copy link

geerlingguy commented Jun 7, 2024

Sorry for the rubber-ducking, but I found out the image has libcamera-apps-lite installed, not the full suite of libcamera-apps. So I installed with:

sudo apt install libcamera-apps -y

And now it gets further... but I wind up seeing 'Unable to set controls: Device or resource busy', so I think something else is broken here. Maybe something in the image is still trying to grab the camera so go2rtc can't use it?

I tried killing webcamd.service with sudo systemctl stop webcamd.service, and then tried go2rtc again, but still get other errors and nothing really seems to help.

It looks like there are a couple alternatives like picamera2-WebUI-Lite or raspi-cam-srv, but I might for the short term just set up a camera stream from a separate Pi since I think I can get it working with a base Pi OS install.

@guysoft
Copy link
Owner Author

guysoft commented Jun 9, 2024

Ill try build with

libcamera-apps

installed and we can test that nightly

@jneilliii
Copy link

jneilliii commented Jul 2, 2024

@geerlingguy ...first and foremost love your videos. curious, did you also disable the ffmpeg_hls service?

I have these notes from when I tested out restreamer in the past, which lists the services I disable.

feel free to jump into OctoPrint discord and get additional help in the support-webcam channel. most people just install pi os lite and then use the octoprint_deploy scripts to install everything.

@guysoft
Copy link
Owner Author

guysoft commented Jul 17, 2024

Working on a PR that should fix most of the stuff.

You can take a look here, nightly is building this branch:
#834

@KruseLuds
Copy link

Noob trying to get Debian running on RPI5. Once you get to a stable version... If I am installing HA will it see "Debian" or "Octopi" (?)

@guysoft
Copy link
Owner Author

guysoft commented Jul 21, 2024

@KruseLuds What do you mean installing HA?

@KruseLuds
Copy link

HA = Home Assistant

@guysoft
Copy link
Owner Author

guysoft commented Aug 6, 2024

Started working on a wpa-supplicant/networkmanager solution, moving slow but I have a plan. After that is done I think I am ready to release a RC using the beta branch of CustomPiOS v2

@guysoft
Copy link
Owner Author

guysoft commented Nov 14, 2024

Its working and good enough for now, build uses CustomPiOS v2 now too.

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