5

I am using ipwebcam-gst to use my phone as a webcam. Sometimes, it does not correctly close the v4l2loopback module (e.g. when the phone was accidentally disconnected), and when I try to remove the module manually, I get an error.

$ sudo modprobe -r v4l2loopback
modprobe: FATAL: Module v4l2loopback is in use.

Without manually removing the module, ipwebcam won't work, and I would have to restart my computer to get ipwebcam working once again.

How to forcefully remove the kernel module when the computer thinks that it is in use, but actually it is not doing anything?

If it can be removed with a command, then I won't have to restart the computer. I also tried $ sudo modprobe -rf v4l2loopback, but it showed the same error.

Also, the output of lsmod | grep v4l2loopback is,

v4l2loopback           40960  1
videodev              225280  5 videobuf2_v4l2,v4l2loopback,uvcvideo,videobuf2_common

0 Answers0