Webcam not working. /dev/video0 (No such file or directory)

Bug #1521710 reported by Pedro Coca
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snappy
Expired
High
Unassigned

Bug Description

Webcam demo from the store not working on latest snappy image (not a hw-assign permission issue)

snappy info & list
==============

(amd64)ubuntu@localhost:~$ snappy info
release: ubuntu-core/15.04/stable
architecture: amd64
frameworks: docker.canonical, webdm.canonical
apps: crossbar.crossbar, webcam-demo.canonical
(amd64)ubuntu@localhost:~$ snappy list
Name Date Version Developer
ubuntu-core 2015-11-13 10 ubuntu
crossbar 2015-12-01 0.10.4 crossbar
docker 2015-12-01 1.6.2.005 canonical
webcam-demo 2015-12-01 1.0.2 canonical
webdm 2015-11-13 0.9.4 canonical
generic-amd64 2015-11-13 1.4 canonical

hw-assign
========
(amd64)ubuntu@localhost:~$ sudo snappy hw-assign webcam-demo.canonical /dev/video0
'webcam-demo.canonical' previously allowed access to '/dev/video0'. Skipping

 systemctl status
==============

(amd64)ubuntu@localhost:~$ systemctl status webcam-demo_webcam-demo_1.0.2.service
● webcam-demo_webcam-demo_1.0.2.service - webcam service that provides a webserver and takes snapshots every 10 seconds
   Loaded: loaded (/etc/systemd/system/webcam-demo_webcam-demo_1.0.2.service; enabled; vendor preset: enabled)
   Active: active (running) since Tue 2015-12-01 17:05:18 UTC; 24min ago
 Main PID: 879 (webcam-webui)
   CGroup: /system.slice/webcam-demo_webcam-demo_1.0.2.service
           ├─ 879 /bin/sh /apps/webcam-demo.canonical/1.0.2/bin/webcam-webui
           ├─ 884 golang-static-http
           └─2945 sleep 10

/dev/video0 cannot be found:

Syslog:
======

Dec 1 17:10:20 localhost ubuntu-core-launcher[879]: #033[0m#033[31mstat: No such file or directory
Dec 1 17:10:21 localhost kernel: [ 393.277710] usb 1-2: USB disconnect, device number 3
Dec 1 17:10:21 localhost systemd-udevd[379]: error opening USB device 'descriptors' file
Dec 1 17:10:23 localhost kernel: [ 394.568843] usb 1-2: new high-speed USB device number 7 using xhci_hcd
Dec 1 17:10:23 localhost kernel: [ 394.793297] usb 1-2: New USB device found, idVendor=041e, idProduct=4097
Dec 1 17:10:23 localhost kernel: [ 394.793320] usb 1-2: New USB device strings: Mfr=3, Product=1, SerialNumber=2
Dec 1 17:10:23 localhost kernel: [ 394.793335] usb 1-2: Product: Live! Cam Chat HD VF0790
Dec 1 17:10:23 localhost kernel: [ 394.793349] usb 1-2: Manufacturer: Creative Technology Ltd.
Dec 1 17:10:23 localhost kernel: [ 394.793362] usb 1-2: SerialNumber: 2015042002502
Dec 1 17:10:23 localhost kernel: [ 394.812901] hid-generic 0003:041E:4097.0004: hiddev0,hidraw0: USB HID v1.11 Device [Creative Technology Ltd. Live! Cam Chat HD VF0790] on usb-0000:00:14.0-2/input4
Dec 1 17:10:30 localhost ubuntu-core-launcher[879]: #033[0m#033[1m--- Opening /dev/video0...
Dec 1 17:10:30 localhost ubuntu-core-launcher[879]: #033[0m#033[31mstat: No such file or directory

Revision history for this message
Alexander Sack (asac) wrote :

Hi,

is any dev/videoX device created for you?

What is the last image that works with that webcam?

Revision history for this message
Pedro Coca (pcoca) wrote : Re: [Bug 1521710] Re: Webcam not working. /dev/video0 (No such file or directory)
Download full text (3.5 KiB)

On Tue, Dec 1, 2015 at 7:23 PM, Alexander Sack <email address hidden> wrote:
> Hi,
>
> is any dev/videoX device created for you?

No

> What is the last image that works with that webcam?

In V9 (2015-10-23) works fine.

> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1521710
>
> Title:
> Webcam not working. /dev/video0 (No such file or directory)
>
> Status in Snappy:
> New
>
> Bug description:
>
> Webcam demo from the store not working on latest snappy image (not a hw-assign permission issue)
>
>
> snappy info & list
> ==============
>
> (amd64)ubuntu@localhost:~$ snappy info
> release: ubuntu-core/15.04/stable
> architecture: amd64
> frameworks: docker.canonical, webdm.canonical
> apps: crossbar.crossbar, webcam-demo.canonical
> (amd64)ubuntu@localhost:~$ snappy list
> Name Date Version Developer
> ubuntu-core 2015-11-13 10 ubuntu
> crossbar 2015-12-01 0.10.4 crossbar
> docker 2015-12-01 1.6.2.005 canonical
> webcam-demo 2015-12-01 1.0.2 canonical
> webdm 2015-11-13 0.9.4 canonical
> generic-amd64 2015-11-13 1.4 canonical
>
> hw-assign
> ========
> (amd64)ubuntu@localhost:~$ sudo snappy hw-assign webcam-demo.canonical /dev/video0
> 'webcam-demo.canonical' previously allowed access to '/dev/video0'. Skipping
>
>
> systemctl status
> ==============
>
> (amd64)ubuntu@localhost:~$ systemctl status webcam-demo_webcam-demo_1.0.2.service
> ● webcam-demo_webcam-demo_1.0.2.service - webcam service that provides a webserver and takes snapshots every 10 seconds
> Loaded: loaded (/etc/systemd/system/webcam-demo_webcam-demo_1.0.2.service; enabled; vendor preset: enabled)
> Active: active (running) since Tue 2015-12-01 17:05:18 UTC; 24min ago
> Main PID: 879 (webcam-webui)
> CGroup: /system.slice/webcam-demo_webcam-demo_1.0.2.service
> ├─ 879 /bin/sh /apps/webcam-demo.canonical/1.0.2/bin/webcam-webui
> ├─ 884 golang-static-http
> └─2945 sleep 10
>
> /dev/video0 cannot be found:
>
> Syslog:
> ======
>
> Dec 1 17:10:20 localhost ubuntu-core-launcher[879]: #033[0m#033[31mstat: No such file or directory
> Dec 1 17:10:21 localhost kernel: [ 393.277710] usb 1-2: USB disconnect, device number 3
> Dec 1 17:10:21 localhost systemd-udevd[379]: error opening USB device 'descriptors' file
> Dec 1 17:10:23 localhost kernel: [ 394.568843] usb 1-2: new high-speed USB device number 7 using xhci_hcd
> Dec 1 17:10:23 localhost kernel: [ 394.793297] usb 1-2: New USB device found, idVendor=041e, idProduct=4097
> Dec 1 17:10:23 localhost kernel: [ 394.793320] usb 1-2: New USB device strings: Mfr=3, Product=1, SerialNumber=2
> Dec 1 17:10:23 localhost kernel: [ 394.793335] usb 1-2: Product: Live! Cam Chat HD VF0790
> Dec 1 17:10:23 localhost kernel: [ 394.793349] usb 1-2: Manufacturer: Creative Technology Ltd.
> Dec 1 17:10:23 localhost kernel: [ 394.793362] usb 1-2: SerialNumber: 2015042002502
> Dec 1 17:10:23 localhost kernel: [ 394.812901] hid-generic 0003:041E:4097.0004: hiddev0,hidraw0...

Read more...

Revision history for this message
Pedro Coca (pcoca) wrote :

No /dev/videoX I'm afraid.

 In V9 (2015-10-23) works fine.

Revision history for this message
Oliver Grawert (ogra) wrote :

do you have the full syslog you could attach ?

Revision history for this message
Pedro Coca (pcoca) wrote :

The system has been updated automatically to version 10 and the webcam-demo has not stop working, so the issue can be observed with a fresh installation of snappy V.10.

Revision history for this message
Pedro Coca (pcoca) wrote :

syslog file attached.

Revision history for this message
Oliver Grawert (ogra) wrote :

weird, your log looks like it is capturing images:

Dec 1 19:12:03 localhost ubuntu-core-launcher[1931]: #033[0m#033[1m--- Opening /dev/video0...
Dec 1 19:12:03 localhost ubuntu-core-launcher[1931]: #033[0m#033[0mTrying source module v4l2...
Dec 1 19:12:03 localhost ubuntu-core-launcher[1931]: #033[0m#033[0m/dev/video0 opened.
Dec 1 19:12:03 localhost ubuntu-core-launcher[1931]: #033[0m#033[0mNo input was specified, using the first.
Dec 1 19:12:03 localhost ubuntu-core-launcher[1931]: #033[0m#033[0mAdjusting resolution from 384x288 to 320x240.
Dec 1 19:12:03 localhost ubuntu-core-launcher[1931]: #033[0m#033[1m--- Capturing frame...

Revision history for this message
Pedro Coca (pcoca) wrote :

Yes, because that's the syslog of the snappy V9 version install updated to V10.

The syslog of a snappy V10 direct installation cannot be attached as we reflashed it.
We can reflash the V10 image tomorrow to reproduce the bug and attached the fresh V10 install syslog.

Revision history for this message
Michael Vogt (mvo) wrote :

I tried to reproduce this issue this moring. I used a 15.04 stable v10 image (freshly flashed) and followed the exact steps from this bugreport, i.e.
$ sudo snappy install webcam-demo.canonical
$ sudo snappy hw-assign webcam-demo.canonical /dev/video0

I got the expected message:
'webcam-demo.canonical' is now allowed to access /dev/video0

and the webcam demo works just fine for me. I tried this on real hardware two times, once a fresh r10 and once on a r6->r10 upgraded system (but did all the install/assign on the r10 version).

The message you got earlier:
   'webcam-demo.canonical' previously allowed access to '/dev/video0'. Skipping
indicates that the system might be in a different state than a fresh install. Were there installs/removals or hw-assign/unassign happening before? If so there may well be a bug but any hints how to reproduce that bug would be very helpful (like a bash history with the commands that were run before the error happened).

Changed in snappy:
status: New → Incomplete
importance: Undecided → High
Revision history for this message
Pedro Coca (pcoca) wrote :

I've reproduced the issue this morning again with a fresh install of snappy Ubuntu Core V10.

Attached logs (syslog, dmesg, bash history, etc) on tar.gz file.

Revision history for this message
Oliver Grawert (ogra) wrote :

comparing the syslogs it seems that the uvcvideo driver does not get loaded ... can you attach the output of lsmod with the camera plugged in ?

Revision history for this message
Pedro Coca (pcoca) wrote :

lsmod output with the camera plugged in:

(amd64)ubuntu@localhost:~$ lsmod
Module Size Used by
nls_iso8859_1 16384 1
autofs4 40960 2
mmc_block 36864 5
hid_generic 16384 0
usbhid 53248 0
hid 110592 2 hid_generic,usbhid
psmouse 118784 0
r8169 81920 0
mii 16384 1 r8169
ahci 36864 0
libahci 32768 1 ahci
sdhci_acpi 16384 0
sdhci 45056 1 sdhci_acpi

Revision history for this message
Oliver Grawert (ogra) wrote :

does /dev/video0 show up if you manually do "sudo modprobe uvcvideo" ?

Revision history for this message
Pedro Coca (pcoca) wrote :

It does show up:

(amd64)ubuntu@localhost:~$ ls /dev/v*
/dev/vcs /dev/vcs3 /dev/vcs6 /dev/vcsa2 /dev/vcsa5 /dev/vhci
/dev/vcs1 /dev/vcs4 /dev/vcsa /dev/vcsa3 /dev/vcsa6 /dev/vhost-net
/dev/vcs2 /dev/vcs5 /dev/vcsa1 /dev/vcsa4 /dev/vga_arbiter

/dev/vfio:
vfio
(amd64)ubuntu@localhost:~$ sudo modprobe uvcvideo
modprobe: ERROR: ../libkmod/libkmod-index.c:822 index_mm_open() magic check fail: c03b3998 instead of b007f457
(amd64)ubuntu@localhost:~$ ls /dev/v*
/dev/vcs /dev/vcs3 /dev/vcs6 /dev/vcsa2 /dev/vcsa5 /dev/vhci
/dev/vcs1 /dev/vcs4 /dev/vcsa /dev/vcsa3 /dev/vcsa6 /dev/vhost-net
/dev/vcs2 /dev/vcs5 /dev/vcsa1 /dev/vcsa4 /dev/vga_arbiter /dev/video0

/dev/v4l:
by-id by-path

/dev/vfio:
vfio
(amd64)ubuntu@localhost:~$

Revision history for this message
Pedro Coca (pcoca) wrote :

After /dev/video0 shows up and using hw-assign primitive, the demo works.

Revision history for this message
Shuduo Sang (sangshuduo) wrote :

I use a Logitech C170 webcam but failed to decode the its data. But the data can be decoded by gstreamer command line "gst-launch-1.0 v4l2src device=/dev/video1 ! xvimagesink" on classic ubuntu. I suggest we continue to improve webcam demo to support more devices.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for Snappy because there has been no activity for 60 days.]

Changed in snappy:
status: Incomplete → Expired
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.