Ubuntu – Need to disable USB device

usbwebcam

My laptop has a built in camera. Ubuntu detects this as a pluged in USB device and turns on the power. One, I don't want the camera on all the time, feel like some one is watching me. Two, it starts to heat up the screen. It's a small camera, but does produce a lot of heat after about 10 minutes of running.

I've tried following steps I found on the internet, but no luck.

The command

for device in $(ls /sys/bus/usb/devices/*/product); do echo $device;cat $device;done

Returns

/sys/bus/usb/devices/1-8/product

USB2.0 Camera

/sys/bus/usb/devices/2-1/product

BCM92045NMD

/sys/bus/usb/devices/3-2/product

Trackball

/sys/bus/usb/devices/usb1/product

EHCI Host Controller

/sys/bus/usb/devices/usb2/product

UHCI Host Controller

/sys/bus/usb/devices/usb3/product

UHCI Host Controller

/sys/bus/usb/devices/usb4/product

UHCI Host Controller

/sys/bus/usb/devices/usb5/product

UHCI Host Controller

The command

echo suspend | sudo tee /sys/bus/usb/devices/1-8/power/level

Returns

suspend

tee: /sys/bus/usb/devices/1-8/power/level: Invalid argument

Best Answer

Try this command,

sudo sh -c "echo suspend >> /sys/bus/usb/devices/1-8/power/level"

It appends the string suspend to the /sys/bus/usb/devices/1-8/power/level file.

If the file doesn't exists anymore then run the below command.It will create a file and then appends the string suspend to that file.

sudo sh -c "echo suspend > /sys/bus/usb/devices/1-8/power/level"
Related Question