Logitec QuickCam 9000 not working

Hi,
since upgrading to Octoprint 1.3.x my camera is not showing anything. Before Octoprint update it was working fine. Now I updated to 1.3.12 but that does not help. I'm using a pi3b. Trying to connect on Port 8080 gives not video. At the moment I have no clue what to modify to make it running.
Cheers
Knut

Camera model Logitec QuickCam 9000

What is the problem? Black screen on the control window

pi@octopi:~ $ lsusb
Bus 001 Device 015: ID 046d:0990 Logitech, Inc. QuickCam Pro 9000

Logs (/var/log/webcamd.log,
Starting up webcamDaemon...
--- Configuration: ----------------------------
camera: auto
usb options: -r 640x480 -f 10
raspi options: -fps 10
http options: -w ./www-octopi -n

No camera detected, trying again in two minutes
Found video devices:
/dev/video0
USB device was not set in options, start MJPG-streamer with the first found video device: /dev/video0
<13>Sep 29 15:03:35 pi: Starting USB webcam
Running ./mjpg_streamer -o output_http.so -w ./www-octopi -n -i input_uvc.so -r 640x480 -f 10 -d /dev/video0
MJPG Streamer Version: git rev: ddb69b7b4f114f3c2ca01adf55712792ca8aed43
i: Using V4L2 device.: /dev/video0
i: Desired Resolution: 640 x 480
i: Frames Per Second.: 10
i: Format............: JPEG
i: TV-Norm...........: DEFAULT
UVCIOC_CTRL_ADD - Error at Pan (relative): Inappropriate ioctl for device (25)
UVCIOC_CTRL_ADD - Error at Tilt (relative): Inappropriate ioctl for device (25)
UVCIOC_CTRL_ADD - Error at Pan Reset: Inappropriate ioctl for device (25)
UVCIOC_CTRL_ADD - Error at Tilt Reset: Inappropriate ioctl for device (25)
UVCIOC_CTRL_ADD - Error at Pan/tilt Reset: Inappropriate ioctl for device (25)
UVCIOC_CTRL_ADD - Error at Focus (absolute): Inappropriate ioctl for device (25)
UVCIOC_CTRL_MAP - Error at Pan (relative): Inappropriate ioctl for device (25)
UVCIOC_CTRL_MAP - Error at Tilt (relative): Inappropriate ioctl for device (25)
UVCIOC_CTRL_MAP - Error at Pan Reset: Inappropriate ioctl for device (25)
UVCIOC_CTRL_MAP - Error at Tilt Reset: Inappropriate ioctl for device (25)
UVCIOC_CTRL_MAP - Error at Pan/tilt Reset: Inappropriate ioctl for device (25)
UVCIOC_CTRL_MAP - Error at Focus (absolute): Inappropriate ioctl for device (25)
UVCIOC_CTRL_MAP - Error at LED1 Mode: Inappropriate ioctl for device (25)
UVCIOC_CTRL_MAP - Error at LED1 Frequency: Inappropriate ioctl for device (25)
UVCIOC_CTRL_MAP - Error at Disable video processing: Inappropriate ioctl for device (25)
UVCIOC_CTRL_MAP - Error at Raw bits per pixel: Inappropriate ioctl for device (25)
o: www-folder-path......: ./www-octopi/
o: HTTP TCP port........: 8080
o: HTTP Listen Address..: (null)
o: username:password....: disabled
o: commands.............: disabled
i: select() timeout
i: cleaning up resources allocated by input thread


syslog,

Oct 26 15:04:51 octopi mtp-probe: bus: 1, device: 14 was not an MTP device
Oct 26 15:08:01 octopi kernel: [2333194.364757] usb 1-1.4: USB disconnect, device number 9
Oct 26 15:08:07 octopi kernel: [2333200.039716] usb 1-1.4: new high-speed USB device number 15 using dwc_otg
Oct 26 15:08:07 octopi kernel: [2333200.297690] usb 1-1.4: New USB device found, idVendor=046d, idProduct=0990
Oct 26 15:08:07 octopi kernel: [2333200.297706] usb 1-1.4: New USB device strings: Mfr=0, Product=0, SerialNumber=2
Oct 26 15:08:07 octopi kernel: [2333200.297716] usb 1-1.4: SerialNumber: BD2DC258
Oct 26 15:08:07 octopi kernel: [2333200.298695] uvcvideo: Found UVC 1.00 device (046d:0990)
Oct 26 15:08:07 octopi kernel: [2333200.330442] uvcvideo 1-1.4:1.0: Entity type for entity Extension 4 was not initialized!

messages:

Oct 26 15:04:51 octopi mtp-probe: checking bus 1, device 14: "/sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.2"
Oct 26 15:04:51 octopi mtp-probe: bus: 1, device: 14 was not an MTP device
Oct 26 15:08:01 octopi kernel: [2333194.364757] usb 1-1.4: USB disconnect, device number 9
Oct 26 15:08:07 octopi kernel: [2333200.039716] usb 1-1.4: new high-speed USB device number 15 using dwc_otg
Oct 26 15:08:07 octopi kernel: [2333200.297690] usb 1-1.4: New USB device found, idVendor=046d, idProduct=0990
Oct 26 15:08:07 octopi kernel: [2333200.297706] usb 1-1.4: New USB device strings: Mfr=0, Product=0, SerialNumber=2
Oct 26 15:08:07 octopi kernel: [2333200.297716] usb 1-1.4: SerialNumber: BD2DC258
Oct 26 15:08:07 octopi kernel: [2333200.298695] uvcvideo: Found UVC 1.00 device (046d:0990)
Oct 26 15:08:07 octopi kernel: [2333200.330442] uvcvideo 1-1.4:1.0: Entity type for entity Extension 4 was not initialized!
Oct 26 15:08:07 octopi kernel: [2333200.330459] uvcvideo 1-1.4:1.0: Entity type for entity Extension 10 was not initialized!
Oct 26 15:08:07 octopi kernel: [2333200.330469] uvcvideo 1-1.4:1.0: Entity type for entity Extension 12 was not initialized!
Oct 26 15:08:07 octopi kernel: [2333200.330480] uvcvideo 1-1.4:1.0: Entity type for entity Extension 8 was not initialized!
Oct 26 15:08:07 octopi kernel: [2333200.330490] uvcvideo 1-1.4:1.0: Entity type for entity Extension 11 was not initialized!
Oct 26 15:08:07 octopi kernel: [2333200.330500] uvcvideo 1-1.4:1.0: Entity type for entity Extension 9 was not initialized!
Oct 26 15:08:07 octopi kernel: [2333200.330510] uvcvideo 1-1.4:1.0: Entity type for entity Processing 2 was not initialized!
Oct 26 15:08:07 octopi kernel: [2333200.330520] uvcvideo 1-1.4:1.0: Entity type for entity Extension 13 was not initialized!
Oct 26 15:08:07 octopi kernel: [2333200.330530] uvcvideo 1-1.4:1.0: Entity type for entity Camera 1 was not initialized!
Oct 26 15:08:07 octopi kernel: [2333200.330936] input: UVC Camera (046d:0990) as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.4/1-1.4:1.0/input/input1
Oct 26 15:08:07 octopi kernel: [2333200.356836] usb 1-1.4: Warning! Unlikely big volume range (=3072), cval->res is probably wrong.
Oct 26 15:08:07 octopi kernel: [2333200.356853] usb 1-1.4: [5] FU [Mic Capture Volume] ch = 1, val = 4608/7680/1

I just needed to replace my previous RPi and used this to also upgrade to 1.3.12 and have also lost my QuickCam 9000

After some more searching I found that killing the mjpg_streamer process and letting it restart automatically "unblocks" the streaming.

sudo pkill mjpg_streamer

Does the trick, but it's still odd why it blocks in the first place :confused:


On first run after boot systemctl status webcamd reports this

 $  systemctl status webcamd
● webcamd.service - the OctoPi webcam daemon with the user specified config
   Loaded: loaded (/etc/systemd/system/webcamd.service; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2019-12-15 14:32:04 GMT; 1h 8min ago
  Process: 409 ExecStart=/root/bin/webcamd (code=exited, status=0/SUCCESS)
 Main PID: 444 (mjpg_streamer)
    Tasks: 3 (limit: 2077)
   Memory: 3.4M
   CGroup: /system.slice/webcamd.service
           └─444 ./mjpg_streamer -o output_http.so -w ./www-octopi -n -i input_uvc.so -r 640x480 -f 10 -d /dev/video0

Dec 15 14:32:04 octopi mjpg_streamer[444]: MJPG-streamer [444]: commands.............: disabled
Dec 15 14:32:04 octopi mjpg_streamer[444]: MJPG-streamer [444]: starting input plugin input_uvc.so
Dec 15 14:32:04 octopi mjpg_streamer[444]: MJPG-streamer [444]: starting output plugin: output_http.so (ID: 00)
Dec 15 14:32:04 octopi webcamd[409]: Done bring up all configured video device
Dec 15 14:32:04 octopi webcamd[409]: Goodbye...
Dec 15 14:32:04 octopi systemd[1]: Started the OctoPi webcam daemon with the user specified config.
Dec 15 14:32:09 octopi webcamd[409]:  i: select() timeout
Dec 15 14:32:09 octopi webcamd[409]:  i: cleaning up resources allocated by input thread
Dec 15 14:32:09 octopi mjpg_streamer[444]: MJPG-streamer [444]: select() timeout
Dec 15 14:32:09 octopi mjpg_streamer[444]: MJPG-streamer [444]: cleaning up resources allocated by input thread

and after killing and auto-restart it looks like this

 $ systemctl status webcamd
● webcamd.service - the OctoPi webcam daemon with the user specified config
   Loaded: loaded (/etc/systemd/system/webcamd.service; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2019-12-15 15:41:36 GMT; 12s ago
  Process: 731 ExecStart=/root/bin/webcamd (code=exited, status=0/SUCCESS)
 Main PID: 755 (mjpg_streamer)
    Tasks: 3 (limit: 2077)
   Memory: 1.2M
   CGroup: /system.slice/webcamd.service
           └─755 ./mjpg_streamer -o output_http.so -w ./www-octopi -n -i input_uvc.so -r 640x480 -f 10 -d /dev/video0

Dec 15 15:41:35 octopi mjpg_streamer[755]: MJPG-streamer [755]: www-folder-path......: ./www-octopi/
Dec 15 15:41:35 octopi mjpg_streamer[755]: MJPG-streamer [755]: HTTP TCP port........: 8080
Dec 15 15:41:35 octopi mjpg_streamer[755]: MJPG-streamer [755]: HTTP Listen Address..: (null)
Dec 15 15:41:35 octopi mjpg_streamer[755]: MJPG-streamer [755]: username:password....: disabled
Dec 15 15:41:35 octopi mjpg_streamer[755]: MJPG-streamer [755]: commands.............: disabled
Dec 15 15:41:35 octopi mjpg_streamer[755]: MJPG-streamer [755]: starting input plugin input_uvc.so
Dec 15 15:41:35 octopi mjpg_streamer[755]: MJPG-streamer [755]: starting output plugin: output_http.so (ID: 00)
Dec 15 15:41:36 octopi webcamd[731]: Done bring up all configured video device
Dec 15 15:41:36 octopi webcamd[731]: Goodbye...
Dec 15 15:41:36 octopi systemd[1]: Started the OctoPi webcam daemon with the user specified config.

(mark the missing entries about HTTP TCP, HTTP Listen Address and www-folder-path in the first log)

Hi, just here to confirm that i have the same problem.
I am new to octoprint but will continue testing.

Did you find any further hints regarding this issue?

Not yet. I've been investigating this for quite some time and have alos filed and issue with the OctoPi repo but haven't got any feedback or further insight yet.

Currently I'm using System Command Editor to add a Restart Webcam command here
image

Have you tried putting in a wait timer in the webcamd script before it starts so things are able to settle right before the script is being executed? I will try this tomorrow after the current print has finished.

So far I tried via dependencies which didn't help (or I just didn't find the crucial one to wait for).
I tried starting it indirectly via a "delay" script that would in turn start the service - which caused systemctl to barf for some reason.
Then I tried starting it indirectly via a systemd one-shot that created a cron job which in turn should have initiated the service - but no luck either.

I'm pretty sure all of the above may have worked if I did it correctly, but I just failed to find that correct way :flushed:

Looking forward to your findings :+1:

Hi Scruff_R,

Thx for your information! Exactly same situation here. Read through many other
articles and TODOs - Nothing else helped.

Using your work around for now. Will also further investigate and share if I find something.

Kind Regards,
marcovaldo

1 Like

Add "-y" argument to your camera options, this will force to use YUVY instead of MJPEG:

/boot/octopi.txt:

camera_usb_options="-r 1280x960 -f 5 -y

Then restart webcamd service:

sudo systemctl restart webcamd

Although I haven't tried your suggestion yet, the question still stands why merely restarting the webcamd service without changing to YUVY also works.

If the -y switch was "required" for it to work on boot-up, wouldn't it be required all the time?


@helix, have you found the time to further investigate?


Update:
@terghalin, I have now tested your suggestion and it does not solve the problem.
Althought the service got started like this

   CGroup: /system.slice/webcamd.service
           └─546 ./mjpg_streamer -o output_http.so -w ./www-octopi -n -i input_uvc.so -r 1280x960 -f f -y -d /dev/video0

OctoPrint control panel still gets stuck at "Webcam stream loading..."

The most simple way that I found to solve this problem was to create a systemd process that restart the webcamd service at the end of all.
Follow method 4 in this tutorial: https://www.dexterindustries.com/howto/run-a-program-on-your-raspberry-pi-at-startup/

Change

ExecStart=/usr/bin/python /home/pi/sample.py

as

ExecStart=/bin/systemctl restart webcamd.service

Continue with the rest of the commands and reboot, problem solved for me.

Hope that this help others.

I also have a Logitech QuickCam Pro 9000 and I was able to get it to work on OctoPrint v1.6.1 with the following edit to the /boot/octopi.txt file.

camera_usb_options="-r 1600x1200 -f 5 -y

I shutdown the Pi, unplugged the microSD card and used Notepad++ on a different computer to edit the file to the above. Then I put the card back in the pi and started it back up. To be fair, I have played with this for a while and I though that I had tried the above command before, but I guess I didn't?