# How to disable integrated webcam and still be able to use an external one

I am looking for a way to disable the webcam that is integrated into my laptop. The webcam is using uvcvideo module but I do not want to blacklist it since it is also being used by an external webcam I have.

Is there any way of disabling the device itself without touching the modules list?

This is how the webcams are listed by lsusb. The first one is an integrated one (It is identified by some apps as BisonCam NB Pro), the second one is the external Logitech C525:

Bus 002 Device 004: ID 5986:0361 Acer, Inc
Bus 003 Device 002: ID 046d:0826 Logitech, Inc.


I have already checked BIOS - there is no way of disabling the webcam from there. Besides I would love to learn how to disable the device by ID anyway.

Thanks!

-
Crossposted this on LinuxQuestions. What I eventually did was to hack the uvc_driver.c kernel module by forcing an error when this particular device is found. This is not really a solution but a dirty workaround, but it works for me. I described it here: linuxquestions –  AtomHeartFather Oct 18 '12 at 20:24

## 1 Answer

It's quite simple. The hard work is working out what the path to the USB device is. We need to start by finding which device we want to disable. We can do this with lsusb:

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 002: ID 0402:5602 ALi Corp. M5602 Video Camera Controller
Bus 001 Device 003: ID 045e:0723 Microsoft Corp. LifeCam VX-7000 (UVC-compliant)


Change 1-6 to your device ports to be disabled. The port often isn't logical (it's physical) but you can get a port mapping with lsusb -t. Once you think you have it, you can test it with:

cat /sys/bus/usb/devices/1-6/id{Vendor,Product}


This gives me 0402 and 5602, vendor and product IDs for the right device (as listed in lsusb).

Now we've found it, turning it off is simple:

echo "0" > /sys/bus/usb/devices/1-6/bConfigurationValue


After making sure it works as desired, make it load every startup (for example, in /etc/rc.local.)

-
Brilliant, clean solution. Thank you very much for sharing that! –  AtomHeartFather Dec 1 '12 at 19:50