Page 1 of 2

Can an MX tweak disable a laptop camera?

Posted: Wed Sep 07, 2022 4:38 pm
by colin_b
I've just read https://ostechnix.com/how-to-disable-bu ... in-ubuntu/

Can an MX tweak be created which makes it easy for the camera to be turned on and off, thus giving MX users the option of enhanced privacy?

Re: Can an MX tweak disable a laptop camera?

Posted: Wed Sep 07, 2022 5:23 pm
by Stevo
There's always the old school method of a little electrical tape. :p

Re: Can an MX tweak disable a laptop camera?

Posted: Thu Sep 08, 2022 2:29 am
by Eadwine Rose
I have some paper in front of my camera :) Super safe hardware switch, that thing :) Never fails me.

Re: Can an MX tweak disable a laptop camera?

Posted: Thu Sep 08, 2022 4:18 am
by chrispop99
If the requirement is that the camera is never available, it can be disabled in BIOS.

Chris

Re: Can an MX tweak disable a laptop camera?

Posted: Thu Sep 08, 2022 7:51 am
by dolphin_oracle
so first question:

does

Code: Select all

sudo modprobe -r uvcvideo
disable the camera? like, it's probably still powered but not working I would guess.

conversely, to re-enable, does

Code: Select all

sudo modprobe uvcvideo
enough to bring it back up?

Re: Can an MX tweak disable a laptop camera?

Posted: Thu Sep 08, 2022 9:10 am
by Huckleberry Finn
@dolphin_oracle tried with Webcamoid: .. -r is (sort of) successfull: It just makes it show an "infinite" 'window in window'

.. Then modprobe doesn't bring it back.. even after a logout, login , even not after a reboot (cause it gets stuck at "screen capture", you need to change to webcam manually) :)

Re: Can an MX tweak disable a laptop camera?

Posted: Thu Sep 08, 2022 9:37 am
by Jerry3904
manually
sounds pretty troglodyte (though that's what I do anyway)

Re: Can an MX tweak disable a laptop camera?

Posted: Thu Sep 08, 2022 10:58 am
by Huckleberry Finn
In the meantime, I mean, from it's settings : "Configure Sources" :)

Re: Can an MX tweak disable a laptop camera?

Posted: Thu Sep 08, 2022 7:04 pm
by colin_b
Thanks for the replies. Considering it would be useful for security there seems to be only one software method which is documented, and that was proposed by DO. I was expecting more.

Example:

Code: Select all

https://unix.stackexchange.com/questions/32364/disabling-web-camera

You can disable the kernel drive module responsible for it, which is most cases is uvcvideo. The modprobe let's you enable and disable kernel module, therefore, you can disable your webcam like so:

modprobe -r uvcvideo

And enable it again like this:

modprobe uvcvideo

You can also check whether or not the module is actually disable looking for it using lsmod, which shows the status of modules in the kernel.

lsmod | grep uvcvideo

The output should be similar to this when the module is enabled:

uvcvideo               98304  0
videobuf2_vmalloc      20480  1 uvcvideo
videobuf2_v4l2         24576  1 uvcvideo
videobuf2_common       49152  2 videobuf2_v4l2,uvcvideo
videodev              225280  3 videobuf2_v4l2,uvcvideo,videobuf2_common
mc                     53248  4 videodev,videobuf2_v4l2,uvcvideo,videobuf2_common

And when it is disabled no occurrences to uvcvideo should be returned from the command.
I tried lsmod | grep uvcvideo and got the vidbuf list when the module was enabled, and the output disappeared when the module was disabled, but Huckleberry Finn didn't have success, so I guess it's a debatable tweak which may or may not work.

Re: Can an MX tweak disable a laptop camera?

Posted: Thu Sep 08, 2022 7:23 pm
by Huckleberry Finn
colin_b wrote: Thu Sep 08, 2022 7:04 pm...and the output disappeared when the module was disabled, but Huckleberry Finn didn't have success, so ...
But, in my trial, the problem was not loading / unloading the module (that part is ok and immediate). Just (with that program at least, it may be different with other programs) it defaults to screen capture mode and then stays like that (till you turn it back to webcam mode from settings).