Friday, May 3, 2024
 Popular · Latest · Hot · Upcoming
19
rated 0 times [  19] [ 0]  / answers: 1 / hits: 13873  / 2 Years ago, sun, october 23, 2022, 9:07:27

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!


More From » hardware

 Answers
2

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.)


[#35503] Monday, October 24, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
clegian

Total Points: 283
Total Questions: 115
Total Answers: 115

Location: Morocco
Member since Tue, Feb 2, 2021
3 Years ago
clegian questions
;