Go to TogaWare.com Home Page. GNU/Linux Desktop Survival Guide
by Graham Williams
Duck Duck Go

Camera LED Control and Privacy

Generally a LED lights up when the camera is in use on a computer thereby giving a visual cue to the fact that the camera is capturing data. However, this may be a settable option for some cameras and the camera can be operated without any visual indication that they are. This is a privacy concern as malicious software could capture video from you computer (even through visiting a web page on a web browser), and stream the video remotely without any indication. Newer laptops, for example the Lenovo X1 Yoga, have built in cameras whereby the indicator light is tied directly to the camera hardware and is not settable by software. Be aware though that some camera LEDs can be controlled.

The uvcdynctrl command from the uvcdynctrl package is a command line tool to control the camera LED and other camera settings through the libwebcam library.

On a computer with two cameras, one an infrared and the other the usual webcam, the --list option will list both cameras:

$ uvcdynctrl --list
Listing available devices:
  video0   Integrated IR Camera: Integrate
    Media controller device: /dev/media0
  video1   Integrated Camera: Integrated C
    Media controller device: /dev/media1

The two devices are video0 and video1. To see if the LED is controlable list the available controls:

$ uvcdynctrl --clist --device=video1
Listing available controls for device video1:
  White Balance Temperature, Auto
  Power Line Frequency
  White Balance Temperature
  Backlight Compensation
  Exposure, Auto
  Exposure (Absolute)
  Exposure, Auto Priority

If the list contains some LED mode then the LED is controlable. If not then your privacy is protected and the LED will likely be switched on in hardware whenever the camera is on.

However, a Logitech QuickCam Pro 9000 (WebCam), for example, has a software controllable LED that lights up by default when the camera is being used. To avoid the LED giving away the fact that the camera is recording, perhaps in a covert security situation, the following commands can be utilised.

$ sudo uvcdynctrl -i /usr/share/uvcdynctrl/data/046d/logitech.xml

$ uvcdynctrl --clist            # Available controls
$ uvcdynctrl -s 'LED1 Mode' 0	# LED off
$ uvcdynctrl -s 'LED1 Mode' 1	# LED on
$ uvcdynctrl -s 'LED1 Mode' 2	# LED blinking
$ uvcdynctrl -s 'LED1 Mode' 3   # LED auto mode

Support further development by purchasing the PDF version of the book.
Other online resources include the Data Science Desktop Survival Guide.
Books available on Amazon include Data Mining with Rattle and Essentials of Data Science.
Popular open source software includes rattle and wajig.
Hosted by Togaware, a pioneer of free and open source software since 1984.
Copyright © 1995-2020 Togaware Pty Ltd. . Creative Commons ShareAlike V4.