Bug 46668

Summary: HAL does not recognize Video4Linux device created by vloopback
Product: hal Reporter: Mike.Linda <Mike.Linda>
Component: haldAssignee: David Zeuthen (not reading bugmail) <zeuthen>
Status: NEW --- QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: output from the lshal command
output from the hal-device command
copy of my /sys/devices

Description Mike.Linda@nasa.gov 2012-02-26 21:11:29 UTC
Created attachment 57696 [details]
output from the lshal command

Video from an external Firewire camera does not display in Cheese, WebcamStudio, or Skype.

Guided by Help in Cheese, I was going to file a bug against Cheese, but then found https://bugzilla.gnome.org/show_bug.cgi?id=545190 and that led me to https://bugs.freedesktop.org/show_bug.cgi?id=17143 .  The problem, as I observe it, seems to be almost identical to what Rob Kennedy described in those bugs.  The main difference between his and mine seems to be a different make and model camera and I cannot use Coriander because (as the error pop-up from Coriander tells me) my camera is compliant with the AV/C protocol, not with Digital Camera specs.  Other than that, Rob Kennedy's experience, described in those previous bugs, seems to parallel mine.

My setup:

>  Canon Optura 40 MiniDV Camcorder camera connected using a Firewire (IEEE 1394) cable.
>  I/O Port: PCMCIA card (Rosewill RC-603, card with two USB and two Firewire ports).
>  Laptop: Dell Inspiron 4150, Mobile Pentium 4, 2.20 GHz.
>  Linux OS: Ubuntu 10.04 LTS Lucid Lynx (fully updated).


I followed a number of recommendations on the web and...

1. Got gstreamer-properties to display video from the camera.  It involved 
   installing vloopback.  Here is how I run gstreamer-properties:

     sudo dv4lstart gstreamer-properties 

       And the selections on the Video tab, under Default Input are as follows:

         Plugin: Video for Linux (v4l)
         Device: DV4Linux dv1394 to V4L

   The video from the camera appears fine using gstreamer-properties.

2. Kino (started up on the command line like this: "sudo dv4lstart kino") 
   permits me to capture video from the camera, no problem there.

3. Dvgrab (started like this: "sudo dv4lstart dvgrab") works fine too; I can 
   then play back the captured video using mplayer. 

However, the following does not work:

a. Cheese (started like this: "sudo dv4lstart cheese") renders no video, 
   only a "No device found" message is shown.

   Running it with some debug turned on:

     sudo dv4lstart cheese --gst-debug-level=1 

>      0:00:00.726495698 28682  0x9cc0590 ERROR   cheese-device-monitor cheese-camera-device-monitor.c:177:cheese_camera_device_monitor_added: Fix your udev installation to include v4l_id, ignoring /dev/video1
>      0:00:00.726889629 28682  0x9cc0590 ERROR   cheese-device-monitor cheese-camera-device-monitor.c:177:cheese_camera_device_monitor_added: Fix your udev installation to include v4l_id, ignoring /dev/video3

b. Skype shows "Select webcams: no devices found" on Skype's Video Devices
   options panel.  I started Skype using this command:

      LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so /usr/bin/skype

c. WebcamStudio also does not recognize the input video stream.  When I select
   Source > DV, the following error pops up:

     DV1394 Error: BaseSrc: [dv1394src0],3, Resource not found.

   Here is WebcamStudio > About > Video Device Info:

     Device        Name                         Version   Type
     -----------   --------------------------   -------   -------
     /dev/video3   Video loopback 0 output      V4L       Output
     /dev/video2                                Unknown   Unknown
     /dev/video1                                Unknown   Unknown
     /dev/video0   Video WebcamStudio 0 input   V4L       Input


Additional info:

  ls -la /dev | grep video

    crw-------   1 root video   10, 175 2012-02-25 19:38 agpgart
    crw-rw----   1 root video   29,   0 2012-02-25 19:38 fb0
    crw-rw----+  1 root video   81,   0 2012-02-25 19:38 video0
    crw-rw----+  1 root video   81,   1 2012-02-25 19:38 video1
    crw-rw----+  1 root video   81,   2 2012-02-26 17:21 video2
    crw-rw----+  1 root video   81,   3 2012-02-26 17:21 video3

      (video0 and video1 were present from the onset; video2 and video3 
      appeared only after I installed the vloopback module using modprobe)

  lsmod | grep loop 

    vloopback     12292  0 
    videodev      34425  2 vloopback,webcamstudio 

  lsmod | grep 1394

    dv1394        15307  0 
    raw1394       22271  0 
    ohci1394      26950  4 dv1394
    ieee1394      81181  4 dv1394,raw1394,sbp2,ohci1394

  sudo dv4l

    use /dev/video3 in your webcam application

  sudo dv4l & 
  sudo /lib/udev/v4l_id /dev/video3 

    ID_V4L_VERSION=1 
    ID_V4L_PRODUCT=DV4Linux dv1394 to V4L 
    ID_V4L_CAPABILITIES=:capture: 

  udevadm info -a -p $(udevadm info -q path -n /dev/video3) 

    looking at device '/devices/virtual/video4linux/video3':
      KERNEL=="video3"
      SUBSYSTEM=="video4linux"
      DRIVER==""
      ATTR{name}=="Video loopback 0 output"
      ATTR{index}=="0"

  udevadm info -a -p $(udevadm info -q path -n /dev/dv1394/0) 

    looking at device '/devices/virtual/ieee1394_protocol/dv1394-0':
      KERNEL=="dv1394-0"
      SUBSYSTEM=="ieee1394_protocol"
      DRIVER==""

  udevadm info --query=all --name=video0 

    P: /devices/virtual/video4linux/video0
    N: video0
    S: char/81:0
    E: UDEV_LOG=3
    E: DEVPATH=/devices/virtual/video4linux/video0
    E: MAJOR=81
    E: MINOR=0
    E: DEVNAME=/dev/video0
    E: SUBSYSTEM=video4linux
    E: ID_V4L_VERSION=1
    E: ID_V4L_PRODUCT=Video WebcamStudio 0 input
    E: ID_V4L_CAPABILITIES=:
    E: ACL_MANAGE=1
    E: DEVLINKS=/dev/char/81:0


I also did the kill/restart hald, capturing new messages in /var/log/syslog:

  sudo pkill hald
  hald --daemon=yes --verbose=yes --use-syslog

> Feb 26 19:25:16 Inspiron-4150 hald[31019]: 19:25:16.200 [I] hald.c:673: hal 0.5.14
> Feb 26 19:25:16 Inspiron-4150 hald[31019]: 19:25:16.200 [I] hald.c:674: using child timeout 250s
> Feb 26 19:25:16 Inspiron-4150 hald[31019]: 19:25:16.201 [I] hald.c:683: Will daemonize
> Feb 26 19:25:16 Inspiron-4150 hald[31019]: 19:25:16.201 [I] hald.c:684: Becoming a daemon
> Feb 26 19:25:16 Inspiron-4150 hald[31020]: 19:25:16.203 [I] hald_dbus.c:5444: local server is listening at unix:abstract=/var/run/hald/dbus-CvRUjlrLas,guid=3a2fc9d44f279cb9f8dd58544f4acd6c
> Feb 26 19:25:16 Inspiron-4150 hald[31020]: 19:25:16.223 [I] hald_runner.c:304: Runner has pid 31021
> Feb 26 19:25:16 Inspiron-4150 hald[31020]: 19:25:16.232 [I] hald_runner.c:184: runner connection is 0x953f7e0
> Feb 26 19:25:16 Inspiron-4150 hald[31020]: 19:25:16.234 [D] util_helper.c:126: drop_privileges: could not set group id

And after I executed lshal on the command line, the following additional messages showed up:

> Feb 26 19:25:20 Inspiron-4150 acpid: client 30982[108:114] has disconnected
> Feb 26 19:25:20 Inspiron-4150 acpid: client connected from 31066[108:114]
> Feb 26 19:25:20 Inspiron-4150 acpid: 1 client rule loaded

There were no new messages in /var/log/messages from this activity.

Output of "lshal" attached in full.

Output of "hal-device" attached in full.

Copy of my /sys/devices attached in full.

I hope all this might provide some insight into what's happening and perhaps answer whether it is a HAL problem or something else.

Please let me know if I can provide any more info (or if I should be looking elsewhere for a fix).

Thanks!
Comment 1 Mike.Linda@nasa.gov 2012-02-26 21:12:54 UTC
Created attachment 57697 [details]
output from the hal-device command
Comment 2 Mike.Linda@nasa.gov 2012-02-26 21:14:23 UTC
Created attachment 57698 [details]
copy of my /sys/devices

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.