Skip to content

Instantly share code, notes, and snippets.

@k5cents
Last active October 18, 2021 19:35
Show Gist options
  • Save k5cents/d8614a4abde33b326bc4ea4c83f92812 to your computer and use it in GitHub Desktop.
Save k5cents/d8614a4abde33b326bc4ea4c83f92812 to your computer and use it in GitHub Desktop.
Disable webcam audio and preserve video
# Disables webcam audio.
SUBSYSTEM=="usb", DRIVER=="snd-usb-audio", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="0991", ATTR{authorized}="0"

Instructions from this helpful guide.

  1. Run lsusb to identify USB webcam:

    $ lsusb
    Bus 004 Device 002: ID 0424:5734 Microchip Technology, Inc. (formerly SMSC) USB5734
    Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
    Bus 003 Device 010: ID 0c45:6366 Microdia USB Camera
    Bus 003 Device 003: ID 0424:274c Microchip Technology, Inc. (formerly SMSC) 
    Bus 003 Device 002: ID 0424:2734 Microchip Technology, Inc. (formerly SMSC) USB2734
    Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
    Bus 001 Device 003: ID 046d:c52b Logitech, Inc. Unifying Receiver
    Bus 001 Device 002: ID 04b4:0510 Cypress Semiconductor Corp. HID Keyboard
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    
  2. Create a new file /etc/udev/rules.d/90-blacklist-webcam-sound.rules:

    sudo nano /etc/udev/rules.d/90-blacklist-webcam-sound.rules
    
  3. Add the lines from the attached text file, replacing your webcam's vendor and product ID.

  4. Reload your rules file. Might need to unplug your device.

    sudo udevadm control --reload-rules
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment