Bug 1201907 - Video does not start - any USB-camera
Summary: Video does not start - any USB-camera
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: zbar
Version: 21
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Douglas Schilling Landgraf
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-03-13 18:36 UTC by Alex. H. F.
Modified: 2015-06-13 06:39 UTC (History)
5 users (show)

Fixed In Version: zbar-0.10-22.fc22
Clone Of:
Environment:
Last Closed: 2015-06-13 06:39:13 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
dmesg listing - careca (5.03 KB, text/plain)
2015-04-23 20:52 UTC, Alex. H. F.
no flags Details
zbarcam --verbose=8 - careca (3.41 KB, text/plain)
2015-04-23 20:56 UTC, Alex. H. F.
no flags Details
Fix REQBUF logic (4.56 KB, patch)
2015-04-24 02:51 UTC, Mauro Carvalho Chehab
no flags Details | Diff
debug output - Douglas build Sat, 25 Apr 2015 21:28:36 UTC (3.80 KB, text/plain)
2015-04-26 11:03 UTC, Alex. H. F.
no flags Details
dmesg - Douglas build (Sat, 25 Apr 2015 21:28:36 UTC) (132.07 KB, text/plain)
2015-04-26 11:07 UTC, Alex. H. F.
no flags Details

Description Alex. H. F. 2015-03-13 18:36:32 UTC
Description of problem:

Video does not start for any USB-camera

Verbose log:
zbarcam -v /dev/video0 
_zbar_video_open: opened camera device /dev/video0 (fd=5)
_zbar_v4l2_probe: Lenovo EasyCamera on usb-0000:00:1a.0-1.6 driver uvcvideo (version 3.18.8)
_zbar_v4l2_probe:     capabilities: CAPTURE READWRITE STREAMING
v4l2_reset_crop: crop bounds: 640 x 480 @ (0, 0)
v4l2_reset_crop: current crop win: 640 x 480 @ (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: current format: YUYV(56595559) 640 x 480 (line=0x500 size=0x96000)
_zbar_v4l2_probe: using I/O mode: MMAP
_zbar_window_probe_xv: XVideo extension version 2.2
xv_probe_port: probing port 145 with 1 encodings:
xv_probe_port: max XV_IMAGE size 8192x8192
xv_probe_port: 5 image formats
xv_probe_port: probing port 161 with 1 encodings:
xv_probe_port: max XV_IMAGE size 8192x8192
xv_probe_port: 3 image formats
v4l2_set_format: set new format: YUYV(56595559) 640 x 480 (0x96000)
v4l2_mmap_buffers: mapping 4 buffers (of 4 requested)


Version-Release number of selected component (if applicable):

0.10-21.fc21


How reproducible:
alwyays

Steps to Reproduce:
1. start zbar with: zbarcam /dev/video0
2. 
3. 

Actual results:
zbar video-window opens
no video

Expected results:
video for scanning should open

Additional info:
Worked with FC20.

Comment 1 teppot 2015-04-08 20:24:37 UTC
The patch from here is said to fix this:

https://bugs.archlinux.org/task/44091

Since there hasn't been an upstream release in over five years, can we please include this in Fedora.

Comment 2 Douglas Schilling Landgraf 2015-04-09 21:00:17 UTC
Hi Mauro,

The patch pointed in comment#1 looks good to me, do you mind to review it?

Thanks!

Comment 3 Douglas Schilling Landgraf 2015-04-23 02:13:00 UTC
Hello careca/teppot,

Do you mind to test the scratch-build which includes the patch?
http://koji.fedoraproject.org/koji/taskinfo?taskID=9541850

Thanks!

Comment 4 teppot 2015-04-23 06:51:50 UTC
(In reply to Douglas Schilling Landgraf from comment #3)
> Do you mind to test the scratch-build which includes the patch?

I can confirm that it works now. Thanks!

Comment 5 Alex. H. F. 2015-04-23 17:33:59 UTC
Hi Douglas,
I installed zbar-0.10-22.fc23.x86_64.rpm from your build in my FC21, but I could not see any improvements.
May I need to take care of any dependencies?

$ yum list installed zbar*
Installierte Pakete
zbar.x86_64     0.10-22.fc23    @@commandline

Comment 6 Mauro Carvalho Chehab 2015-04-23 17:58:13 UTC
Careca's bug seems different than teppot.

On teppot, it is using USERPTR mode, while, on careca's log, it is using MMAP.

So, the fix should be different.

That's said, the logs that careca provided don't show any error (well, except for the non-fatal warning that S_CROP failed).

Careca, could you please try to produce a more verbose log? Perhaps
   zbarcam --verbose=8

will provide more info.

It also helps if you attach the Kernel logs.

Comment 7 Douglas Schilling Landgraf 2015-04-23 18:19:04 UTC
(In reply to Mauro Carvalho Chehab from comment #6)
> Careca's bug seems different than teppot.
> 
> On teppot, it is using USERPTR mode, while, on careca's log, it is using
> MMAP.
> 
> So, the fix should be different.
> 
> That's said, the logs that careca provided don't show any error (well,
> except for the non-fatal warning that S_CROP failed).
> 
> Careca, could you please try to produce a more verbose log? Perhaps
>    zbarcam --verbose=8
> 
> will provide more info.
> 
> It also helps if you attach the Kernel logs.

Thanks for your input Mauro. Careca, could you also please enable the debug mode and send us the dmesg file?

# echo 3 > /sys/class/video4linux/video0/debug
# zbarcam --verbose=8

Comment 8 Alex. H. F. 2015-04-23 20:52:10 UTC
Created attachment 1018179 [details]
dmesg listing - careca

Comment 9 Alex. H. F. 2015-04-23 20:56:15 UTC
Created attachment 1018180 [details]
zbarcam --verbose=8   - careca

Comment 10 Mauro Carvalho Chehab 2015-04-24 02:07:48 UTC
(In reply to careca from comment #9)
> Created attachment 1018180 [details]
> zbarcam --verbose=8   - careca

You forgot to add the output of the "dmesg" command. It should contain Kernel messages like:

[266184.632969] video0: open (0)
[266184.633432] video0: VIDIOC_QUERYCAP: driver=uvcvideo, card=Sirius USB2.0 Camera, bus=usb-0000:00:1d.0-1.5.2.2, version=0x00031303, capabilities=0x84200001, device_caps=0x04200001
[266184.633524] video0: VIDIOC_QUERYCAP: driver=uvcvideo, card=Sirius USB2.0 Camera, bus=usb-0000:00:1d.0-1.5.2.2, version=0x00031303, capabilities=0x84200001, device_caps=0x04200001
...

Comment 11 Mauro Carvalho Chehab 2015-04-24 02:14:50 UTC
(In reply to Mauro Carvalho Chehab from comment #10)
> (In reply to careca from comment #9)
> > Created attachment 1018180 [details]
> > zbarcam --verbose=8   - careca
> 
> You forgot to add the output of the "dmesg" command. It should contain
> Kernel messages like:
> 
> [266184.632969] video0: open (0)
> [266184.633432] video0: VIDIOC_QUERYCAP: driver=uvcvideo, card=Sirius USB2.0
> Camera, bus=usb-0000:00:1d.0-1.5.2.2, version=0x00031303,
> capabilities=0x84200001, device_caps=0x04200001
> [266184.633524] video0: VIDIOC_QUERYCAP: driver=uvcvideo, card=Sirius USB2.0
> Camera, bus=usb-0000:00:1d.0-1.5.2.2, version=0x00031303,
> capabilities=0x84200001, device_caps=0x04200001
> ...

Sorry, I looked at the wrong attachment. From what you posted, it seems that zbar is actually working, as it shows a sequence of QBUF/DQBUF.

So, at least the capture part of zbar seems to be working properly. Unfortunately, the log you paste is too small, and don't tell the history from device open.

What happens if you put a 3D barcode in front of your camera?

What video driver are you using?

Comment 12 Mauro Carvalho Chehab 2015-04-24 02:51:20 UTC
Created attachment 1018279 [details]
Fix REQBUF logic

(In reply to teppot from comment #1)
> The patch from here is said to fix this:
> 
> https://bugs.archlinux.org/task/44091
> 
> Since there hasn't been an upstream release in over five years, can we
> please include this in Fedora.
The patch above looks right, although it duplicates the part of the code that calls REQBUF, and have some minor issues with the error path.

The enclosed patch seems better. I can't test here for USRPTR, since my UVC cameras work on MMAP mode.

Comment 13 Alex. H. F. 2015-04-24 17:06:20 UTC
Hello Mauro,

Sure the recognition works properly.
Just the stream does not show in the window...

Sorry, if I wasn't precise in this aspect.

Comment 14 Douglas Schilling Landgraf 2015-04-25 22:28:48 UTC
Hi guys,

(In reply to Mauro Carvalho Chehab from comment #12)
> Created attachment 1018279 [details]
> Fix REQBUF logic
> 
> (In reply to teppot from comment #1)
> > The patch from here is said to fix this:
> > 
> > https://bugs.archlinux.org/task/44091
> > 
> > Since there hasn't been an upstream release in over five years, can we
> > please include this in Fedora.
> The patch above looks right, although it duplicates the part of the code
> that calls REQBUF, and have some minor issues with the error path.
> 
> The enclosed patch seems better. I can't test here for USRPTR, since my UVC
> cameras work on MMAP mode.

Could you please re-test the zbar with Mauro's patch?
http://koji.fedoraproject.org/koji/taskinfo?taskID=9569995

Thanks!

Comment 15 Alex. H. F. 2015-04-26 11:03:24 UTC
Created attachment 1018968 [details]
debug output - Douglas build Sat, 25 Apr 2015 21:28:36 UTC

Comment 16 Alex. H. F. 2015-04-26 11:07:24 UTC
Created attachment 1018969 [details]
dmesg - Douglas build (Sat, 25 Apr 2015 21:28:36 UTC)

Comment 17 Alex. H. F. 2015-04-26 11:13:10 UTC
Hi Douglas,
Please, get both attachments, just above this comment, taken with your last build zbar-0.10-22.fc23.x86_64.rpm (Sat, 25 Apr 2015 21:28:36 UTC).
I could not notice any changes. That means, I can scan, but still no video.

I am using FC21. Zbarcam worked properly until FC20.

Please, tell me if I can help further!  BR

Comment 18 Douglas Schilling Landgraf 2015-04-27 00:37:23 UTC
(In reply to careca from comment #17)
> Hi Douglas,
> Please, get both attachments, just above this comment, taken with your last
> build zbar-0.10-22.fc23.x86_64.rpm (Sat, 25 Apr 2015 21:28:36 UTC).
> I could not notice any changes. That means, I can scan, but still no video.
> 
> I am using FC21. Zbarcam worked properly until FC20.
> 
> Please, tell me if I can help further!  BR

Thanks Careca, that's expected. Mauro just improved the previous patch and I was wondering if you could get the same result as the previous test and you got. Now we need to focus on your problem, we had two issues here.

Comment 19 Mauro Carvalho Chehab 2015-05-13 15:56:18 UTC
(In reply to careca from comment #17)
> Hi Douglas,
> Please, get both attachments, just above this comment, taken with your last
> build zbar-0.10-22.fc23.x86_64.rpm (Sat, 25 Apr 2015 21:28:36 UTC).
> I could not notice any changes. That means, I can scan, but still no video.
> 
> I am using FC21. Zbarcam worked properly until FC20.
> 
> Please, tell me if I can help further!  BR

From your logs, expecially this:

_zbar_process_image: QR-Code: http://www.facebook.com/mathaeser (4 pts) (dir=0) (q=1) (new)

The V4L2 side is working fine. Even the QR code was properly read.

So, the problem is that the part of the zcam that displays the images, and not the part that captures the video.

What appears on your desktop? a black screen?

What's the video driver that you're using?

Comment 20 Fedora Update System 2015-06-07 00:01:20 UTC
zbar-0.10-22.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/zbar-0.10-22.fc22

Comment 21 Fedora Update System 2015-06-09 15:00:54 UTC
Package zbar-0.10-22.fc22:
* should fix your issue,
* was pushed to the Fedora 22 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing zbar-0.10-22.fc22'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-9634/zbar-0.10-22.fc22
then log in and leave karma (feedback).

Comment 22 Fedora Update System 2015-06-13 06:39:13 UTC
zbar-0.10-22.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.