BUG: Killing motion makes webcam light stuck to on and device becomes unusable
My webcam light remains on and the device becomes unusable when killing motion or the terminal that's running motion. I have to both unplug the device and reboot my machine. ( If I leave the device plugged in and reboot the light will remain on and the device will be unusable. If I just unplug and plug it back the light pops on and nothing changes. )
I have noticed the same thing happens when killing other applications using my webcam. However, programs with a proper 'exit' or 'close' function do not cause this to happen; camorama, for example. I think this bug is related to how the only way to exit motion besides command-on-event ( and if the event you want isn't built-in, then you can't exit ) is to kill it with ps, killall, or xkill. But when you do that apparently it does not properly signal the camera to turn off and stop what it's doing, and it goes into a coma.
This dilemma makes motion unsuitable as a surveillance solution since I have to go through all this rigamarole to get it working again each time I kill motion. I need to be able to not have to reboot my machine or unplug / plug-in devices. It needs to somehow close flawlessly. I realize my Logitech C525 webcam is not on the compatibility list, but many other Logitch C series devices do, and other than this problem, my webcam does work with motion in every way. Hopefully there is some way the webcam can be deactivated properly and completely without depending on the manner in which the program ends.
After it gets stuck, the light can be shut off with command: sudo modprobe -r uvcvideo ... but when I do: sudo modprobe -a uvcvideo --or-- sudo modprobe uvcvideo I'm not able to capture video. Doing: camorama --debug results in:
libv4l2: error turning on stream: Invalid argument
libv4l2: error reading: Invalid argument
Unable to capture image (VIDIOCSYNC)
Module Size Used by
uvcvideo 80885 0
videobuf2_vmalloc 13216 1 uvcvideo
videobuf2_memops 13362 1 videobuf2_vmalloc
videobuf2_core 40664 1 uvcvideo
videodev 134688 2 uvcvideo,videobuf2_core
Perhaps if there was a way to successfully re-initialize the webcam module without reboot my problem could be worked around.
There is no error message.
Using Mint 17 Mate 64-bit.
Using Logitech C525 webcam.
Using the default motion.conf file.
Activating motion with command: motion -c /etc/motion/motion.conf
| Motion version:
| ffmpeg version:
| Shared libraries:
|| ffmpeg, mysql, postgresql
| Server OS:
|| Mint 17 Mate 64-bit, 3.13.0-24-generic
- 15 Jul 2014