Score:2

laptop's webcam shows blank screen

cn flag

I just format my entire laptop using a bootable USB stick (I do this when my laptop becomes laggy). My webcam was working perfectly fine before that, but after the format, it has stopped working, so I would like to think it isn't a hardware issue. I have no clue how to debug this issue, any help would mean a lot!


On opening cheese, I get a blank dark screen, notice how all buttons are disabled. The flashlight beside my webcam is on.

enter image description here


output of ls /dev/video*

/dev/video0  /dev/video1

output of lsb_release -a

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.3 LTS
Release:    20.04
Codename:   focal

output of lsusb

Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 005: ID 0cf3:e009 Qualcomm Atheros Communications 
Bus 001 Device 004: ID 0bda:0129 Realtek Semiconductor Corp. RTS5129 Card Reader Controller
Bus 001 Device 003: ID 1bcf:0b09 Sunplus Innovation Technology Inc. SPCA2085 PC Camera
Bus 001 Device 002: ID 046d:c534 Logitech, Inc. Unifying Receiver
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

output on running gucview. Again, the flashlight beside my webcam is on.

V4L2_CORE: Unable to find parent usb device.GUVCVIEW: version 2.0.6
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: No such file or directory
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: No such file or directory
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm_route.c:869:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_route.c:869:(find_matching_chmap) Found no matching channel map
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port
ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port
ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card
ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
V4L2_CORE: Could not grab image (select timeout): Resource temporarily unavailable
V4L2_CORE: Could not grab image (select timeout): Resource temporarily unavailable
V4L2_CORE: Could not grab image (select timeout): Resource temporarily unavailable

output of cat /etc/modprobe.d/blacklist.conf

# This file lists those modules which we don't want to be loaded by
# alias expansion, usually so some other driver will be loaded for the
# device instead.

# evbug is a debug tool that should be loaded explicitly
blacklist evbug

# these drivers are very simple, the HID drivers are usually preferred
blacklist usbmouse
blacklist usbkbd

# replaced by e100
blacklist eepro100

# replaced by tulip
blacklist de4x5

# causes no end of confusion by creating unexpected network interfaces
blacklist eth1394

# snd_intel8x0m can interfere with snd_intel8x0, doesn't seem to support much
# hardware on its own (Ubuntu bug #2011, #6810)
blacklist snd_intel8x0m

# Conflicts with dvb driver (which is better for handling this device)
blacklist snd_aw2

# replaced by p54pci
blacklist prism54

# replaced by b43 and ssb.
blacklist bcm43xx

# most apps now use garmin usb driver directly (Ubuntu: #114565)
blacklist garmin_gps

# replaced by asus-laptop (Ubuntu: #184721)
blacklist asus_acpi

# low-quality, just noise when being used for sound playback, causes
# hangs at desktop session start (Ubuntu: #246969)
blacklist snd_pcsp

# ugly and loud noise, getting on everyone's nerves; this should be done by a
# nice pulseaudio bing (Ubuntu: #77010)
blacklist pcspkr

# EDAC driver for amd76x clashes with the agp driver preventing the aperture
# from being initialised (Ubuntu: #297750). Blacklist so that the driver
# continues to build and is installable for the few cases where its
# really needed.
blacklist amd76x_edac
S. Y. Lerner avatar
pk flag
A silly thing to check, but does your laptop have either a privacy shutter or a disable webcam switch or a disable webcam hotkey? If so, make sure it didn't get activated.
uz flag
Jos
I disagree with the Community Bot. The problem is clear and well documented.
waltinator avatar
it flag
Does `id` show that you're in the `video` group? [Edit] your Question to add information, don't use Comment.
uz flag
Jos
@waltinator I am not in my `video` group, and `cheese` works just fine.
nobody avatar
gh flag
Is the hardware older? `env LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libv4l/v4l1compat.so /usr/bin/cheese`
darth_epoxy avatar
nl flag
What is the make and model of your laptop and what is your setting at GRUB_CMDLINE_LINUX_DEFAULT=
keemahs avatar
cn flag
@nobody I got (cheese:247977): GStreamer-CRITICAL **: 16:31:02.889: gst_element_message_full_with_details: assertion 'GST_IS_ELEMENT (element)' failed.
keemahs avatar
cn flag
@darth_epoxy it cannot be the case in my opinion. My webcam was working perfect a week back, infact I was on ubuntu 20.04 only. I had too many things installed on my laptop, felt it was getting slow, so just reinstalled ubuntu from the boot disk.
darth_epoxy avatar
nl flag
I meant, open a terminal and type `gedit /etc/default/grub` then report back to us what text follows GRUB_CMDLINE_LINUX_DEFAULT= Because your issue is most likely a driver and we might be able to prove that.
keemahs avatar
cn flag
@darth_epoxy GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" and GRUB_CMDLINE_LINUX="". I have pasted the enitre output here for you - https://pastebin.com/aw5w1JBn
darth_epoxy avatar
nl flag
Try adding `nomodeset`after quiet splash and let us know if you need help doing that. The other thing to try is turniong off secure boot because it may be preventing the necessary drivers from loading at boot.
keemahs avatar
cn flag
please consider moving your comment to an answer, this actually worked for me!! I made GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" to GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset" and used https://wiki.ubuntu.com/UEFI/SecureBoot/DKMS to disable secure boot
jsbueno avatar
my flag
So - another "silly suggestion" - just got some 20 minutes hunting, even going down to a reboot - just to findout the notebook I am using has a physical switch to cover the sensor - check the answer at https://askubuntu.com/questions/1296971/camera-showing-black-in-ubuntu-18-04-on-a-lenovo-l490
Score:2
it flag

Many device access problems can be resolved through group membership changes.

Do ls -l /dev/video

Specifically, if ls -l shows that the group permissions (the second "rwx" triplet) is "rw" (e.g."-rw-rw----"), then, adding oneself to the group that owns the device will grant rw access.

Here's how:

device="/dev/video"
sudo adduser $USER $(stat -c "%G" $device)

This allows you membership in the group that can rw the device, but there is one more step.

To make all your processes members of the new group, logout and login. Group memberships are set up at login time.

keemahs avatar
cn flag
thanks...but this didn't work for me...everything is still the same..
Score:1
nl flag

Adding nomodeset after quiet splash in your GRUB will fix it for now (retrosepective answer).
Save the file and use update-grub to make the change permanent.
Also, turn off secure boot because it may be preventing the necessary drivers from loading at boot.
Here is a link to help you disable secure boot

sunxd avatar
in flag
could you explain how to do that exactly?
darth_epoxy avatar
nl flag
Open a termial and type`sudo gedit /etc/default/grub` then tell us what text currently lies to the right of GRUB_CMDLINE_LINUX_DEFAULT=
Score:0
va flag

I know this sounds stupid, but it's worth a try.

Some laptop models have a physical shutter, so the reason for the black screen is because the shutter's closed.

You can usually open it with a finger by sliding it to the right/left.

Score:0
pk flag

A silly thing to check, but does your laptop have either a privacy shutter or a disable webcam switch or a disable webcam hotkey? If so, make sure it didn't get activated.

pigeonburger avatar
de flag
This belongs as a comment, it's not really an answer.
Score:0
cn flag

Another silly thing to check. When you have cheese open, go to the Preferences and check your sliders for Brightness, Contrast, Saturation, and Hue. enter image description here

If they are out of position, please move the sliders to the reference position in the middle.

keemahs avatar
cn flag
this isn't the issue, thanks though...
mondotofu avatar
cn flag
Have you ruled out an issue with the USB port by plugging the webcam into a different USB port?
keemahs avatar
cn flag
my webcam is "built" into my laptop...
keemahs avatar
cn flag
@TBr here is the output - https://pastebin.com/g11JJm1h
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.