zbarcam no longer works


Silent-Hunter

Hardcore Member
Joined
May 29, 2010
Messages
3,485
zbarcam has stopped working since the SuperZaxxon 1.61 update. It now does the same thing it does on my laptop:

Code:
=======================================================================================
PND             : /media/2/pandora/apps/zbarcam.pnd
PND_FSTYPE      : Squashfs
APPDATADIR      : /media/2/pandora/appdata/zbarcam
APPDD_FSTYPE    : ext3
PND_CPUSPEED    : <unset>
EXENAME         : run.sh
ARGUMENTS       : <unset>
=======================================================================================
[ START ]--- Mount the PND ----------
Mounting : mount -t squashfs -o ro "/dev/loop0" "/mnt/utmp/zbarcam"
Mounting the Union FS : mount -t aufs -o exec,dirs="/media/2/pandora/appdata/zbarcam=rw+nolwh":"/mnt/pnd/zbarcam=rr" none "/mnt/utmp/zbarcam"
[SUCCESS]--- Mount the PND ----------
[ START ]--- Starting the application ( run.sh  ) ----------
WARNING: no compatible input to output format
...trying again with output disabled
ERROR: zbar processor in zbar_processor_init():
    unsupported request: no compatible image format
[SUCCESS]--- Starting the application ( run.sh  ) ----------
[ START ]--- Restoring the frame buffer status ----------
[SUCCESS]--- Restoring the frame buffer status ----------
[ START ]--- uMount the PND ----------
[ START ]--- Waiting the Union to be available ----------
[SUCCESS]--- Waiting the Union to be available ----------
auplink:plink.c:223: AUFS_CTL_PLINK_MAINT: Inappropriate ioctl for device
rmdir: failed to remove `/mnt/utmp/zbarcam': Device or resource busy
[ START ]--- Waiting the PND mount dir to be free ----------
[SUCCESS]--- Waiting the PND mount dir to be free ----------
cleanup done
[SUCCESS]--- uMount the PND ----------
=======================================================================================
Return code is : 2
 
I confirm. I have just upgraded my installation, and now both zbarcam and guvcview stopped working. I will look into this sometime next week.

PS: I have unusual messages in dmesg when I connect my webcam:

Code:
[ 1524.504699] usb 2-2: new high-speed USB device number 3 using ehci-omap
[ 1524.703399] usb 2-2: New USB device found, idVendor=0c45, idProduct=6340
[ 1524.703399] usb 2-2: New USB device strings: Mfr=2, Product=1, SerialNumber=0
[ 1524.703430] usb 2-2: Product: USB 2.0 Camera
[ 1524.703430] usb 2-2: Manufacturer: Sonix Technology Co., Ltd.
[ 1524.706695] uvcvideo: Found UVC 1.00 device USB 2.0 Camera (0c45:6340)
[ 1524.720367] input: USB 2.0 Camera as /devices/platform/usbhs-omap.0/ehci-omap.0/usb2/2-2/2-2:1.0/input/input18
[ 1524.730346] 3:3:1: cannot get freq at ep 0x84
 
Last edited by a moderator:
Just to check, have you both upgraded to 1.61 stock (using one of the images), or have you used the Pandora updater to the latest version instead?  Because if the latter case, you'll also have notaz's beefy kernel update in there, which needs this sort of testing.
 
Updater as well. And my camera script still works, so mplayer can still read from the camera, it seems like other apps can't though.

Just so you know, this exact error occurs on Gentoo on my laptop with kernel 3.14.14
 
Last edited by a moderator:
Anyone have any more information on this? I'm guessing the newer kernel dropped support for something zbar used, and we have to wait for the zbar people to update it.
 
You might get more help if you posted something in the beefy kernel update thread. I doubt notaz checks each and every support thread. You might get away with just linking to this thread if you don't want to repeat everthing.
 
I keep forgetting about dmesg. Let me have a look:

Code:
[17812.075164] aufs test_add:261:mount[10957]: uid/gid/perm /mnt/pnd/zbarcam 0/0/0755, 0/0/0777
[17814.942871] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[17815.952331] ehci-omap ehci-omap.0: OMAP-EHCI Host Controller
[17815.956085] ehci-omap ehci-omap.0: new USB bus registered, assigned bus number 2
[17815.957885] ehci-omap ehci-omap.0: irq 77, io mem 0x48064800
[17815.968231] ehci-omap ehci-omap.0: USB 2.0 started, EHCI 1.00
[17815.968322] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
[17815.968353] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[17815.968353] usb usb2: Product: OMAP-EHCI Host Controller
[17815.968353] usb usb2: Manufacturer: Linux 3.2.63 ehci_hcd
[17815.968383] usb usb2: SerialNumber: ehci-omap.0
[17815.970397] hub 2-0:1.0: USB hub found
[17815.970428] hub 2-0:1.0: 3 ports detected
[17816.296447] usb 2-2: new high-speed USB device number 2 using ehci-omap
[17816.454376] usb 2-2: New USB device found, idVendor=18cd, idProduct=cafe
[17816.454406] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[17816.454406] usb 2-2: Product: Pico iCubie Webcam
[17816.454406] usb 2-2: Manufacturer: Pico Instruments LLC
[17816.454437] usb 2-2: SerialNumber: 689076698948
[17816.809570] media: Linux media interface: v0.10
[17816.833862] Linux video capture interface: v2.00
[17816.833892] WARNING: You are using an experimental version of the media stack.
[17816.833892] 	As the driver is backported to an older kernel, it doesn't offer
[17816.833892] 	enough quality for its usage in production.
[17816.833923] 	Use it with care.
[17816.833923] Latest git patches (needed if you report a bug to linux-media@vger.kernel.org):
[17816.833923] 	b250392f7b5062cf026b1423e27265e278fd6b30 [media] media: ttpci: fix av7110 build to be compatible with CONFIG_INPUT_EVDEV
[17816.833923] 	85c1abcb5251673d18325576f4923bb78af479de [media] usbtv: Make it dependent on ALSA
[17816.833923] 	66cae53024c4b73d40b4e78c557a73e082522aed [media] media: fix au0828 dvb suspend/resume to call dvb_frontend_suspend/resume
[17816.867828] uvcvideo: Found UVC 1.00 device Pico iCubie Webcam (18cd:cafe)
[17816.872680] usbcore: registered new interface driver uvcvideo
[17816.872711] USB Video Class driver (1.1.1)
[17817.611938] ehci-omap ehci-omap.0: remove, state 1
[17817.611968] usb usb2: USB disconnect, device number 1
[17817.611968] usb 2-2: USB disconnect, device number 2
[17817.640350] ehci-omap ehci-omap.0: USB bus 2 deregistered
 
I took a look at zbarcam today and it seems to fail during ioctl call VIDIOC_S_FMT, with EBUSY error code. It's like a data transfer starts before the call, and it's too late to change the format.

_zbar_video_open: opened camera device /dev/video0 (fd=6)

_zbar_v4l2_probe: USB 2.0 Camera on usb-ehci-omap.0-2 driver uvcvideo (version 3.17.0)

_zbar_v4l2_probe:     capabilities: CAPTURE STREAMING

v4l2_reset_crop: crop bounds: 320 x 240 @ (0, 0)

v4l2_reset_crop: current crop win: 320 x 240 @ (0, 0) aspect 1 / 1

ERROR: zbar video in v4l2_reset_crop():

    system error: setting default crop window (VIDIOC_S_CROP): Inappropriate ioctl for device (25)

v4l2_probe_formats: enumerating supported formats:

v4l2_probe_formats:     [0] YUYV : YUV 4:2:2 (YUYV)

v4l2_probe_formats: current format: YUYV(56595559) 320 x 240 (line=0x280 size=0x25800)

_zbar_v4l2_probe: using I/O mode: USERPTR

_zbar_window_probe_xv: XVideo extension version 2.2

_zbar_window_probe_xv:     adaptor[0] 1 ports 62-62 type=0x11 fmts=1 : OMAP XV adaptor

xv_probe_port: probing port 62 with 1 encodings:

xv_probe_port:     [0] 800 x 480 rate=1/1 : XV_IMAGE

xv_probe_port: max XV_IMAGE size 800x480

xv_probe_port: 4 image formats

xv_probe_port:     [0] YUY2(32595559) YUV LSBFirst packed planes=1 bpp=16 : YUY2

xv_probe_port:     [1] UYVY(59565955) YUV LSBFirst packed planes=1 bpp=16 : UYVY

xv_probe_port:     [2] I420(30323449) YUV LSBFirst planar planes=3 bpp=12 : I420

xv_probe_port:     [3] YV12(32315659) YUV LSBFirst planar planes=3 bpp=12 : YV12

zbar_negotiate_format: setting best format YUYV(56595559) (0)

v4l2_set_format: VIDIOC_S_FMT returned -1(16), trying interlaced...

ERROR: zbar video in v4l2_set_format():

    system error: setting format 56595559 (VIDIOC_S_FMT): Device or resource busy (16)

WARNING: no compatible input to output format

...trying again with output disabled

zbar_negotiate_format: setting best format YUYV(56595559) (24)

v4l2_set_format: VIDIOC_S_FMT returned -1(16), trying interlaced...

ERROR: zbar video in v4l2_set_format():

    system error: setting format 56595559 (VIDIOC_S_FMT): Device or resource busy (16)

zbar_processor_init: ERROR: no compatible video input format

ERROR: zbar processor in zbar_processor_init():

    unsupported request: no compatible image format

ERROR: zbar processor in zbar_processor_init():

    unsupported request: no compatible image  

I wonder why this happens, as zbarcam is quite stable and works perfectly on my laptop (Debian-i386).
 
Last edited by a moderator:
Looks like some issue with UVC driver to me, but I don't have any devices to test. There are multiple paths that return EBUSY, so I've added kernel prints there, somebody needs to copy the modules from attached zip to /lib/modules/3.2.63/kernel/drivers/media/v4l2-core/videodev.ko and /lib/modules/3.2.63/kernel/drivers/media/usb/uvc/uvcvideo.ko , try again report back with dmesg.

modules.zip
 

Attachments

  • modules.zip
    113.8 KB · Views: 161
Ok, I just tried out these modules. The "uvc_v4l2_set_format: queue already allocated" error gets triggered 4 times -- exactly the number of attempts zbarcam is taking before giving up.

Full log:

[26944.628570] aufs test_add:261:mount[3231]: uid/gid/perm /mnt/pnd/zbarcam 0/0/0755, 0/0/0777

[26945.061859] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver

[26946.068023] ehci-omap ehci-omap.0: OMAP-EHCI Host Controller

[26946.068054] sched: RT throttling activated

[26946.073608] ehci-omap ehci-omap.0: new USB bus registered, assigned bus number 2

[26946.074920] ehci-omap ehci-omap.0: irq 77, io mem 0x48064800

[26946.083709] ehci-omap ehci-omap.0: USB 2.0 started, EHCI 1.00

[26946.083801] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002

[26946.083831] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1

[26946.083831] usb usb2: Product: OMAP-EHCI Host Controller

[26946.083831] usb usb2: Manufacturer: Linux 3.2.63 ehci_hcd

[26946.083831] usb usb2: SerialNumber: ehci-omap.0

[26946.085693] hub 2-0:1.0: USB hub found

[26946.085693] hub 2-0:1.0: 3 ports detected

[26946.412078] usb 2-2: new high-speed USB device number 2 using ehci-omap

[26946.610504] usb 2-2: New USB device found, idVendor=0c45, idProduct=6340

[26946.610534] usb 2-2: New USB device strings: Mfr=2, Product=1, SerialNumber=0

[26946.610534] usb 2-2: Product: USB 2.0 Camera

[26946.610565] usb 2-2: Manufacturer: Sonix Technology Co., Ltd.

[26947.274169] media: Linux media interface: v0.10

[26947.291564] Linux video capture interface: v2.00

[26947.291564] WARNING: You are using an experimental version of the media stack.

[26947.291564] As the driver is backported to an older kernel, it doesn't offer

[26947.291595] enough quality for its usage in production.

[26947.291595] Use it with care.

[26947.291595] Latest git patches (needed if you report a bug to linux-media@vger.kernel.org):

[26947.291595] b250392f7b5062cf026b1423e27265e278fd6b30 media: ttpci: fix av7110 build to be compatible with CONFIG_INPUT_EVDEV

[26947.291595] 85c1abcb5251673d18325576f4923bb78af479de usbtv: Make it dependent on ALSA

[26947.291595] 66cae53024c4b73d40b4e78c557a73e082522aed media: fix au0828 dvb suspend/resume to call dvb_frontend_suspend/resume

[26947.354675] uvcvideo: Found UVC 1.00 device USB 2.0 Camera (0c45:6340)

[26947.372589] input: USB 2.0 Camera as /devices/platform/usbhs-omap.0/ehci-omap.0/usb2/2-2/2-2:1.0/input/input8

[26947.373962] usbcore: registered new interface driver uvcvideo

[26947.373962] USB Video Class driver (1.1.1)

[26947.415527] 2:3:1: cannot get freq at ep 0x84

[26947.438507] usbcore: registered new interface driver snd-usb-audio

[26947.800811] uvc_v4l2_set_format: queue already allocated

[26947.828704] uvc_v4l2_set_format: queue already allocated

[26947.856719] uvc_v4l2_set_format: queue already allocated

[26947.884948] uvc_v4l2_set_format: queue already allocated

[26948.020294] ehci-omap ehci-omap.0: remove, state 1

[26948.020324] usb usb2: USB disconnect, device number 1

[26948.020324] usb 2-2: USB disconnect, device number 2

[26948.067382] ehci-omap ehci-omap.0: USB bus 2 deregistered
 
Last edited by a moderator:
It seems the driver doesn't like if VIDIOC_REQBUFS is done before VIDIOC_S_FMT, it then reports busy to some requests. Try commenting out v4l2_probe_iomode() call in zbar/video/v4l2.c and just set vdo->iomode to VIDEO_USERPTR.

Alternatively v4l2_probe_iomode() should close vdo->fd and open it again on exit, so that the driver frees those buffers.

Another alternative that might work is to set rb.count to 0, on the line where "FIXME workaround broken drivers" comment is.
 
Hi there,

I have tried a couple of notaz' suggestions, but with no luck so far. Didn't have time to debug this properly.

Meanwhile there is another program that stopped working since the update - guvcview (camcoder pnd). It doesn't fail, but only gets black frames from the webcam, fps counter is alive. Here's the output of guvcview, with no apparent cause of failure:

guvcview 1.5.0

video device: /dev/video0 

Init. USB 2.0 Camera (location: usb-ehci-omap.0-2)

{ pixelformat = 'YUYV', description = 'YUV 4:2:2 (YUYV)' }

{ discrete: width = 640, height = 480 }

Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, 

{ discrete: width = 352, height = 288 }

Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, 

{ discrete: width = 320, height = 240 }

Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, 

{ discrete: width = 176, height = 144 }

Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, 

{ discrete: width = 160, height = 120 }

Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, 

{ discrete: width = 1280, height = 960 }

Time interval between frame: 1/9, 1/5, 

{ discrete: width = 1280, height = 1024 }

Time interval between frame: 1/9, 1/5, 

{ pixelformat = 'RGB3', description = 'RGB3' }

{ discrete: width = 640, height = 480 }

Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, 

{ discrete: width = 352, height = 288 }

Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, 

{ discrete: width = 320, height = 240 }

Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, 

{ discrete: width = 176, height = 144 }

Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, 

{ discrete: width = 160, height = 120 }

Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, 

{ discrete: width = 1280, height = 960 }

Time interval between frame: 1/9, 1/5, 

{ discrete: width = 1280, height = 1024 }

Time interval between frame: 1/9, 1/5, 

{ pixelformat = 'BGR3', description = 'BGR3' }

{ discrete: width = 640, height = 480 }

Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, 

{ discrete: width = 352, height = 288 }

Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, 

{ discrete: width = 320, height = 240 }

Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, 

{ discrete: width = 176, height = 144 }

Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, 

{ discrete: width = 160, height = 120 }

Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, 

{ discrete: width = 1280, height = 960 }

Time interval between frame: 1/9, 1/5, 

{ discrete: width = 1280, height = 1024 }

Time interval between frame: 1/9, 1/5, 

{ pixelformat = 'YU12', description = 'YU12' }

{ discrete: width = 640, height = 480 }

Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, 

{ discrete: width = 352, height = 288 }

Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, 

{ discrete: width = 320, height = 240 }

Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, 

{ discrete: width = 176, height = 144 }

Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, 

{ discrete: width = 160, height = 120 }

Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, 

{ discrete: width = 1280, height = 960 }

Time interval between frame: 1/9, 1/5, 

{ discrete: width = 1280, height = 1024 }

Time interval between frame: 1/9, 1/5, 

{ pixelformat = 'YV12', description = 'YV12' }

{ discrete: width = 640, height = 480 }

Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, 

{ discrete: width = 352, height = 288 }

Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, 

{ discrete: width = 320, height = 240 }

Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, 

{ discrete: width = 176, height = 144 }

Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, 

{ discrete: width = 160, height = 120 }

Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5, 

{ discrete: width = 1280, height = 960 }

Time interval between frame: 1/9, 1/5, 

{ discrete: width = 1280, height = 1024 }

Time interval between frame: 1/9, 1/5, 

vid:0c45 

pid:6340 

driver:uvcvideo

checking format: 1448695129

fps is set to 1/30

drawing controls

 

fps is set to 1/30

no codec detected for H264

Checking video mode 640x480@32bpp : OK 

 Could not grab image (select timeout): Success

 Could not grab image (select timeout): Success

q pressed - Quiting...

Interestingly, the only dmesg messages for this program are


[ 295.004852] 2:3:1: cannot get freq at ep 0x84
[ 295.023773] 2:3:1: cannot get freq at ep 0x84

I have the modified drivers from the zip above installed.
 
So VIDIOC_S_FMT is still failing for zbarcam?

Looks like this needs some heavier kernel debugging work with hardware, perhaps some incompatibility with old kernel base, or they have a regression in mainline.

I could revert the new media driver import, but I know there are at least 3 people who use USB TV sticks that the new media drivers enabled, so that would screw them up. Using part of the drivers from old kernel and others from new is also not an option, because basically the whole media subsystem is changed with the new one, and old drivers won't load on top of that.

Don't really know what to do here.
 
Well, I haven't tried to recompile zbar with the changes you mentioned. Mainly because I've no experience with C. But I think dimag0g did.
 
Hi there,

I'm in a bit of a trouble right now: I was denied to leave the nice country of Kazakhstan because of the sloppy work our HR did with my papers which I didn't bother to double check. So just let me pass the fucking trial, pay the fine, get a new ticket to France, and then I will hopefully be able to think straight again...
 
Last edited by a moderator:
Back
Top