uvcvideo doesn't work with USB webcam with linux 3.16

Bug #1362358 reported by Rocko
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Linux
Confirmed
Medium
linux (Ubuntu)
Triaged
Medium
Unassigned
Utopic
Won't Fix
Medium
Unassigned

Bug Description

uvcvideo doesn't work with linux 3.16 on at least two USB webcams.

guvcvideo shows a black screen and reports "Could not grab image" or "ignoring empty buffer".

The camera works fine with Motion or Skype in linux 3.16. guvcvideo works fine with linux 3.15.

There is more info at https://bugzilla.kernel.org/show_bug.cgi?id=81611.

ProblemType: Bug
DistroRelease: Ubuntu 14.10
Package: linux-image-3.16.0-10-generic 3.16.0-10.15
ProcVersionSignature: Ubuntu 3.16.0-10.15-generic 3.16.1
Uname: Linux 3.16.0-10-generic x86_64
ApportVersion: 2.14.6-0ubuntu2
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: rocko 1894 F.... pulseaudio
CurrentDesktop: Unity
Date: Wed Aug 27 17:26:27 2014
HibernationDevice: RESUME=UUID=e586cc1f-5429-445e-b3fa-d15a1f5b54a0
InstallationDate: Installed on 2014-08-22 (5 days ago)
InstallationMedia: Ubuntu 14.10 "Utopic Unicorn" - Alpha amd64 (20140821)
IwConfig:
 eth0 no wireless extensions.

 lo no wireless extensions.
Lsusb:
 Bus 001 Device 002: ID 0408:2fb1 Quanta Computer, Inc.
 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
 Bus 002 Device 002: ID 80ee:0021 VirtualBox USB Tablet
 Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
MachineType: innotek GmbH VirtualBox
ProcFB: 0 VESA VGA
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.16.0-10-generic root=UUID=fa1da5bc-d7d9-40bf-9d26-ad7bcf1ab6bc ro quiet splash vt.handoff=7
RelatedPackageVersions:
 linux-restricted-modules-3.16.0-10-generic N/A
 linux-backports-modules-3.16.0-10-generic N/A
 linux-firmware 1.132
RfKill:

SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 12/01/2006
dmi.bios.vendor: innotek GmbH
dmi.bios.version: VirtualBox
dmi.board.name: VirtualBox
dmi.board.vendor: Oracle Corporation
dmi.board.version: 1.2
dmi.chassis.type: 1
dmi.chassis.vendor: Oracle Corporation
dmi.modalias: dmi:bvninnotekGmbH:bvrVirtualBox:bd12/01/2006:svninnotekGmbH:pnVirtualBox:pvr1.2:rvnOracleCorporation:rnVirtualBox:rvr1.2:cvnOracleCorporation:ct1:cvr:
dmi.product.name: VirtualBox
dmi.product.version: 1.2
dmi.sys.vendor: innotek GmbH

Revision history for this message
In , rockorequin (rockorequin-linux-kernel-bugs) wrote :

Created attachment 145021
guvcview output, uvc trace output, lsusb output

guvcview used to work fine with kernel 3.15 and earlier with my laptop webcam, but with kernel 3.16 (amd64) it just shows (and captures) a black screen and reports "Could not grab image (select timeout): Resource temporarily unavailable" or "ignoring empty buffer".

With 3.15 it would complain that the resource was temporarily unavailable once or twice, but would then recover and display streaming video.

I built the kernel using the same config as the ubuntu mainline builds for 3.16.

'motion' and 'skype' are both able to capture video with 3.16, so the underlying v4l driver looks like it is working.

Is video (other) the right component to file this under?

Revision history for this message
In , chrylis (chrylis-linux-kernel-bugs) wrote :

I can confirm identical behavior on a Dell M6600 integrated webcam. The device has USB ID 1bcf:280b and is listed as "Sunplus Innovation Technology Inc.".

Revision history for this message
In , rockorequin (rockorequin-linux-kernel-bugs) wrote :

I tested and it occurs with 3.16-rc2, so it regressed fairly early on. I couldn't test with 3.16-rc1 in the VM I set up because it failed to boot.

Revision history for this message
Rocko (rockorequin) wrote :
Revision history for this message
Brad Figg (brad-figg) wrote : Status changed to Confirmed

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Would it be possible for you to test the latest upstream kernel? Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Please test the latest v3.17 kernel[0].

If this bug is fixed in the mainline kernel, please add the following tag 'kernel-fixed-upstream'.

If the mainline kernel does not fix this bug, please add the tag: 'kernel-bug-exists-upstream'.

If you are unable to test the mainline kernel, for example it will not boot, please add the tag: 'kernel-unable-to-test-upstream'.
Once testing of the upstream kernel is complete, please mark this bug as "Confirmed".

Thanks in advance.

[0] http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.17-rc2-utopic/

Changed in linux (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Incomplete
Revision history for this message
Rocko (rockorequin) wrote :

Same problem in 3.17-rc2.

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Just to confirm, booting an earlier kernel version will make this bug go away?

tags: added: kernel-bug-exists-upstream
Changed in linux (Ubuntu):
status: Incomplete → Triaged
Revision history for this message
Rocko (rockorequin) wrote :

Yes, it works fine with 3.15.10-031510-generic.

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

This issue appears to be an upstream bug, since you tested the latest upstream kernel. Would it be possible for you to open an upstream bug report[0]? That will allow the upstream Developers to examine the issue, and may provide a quicker resolution to the bug.

Please follow the instructions on the wiki page[0]. The first step is to email the appropriate mailing list. If no response is received, then a bug may be opened on bugzilla.kernel.org.

Once this bug is reported upstream, please add the tag: 'kernel-bug-reported-upstream'.

[0] https://wiki.ubuntu.com/Bugs/Upstream/kernel

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

If this issue is not already known upstream, we can perform a kernel bisect to identify the commit that introduced the regression.

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Sorry, there is already an upstream bug report :-) We can perform a bisect then

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

So, 3.16-rc2 is the first kernel that exhibts this bug, and you cannot test -rc1? If so, we can bisect between 3.15 final and 3.16-rc2. However, it may be time consuming until we find out what is preventing -rc1 from booting for you.

tags: added: performing-bisect
Revision history for this message
Rocko (rockorequin) wrote :

3.16-rc1 doesn't boot on my main laptop, either, even in recovery mode. I can see a bunch of "[169198.816426] init: plymouth-upstart-bridge respawning too fast, stopped" messages in the log.

There doesn't seem to be any interest in the upstream bug, which I reported four weeks ago - is it not the right place to report it?

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Did you not receive a response from upstream or was the response that there was no interest?

The -rc4 kernel is now out. Can you also see if this version is affected by the bug?

http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.17-rc4-utopic/

Revision history for this message
Rocko (rockorequin) wrote :

I haven't received any response from the bugzilla report (see the link I posted, https://bugzilla.kernel.org/show_bug.cgi?id=81611).

I tried 3.17-rc5 but it failed to create the /dev/videoX file, so guvcview just reported it couldn't find a video device.

Revision history for this message
Rocko (rockorequin) wrote :

With 3.17-rc6, the VM recognises the video device again, but guvcview segfaults.

Revision history for this message
Rocko (rockorequin) wrote :

I tried 3.17-rc6 on the laptop instead of in a VM, and guvcview doesn't segfault, but exhibits the same error as originally reported for 3.16 in this bug.

Revision history for this message
In , rockorequin (rockorequin-linux-kernel-bugs) wrote :

The bug is still present in both 3.16.3 and 3.17-rc6.

I started attempting to bisect, but 3.16-rc1 doesn't get past the very early boot stages on the laptop I first saw the problem on (I can't even get a tty prompt in recovery mode).

Revision history for this message
Paulo Assis (pj-assis) wrote :

Hi,
after increasing verbosity on the driver and get:
EOF on empty payload
this is consistent with the zero sized frames returned by the driver.
I'll try to install the latest media tree:
http://git.linuxtv.org/cgit.cgi/media_build.git/about/
and check if this issue is fixed upstream

I've also tested with gspca driver (eye toy camera) and it worked fine.
I'll report this at the linux media mailing list.

Regards,
Paulo

Revision history for this message
In , suse (suse-linux-kernel-bugs) wrote :

I was able to bisect and it looks like commit 61bd8fb37db948154ae01c8ed43a86633ae1d2be
introduces the black screen.

Using v3.16 and reverting 61bd8fb37db948154ae01c8ed43a86633ae1d2be works in virtualbox.

I will try to test the fix on real hardware soon.

Revision history for this message
In , suse (suse-linux-kernel-bugs) wrote :

OK, laptop test successfully finished.
with kernel v3.17-rc6 I need to revert two commits:
8a75ffb81b1c1b6949d191fbef3eaa03fd648852 [media] vb2: fix bytesused == 0 handling
and again
61bd8fb37db948154ae01c8ed43a86633ae1d2be [media] vb2: if bytesused is 0, then fill with output buffer length

Reverting both commits makes my two webcams working again.
(integrated webcam 04f2:b1b4 and external 046d:09a4)

Revision history for this message
Paulo Assis (pj-assis) wrote :

I've set a warkaround in guvcview for this buggy behaviour, if bytesused is zero guvcview will now use the length field.
It serves as a workaround but this clearly violates the v4l2 api:
http://linuxtv.org/downloads/v4l-dvb-apis/buffer.html

bytesused - ... Drivers must set this field when type refers to an input stream, ...

you can try my testing ppa:
https://code.launchpad.net/~pj-assis/+archive/ubuntu/testing/+packages

build is pending, but it should be available in an hour or so.

Revision history for this message
In , hverkuil (hverkuil-linux-kernel-bugs) wrote :

I think you hit this guvcview bug:

http://<email address hidden>/msg80144.html

So it's not a driver bug, it's a bug in the application which was exposed by the driver change.

Revision history for this message
Oleksij Rempel (olerem) wrote :
Revision history for this message
Pilot6 (hanipouspilot) wrote :
Revision history for this message
Andrew Pogrebennyk (andrew-nau-ua) wrote :

I'm not sure if this is of any help, but I've had trouble with Suyin webcam on my Asus laptop running the 3.16.0-31 kernel. Kernel 3.13.0-37.64 worked well...

Here is the hw id:
Bus 001 Device 003: ID 064e:9700 Suyin Corp.
in skype the video screen from me and remote was black and I noticed error
libv4l2: error dequeuing buf: Invalid argument
and guvcview didn't show any video either. It was just flooding the console with "Ignoring empty buffer ..." messages.

I've tried testing ppa from Paulo and after installing the following packages:
ii guvcview 2.0.1+ubuntu2~ppa1+1278-0ubuntu0~201501091246~ubuntu14.04.1 amd64 GTK+ base UVC Viewer
ii libguvcview-1.0-1:amd64 2.0.1+ubuntu2~ppa1+1278-0ubuntu0~201501091246~ubuntu14.04.1 amd64 GTK+ base UVC Viewer - runtime
the problem magically went away - in skype too..

Changed in linux (Ubuntu Utopic):
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Matthias Homann (palto) wrote :

The solution in #20 worked for me as well with kernel 3.16.0-38 on Ubuntu 14.04 .2
With the older 14.04 kernel 3.13.0-53 it also worked with the version guvcview 2.0.0 from the stable ppa.

Revision history for this message
Michel-Ekimia (michel.ekimia) wrote :

That's a real serious problem

Here on 14.04.3 fresh kernel 3.19 , no application can access the UVC webcam.

SOlution on #20 does not work on 14.04.3 , don't understand why

Revision history for this message
Rolf Leggewie (r0lf) wrote :

utopic has seen the end of its life and is no longer receiving any updates. Marking the utopic task for this ticket as "Won't Fix".

Changed in linux (Ubuntu Utopic):
status: Triaged → Won't Fix
Revision history for this message
In , suse (suse-linux-kernel-bugs) wrote :

bug report should be closed.

Changed in linux:
importance: Unknown → Medium
status: Unknown → Confirmed
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.