What to do when you remove a package with all its dependencies

I had to remove ‘droidcam’ using -Rsc flags because my laptop was unable to detect the native webcam. I used to switch between native webcam and ‘driodcam’ in browser settings but it kept showing the option for ‘droidcam’ only. I tried removing it using -Rsn flags first, did --afterclean, removed the droidcam directory but my browser settings still showed ‘droidcam’ in the camera settings. Now, how do i know what packages to install to get my webcam working agian?

sudo dmesg | grep -i camera 
ls -ltrh /dev/video*                  
zsh: no matches found: /dev/video*

Wrong. You didn’t have to use those flags, you chose to use the -c cascade flag, which will remove all a lot of stuff. You could have just used -Rsn which will remove the package and it’s dependency that are no longer needed by the system.

You need to check your /var/log/pacman.log file for packages that where removed, but was not suppose to be removed. There’s likely a lot of them. I’m surprised your system is still booting to a GUI. :wink:

Did you reboot after this action? Pretty sure it would have removed the option after a reboot (eg the kernel module was removed).

I checked the logs already but they don’t contain much useful information.

[2022-12-31T11:08:32+0530] [PACMAN] Running 'pacman -Rscn droidcam'
[2022-12-31T11:08:34+0530] [ALPM] transaction started
[2022-12-31T11:08:34+0530] [ALPM] removed droidcam (1:1.8.2-1)
[2022-12-31T11:08:35+0530] [ALPM] transaction completed
[2022-12-31T11:08:35+0530] [ALPM] running '30-systemd-update.hook'...
[2022-12-31T11:08:35+0530] [ALPM] running 'update-desktop-database.hook'...
[2022-12-31T11:21:16+0530] [PACMAN] Running 'pacman -S droidcam'
[2022-12-31T11:21:29+0530] [PACMAN] Running 'pacman -S droidcam'
[2022-12-31T11:22:32+0530] [ALPM] transaction started
[2022-12-31T11:22:32+0530] [ALPM] installed droidcam (1:1.8.2-1)
[2022-12-31T11:22:32+0530] [ALPM] transaction completed

I tried to install droidcam again, hoping that yay would install the necessary dependencies but that didn’t happen.
I agree about rebooting the system after -Rsn but i was in the middle of a test and i needed my webcam to work without rebooting it.
I also tried switching kernels and then synchronizing the packages but it didn’t help either.
Guess i don’t have to worry about getting my webcam hacked for a while and i have remove the tape covering it already :smiley:

So it turned out that i needed to remove and reinstall v412loopback followed by a reboot ,for the droidcam to work again .

khusham-pc% v4l2-ctl --list-devices
Droidcam (platform:v4l2loopback_dc-000):

khusham-pc% ls -l /dev/video*      
crw-rw----+ 1 root video 81, 0 Jan  1 10:43 /dev/video0

However, the system is still unable to detect the native webcam:

khusham-pc% lsusb                               
Bus 001 Device 002: ID 8087:8001 Intel Corp. Integrated Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 002: ID 0bda:b001 Realtek Semiconductor Corp. Bluetooth Radio 
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Make sure it isn’t disabled in BIOS or via some hardware switch.

I don’t think my laptop has the ability to disable a webcam in BIOS. I still checked and found nothing of that sort. Maybe it’s a hardware issue and maybe not. Is there a definite way of knowing it without opening this little guy up?