You are not logged in.

#1 2020-04-17 02:26:16

callmejoe
Member
Registered: 2019-03-06
Posts: 84

[Solved] Turning on/off usb webcam

looking for ways to disable my usb webcam.  seems the most popular method i came across is to blacklist the uvcvideo module.  but i dont want to have to reboot.

then i came across this suggestion and it looked promising.

echo 0 | sudo tee /sys/devices/pci0000:00/0000:00:14.0/usb2/2-9/2-9.2/2-9.2:1.2/authorized

this does turn off the usb port the camera is connected to.  however, it does not turn back on with

echo 1 | sudo tee /sys/devices/pci0000:00/0000:00:14.0/usb2/2-9/2-9.2/2-9.2:1.2/authorized

seems like it should work.

Last edited by callmejoe (2020-04-17 14:23:30)

Offline

#2 2020-04-17 07:24:55

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,854

Re: [Solved] Turning on/off usb webcam

You might have to re-bind the device, https://unix.stackexchange.com/question … usb-device

Offline

#3 2020-04-17 12:56:57

callmejoe
Member
Registered: 2019-03-06
Posts: 84

Re: [Solved] Turning on/off usb webcam

seth wrote:

You might have to re-bind the device, https://unix.stackexchange.com/question … usb-device

yes that was it.  thanks for the help!

To disconnect USB :

echo '1-1.2' | tee /sys/bus/usb/drivers/usb/unbind

To connect USB :

echo '1-1.2' | tee /sys/bus/usb/drivers/usb/bind

Offline

#4 2020-04-17 13:29:09

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,648

Re: [Solved] Turning on/off usb webcam

Please remember to mark your thread [SOLVED] (edit the title of your first post).

Offline

Board footer

Powered by FluxBB