video: USB webcam fails since kernel 3.2
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): 20120614215359.GF3537@burratino
A message that is not in the archive (sent off-list or not yet received): CAPZXPQd9gNCxn7xGyqj_xymPaF5OxvRtxRFkt+SsLs942te4og@mail.gmail.com
A message that is not in the archive (sent off-list or not yet received): 20120616044137.GB4076@burratino
pe, 2012-06-15 kello 23:41 -0500, Jonathan Nieder kirjoitti:
Quoted 27 lines
Quoted 1 line · Martin-Éric Racine
usb 1-7: new high-speed USB device number 3 using
ehci_hcd[...]
Quoted 4 lines
usb 1-7: New USB device found, idVendor=0ac8, idProduct=0321 usb 1-7: New USB device strings: Mfr=1, Product=2, SerialNumber=0 usb 1-7: Product: USB2.0 Web Camera
usb 1-7: Manufacturer: Vimicro Corp.[...]
Quoted 5 lines
Linux media interface: v0.10
Linux video capture interface: v2.00gspca_main: v2.14.0 registeredgspca_main: vc032x-2.14.0 probing 0ac8:0321
usbcore: registered new interface driver vc032xThe device of interest is discovered.
Quoted 2 lines
gspca_main: ISOC data error: [36] len=0, status=-71gspca_main: ISOC data error: [65] len=0, status=-71[...]
Quoted 3 lines
gspca_main: ISOC data error: [48] len=0, status=-71
video_source:sr[3246]: segfault at 0 ip (null) spab36de1cerror 14 in cheese[8048000+21000]gspca_main: ISOC data error: [17] len=0, status=-71(The above data error spew starts around t=121 seconds and continues at a rate of about 15 messages per second. The segfault is around t=154.)
Quoted 7 lines
The vc032x code hasn't changed since 3.4.1, so please report your symptoms to Jean-François Moine <[email protected]>, cc-ing [email protected], [email protected], and either me or this bug log so we can track it. Be sure to mention:
- steps to reproduce, expected result, actual result, and how the difference indicates a bug (should be simple enough in this case)
1. Ensure that user 'myself' is a member of the 'video' group.
2. Launch the webcam application Cheese from the GNOME desktop.
Expected result: Cheese displays whatever this laptop's camera sees.
Actual result: Cheese crashes while attempting to access the camera.
Quoted 1 line
- how reproducible the bug is (100%?)
100%
Quoted 2 lines
- which kernel versions you have tested and result with each (what is the newest kernel version that worked?)
It probably was 3.1.0 or some earlier 3.2 release (the upcoming Debian will release with 3.2.x; 3.4 was only used here for testing purposes), but I wouldn't know for sure since I don't use my webcam too often.
Quoted 1 line
- a log from booting and reproducing the bug, or a link to one
See http://bugs.debian.org/677533
Quoted 1 line
- any other weird symptoms or observations
When testing the camera using the closed-source Skype 4.x compiled for Debian, the video preferences dialog shows that a USB 2.0 camera is found at /dev/video0. However, no image is shown. This would confirm the assumption that the issue lies with the kernel video driver, rather than with the Gstreamer framework that Cheese uses to access the camera.
Quoted 2 lines
Hopefully someone upstream will have ideas for commands to run or patches to apply to further track down the cause.
Let's indeed hope so. Thanks for providing these instructions!
Regards,
Martin-Éric
(cc-ing Hans de Goede, the new gspca maintainer. Sorry I missed that before.)
Quoted 2 lines
Quoted 2 lines
Quoted 1 line · Martin-Éric Racine
usb 1-7: new high-speed USB device number 3 using
ehci_hcd
[...]
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
usb 1-7: Product: USB2.0 Web Camera
usb 1-7: Manufacturer: Vimicro Corp.
[...]
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
gspca_main: v2.14.0 registeredgspca_main: vc032x-2.14.0 probing 0ac8:0321
[...]
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
gspca_main: ISOC data error: [36] len=0, status=-71gspca_main: ISOC data error: [65] len=0, status=-71
[...]
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
gspca_main: ISOC data error: [48] len=0, status=-71
video_source:sr[3246]: segfault at 0 ip (null) spab36de1cerror 14 in cheese[8048000+21000]gspca_main: ISOC data error: [17] len=0, status=-71
Thanks again.
If you get a chance to test Hans's media-for_v3.5 branch, that would be interesting. It works like so:
0. prerequisites:
apt-get install git build-essential
1. get the kernel history, if you don't already have it:
git clone \ git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
2. fetch gspca updates:
cd linux git remote add gspca \ git://linuxtv.org/hgoede/gspca.git git fetch gspca
3. configure, build, test:
git checkout gspca/media-for_v3.5
cp /boot/config-$(uname -r) .config; # current configuration scripts/config --disable DEBUG_INFO
make localmodconfig; # optional: minimize configuration make deb-pkg; # optionally with -j<num> for parallel build dpkg -i ../<name of package>; # as root
reboot
... test test test ...
I ask because there have been some gspca core fixes cooking that are not part of the 3.4.y tree, though none of them looks especially relevant.
Hope that helps,
Jonathan
Quoted 2 lines · Jonathan Nieder
(cc-ing Hans de Goede, the new gspca maintainer. Sorry I missed that before.)
Actually cc-ing this time. Sorry for the noise.
Quoted 2 lines
Quoted 2 lines
Quoted 1 line · Martin-Éric Racine
usb 1-7: new high-speed USB device number 3 using
ehci_hcd
[...]
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
usb 1-7: Product: USB2.0 Web Camera
usb 1-7: Manufacturer: Vimicro Corp.
[...]
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
gspca_main: v2.14.0 registeredgspca_main: vc032x-2.14.0 probing 0ac8:0321
[...]
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
gspca_main: ISOC data error: [36] len=0, status=-71gspca_main: ISOC data error: [65] len=0, status=-71
[...]
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
gspca_main: ISOC data error: [48] len=0, status=-71
video_source:sr[3246]: segfault at 0 ip (null) spab36de1cerror 14 in cheese[8048000+21000]gspca_main: ISOC data error: [17] len=0, status=-71
Thanks again.
If you get a chance to test Hans's media-for_v3.5 branch, that would be interesting. It works like so:
0. prerequisites:
apt-get install git build-essential
1. get the kernel history, if you don't already have it:
git clone \ git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
2. fetch gspca updates:
cd linux git remote add gspca \ git://linuxtv.org/hgoede/gspca.git git fetch gspca
3. configure, build, test:
git checkout gspca/media-for_v3.5
cp /boot/config-$(uname -r) .config; # current configuration scripts/config --disable DEBUG_INFO
make localmodconfig; # optional: minimize configuration make deb-pkg; # optionally with -j<num> for parallel build dpkg -i ../<name of package>; # as root
reboot
... test test test ...
I ask because there have been some gspca core fixes cooking that are not part of the 3.4.y tree, though none of them looks especially relevant.
Hope that helps,
Jonathan
2012/6/17 Martin-Éric Racine <[email protected]>:
Quoted 45 lines
pe, 2012-06-15 kello 23:41 -0500, Jonathan Nieder kirjoitti:
Quoted 27 lines
Quoted 1 line · Martin-Éric Racine
usb 1-7: new high-speed USB device number 3 using
ehci_hcd[...]
Quoted 4 lines
usb 1-7: New USB device found, idVendor=0ac8, idProduct=0321 usb 1-7: New USB device strings: Mfr=1, Product=2, SerialNumber=0 usb 1-7: Product: USB2.0 Web Camera
usb 1-7: Manufacturer: Vimicro Corp.[...]
Quoted 5 lines
Linux media interface: v0.10
Linux video capture interface: v2.00gspca_main: v2.14.0 registeredgspca_main: vc032x-2.14.0 probing 0ac8:0321
usbcore: registered new interface driver vc032xThe device of interest is discovered.
Quoted 2 lines
gspca_main: ISOC data error: [36] len=0, status=-71gspca_main: ISOC data error: [65] len=0, status=-71[...]
Quoted 3 lines
gspca_main: ISOC data error: [48] len=0, status=-71
video_source:sr[3246]: segfault at 0 ip (null) spab36de1cerror 14 in cheese[8048000+21000]gspca_main: ISOC data error: [17] len=0, status=-71(The above data error spew starts around t=121 seconds and continues at a rate of about 15 messages per second. The segfault is around t=154.)
Quoted 7 lines
The vc032x code hasn't changed since 3.4.1, so please report your symptoms to Jean-François Moine <[email protected]>, cc-ing [email protected], [email protected], and either me or this bug log so we can track it. Be sure to mention:
- steps to reproduce, expected result, actual result, and how the difference indicates a bug (should be simple enough in this case)
1. Ensure that user 'myself' is a member of the 'video' group.
2. Launch the webcam application Cheese from the GNOME desktop.Expected result: Cheese displays whatever this laptop's camera sees.
Actual result: Cheese crashes while attempting to access the camera.
Quoted 1 line
- how reproducible the bug is (100%?)
Quoted 8 lines
100%
Quoted 2 lines
- which kernel versions you have tested and result with each (what is the newest kernel version that worked?)
It probably was 3.1.0 or some earlier 3.2 release (the upcoming Debian will release with 3.2.x; 3.4 was only used here for testing purposes), but I wouldn't know for sure since I don't use my webcam too often.
I finally found time to perform further testing, using kernel packages from snapshots.debian.org, and the last one that positively worked (at least using GNOME's webcam application Cheese) was:
linux-image-3.1.0-1-686-pae 3.1.8-2
Linux 3.1 for modern PCs
This loaded the following video modules:
gspca_vc032xgspca_main
videodev
media
Tests using 3.2.1-1 or more recent crashed as described before. This at least gives us a time frame for when the regression started.
Martin-Éric
Hi,
Quoted 64 lines · Martin-Éric Racine
2012/6/17 Martin-Éric Racine <[email protected]>:
Quoted 45 lines
pe, 2012-06-15 kello 23:41 -0500, Jonathan Nieder kirjoitti:
Quoted 27 lines
Quoted 1 line · Martin-Éric Racine
usb 1-7: new high-speed USB device number 3 using
ehci_hcd[...]
Quoted 4 lines
usb 1-7: New USB device found, idVendor=0ac8, idProduct=0321 usb 1-7: New USB device strings: Mfr=1, Product=2, SerialNumber=0 usb 1-7: Product: USB2.0 Web Camera
usb 1-7: Manufacturer: Vimicro Corp.[...]
Quoted 5 lines
Linux media interface: v0.10
Linux video capture interface: v2.00gspca_main: v2.14.0 registeredgspca_main: vc032x-2.14.0 probing 0ac8:0321
usbcore: registered new interface driver vc032xThe device of interest is discovered.
Quoted 2 lines
gspca_main: ISOC data error: [36] len=0, status=-71gspca_main: ISOC data error: [65] len=0, status=-71[...]
Quoted 3 lines
gspca_main: ISOC data error: [48] len=0, status=-71
video_source:sr[3246]: segfault at 0 ip (null) spab36de1cerror 14 in cheese[8048000+21000]gspca_main: ISOC data error: [17] len=0, status=-71(The above data error spew starts around t=121 seconds and continues at a rate of about 15 messages per second. The segfault is around t=154.)
Quoted 7 lines
The vc032x code hasn't changed since 3.4.1, so please report your symptoms to Jean-François Moine <[email protected]>, cc-ing [email protected], [email protected], and either me or this bug log so we can track it. Be sure to mention:
- steps to reproduce, expected result, actual result, and how the difference indicates a bug (should be simple enough in this case)
1. Ensure that user 'myself' is a member of the 'video' group.
2. Launch the webcam application Cheese from the GNOME desktop.Expected result: Cheese displays whatever this laptop's camera sees.
Actual result: Cheese crashes while attempting to access the camera.
Quoted 1 line
- how reproducible the bug is (100%?)
Quoted 8 lines
100%
Quoted 2 lines
- which kernel versions you have tested and result with each (what is the newest kernel version that worked?)
It probably was 3.1.0 or some earlier 3.2 release (the upcoming Debian will release with 3.2.x; 3.4 was only used here for testing purposes), but I wouldn't know for sure since I don't use my webcam too often.
I finally found time to perform further testing, using kernel packages from snapshots.debian.org, and the last one that positively worked (at least using GNOME's webcam application Cheese) was:
linux-image-3.1.0-1-686-pae 3.1.8-2
Linux 3.1 for modern PCsThis loaded the following video modules:
Quoted 7 lines
gspca_vc032xgspca_main
videodev
mediaTests using 3.2.1-1 or more recent crashed as described before. This at least gives us a time frame for when the regression started.
Hmm, this is then likely caused by the new isoc bandwidth negotiation code in 3.2, unfortunately the vc032x driver is one of the few gspca drivers for which I don't have a cam to test with. Can you try to build your own kernel from source?
Boot into your own kernel, and verify the regression is still there, then edit drivers/media/video/gspca/gspca.c and go to the which_bandwidth function, and at the beginning of this function add the following line:
return 2000 * 2000 * 120;
Then rebuild and re-install the kernel and try again.
If that helps, remove the added
return 2000 * 2000 * 120;
line, and also remove the following lines from which_bandwidth:
/* if the image is compressed, estimate its mean size */
if (!gspca_dev->cam.needs_full_bandwidth &&
bandwidth < gspca_dev->cam.cam_mode[i].width *
gspca_dev->cam.cam_mode[i].height)
bandwidth = bandwidth * 3 / 8; /* 0.375 */And try again if things still work this way.
Once you've tested this I can try to write a fix for this.
Regards,
Hans
Quoted 4 lines · On Sun, 08 Jul 2012 19:58:08 +0200 Hans de Goede <[email protected]> wrote:
Hmm, this is then likely caused by the new isoc bandwidth negotiation code in 3.2, unfortunately the vc032x driver is one of the few gspca drivers for which I don't have a cam to test with. Can you try to build your own kernel from source?
Hi Martin-Éric,
Instead of re-building the gspca driver from a kernel source, you may try the gspca test tarball from my web site
http://moinejf.free.fr/gspca-2.15.18.tar.gz
It contains most of the bug fixes, including the one about the bandwidth problem.
Signature · 2 lines
Ken ar c'hentañ | ** Breizh ha Linux atav! ** Jef | http://moinejf.free.fr/
Hi,
Quoted 8 lines · Jean-Francois Moine
Quoted 4 lines · On Sun, 08 Jul 2012 19:58:08 +0200 Hans de Goede <[email protected]> wrote:
Hmm, this is then likely caused by the new isoc bandwidth negotiation code in 3.2, unfortunately the vc032x driver is one of the few gspca drivers for which I don't have a cam to test with. Can you try to build your own kernel from source?
Quoted 5 lines
Hi Martin-Éric,
Instead of re-building the gspca driver from a kernel source, you may try the gspca test tarball from my web site
http://moinejf.free.fr/gspca-2.15.18.tar.gz
That is a good option too and easier then building a whole new kernel, but:
Quoted 2 lines
It contains most of the bug fixes, including the one about the bandwidth problem.
Right, but the problem with the vc032x driver is that there no bandwidth related bugfix for it yet, which is why I asked Martin-Éric, not only to build a new gspca driver from source, but also to try some modifications.
Martin-Éric,
Building the gspca test-tarbal also is a good way to test this:
http://moinejf.free.fr/gspca-2.15.18.tar.gz
But once you've confirmed the problem still happens with that version you will still need to try the changes I suggested to gspca.c to help us confirm that this is a bandwidth issue and try to come up with a fix.
Thanks & Regards,
Hans
2012/7/8 Hans de Goede <[email protected]>:
Quoted 115 lines · Martin-Éric Racine
Quoted 82 lines
2012/6/17 Martin-Éric Racine <[email protected]>:
Quoted 62 lines
pe, 2012-06-15 kello 23:41 -0500, Jonathan Nieder kirjoitti:
Quoted 39 lines
Quoted 2 lines · Martin-Éric Racine
usb 1-7: new high-speed USB device number 3 using
ehci_hcd[...]
Quoted 5 lines
usb 1-7: New USB device found, idVendor=0ac8, idProduct=0321 usb 1-7: New USB device strings: Mfr=1, Product=2, SerialNumber=0 usb 1-7: Product: USB2.0 Web Camera
usb 1-7: Manufacturer: Vimicro Corp.[...]
Quoted 6 lines
Linux media interface: v0.10
Linux video capture interface: v2.00gspca_main: v2.14.0 registeredgspca_main: vc032x-2.14.0 probing 0ac8:0321
usbcore: registered new interface driver vc032xThe device of interest is discovered.
Quoted 2 lines
gspca_main: ISOC data error: [36] len=0, status=-71gspca_main: ISOC data error: [65] len=0, status=-71[...]
Quoted 5 lines
gspca_main: ISOC data error: [48] len=0, status=-71
video_source:sr[3246]: segfault at 0 ip (null) spab36de1cerror 14
in cheese[8048000+21000]gspca_main: ISOC data error: [17] len=0, status=-71(The above data error spew starts around t=121 seconds and continues at a rate of about 15 messages per second. The segfault is around t=154.)
Quoted 7 lines
The vc032x code hasn't changed since 3.4.1, so please report your symptoms to Jean-François Moine <[email protected]>, cc-ing [email protected], [email protected], and either me or this bug log so we can track it. Be sure to mention:
- steps to reproduce, expected result, actual result, and how the difference indicates a bug (should be simple enough in this case)
1. Ensure that user 'myself' is a member of the 'video' group.
2. Launch the webcam application Cheese from the GNOME desktop.Expected result: Cheese displays whatever this laptop's camera sees.
Actual result: Cheese crashes while attempting to access the camera.
Quoted 1 line
- how reproducible the bug is (100%?)
100%
Quoted 7 lines
Quoted 2 lines
- which kernel versions you have tested and result with each (what is the newest kernel version that worked?)
It probably was 3.1.0 or some earlier 3.2 release (the upcoming Debian will release with 3.2.x; 3.4 was only used here for testing purposes), but I wouldn't know for sure since I don't use my webcam too often.
I finally found time to perform further testing, using kernel packages from snapshots.debian.org, and the last one that positively worked (at least using GNOME's webcam application Cheese) was:
linux-image-3.1.0-1-686-pae 3.1.8-2
Linux 3.1 for modern PCsThis loaded the following video modules:
Quoted 7 lines
gspca_vc032xgspca_main
videodev
mediaTests using 3.2.1-1 or more recent crashed as described before. This at least gives us a time frame for when the regression started.
Hmm, this is then likely caused by the new isoc bandwidth negotiation code in 3.2, unfortunately the vc032x driver is one of the few gspca drivers for which I don't have a cam to test with. Can you try to build your own kernel from source?
Boot into your own kernel, and verify the regression is still there, then edit
drivers/media/video/gspca/gspca.cand go to thewhich_bandwidthfunction, and at the beginning of this function add the following line:return 2000 * 2000 * 120;
Then rebuild and re-install the kernel and try again.
If that helps, remove the added
return 2000 * 2000 * 120;
line, and also remove the following lines fromwhich_bandwidth:/* if the image is compressed, estimate its mean size */ if (!gspca_dev->cam.needs_full_bandwidth && bandwidth < gspca_dev->cam.cam_mode[i].width * gspca_dev->cam.cam_mode[i].height) bandwidth = bandwidth * 3 / 8; /* 0.375 */
Quoted 3 lines
And try again if things still work this way.
Once you've tested this I can try to write a fix for this.
Hans,
Thank you for your reply.
Just to eliminate the possibility of mistakes on my part while trying to perform the above changes, could you send me a patch against Linux 3.2.21 that I could apply as-is, before building myself a test kernel package?
Cheers!
Martin-Éric
Hi,
On 07/09/2012 01:33 PM, Martin-Éric Racine wrote:
<snip>
Quoted 27 lines
Quoted 23 lines
Hmm, this is then likely caused by the new isoc bandwidth negotiation code in 3.2, unfortunately the vc032x driver is one of the few gspca drivers for which I don't have a cam to test with. Can you try to build your own kernel from source?
Boot into your own kernel, and verify the regression is still there, then edit
drivers/media/video/gspca/gspca.cand go to thewhich_bandwidthfunction, and at the beginning of this function add the following line:return 2000 * 2000 * 120;
Then rebuild and re-install the kernel and try again.
If that helps, remove the added
return 2000 * 2000 * 120;
line, and also remove the following lines fromwhich_bandwidth:/* if the image is compressed, estimate its mean size */ if (!gspca_dev->cam.needs_full_bandwidth && bandwidth < gspca_dev->cam.cam_mode[i].width * gspca_dev->cam.cam_mode[i].height) bandwidth = bandwidth * 3 / 8; /* 0.375 */Quoted 3 lines
And try again if things still work this way.
Once you've tested this I can try to write a fix for this.
Quoted 8 lines
Hans,
Thank you for your reply.
Just to eliminate the possibility of mistakes on my part while trying to perform the above changes, could you send me a patch against Linux 3.2.21 that I could apply as-is, before building myself a test kernel package?
Erm, that is quite a bit of work from my side for something which you can easily do yourself, edit gspca.c, search for which_bandwidth and then under the following lines:
u32 bandwidth;
int i;Add a line like this:
return 2000 * 2000 * 120;
Regards,
Hans
Hi Martin-Éric,
Quoted 8 lines · Hans de Goede
Erm, that is quite a bit of work from my side for something which you can easily do yourself, edit
gspca.c, search forwhich_bandwidthand then under the following lines:u32 bandwidth; int i;Add a line like this:
return 2000 * 2000 * 120;
In case it helps, here are some more complete instructions.
0. Prerequisites:
apt-get install git build-essential
1. Get the kernel history, if you don't already have it:
git clone \ git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
2. Try linus's master:
cd linux
git fetch origin
git reset --hard origin/master
cp /boot/config-$(uname -r) .config; # current configuration scripts/config --disable DEBUG_INFO
make localmodconfig; # optional: minimize configuration make deb-pkg; # optionally with -j<num> for parallel build dpkg -i ../<name of package>; # as root
reboot
... test test test ...
Hopefully it reproduces the bug.
3. Try Hans's first suggested change, as described in the quoted text above:
cd linux
vi drivers/media/video/gspca/gspca.c
... make the suggested edits ...
make deb-pkg; # maybe with -j4
dpkg -i ../<name of package>; # as root
reboot
... test test test ...
4. Try Hans's second suggested change, as described in a previous message:
cd linux
vi drivers/media/video/gspca/gspca.c
... make the suggested edits ...
make deb-pkg; # maybe with -j4
dpkg -i ../<name of package>; # as root
reboot
... test test test ...
No doubt Jean-François will notice that it is easier to test the standalone driver because the first build does not have to compile the whole kernel. That's fine, too. The instructions above describe how to test the in-kernel driver because it's what I'm used to (and because it means you test the driver against the same version of the rest of the kernel as would get the fix).
Hope that helps,
Jonathan
Hi Jonathan,
Thank you for these detailed instructions. Find the results of my testing below:
2012/7/9 Jonathan Nieder <[email protected]>:
Quoted 13 lines
Quoted 8 lines · Hans de Goede
Erm, that is quite a bit of work from my side for something which you can easily do yourself, edit
gspca.c, search forwhich_bandwidthand then under the following lines:u32 bandwidth; int i;Add a line like this:
return 2000 * 2000 * 120;In case it helps, here are some more complete instructions.
Quoted 8 lines
0. Prerequisites:
apt-get install git build-essential
1. Get the kernel history, if you don't already have it:
git clone \ git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Cloned up to the following commit:
commit 2437fccfbfc83bcb868ccc7fdfe2b5310bf07835
Merge: 6c6ee53 d92d95b6
Author: Linus Torvalds <[email protected]>
Date: Mon Jul 9 13:43:02 2012 -0700
Merge tag 'regulator-3.5' ofgit://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator
Quoted 13 lines
2. Try linus's master:
cd linux
git fetch origin
git reset --hard origin/master
cp /boot/config-$(uname -r) .config; # current configurationscripts/config--disableDEBUG_INFO
make localmodconfig; # optional: minimize configuration make deb-pkg; # optionally with -j<num> for parallel build dpkg -i ../<name of package>; # as root
reboot
... test test test ...
Quoted 1 line
Hopefully it reproduces the bug.
Fails as previously.
Quoted 2 lines
3. Try Hans's first suggested change, as described in the quoted text above:
/* compute the minimum bandwidth for the current transfer */ static u32 which_bandwidth(struct gspca_dev *gspca_dev)
{
u32 bandwidth;
int i;
return 2000 * 2000 * 120;
/* get the (max) image size */Quoted 7 lines
cd linux
vidrivers/media/video/gspca/gspca.c
... make the suggested edits ...
make deb-pkg; # maybe with -j4
dpkg -i ../<name of package>; # as root
reboot
... test test test ...
The camera works again in Cheese, at least some of the time. Other times, launching Cheese immediately crashes GNOME, which restarts the X.org server.
However, with Skype 4.0.0.7, it only shows a green square, instead of the camera's output.
Quoted 10 lines
4. Try Hans's second suggested change, as described in a previous message:
cd linux
vidrivers/media/video/gspca/gspca.c
... make the suggested edits ...
make deb-pkg; # maybe with -j4
dpkg -i ../<name of package>; # as root
reboot
... test test test ...
This produces a severely distorted image for a few seconds, then Cheese crashes; GNOME itself survives.
Meanwhile, Skype 4.0.0.7 shows a black square, instead of the camera's output.
I hope that the above already provides some usable answers.
Martin-Éric
On Tue, 10 Jul 2012 15:56:08 +0300 Martin-Éric Racine <[email protected]> wrote:
[snip]
Quoted 1 line
I hope that the above already provides some usable answers.
Not a lot :(
Well, I already saw these errors -71. One case was a cable problem. An other one occurred with skype only, while vlc worked correctly.
So, it would be interesting to know if the (almost) last driver works. Then, you may try the gspca-2.15.18.tar.gz from my web site:
wget http://moinejf.free.fr/gspca-2.15.18.tar.gz tar -zxf gspca-2.15.18.tar.gz cd gspca-2.15.18 make su make install reboot
You may then try cheese. For skype, don't forget to force the use of the v4l library:
export LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so skype
If the problem is still there, I'd be glad to get some traces. For that, as root, do:
echo 0x1f > /sys/module/gspca_main/parameters/debug
then, unplug/replug the webcam, do some capture until the problem occurs, and send us the last kernel messages starting from the webcam probe.
Thanks.
Signature · 2 lines
Ken ar c'hentañ | ** Breizh ha Linux atav! ** Jef | http://moinejf.free.fr/
2012/7/10 Jean-Francois Moine <[email protected]>:
Quoted 7 lines
So, it would be interesting to know if the (almost) last driver works. Then, you may try the gspca-2.15.18.tar.gz from my web site:
wget http://moinejf.free.fr/gspca-2.15.18.tar.gz tar -zxf gspca-2.15.18.tar.gz cd gspca-2.15.18 make
$ LC_ALL=C make make -C /lib/modules/3.5.0-rc6+/build M=/home/perkelix/gspca-2.15.18/build modules make: *** /lib/modules/3.5.0-rc6+/build: No such file or directory. Stop. make: *** [modules] Error 2
Quoted 9 lines
su
make install
rebootYou may then try cheese. For skype, don't forget to force the use of the v4l library:
export LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so skype
I don't recall Skype having required this in a long time. As I already said, until recently, the camera "just worked".
Quoted 6 lines
If the problem is still there, I'd be glad to get some traces. For that, as root, do:
echo 0x1f > /sys/module/gspca_main/parameters/debugthen, unplug/replug the webcam,
No can do; this is an internal webcam.
Martin-Éric
On Wed, 11 Jul 2012 10:02:27 +0300 Martin-Éric Racine <[email protected]> wrote:
[snip]
Quoted 10 lines
Quoted 4 lines
wget http://moinejf.free.fr/gspca-2.15.18.tar.gz tar -zxf gspca-2.15.18.tar.gz cd gspca-2.15.18 make$ LC_ALL=C make make -C /lib/modules/3.5.0-rc6+/build M=/home/perkelix/gspca-2.15.18/build modules make: *** /lib/modules/3.5.0-rc6+/build: No such file or directory. Stop. make: *** [modules] Error 2
You need the linux headers of your running kernel to compile the tarball.
[snip]
Quoted 2 lines
I don't recall Skype having required this in a long time. As I already said, until recently, the camera "just worked".
Good news!
[snip]
Quoted 5 lines
Quoted 3 lines
echo 0x1f > /sys/module/gspca_main/parameters/debugthen, unplug/replug the webcam,
No can do; this is an internal webcam.
No problem. As I want to know the sensor type, instead of cutting the kernel messages starting from the webcam probe, please, filter them by something like:
dmesg | fgrep gspca > gspca.txt
Thanks.
2012/7/11 Jean-Francois Moine <[email protected]>:
Quoted 8 lines
On Wed, 11 Jul 2012 10:02:27 +0300 Martin-Éric Racine <[email protected]> wrote:
[snip]Quoted 5 lines
Quoted 4 lines
wget http://moinejf.free.fr/gspca-2.15.18.tar.gz tar -zxf gspca-2.15.18.tar.gz cd gspca-2.15.18 make
Quoted 7 lines
Quoted 5 lines
$ LC_ALL=C make make -C /lib/modules/3.5.0-rc6+/build M=/home/perkelix/gspca-2.15.18/build modules make: *** /lib/modules/3.5.0-rc6+/build: No such file or directory. Stop. make: *** [modules] Error 2You need the linux headers of your running kernel to compile the tarball.
I installed them. That still doesn't fix it:
$ LC_ALL=C make make -C /lib/modules/3.5.0-rc6+/build M=/home/perkelix/gspca-2.15.18/build modules make[1]: Entering directory `/usr/src/linux-headers-3.5.0-rc6+' /usr/src/linux-headers-3.5.0-rc6+/arch/x86/Makefile:39: /usr/src/linux-headers-3.5.0-rc6+/arch/x86/Makefile_32.cpu: No such file or directory make[1]: *** No rule to make target `/usr/src/linux-headers-3.5.0-rc6+/arch/x86/Makefile_32.cpu'. Stop. make[1]: Leaving directory `/usr/src/linux-headers-3.5.0-rc6+' make: *** [modules] Error 2
Signature · 1 line
Martin-Éric
Quoted 10 lines · On Wed, 11 Jul 2012 13:21:55 +0300 Martin-Éric Racine…
I installed them. That still doesn't fix it:
$ LC_ALL=C make make -C /lib/modules/3.5.0-rc6+/build M=/home/perkelix/gspca-2.15.18/build modules make[1]: Entering directory `/usr/src/linux-headers-3.5.0-rc6+' /usr/src/linux-headers-3.5.0-rc6+/arch/x86/Makefile:39: /usr/src/linux-headers-3.5.0-rc6+/arch/x86/Makefile_32.cpu: No such file or directory make[1]: *** No rule to make target
Strange. The file arch/x86/Makefile_32.cpu is in the linux 3.5.0 tree. It should have been forgotten in the Debian package. You may copy it from any other kernel source/header you have.
Signature · 2 lines
Ken ar c'hentañ | ** Breizh ha Linux atav! ** Jef | http://moinejf.free.fr/
2012/7/11 Jean-Francois Moine <[email protected]>:
Quoted 14 lines
Quoted 10 lines · On Wed, 11 Jul 2012 13:21:55 +0300 Martin-Éric Racine…
I installed them. That still doesn't fix it:
$ LC_ALL=C make make -C /lib/modules/3.5.0-rc6+/build M=/home/perkelix/gspca-2.15.18/build modules make[1]: Entering directory `/usr/src/linux-headers-3.5.0-rc6+' /usr/src/linux-headers-3.5.0-rc6+/arch/x86/Makefile:39: /usr/src/linux-headers-3.5.0-rc6+/arch/x86/Makefile_32.cpu: No such file or directory make[1]: *** No rule to make target
Quoted 3 lines
Strange. The file
arch/x86/Makefile_32.cpuis in the linux 3.5.0 tree. It should have been forgotten in the Debian package. You may copy it from any other kernel source/header you have.
That would be a bug in upstream GIT's built-in support for producing Debian packages then.
Anyhow, after copying the missing file, the build successfully launches then breaks as follow:
CC [M] /home/perkelix/gspca-2.15.18/build/ov534_9.o/home/perkelix/gspca-2.15.18/build/ov534_9.c: In function ‘sd_init’:/home/perkelix/gspca-2.15.18/build/ov534_9.c:1353:3: error: implicit declaration of function ‘err’ [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors
make[2]: *** [/home/perkelix/gspca-2.15.18/build/ov534_9.o] Virhe 1 make[1]: *** [_module_/home/perkelix/gspca-2.15.18/build] Error 2 make[1]: Leaving directory `/usr/src/linux-headers-3.5.0-rc6+'
make: *** [modules] Error 2
Signature · 1 line
Martin-Éric
Quoted 9 lines · On Wed, 11 Jul 2012 14:14:24 +0300 Martin-Éric Racine…
CC [M]
/home/perkelix/gspca-2.15.18/build/ov534_9.o/home/perkelix/gspca-2.15.18/build/ov534_9.c: In function ‘sd_init’:/home/perkelix/gspca-2.15.18/build/ov534_9.c:1353:3: error: implicit declaration of function ‘err’ [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors
make[2]: *** [/home/perkelix/gspca-2.15.18/build/ov534_9.o] Virhe 1 make[1]: *** [_module_/home/perkelix/gspca-2.15.18/build] Error 2 make[1]: Leaving directory `/usr/src/linux-headers-3.5.0-rc6+'
make: *** [modules] Error 2
Sorry, I did not compile yet with kernel >= 3.4.
So, please, edit the file build/ov534_9.c (and possibly other sources), changing the calls to 'err' to 'pr_err'.
Signature · 2 lines
Ken ar c'hentañ | ** Breizh ha Linux atav! ** Jef | http://moinejf.free.fr/
A message that is not in the archive (sent off-list or not yet received): CAPZXPQeDKLAu13Qs-MhhxJEBrF-5620HNZDmPiH+4NRmkxx3Ag@mail.gmail.com
Quoted 4 lines · Martin-Éric Racine
PS: Jonathan, do you feel like investigating why
arch/x86/Makefile_32.cpuwasn't included in the linux-headers-3.5.0-rc6+_3.5.0-rc6+-1_i386.deb package that was generated by the 'make deb-pkg' target?
MAINTAINERS tells me that [email protected] is the list to contact. You might also want to cc the kernel team at [email protected] since there are likely to be some familiar people among them.
Hi,
Quoted 16 lines · Martin-Éric Racine
2012/7/11 Jean-Francois Moine <[email protected]>:
Quoted 15 lines
Quoted 9 lines · On Wed, 11 Jul 2012 14:14:24 +0300 Martin-Éric Racine…
CC [M] /home/perkelix/gspca-2.15.18/build/ov534_9.o
/home/perkelix/gspca-2.15.18/build/ov534_9.c: In function ‘sd_init’:/home/perkelix/gspca-2.15.18/build/ov534_9.c:1353:3: error: implicit declaration of function ‘err’ [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors
make[2]: *** [/home/perkelix/gspca-2.15.18/build/ov534_9.o] Virhe 1 make[1]: *** [_module_/home/perkelix/gspca-2.15.18/build] Error 2 make[1]: Leaving directory `/usr/src/linux-headers-3.5.0-rc6+'
make: *** [modules] Error 2Sorry, I did not compile yet with kernel >= 3.4.
Quoted 8 lines
Quoted 2 lines
So, please, edit the file
build/ov534_9.c(and possibly other sources), changing the calls to 'err' to 'pr_err'.This was was required for both
build/ov534_9.candbuild/spca505.cto build agaist 3.5.Sure enough, this seems to fix support for this camera in both Cheese and Skype. Hurray! :-)
Ok, so it seems that increasing the bandwidth we claim for the camera (which is what my suggested "return 2000 * 2000 * 120;" change does, helps a bit, where as the changes to vc032x which are in Jean-Francois Moine's gspca-2.15.18 tarbal fix the problem entirely, correct?
Quoted 5 lines
Now, the only thing that remains is for this to be merged in the 3.5 tree, then backported to the 3.2 tree that is used for Debian's upcoming Wheezy stable release (and for Ubuntu's recently released Precise also).
Well we first need to turn the changes made in gspca-2.15.18 into a patch will which apply to the latest gspca tree:
http://git.linuxtv.org/hgoede/gspca.git/shortlog/refs/heads/media-for_v3.6
And then apply them there, before the can be backported to older kernels. Unfortunately I'm leaving for a week vacation Friday, and I probably won't get around to this before then.
Jean-Francois, can you perhaps make a patch against my latest tree for the poXXXX / PO3130 changes in your tarbal?
Regards,
Hans
2012/7/11 Hans de Goede <[email protected]>:
Quoted 27 lines · Martin-Éric Racine
Quoted 26 lines
2012/7/11 Jean-Francois Moine <[email protected]>:
Quoted 15 lines
Quoted 9 lines · On Wed, 11 Jul 2012 14:14:24 +0300 Martin-Éric Racine…
CC [M] /home/perkelix/gspca-2.15.18/build/ov534_9.o
/home/perkelix/gspca-2.15.18/build/ov534_9.c: In function ‘sd_init’:/home/perkelix/gspca-2.15.18/build/ov534_9.c:1353:3: error: implicit declaration of function ‘err’ [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors
make[2]: *** [/home/perkelix/gspca-2.15.18/build/ov534_9.o] Virhe 1 make[1]: *** [_module_/home/perkelix/gspca-2.15.18/build] Error 2 make[1]: Leaving directory `/usr/src/linux-headers-3.5.0-rc6+'
make: *** [modules] Error 2Quoted 4 lines
Sorry, I did not compile yet with kernel >= 3.4.
So, please, edit the file
build/ov534_9.c(and possibly other sources), changing the calls to 'err' to 'pr_err'.This was was required for both
build/ov534_9.candbuild/spca505.cto build agaist 3.5.
Quoted 8 lines
Quoted 2 lines
Sure enough, this seems to fix support for this camera in both Cheese and Skype. Hurray! :-)
Ok, so it seems that increasing the bandwidth we claim for the camera (which is what my suggested "return 2000 * 2000 * 120;" change does, helps a bit, where as the changes to vc032x which are in Jean-Francois Moine's gspca-2.15.18 tarbal fix the problem entirely, correct?
As far as I can tell, yes, the modules in Jean-François' tarball work as-is to fix the problem.
Quoted 10 lines
Quoted 4 lines
Now, the only thing that remains is for this to be merged in the 3.5 tree, then backported to the 3.2 tree that is used for Debian's upcoming Wheezy stable release (and for Ubuntu's recently released Precise also).
Well we first need to turn the changes made in gspca-2.15.18 into a patch will which apply to the latest gspca tree:
http://git.linuxtv.org/hgoede/gspca.git/shortlog/refs/heads/media-for_v3.6
Quoted 6 lines
And then apply them there, before the can be backported to older kernels. Unfortunately I'm leaving for a week vacation Friday, and I probably won't get around to this before then.
Jean-Francois, can you perhaps make a patch against my latest tree for the poXXXX / PO3130 changes in your tarbal?
Noted. Hopefully, the Debian kernel team can contribute to the backporting part, since it's needed for the upcoming stable release.
Martin-Éric
Quoted 5 lines · On Wed, 11 Jul 2012 16:43:47 +0300 Martin-Éric Racine…
Quoted 2 lines
Jean-Francois, can you perhaps make a patch against my latest tree for the poXXXX / PO3130 changes in your tarbal?
Noted. Hopefully, the Debian kernel team can contribute to the backporting part, since it's needed for the upcoming stable release.
I had many problems with the vc032x driver, and the source code is very different from the code in the official kernels.
As I have no webcam, Martin-Éric, may I ask you to test the backport I will do? It will be done only in the vc032x driver, so you could keep the working gspca_vc032x.ko file you have and restore it between the tests. I still lack the sensor type of your webcam. May you send me the result of:
dmesg | fgrep gspca
I'll contact you directly (with copy to Hans de Goede) as soon as I will have something to propose.
Thanks by advance.
Signature · 2 lines
Ken ar c'hentañ | ** Breizh ha Linux atav! ** Jef | http://moinejf.free.fr/
2012/7/11 Jean-Francois Moine <[email protected]>:
Quoted 12 lines
Quoted 5 lines · On Wed, 11 Jul 2012 16:43:47 +0300 Martin-Éric Racine…
Quoted 2 lines
Jean-Francois, can you perhaps make a patch against my latest tree for the poXXXX / PO3130 changes in your tarbal?
Noted. Hopefully, the Debian kernel team can contribute to the backporting part, since it's needed for the upcoming stable release.
I had many problems with the vc032x driver, and the source code is very different from the code in the official kernels.
Quoted 7 lines
As I have no webcam, Martin-Éric, may I ask you to test the backport I will do? It will be done only in the vc032x driver, so you could keep the working gspca_vc032x.ko file you have and restore it between the tests. I still lack the sensor type of your webcam. May you send me the result of:
dmesg | fgrep gspca
[ 11.834852] gspca_main: v2.15.18 registered [ 11.844262] gspca_main: vc032x-2.15.18 probing 0ac8:0321 [ 11.844682] gspca_vc032x: vc0321 check sensor header 2c [ 11.850304] gspca_vc032x: Sensor ID 3130 (0) [ 11.850309] gspca_vc032x: Find Sensor PO3130NC [ 11.851809] gspca_main: video0 created
Backport would be needed against 3.2.21 as this is what Debian will (probably) release with.
Cheers!
Martin-Éric
Hi,
Quoted 4 lines · Martin-Éric Racine
Since recent kernels, this ASUS W5F's built-in webcam fails to be detected. Gstreamer-based applications (Cheese, gstreamer-properties) immediately crash whenever trying to access the video device.
[...]
Quoted 2 lines
video_source:sr[3246]: segfault at 0 ip (null) sp
ab36de1cerror
14 in cheese[8048000+21000]
Quoted 2 lines · Martin-Éric Racine
As far as I can tell, yes, the modules in Jean-François' tarball work as-is to fix the problem.
[...]
Quoted 9 lines
[ 11.834852] gspca_main: v2.15.18 registered [ 11.844262] gspca_main: vc032x-2.15.18 probing 0ac8:0321 [ 11.844682] gspca_vc032x: vc0321 check sensor header 2c [ 11.850304] gspca_vc032x: Sensor ID 3130 (0) [ 11.850309] gspca_vc032x: Find Sensor PO3130NC [ 11.851809] gspca_main: video0 createdBackport would be needed against 3.2.21 as this is what Debian will (probably) release with.
Sorry to have lost track of this. Do you know what patch fixed it? Does 3.5.y from experimental work?
Curious,
Jonathan
2012/10/10 Jonathan Nieder <[email protected]>:
Quoted 24 lines
Hi,
Quoted 4 lines · Martin-Éric Racine
Since recent kernels, this ASUS W5F's built-in webcam fails to be detected. Gstreamer-based applications (Cheese, gstreamer-properties) immediately crash whenever trying to access the video device.
[...]
Quoted 2 lines
video_source:sr[3246]: segfault at 0 ip (null) sp
ab36de1cerror
14 in cheese[8048000+21000]Quoted 2 lines · Martin-Éric Racine
As far as I can tell, yes, the modules in Jean-François' tarball work as-is to fix the problem.
[...]
Quoted 7 lines
[ 11.834852] gspca_main: v2.15.18 registered [ 11.844262] gspca_main: vc032x-2.15.18 probing 0ac8:0321 [ 11.844682] gspca_vc032x: vc0321 check sensor header 2c [ 11.850304] gspca_vc032x: Sensor ID 3130 (0) [ 11.850309] gspca_vc032x: Find Sensor PO3130NC [ 11.851809] gspca_main: video0 created
Quoted 5 lines
Quoted 2 lines
Backport would be needed against 3.2.21 as this is what Debian will (probably) release with.
Sorry to have lost track of this. Do you know what patch fixed it? Does 3.5.y from experimental work?
There is no known patch. What currently works is a whole new upstream tarball of the GSPCA tree, built as a standalone module package. It's not fixed in 3.5 however.
Martin-Éric
Quoted 24 lines · On Tue, 9 Oct 2012 15:54:46 -0700 Jonathan Nieder <[email protected]> wrote:
Hi,
Quoted 4 lines · Martin-Éric Racine
Since recent kernels, this ASUS W5F's built-in webcam fails to be detected. Gstreamer-based applications (Cheese, gstreamer-properties) immediately crash whenever trying to access the video device.
[...]
Quoted 2 lines
video_source:sr[3246]: segfault at 0 ip (null) sp
ab36de1cerror
14 in cheese[8048000+21000]Quoted 2 lines · Martin-Éric Racine
As far as I can tell, yes, the modules in Jean-François' tarball work as-is to fix the problem.
[...]
Quoted 7 lines
[ 11.834852] gspca_main: v2.15.18 registered [ 11.844262] gspca_main: vc032x-2.15.18 probing 0ac8:0321 [ 11.844682] gspca_vc032x: vc0321 check sensor header 2c [ 11.850304] gspca_vc032x: Sensor ID 3130 (0) [ 11.850309] gspca_vc032x: Find Sensor PO3130NC [ 11.851809] gspca_main: video0 created
Quoted 8 lines
Quoted 2 lines
Backport would be needed against 3.2.21 as this is what Debian will (probably) release with.
Sorry to have lost track of this. Do you know what patch fixed it? Does 3.5.y from experimental work?
Curious,
Jonathan
Hi Jonathan,
I tried to prepare a patch set for the vc032x, but testing with Martin-Éric stopped mid-july, so I have nothing to propose yet. I'm waiting for some other vc0321+po3130nc owner and continue the tests...
Signature · 2 lines
Ken ar c'hentañ | ** Breizh ha Linux atav! ** Jef | http://moinejf.free.fr/
Quoted 1 line · Jean-Francois Moine
I tried to prepare a patch set for the vc032x,
That's good to hear. Does that you mean you have a rough patchset available, even if it doesn't work perfectly yet?
I'd be happy to see some patches e.g. with [PATCH/WIP] in the subject line so there is something for people listening in to experiment with. Alternatively if they are not ready for testing or comments but should go somewhere public in a less noisy way, if you send patches as attachments to the bug log at [email protected] then they won't be forgotten.
Thanks,
Jonathan
2012/10/10 Jean-Francois Moine <[email protected]>:
Quoted 33 lines
Quoted 30 lines · On Tue, 9 Oct 2012 15:54:46 -0700 Jonathan Nieder <[email protected]> wrote:
Hi,
Quoted 4 lines · Martin-Éric Racine
Since recent kernels, this ASUS W5F's built-in webcam fails to be detected. Gstreamer-based applications (Cheese, gstreamer-properties) immediately crash whenever trying to access the video device.
[...]
Quoted 2 lines
video_source:sr[3246]: segfault at 0 ip (null) sp
ab36de1cerror
14 in cheese[8048000+21000]Quoted 2 lines · Martin-Éric Racine
As far as I can tell, yes, the modules in Jean-François' tarball work as-is to fix the problem.
[...]
Quoted 9 lines
[ 11.834852] gspca_main: v2.15.18 registered [ 11.844262] gspca_main: vc032x-2.15.18 probing 0ac8:0321 [ 11.844682] gspca_vc032x: vc0321 check sensor header 2c [ 11.850304] gspca_vc032x: Sensor ID 3130 (0) [ 11.850309] gspca_vc032x: Find Sensor PO3130NC [ 11.851809] gspca_main: video0 createdBackport would be needed against 3.2.21 as this is what Debian will (probably) release with.
Sorry to have lost track of this. Do you know what patch fixed it? Does 3.5.y from experimental work?
Quoted 8 lines
Quoted 2 lines
Curious,
JonathanHi Jonathan,
I tried to prepare a patch set for the vc032x, but testing with Martin-Éric stopped mid-july, so I have nothing to propose yet. I'm waiting for some other vc0321+po3130nc owner and continue the tests...
We kept on going back and forth between two versions of the same file, none of which produced the result expected by Jean-Francois. I'd venture that the change that fixed it involves an entirely different file, but he seemed to expect otherwise.
Martin-Éric