Checkbox detect an extra webcam "video1"

Bug #1830146 reported by Gene Li
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Checkbox Support Library
Fix Released
Critical
Sylvain Pineau
systemd (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Summary: System only have 1 webcam (video0) but checkbox detect an extra webcam "video1"

-----

system-product-name: Latitude 5501
GPU: 00:02.0 VGA compatible controller: Intel Corporation Device 3e9b (rev 02)
CPU: Intel(R) Core(TM) i7-9850H CPU @ 2.60GHz (12x)
bios-version: 1.0.0
system-manufacturer: Dell Inc.
Image: somerville-bionic-amd64-iso-hybrid-20180608-47

Related branches

Revision history for this message
Gene Li (genelicc) wrote :

Automatically attached

Changed in plainbox-provider-checkbox:
importance: Undecided → High
status: New → Confirmed
Revision history for this message
Gene Li (genelicc) wrote :

Automatically attached

Revision history for this message
Gene Li (genelicc) wrote :

Automatically attached

Revision history for this message
Gene Li (genelicc) wrote :

Automatically attached

Revision history for this message
Gene Li (genelicc) wrote :
Revision history for this message
Gene Li (genelicc) wrote :
Changed in plainbox-provider-checkbox:
assignee: nobody → Sylvain Pineau (sylvain-pineau)
Revision history for this message
Gene Li (genelicc) wrote :

https://certification.canonical.com/hardware/201903-26914/submission/140202/test/76249/result/10501614/

===

Format: (00000032-0002-0010-8000-00aa003)
Resolutions: 340x340

Taking multiple images using the format
Traceback (most recent call last):
  File "/tmp/nest-y_ppt4sw.d1638308f2288bbf538a20989cac250249789e6a17c46fe001795d51e9dcdee2/camera_test", line 588, in <module>
    sys.exit(getattr(camera, args.test)())
  File "/tmp/nest-y_ppt4sw.d1638308f2288bbf538a20989cac250249789e6a17c46fe001795d51e9dcdee2/camera_test", line 365, in resolutions
    suffix='.jpg', delete=False)
  File "/usr/lib/python3.6/tempfile.py", line 688, in NamedTemporaryFile
    (fd, name) = _mkstemp_inner(dir, prefix, suffix, flags, output_type)
  File "/usr/lib/python3.6/tempfile.py", line 399, in _mkstemp_inner
    fd = _os.open(file, flags, 0o600)
ValueError: embedded null byte

Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

Not a checkbox bug since udev creates two devices for the same camera. found the same problem for Sideswipe:

https://certification.canonical.com/hardware/201902-26860/submission/141671/

It's a cert blocker.

Revision history for this message
Betty Lin (bettyl) wrote :

@Sylvain

I found a similar problem when running "video1" with the error:

Traceback (most recent call last):
  File "/tmp/nest-al0bjp_e.79f904e165d58eb488e8c67fd21e8733c7b6bbc5b3fb884068140a5b06b297c8/camera_test", line 588, in <module>
    sys.exit(getattr(camera, args.test)())
  File "/tmp/nest-al0bjp_e.79f904e165d58eb488e8c67fd21e8733c7b6bbc5b3fb884068140a5b06b297c8/camera_test", line 290, in still
    self.args.quiet)
  File "/tmp/nest-al0bjp_e.79f904e165d58eb488e8c67fd21e8733c7b6bbc5b3fb884068140a5b06b297c8/camera_test", line 323, in _still_helper
    still_texture = Clutter.Texture.new_from_file(filename)
GLib.Error: gdk-pixbuf-error-quark: Image file '/tmp/camera_test_0emg6e5y.jpg' contains no data (0)

I figure out Cheese can choose video1 as camera, but checkbox can't.

u@u-Latitude-3590:~$ checkbox-cli --version
checkbox-ng: 1.4.0
checkbox-support: 0.41.0
com.canonical.ce:oem: 1.0
certification-client: 0.37.0
plainbox-provider-checkbox: 0.48.0
plainbox-provider-resource-generic: 0.40.0
plainbox-provider-sru: 1.13.0
plainbox-provider-tpm2: 1.10.0

Revision history for this message
Betty Lin (bettyl) wrote :

@Sylvain

For #9, the machine I tested which has four camera devices list in udevadm - video0, video1, video2 and video3.

When running checkbox with those camera devices, only video0 and video2 can pass the tests.

Revision history for this message
Jerry Kao (jerry.kao) wrote :

Seems it's normal that udev creates two devices for the same camera as Gene discovered with OEM image 18.04 with OEM kernel 4.15 as stock 18.04.2 and 19.04.

I found the same symptom on 201803-26172 with 18.04.2. Please refer https://paste.ubuntu.com/p/gnszvyrWtR/ and https://paste.ubuntu.com/p/Q7qMtxrwrD/
Also 201810-26509 with 19.04. Please refer https://paste.ubuntu.com/p/PZdcSdHBXD/

For 2 cameras hardware as comment#10, udev creates 4 devices in Bettey's case.

Revision history for this message
Taihsiang Ho (tai271828) wrote :
Revision history for this message
Taihsiang Ho (tai271828) wrote :

According to https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1832239/comments/3 this is caused by a kernel new feature to dump uvcvideo metadata into another separated video node in userspace.

This issue is not a checkbox bug but I personally more inclined to tweak the device parser of checkbox to meet the new kernel feature.

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

IMO it's a bug in checkbox, kernel doesn't do anything wrong.

The metadata device only has capability V4L2_CAP_META_CAPTURE, it doesn't have V4L2_CAP_VIDEO_CAPTURE, which is required for capturing video.

Please see the example in linux kernel doc and modify checkbox accordingly:
https://www.kernel.org/doc/html/latest/media/uapi/v4l/capture.c.html

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :
Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

In the goal of teaching the checkbox udev parser how to discard the metadata device node, @Gene and @Betty could you please run this command on all devices listed as video under /dev and mention the CID on the corresponding system?

v4l2-ctl --device=/dev/video0 --all
v4l2-ctl --device=/dev/video1 --all
v4l2-ctl --device=/dev/video2 --all
v4l2-ctl --device=/dev/video3 --all
...

Thanks

Revision history for this message
Betty Lin (bettyl) wrote :

@Sylvain
CID: 201711-25942
Video devices information as attached.

Changed in plainbox-provider-checkbox:
importance: High → Critical
milestone: none → 0.49.0
Revision history for this message
Gene Li (genelicc) wrote :
Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

Thanks @Gene, for this system I think it's a combo color + IR webcam for windows hello compatibility.

See https://www.dell.com/en-us/work/shop/cty/pdp/spd/latitude-15-5501-laptop/s009l550115us

"Bypass passwords: Start the workday faster by signing on with an optional fingerprint reader integrated into the power button or with the optional IR camera + Windows Hello for seamless authentication. "

Such webcams are sometimes very well designed and almost invisible in the screen chassis but a closer look can reveal the two sensors. Can you confirm it's a system with two cameras?

affects: plainbox-provider-checkbox → checkbox-support
Changed in checkbox-support:
milestone: 0.49.0 → none
milestone: none → 0.42.0
Changed in checkbox-support:
status: Confirmed → In Progress
Changed in checkbox-support:
status: In Progress → Fix Committed
Revision history for this message
Betty Lin (bettyl) wrote :

Found one new case that got the same error for video 1 with latptop - 201903-26914

Changed in checkbox-support:
status: Fix Committed → Confirmed
Changed in checkbox-support:
status: Confirmed → In Progress
Changed in checkbox-support:
status: In Progress → Fix Committed
Revision history for this message
Betty Lin (bettyl) wrote :

Verified the bug pass with latptop - 201903-26914

checkbox-ng: 1.5.0rc3
checkbox-support: 0.42.0rc2
com.canonical.ce:oem: 1.0
certification-client: 0.38.0rc2
plainbox-provider-checkbox: 0.49.0rc4
plainbox-provider-resource-generic: 0.41.0rc2
plainbox-provider-sru: 1.14.0rc1
plainbox-provider-tpm2: 1.11.0rc2

tags: added: cqa-verified
Changed in checkbox-support:
status: Fix Committed → Fix Released
Revision history for this message
Dan Streetman (ddstreet) wrote :

please reopen if this is still an issue

Changed in systemd (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.