[SOLVED] Webcam not working on Ubuntu 22.04 12th generation laptop

Hi

I’m test first test user of us moving to Framework laptops for development as a business.

I’m setting things up for the time and encountering a few different issues.

This specific one is that the Webcam is not working on Ubuntu 22.04.2 LTS in the 12th Generation laptop.

Tried install gucview and running it.

In the app I get a blackscreen and the error guview not working

On the console

GUVCVIEW: version 2.0.7
GUVCVIEW: couldn't open /home/ddecesare/.config/guvcview2/video0 for read: No such file or directory
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: No such file or directory
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: No such file or directory
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: No such file or directory
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: No such file or directory
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: No such file or directory
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: No such file or directory
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: No such file or directory
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_dmix.c:1032:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm_route.c:877:(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:397:(_snd_pcm_oss_open) Cannot open device /dev/dsp
ALSA lib pcm_oss.c:397:(_snd_pcm_oss_open) Cannot open device /dev/dsp
ALSA lib confmisc.c:160:(snd_config_get_card) Invalid field card
ALSA lib pcm_usb_stream.c:482:(_snd_pcm_usb_stream_open) Invalid card 'card'
ALSA lib confmisc.c:160:(snd_config_get_card) Invalid field card
ALSA lib pcm_usb_stream.c:482:(_snd_pcm_usb_stream_open) Invalid card 'card'
ALSA lib pcm_dmix.c:1032:(snd_pcm_dmix_open) unable to open slave
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
control[0]:(unknown - 0x6) 0x980001 'User Controls'
control[11]:(unknown - 0x6) 0x9a0001 'Camera Controls'
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
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
V4L2_CORE: Could not grab image (select timeout): Resource temporarily unavailable

Anyone have any suggestions of what the issue might be?

Just to be sure, have you switched the camera on?
It’s the two switches on the sides of the camera, they are red when the mic and camera are cut.

Definitely have the switches set to on. Tried them both ways, if I have the camera set to off I get told there is no device installed which is a very different error to what I’m seeing above

1 Like

Adding more details as I try and work out the issue

ddecesare@Framework1:~$ v4l2-ctl --list-devices -D
Laptop Camera: Laptop Camera (usb-0000:00:14.0-7):
	/dev/video0
	/dev/video1
	/dev/media0

Driver Info:
	Driver name      : uvcvideo
	Card type        : Laptop Camera: Laptop Camera
	Bus info         : usb-0000:00:14.0-7
	Driver version   : 5.19.17
	Capabilities     : 0x84a00001
		Video Capture
		Metadata Capture
		Streaming
		Extended Pix Format
		Device Capabilities
	Device Caps      : 0x04200001
		Video Capture
		Streaming
		Extended Pix Format
Media Driver Info:
	Driver name      : uvcvideo
	Model            : Laptop Camera: Laptop Camera
	Serial           : 200901010001
	Bus info         : usb-0000:00:14.0-7
	Media version    : 5.19.17
	Hardware revision: 0x00000021 (33)
	Driver version   : 5.19.17
Interface Info:
	ID               : 0x03000002
	Type             : V4L Video
Entity Info:
	ID               : 0x00000001 (1)
	Name             : Laptop Camera: Laptop Camera
	Function         : V4L2 I/O
	Flags            : default
	Pad 0x01000007   : 0: Sink
	  Link 0x02000010: from remote pad 0x100000a of entity 'Extension 4' (Video Pixel Formatter): Data, Enabled, Immutable

1 Like

(Previous answer deleted: you obviously already have the package v4l-utils, because you are using v4l2-ctl.)

Tried running (might be doing this wrong)

v4l2-ctl --device /dev/video0   --set-fmt-video=width=3840,height=2160,pixelformat=MJPG   --stream-mmap --stream-to=frame.jpg --stream-count=1

The led next to the camera comes on which it hasn’t done before. The command just hangs and a 0 byte size frame.jpg is created

1 Like

Just to eliminate a possible cause, do you have the proper permissions on /dev/video0?
And if /dev/video0 pertains to a group, are you also in that group too?

ls -al /dev/video0
crw-rw----+ 1 root video 81, 0 Jun 14 11:13 /dev/video0

Ok, are you in the video group?
Just type the command groups to find out.

I am not. I’ll try adding myself

1 Like

I’m now in the video group, have logged in and out. Nothing has changed as a result. Still seeing the same behaviors

GUVCVIEW: version 2.0.7
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: No such file or directory
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: No such file or directory
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: No such file or directory
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: No such file or directory
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: No such file or directory
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: No such file or directory
V4L2_CORE: (UVCIOC_CTRL_MAP) Error: No such file or directory
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:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm_route.c:877:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_route.c:877:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_route.c:877:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_route.c:877:(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:397:(_snd_pcm_oss_open) Cannot open device /dev/dsp
ALSA lib pcm_oss.c:397:(_snd_pcm_oss_open) Cannot open device /dev/dsp
ALSA lib confmisc.c:160:(snd_config_get_card) Invalid field card
ALSA lib pcm_usb_stream.c:482:(_snd_pcm_usb_stream_open) Invalid card 'card'
ALSA lib confmisc.c:160:(snd_config_get_card) Invalid field card
ALSA lib pcm_usb_stream.c:482:(_snd_pcm_usb_stream_open) Invalid card '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
control[0]:(unknown - 0x6) 0x980001 'User Controls'
control[11]:(unknown - 0x6) 0x9a0001 'Camera Controls'
V4L2_CORE: Could not grab image (select timeout): Resource temporarily unavailable
GUVCVIEW: (status) saving video to /home/ddecesare/my_video-3.mkv
ENCODER: add stream 0 to stream list
ENCODER: add stream 1 to stream list
ENCODER: (matroska) add seekhead entry 0 (max 10)
ENCODER: (matroska) add seekhead entry 1 (max 10)
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
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
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
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
Killed

Thank you for the assistance so far btw

No problem, sorry that it was not fruitful…
Right now I don’t have the answer to your problem, hopefully somebody else can also chime in.
As I understand, camera support should be pretty much out-of-the-box on Ubuntu 22.04, so there may be something not right, maybe hardware, who knows.
Can you also try another software, for example video inside Google Chrome?

I’ll give that a go

Tried testing it with discord and got the same behaviour of it just showing a black image.

1 Like

Ok hmm… next I would check the camera cable, and contact Support…

Hi @Dominic_DeCesare,

Linux Support Lead here. Mapeleaf did a great job with some initial testing and troubleshooting. Here’s what we know o far.

I feel like something must have changed somewhere along the line. Going to try and reproduce now. In the meantime:

  • Anything changed or added with ffmpeg outside of the standard repos?
  • We know the camera is detected as showing in your device list. The work with v4l2-ctl saved us a ton of back and forth.
  • How was GUVCVIEW installed? Specifically.
  • I also wonder if there is additional ownership/permission issues happening somewhere.

Just tol rule some stuff out:

  • Please test a Live Ubuntu 22.04 USB, test Cheese - did this work?
  • If it did, while still booted to the live USB key, connect to wifi sudo apt update && apt install guvcview - Without the changes to power savings/kernel from the guide, I am hopeful wifi won’t time out on you here, but it should maintain long enough to get the package installed.
  • Try GUVCVIEW from inside the Live USB.
1 Like

Not that I’m aware of, the only thing I believe was done before it was handed over to me was setting up secure boot.

Using apt

It’s worth noting I had the same behaviour with Teams before installing, and discord afterwards so it’s not limited to GUVCVIEW

I’ll try this next week, as I can’t try that today.

I’m wondering if the Secure Boot aspect is where the issue is here

ffmpeg is not currently installed

1 Like