Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 259834 - in-kernel uvcvideo not working with Logitech camera. emerged version 0.1.0_pre250 works.
Summary: in-kernel uvcvideo not working with Logitech camera. emerged version 0.1.0_pr...
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High minor (vote)
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-21 17:42 UTC by Michael Elbaum
Modified: 2009-04-24 18:30 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Elbaum 2009-02-21 17:42:44 UTC
After compiling a new kernel 2.6.27-gentoo-r8 with uvcvideo selected, my camera was not recognized. The uvcvideo module loaded when I plugged in the camera but there was no /dev/video and /var/log/messages contained:

Feb 21 19:17:15 homepc [  423.040966] usb 2-1: USB disconnect, address 6
Feb 21 19:17:16 homepc [  423.896888] usb 2-1: new high speed USB device using ehci_hcd and address 7
Feb 21 19:17:16 homepc [  424.200998] usb 2-1: configuration #1 chosen from 1 choice
Feb 21 19:17:17 homepc [  425.201736] 7:3:3: cannot set freq 16000 to ep 0x86
Feb 21 19:17:18 homepc [  426.254204] usb 2-1: New USB device found, idVendor=046d, idProduct=08c1
Feb 21 19:17:18 homepc [  426.254394] usb 2-1: New USB device strings: Mfr=0, Product=0, SerialNumber=2
Feb 21 19:17:18 homepc [  426.254476] usb 2-1: SerialNumber: 3281D593
Feb 21 19:17:18 homepc [  426.254592] uvcvideo: Found UVC 1.00 device <unnamed> (046d:08c1)
Feb 21 19:17:18 homepc [  426.254699] usb 2-1: USB disconnect, address 7
Feb 21 19:17:18 homepc [  426.266077] uvcvideo: Failed to query (135) UVC control 1 (unit 0) : -19 (exp. 26).
Feb 21 19:17:18 homepc [  426.266625] uvcvideo: Failed to query (129) UVC control 1 (unit 0) : -19 (exp. 26).
Feb 21 19:17:18 homepc [  426.266707] uvcvideo: Failed to initialize the device (-5).
Feb 21 19:17:18 homepc [  426.267506] usbcore: registered new interface driver uvcvideo
Feb 21 19:17:18 homepc [  426.267616] USB Video Class driver (v0.1.0)


I then recompiled the kernel without uvcvideo, emerged the latest, and all's well.

Feb 21 19:35:17 homepc [ 1505.332326] usb 2-3: new high speed USB device using ehci_hcd and address 16
Feb 21 19:35:17 homepc [ 1505.384330] hub 2-0:1.0: unable to enumerate USB device on port 3
Feb 21 19:35:17 homepc [ 1505.712246] usb 2-3: new high speed USB device using ehci_hcd and address 17
Feb 21 19:35:17 homepc [ 1505.764287] hub 2-0:1.0: unable to enumerate USB device on port 3
Feb 21 19:35:18 homepc [ 1506.262127] usb 2-3: new high speed USB device using ehci_hcd and address 18
Feb 21 19:35:18 homepc [ 1506.566230] usb 2-3: configuration #1 chosen from 1 choice
Feb 21 19:35:19 homepc [ 1507.566918] 18:3:3: cannot set freq 16000 to ep 0x86
Feb 21 19:35:21 homepc [ 1509.567740] usb 2-3: New USB device found, idVendor=046d, idProduct=08c1
Feb 21 19:35:21 homepc [ 1509.568667] usb 2-3: New USB device strings: Mfr=0, Product=0, SerialNumber=2
Feb 21 19:35:21 homepc [ 1509.568779] usb 2-3: SerialNumber: 3281D593
Feb 21 19:35:21 homepc [ 1509.568898] uvcvideo: Found UVC 1.00 device <unnamed> (046d:08c1)
Feb 21 19:35:21 homepc [ 1509.606602] uvcvideo: Failed to query (135) UVC control 1 (unit 0) : -32 (exp. 26).
Feb 21 19:35:21 homepc [ 1509.626487] input: UVC Camera (046d:08c1) as /devices/pci0000:00/0000:00:13.5/usb2/2-3/2-3:1.0/input/input5
Feb 21 19:35:21 homepc [ 1509.627806] usbcore: registered new interface driver uvcvideo
Feb 21 19:35:21 homepc [ 1509.628224] USB Video Class driver (v0.1.0)


My case seems solved but there's a problem either upstream or in coordination with gentoo.
Comment 1 Michael Elbaum 2009-02-21 19:38:35 UTC
Portage 2.1.6.4 (default/linux/x86/2008.0/desktop, gcc-4.1.2, glibc-2.6.1-r0, 2.6.27-gentoo-r8 i686)
=================================================================
System uname: Linux-2.6.27-gentoo-r8-i686-Intel-R-_Core-TM-2_CPU_4300_@_1.80GHz-with-glibc2.0
Timestamp of tree: Thu, 19 Feb 2009 01:45:01 +0000
app-shells/bash:     3.2_p39
dev-java/java-config: 1.3.7, 2.1.6-r1
dev-lang/python:     2.4.4-r14, 2.5.2-r7
dev-python/pycrypto: 2.0.1-r6
dev-util/cmake:      2.4.6-r1
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=nocona -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://mirror.hamakor.org.il/pub/mirrors/gentoo"
LDFLAGS="-Wl,-O1"
LINGUAS="en"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X Xaw3d acl acpi alsa avi bash-completion berkdb bidi bindist bluetooth bonobo branding bzip2 bzlib cairo cdr cli cracklib crypt cscope cups dbus dga dhcp divx4linux dri dv dvd dvdr dvdread eds emboss encode esd evo exif f77 fam fftw firefox flac flash foomaticdb fortran ftp gdbm gif gimpprint ginac gnome gphoto2 gpm gstreamer gtk gtk2 hal iconv ieee1394 imagemagick ipv6 isdnlog java jpeg jpeg2k lcms ldap libnotify mad midi mikmod ming mmx motif mp3 mpeg mplayer mudflap ncurses nls nptl nptlonly nvidia ogg oggvorbis opengl openmp pam pcmcia pcre pdf pdflib perl png pnp ppds pppd python qt3 qt3support qt4 quicktime readline reflection samba sdk sdl session spell spl sse sse2 sse3 ssl startup-notification svg sysfs tcpd tetex theora tiff truetype trusted unicode usb vorbis win32codecs wmf x86 xinerama xml xorg xulrunner xv xvid zeo zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" FOO2ZJS_DEVICES="hp1020" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" USERLAND="GNU" VIDEO_CARDS="nvidia"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 2 Michael Elbaum 2009-02-21 19:51:48 UTC
another important point, after it stopped working inexplicably:

The emerged driver works IF AND ONLY IF the module is inserted AFTER the camera is plugged in. In other words, I plug in the camera, rmmod uvcvideo, and then modprobe uvcvideo immediately. This suggests the problem is in the module loading process (maybe just a delay needed?) rather than in the driver itself.
Comment 3 Mike Pagano gentoo-dev 2009-03-09 17:32:32 UTC
I see some matching bugs from Ubuntu with similar error messages. They seem to feel it was fixed in 2.6.28 from what I can decipher. 

Can you test on gentoo-sources-2.6.28-r3 and post the results.
Comment 4 Michael Elbaum 2009-03-12 21:57:36 UTC
I compiled 2.6.28-gentoo-r3 and found the same thing, this time with the in-kernel module. It works if I plug in the camera, rmmod uvcvideo (which is loaded automatically, as it should be), and then modprobe uvcvideo. Otherwise I get the Failed to query business. 

I think my original description was probably wrong, and the problem was the sequence of events rather than the in-kernel vs emerged version of the module.
Comment 5 George Kadianakis (RETIRED) gentoo-dev 2009-04-11 00:32:09 UTC
(In reply to comment #4)
> I compiled 2.6.28-gentoo-r3 and found the same thing, this time with the
> in-kernel module. It works if I plug in the camera, rmmod uvcvideo (which is
> loaded automatically, as it should be), and then modprobe uvcvideo. Otherwise I
> get the Failed to query business. 
> 
> I think my original description was probably wrong, and the problem was the
> sequence of events rather than the in-kernel vs emerged version of the module.
> 

I think that you will find the following discussion quite interesting:
http://lists.berlios.de/pipermail/linux-uvc-devel/2007-September/002129.html

After reading the above, read the Known Problems section of
http://openfacts.berlios.de/index-en.phtml?title=Linux%20UVC
and try using the modprobe install rule. See if it helps ;)
Comment 6 Michael Elbaum 2009-04-11 20:33:18 UTC
Thanks.      It seems that's the same bug: snd_usb_audio has to be loaded before uvcvideo. I added snd_usb_audio to the kernel autoload list and now the camera works straight off after reboot. If I unplug it though, I have to rmmod and modprobe uvcvideo after replugging, just as the openfacts page says. (It's not necessary to reload the sound.) If there were some way to auto-unloading modules when their devices disappear that would take care of the problem. It might be useful in other circumstances as well. I looked around the docs and forums a bit but didn't find a means to do that. Are you aware of something? perhaps it's for the forum...
Comment 7 Mike Pagano gentoo-dev 2009-04-24 18:30:30 UTC
It seems we have a workaround for a know issue