7

I was using facebook messenger, and When I finished my call, the web cam stilled working.I have an integrated camera in my laptop HP 630. Is there a way to turn it off ? Thanks.

3
  • It might just be glitched. Have you tried restarting?
    – wjandrea
    Mar 25, 2017 at 13:52
  • @NeoTheThird shameless plug, but this most probably readily available and thus cheaper: askubuntu.com/a/779909/75166
    – MadMike
    Mar 27, 2017 at 13:15
  • the problem is solved, but I am using it :xD Mar 27, 2017 at 13:35

4 Answers 4

15

Thank you guys, the problem is gone.

- I used the command : lsof | grep video0 to find the software using my webcam. It was FireFox.

- I just restarted FireFox, and then the webcam turned off.

1
  • 5
    Just run lsof /dev/video0. That's often much faster than running lsof on all files
    – smac89
    Jun 2, 2020 at 4:58
10

If the webcam behaves weirdly, not automatically turning off for example, you can:

To disable the webcam run:

sudo modprobe -r uvcvideo

It removes the module from the Linux Kernel.

To re-enable the webcam you can either restart or run:

sudo modprobe -a uvcvideo

Reinserts the module.

3
  1. sudo rmmod -f uvcvideo(to kill laptop camera)

  2. sudo modprobe -r uvcvideo(to restart the video module)

  3. sudo modprobe uvcvideo(to restart the laptop camera)

  4. sudo modprobe -a uvcvideo(can be used while skipping steps 2&3 to restart the camera directly)

1
  • lsmod | grep uvcvideo (to check if camera killed or alive)
    – Rolas
    Dec 2, 2020 at 7:10
1

If you know the application name, you can use the following to get the process ID:

ps -fA | grep application_name
Output: process_name PID PPID .....

Then you can kill the process using:

kill -9 PID

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .