This repository provides a simple method to resolve the notorious continuous auto focussing issue that is present on the Microsoft Lifecam (and related cameras).
The amazing "fix"... simply disable the auto focus feature.
As much as this doesn't sound like a fix (and sounds more like avoiding the problem), it seems to be the best way to get a usable camera that doesn't cause the image to go blurry even 10 or so seconds.
The Microsoft Lifecams are UVC compliant cameras and therefore the dynamic controls can be interfaced via the UVC driver. This can be done with a tool such as uvcdynctrl
.
- Debian based distribution (this approach can be adapted to others, but I have not tested it)
uvcdynctrl
installed - (apt install uvcdynctrl
)
- Work out the product ID of the camera using
lsusb
. For example:The product ID for the above camera is$ lsusb ... Bus 003 Device 056: ID 045e:075d Microsoft Corp. LifeCam Cinema ...
075d
. If you have multiple cameras connected, you may need to disconnect them and runlsusb
again to isolate the camera you want to disable auto focus for. - Run the install script, passing the product ID obtained from the previous step. For example:
# Replace '075d' with the product ID you obtained in step 1 $ ./install.sh 075d
The install script will essentially copy source files in this repo to /opt
on your machine and setup a udev rule to disable the auto focus every time the camera is connected. The udev rule is necessary as the camera does not persist the setting of disabling the auto focus control.