Linux 禁用摄像头

1.使用命令查看摄像头信息

root@root-PC:~$ sudo dmesg | grep uvc
[ 8.625446] uvcvideo: Found UVC 1.00 device USB 2.0 PC Camera (0342:9463)
[ 8.630269] uvcvideo: Failed to query (GET_INFO) UVC control 11 on unit 1: -32 (exp. 1).
[ 8.631667] uvcvideo: Failed to query (GET_INFO) UVC control 13 on unit 1: -32 (exp. 1).
[ 8.680768] uvcvideo 1-1.1.1:1.0: Entity type for entity Processing 2 was not initialized!
[ 8.680771] uvcvideo 1-1.1.1:1.0: Entity type for entity Extension 6 was not initialized!
[ 8.680773] uvcvideo 1-1.1.1:1.0: Entity type for entity Camera 1 was not initialized!
[ 8.685508] uvcvideo: Found UVC 1.00 device Integrated Camera (0342:9463)
[ 8.761845] uvcvideo 1-1.8:1.0: Entity type for entity Extension 4 was not initialized!
[ 8.761849] uvcvideo 1-1.8:1.0: Entity type for entity Processing 2 was not initialized!
[ 8.761850] uvcvideo 1-1.8:1.0: Entity type for entity Camera 1 was not initialized!
[ 8.833930] usbcore: registered new interface driver uvcvideo
authen@authen-PC:~$

 

2.修改配置文件中的值,禁用摄像头

root@root-PC:~$ cat /sys/bus/usb/devices/1-1.8/bConfigurationValue

1

root@root-PC:~$ 

使用 vi 编辑器把1改为0后保存退出,此时摄像头已经被禁用

 

3.摄像头恢复禁用: 把配置文件的值设置为1,或重启系统

 

posted @ 2021-06-02 15:46  晴天224  阅读(1168)  评论(0编辑  收藏  举报