The Logitech c930e has autofocus enabled by default, which fails to focus on objects close to the camera after relaxing the focus to distant objects. This is usually not much of a problem in video meetings, but for use cases such as online proctored exams where the invigilator requests an identity document to be presented close to the camera, this lack of focus can render the text on the identity document unreadable, making the camera useless for such exams.
This gist corrects the issue by disabling autofocus and manually setting the focus so that close-up text can be seen clearly, yet distant objects do not appear too blurry.
This solution has been tested on Fedora 35 Workstation, though it can probably be used on many other Linux distributions as well with minimal modification. In particular, for Ubuntu 20.04, replace focus_automatic_continuous
with focus_auto
.
Ensure the v4l-utils
package is installed.
-
Place the file
90-logitech-c930e.rules
under/etc/udev/rules.d
-
Place the file
[email protected]
under/etc/systemd/system
-
Place the file
logitech-c930e.sh
under/root
and mark it executable -
Restart
systemd-udevd.service
and reloadsystemd
:$ sudo systemctl restart systemd-udevd.service $ sudo systemctl daemon-reload
-
Unplug and re-plug your Logitech c930e webcam. The rules should now be effective. Enjoy ;-)
- Webcam setup - ArchWiki: https://wiki.archlinux.org/title/webcam_setup
- yookoala/90-mac-superdrive.rules: https://gist.github.com/yookoala/818c1ff057e3d965980b7fd3bf8f77a6
- Long-running systemd service with udev: http://blog.fraggod.net/2012/06/16/proper-ish-way-to-start-long-running-systemd-service-on-udev-event-device-hotplug.html
- Ask Ubuntu: https://askubuntu.com/questions/1393244/logitech-c930e-focus-reverts-to-default-settings-even-with-custom-udev-rules
- Ask Fedora: https://ask.fedoraproject.org/t/logitech-c930e-focus-reverts-to-default-settings-even-with-custom-udev-rules/20209
CC0 (public domain)
I pushed some updates to the role this morning:
v4l-ctl
calls directly each time.