Logitech C310 boots to a snowy picture

What is the problem?

On the first boot of the day, the camera boots to a snowy screen. The camera works on a laptop without any issue. If I reboot the RPI several times it will eventually boot normally, OR if I run "sudo service webcamd restart", it will immediately correct itself. The problem only started after I upgraded to .18/1.5.3, I'm sure it's a setting, but searching here hasn't revealed anything but some troubleshooting steps. The camera was working on the same platform, without issue prior to the upgrade.

What did you already try to solve it?

restart PI and restart camera service.

Have you tried running in safe mode?

Yes, problem still occurred, but rebooting back into normal mode will correct the issue.

Did running in safe mode solve the problem?

Not exactly.

Complete Logs

octoprint.log (348.2 KB)

Additional information about your setup

OCTOPI - 0.18
Octoprint - 1.5.3
Camera - Logitech C310
3.5" TFT Display - MPI3501 (3.5inch RPi Display - LCD wiki)

1 Like

There's been a few reports of this around, I get the impression from all of them that mjpg streamer is starting a bit too early for these cameras or general setup. You mentioned in previous posts about using a powered USB hub - maybe this makes a difference with the startup time of USB devices.

If you know what you are doing, you may be able to add a delay, or depend on some different services (such as OctoPrint) in the webcam service. If you don't know what that is, I can dig out the file locations and come up with something to change, but that will have to come later when I can poke at my OctoPi install again.

Thank you, I'd appreciate your suggested modification. I'm not familiar with inserting delays into a startup file, I can edit a file and make changes.

As for the powered hub, it doesn't matter if I plug into the RPI direct or the hub. To avoid a tangent discussion leading to my censure, I'll remove the hub from the equation. I am testing/troubleshooting with the camera plugged directly into the RPI.

1 Like

Try adding this to the file /etc/systemd/system/webcamd.service, to wait until after OctoPrint is started (just another service I know starts up)


Description=the OctoPi webcam daemon with the user specified config

+ After=octoprint.service



You can also add a sleep before it starts, though this is not preferred because otherwise every time you run sudo service webcamd restart it will wait before actually doing it:

+ ExecStartPre=/bin/sleep 30


Maybe see what happens? There's no other configuration I can think of that would make it wait longer before starting up the server, someone else may have another solution but that's what I think is the easiest/fastest to test it out.

Thanks for the post.

This what is actually in my webcamd.service file under [Unit]

Description=the OctoPi webcam daemon with the user specified config


My question is, don't the restart entries automatically restart the service if it fails or faults? If I add the delay will it loop? It doesn't resolve the issue by itself if left for any time, so I don't think the service is generating any errors. The only negative entry in the log is in relation to a VL805 camera it says I don't have but still tests all functions. webcamd.log (28.4 KB)

It will only auto-restart if the service fails, from it's perspective everything is OK. Little does it know...

The delay (my 2nd option) is configured so that it runs the sleep first, then webcamd after that has finished. So hopefully, it would just take 30 secs to restart - that's why I said it was not as good as something boot-only, since the delay gets where you don't want it. My googling couldn't find a good solution for a delay only on boot.

OK, thanks. That is miles above my level in Linux. I have a print job running, so I'll need to wait before I can make changes to the startup files, and this problem only occurs on first boot each day, so tomorrow morning will be the real test.

Since the service is checking for USB cameras and then PI cameras, should I change in Octopi.txt:

camera="auto" to camera= "usb" to keep it from testing the raspi cams? (I'll never have one)

Having this same problem. If restart the service manually the camera will start to work. But never on boot. very frustrating!

Tried to edit the webcamd.service file as described above with no luck. Even tried setting the sleep to 90 and then 120 and still no luck.

This camera was working fine until i updated my version of Octopi and Octo Print.

Tried other USB cameras and they work fine.