Pi Camera Fails after LCD Drivers Installed

What is the problem?

Pi camera stops working after 3.5" LCD drivers installed

What did you already try to solve it?

Tried safe mode, fresh install of octopi on a fresh sd card, tried various settings in octopi.txt

Have you tried running in safe mode?


Did running in safe mode solve the problem?


Systeminfo Bundle

You can download this in OctoPrint's System Information dialog ... no bundle, no support!)

webcamd.log (431.1 KB)
haproxy.log (74.3 KB)
octoprint.log (54.7 KB)

Note: Other items in systeminfo bundle are 0kb and can't be uploaded, this is after a fresh install attempt to resolve the issue.

Additional information about your setup

OctoPrint version, OctoPi version, printer, firmware, browser, operating system, ... as much data as possible

  • OctoPrint 1.8.6
  • Python 3.7.3
  • OctoPi 0.18.0
  • Safari Version 16.2 (18614.
  • Raspberry Pi 4 Model B with 1.5GHz 64-bit quad-core ARMv8 CPU
  • Samsung EVO+ 128GB High Speed MicroSD Card
  • CanaKit USB-C Power Supply
  • Waveshare 3.5inch RPi LCD (A), 480x320
  • Prusa MK3s+ Firmware 3.12.0-5672
  • MakerFocus Fisheye Camera 5mp

After a fresh install of Octopi the camera worked fine, I then ran the install procedure for the Waveshare 3.5" RPi LCD (A) to make the screen work (screen is blank white until this is completed), after the install and reboot the camera stops working.

The following is the report when checking that the camera service is running:

pi@deimos:~ $ systemctl status webcamd.service
● webcamd.service - the OctoPi webcam daemon with the user specified config
   Loaded: loaded (/etc/systemd/system/webcamd.service; enabled; vendor preset: enabled)
   Active: activating (auto-restart) since Tue 2023-01-31 11:59:26 EST; 710ms ago
  Process: 2299 ExecStart=/root/bin/webcamd (code=exited, status=0/SUCCESS)

I also see another post with the same exact issue after searching the forums prior to requesting help, but there is not resolution on that thread located here.

Rechecked octopi.txt and noticed it was mostly commented out so made changes to attempt to force Pi camera setup, new file attached (file is txt on Pi, switched to log for upload purposes), camera still not functioning (however night vision lights do come on):

octopi.log (2.9 KB)

Followed webcamd.log to webcam line 184 throwing an exception, here is the code:

    if [ -e $uevent_file ]; then
        # let's see what kind of webcam we have here, fetch vid and pid...
        product=`cat $uevent_file | grep PRODUCT | cut -d"=" -f2`
        vid=`echo $product | cut -d"/" -f1`
        pid=`echo $product | cut -d"/" -f2`
        vidpid=`printf "%04x:%04x" "0x$vid" "0x$pid"` #this is line 184

        # ... then look if it is in our list of known broken-fps-devices and if so remove
        # the -f parameter from the options (if it's in there, else that's just a no-op)
        for identifier in ${brokenfps_usb_devices[@]};
            if [ "$vidpid" = "$identifier" ]; then
                echo "Camera model $vidpid is known to not work with -f parameter, stripping it out"
                options=`echo $options | sed -e "s/\(\s\+\|^\)-f\s\+[0-9]\+//g"`

Next update, I found this script mentioned resolving some v3 camera issues in the Octopi GIT and tried it, still nothing. I'm not sure what version my camera is be honest. I'll update original thread with specific camera link.

In case it helps, here are the systeminfo bundle logs from a fresh install, the camera works here. LCD doesn't as it appears to be the offending element that breaks it.

octoprint.log (12.6 KB)
webcamd.log (2.6 KB)
haproxy.log (14.4 KB)

And I've got it working! For those interested the Waveshare GIT repo appears to be extremely out dated. I followed the install code and discovered the primary file being affected that existed prior to install was the config.txt file.

Of course with all the back and forth trying various different things I never compared before and after. Waveshare install doesn't append to the file, it out right replaces the file, which removed this block of code that I believe is the key to Pi camera configurations being used:

# enable raspicam

So I ran a diff on the two files and essential merged them with some clean up appending the Waveshare added items to the bottom. This does leave some duplicate values commented out above, but liked keeping it blocked with hardware functionality.

If you have a Pi camera and running a Waveshare 3.5" board (may affect others as well but haven't checked) replace your config.txt file with this one. It should resolve your issue (named as log for uploading):

LCD35-show-octopi-plus-pi-camera.log (2.0 KB)

1 Like

Thanks for the attempt but not related at all.

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