Bug 172043 - webcam (uvcvideo) doesn't work with kopete in kde 4.1.2
Summary: webcam (uvcvideo) doesn't work with kopete in kde 4.1.2
Status: RESOLVED WORKSFORME
Alias: None
Product: kopete
Classification: Applications
Component: Audio/Video Plugin (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Kopete Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-02 16:50 UTC by sts
Modified: 2009-07-21 17:14 UTC (History)
9 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description sts 2008-10-02 16:50:16 UTC
Version:           0.60.2 (using 4.1.2 (KDE 4.1.2) "release 44.2", KDE:KDE4:Factory:Desktop / openSUSE_11.0)
Compiler:          gcc
OS:                Linux (x86_64) release 2.6.25.16-0.1-default

luvcview 0.2.4 works fine If I close kopete:

SDL information:
  Video driver: x11
  A window manager is available
Device information:            
  Device path:  /dev/video0    
Stream settings:               
  Frame format: MJPG           
  Frame size:   640x480        
  Frame rate:   30 fps         
find DRI                       
find DRI
...

but kopete doesn't work:

konsole output:
...
VIDIOC_DQBUF error 16, Das Gerät oder die Ressource ist belegt
VIDIOC_DQBUF error 16, Das Gerät oder die Ressource ist belegt
VIDIOC_DQBUF error 16, Das Gerät oder die Ressource ist belegt
VIDIOC_STREAMOFF error 16, Das Gerät oder die Ressource ist belegt
Comment 1 Detlev Casanova 2008-10-02 23:29:14 UTC
Are you sure your webcam is not used by any other software at the same time ?
It works for me with an UVC webcam.
The webcam seems busy, try running

lsof /dev/video0

while kopete is running and the probleme appears to check if other applications are using it.
Comment 2 sts 2008-10-02 23:52:31 UTC
here is my output:

COMMAND   PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
kopete  17075  sts   16u   CHR   81,0      0t0 3596 /dev/video0
kopete  17075  sts   17u   CHR   81,0      0t0 3596 /dev/video0
Comment 3 Detlev Casanova 2008-10-03 08:28:42 UTC
Ok, it seems Kopete is faulty here, it opens the webcam twice.
Do you have more debug details about the webcam opening process ? Do you have debug activated in Kopete ?
I don't know how it works and if it is possible with openSuse...
Comment 4 sts 2008-10-03 09:56:34 UTC
I'm not sure how can I enable the debug mode. I have installed debuginfo packages.

here is my konsole output if I open the kopete config dialog:

VIDIOC_ENUMSTD: Das Argument ist ungültig                                                             
VIDIOC_ENUM_FMT: Das Argument ist ungültig                                                                              
VIDIOC_ENUMSTD: Das Argument ist ungültig                                                                               
VIDIOC_ENUM_FMT: Das Argument ist ungültig                                                                              
VIDIOC_S_INPUT: Das Gerät oder die Ressource ist belegt                                                                 
VIDIOC_S_INPUT: Das Gerät oder die Ressource ist belegt                                                                 
VIDIOC_REQBUFS error 16, Das Gerät oder die Ressource ist belegt                                                        
VIDIOC_STREAMON error 16, Das Gerät oder die Ressource ist belegt                                                       
QObject::connect: Cannot connect (null)::onlineStatusChanged(Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus &) to Kopete::Identity::updateOnlineStatus()                                                           
VIDIOC_DQBUF error 16, Das Gerät oder die Ressource ist belegt                                                          
VIDIOC_DQBUF error 16, Das Gerät oder die Ressource ist belegt
Comment 5 S. Burmeister 2008-10-03 15:14:54 UTC
It's not only kopete. While kopete3 and ekiga work with the webcam, kopete4 and webkam do not, i.e. just show a green picture.
Comment 6 Gerwin 2008-10-11 14:28:21 UTC
You can count me in i'm having a eeepc 70X and in Ekiga and Skyp the cam is working but in Kopete I have a green screen and see two open files from kopete with lsof.
Comment 7 Aniket 2008-10-22 23:07:43 UTC
I can confirm this bug, on Dell Vostro 1400 laptop .Kopete in kde3(ubuntu) are fine, but using kde 4.1.2 packages from fedora , I cant use the webcam in yahoo in Kopete. 
 lsof shows this

kopete  2805 ani   19u   CHR   81,0      2842 /dev/video0
kopete  2805 ani   20u   CHR   81,0      2842 /dev/video0

This is after I just start kopete and access the preferences.Then if I close preferences and open it again, I see a third line with lsof command, and so on for each successive attempt. 

Also, after this , any other app trying to access the webcam fails (eg Skype), till I close Kopete. 
Comment 8 Jim Sublette 2008-10-27 00:21:04 UTC
I dual boot with gentoo and opensuse.  It is not becuase it is  showing up twice.    On gentoo it also shows up twice.  But, the webcam works with kopete on gentoo it does not work with opensuse.  both gentoo and opensuse using kde 4.1.2

jsubl2@lappie ~ $ lsof /dev/video
COMMAND  PID   USER   FD   TYPE DEVICE SIZE NODE NAME
kopete  5648 jsubl2  mem    CHR   81,0      4643 /dev/v4l/video0
kopete  5648 jsubl2   15u   CHR   81,0      4643 /dev/v4l/video0

Note that I also see these errors
uvcvideo: Failed to query (1) UVC control 9 (unit 3) : -32 (exp. 2).
I see these error on both gentoo and opensuse.  But on gentoo the webcam works.



Comment 9 Detlev Casanova 2008-10-27 15:47:15 UTC
> It is not becuase it is  showing up twice.
> On gentoo it also shows up twice.
> But, the webcam works with kopete on gentoo it does not work with opensuse.
> both gentoo and opensuse using kde 4.1.2

The file node can be opened as many times as you want, but streaming is only possible for 1 file descriptor. The other ones could be used to change controls on the webcam (Brightness, Contrast,...)

> Note that I also see these errors
> uvcvideo: Failed to query (1) UVC control 9 (unit 3) : -32 (exp. 2).
> I see these error on both gentoo and opensuse.  But on gentoo the webcam works.

Don't worry, it is common errors due to bugs into the webcam (most likely an old logitech device). there are workarounds for those problems, that's why your webcam still works.

It's interesting to see that the problem is in openSuse but not in Gentoo (I'm running Gentoo only. So I am unable to reproduce that bug).

I'm checking with openSuse guys right now :-)
Comment 10 Hans Seeliger 2008-11-07 10:29:46 UTC
The problem still exists in KDE 4.1.3, Opensuse 11, 64-bit. Here's my lsof /dev/video:

COMMAND  PID    USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
kopete  5043 hansito   16u   CHR   81,0      0t0 3885 /dev/video0
kopete  5043 hansito   17u   CHR   81,0      0t0 3885 /dev/video0

In Kopete you just see a green screen, also the activity-LED of my webcam doesn't turn on.
My workaround: Still using Kopete KDE 3
Comment 11 Detlev Casanova 2008-11-07 11:50:42 UTC
There is nothing wrong in openSuse patches.
please post or attach the dmesg output too (at least, the relevant lines about your webcam driver : uvcvideo, spca5xx, ...)
Are you all using a 64 bit distribution ?
Comment 12 Hans Seeliger 2008-11-07 12:01:49 UTC
(In reply to comment #11)
> There is nothing wrong in openSuse patches.
> please post or attach the dmesg output too (at least, the relevant lines about
> your webcam driver : uvcvideo, spca5xx, ...)
> Are you all using a 64 bit distribution ?
> 

Here are the relevant parts of my dmesg, the last part may be the most relevant one:


usb 2-10: configuration #1 chosen from 1 choice                                    
usb 2-10: New USB device found, idVendor=04f2, idProduct=b022                      
usb 2-10: New USB device strings: Mfr=2, Product=1, SerialNumber=3                 
usb 2-10: Product: USB 2.0 Camera                                                  
usb 2-10: Manufacturer: Chicony Electronics Co., Ltd.                              
usb 2-10: SerialNumber: SN0001

....................................................................

uvcvideo: Found UVC 1.00 device USB 2.0 Camera (04f2:b022)                         
input: USB 2.0 Camera as /devices/pci0000:00/0000:00:13.5/usb2/2-10/2-10:1.0/input/input8                                                                             
Bluetooth: Generic Bluetooth USB driver ver 0.1                                    
usbcore: registered new interface driver btusb                                     
usbcore: registered new interface driver uvcvideo                                  
USB Video Class driver (SVN r260) 

.....................................................................


uvcvideo: Failed to query (1) UVC control 9 (unit 3) : -32 (exp. 2).               
SFW2-INext-DROP-DEFLT IN=wlan0 OUT= MAC= SRC=130.149.242.216 DST=224.0.0.251 LEN=64 TOS=0x00 PREC=0x00 TTL=255 ID=0 DF PROTO=UDP SPT=5353 DPT=5353 LEN=44             
uvcvideo: Failed to query (1) UVC control 9 (unit 3) : -32 (exp. 2). 
Comment 13 sts 2008-11-07 13:20:20 UTC
yes my system is 64bit.. but also with a 686 installation on my 64 bit system (opensuse11.1 beta4) it doesn't work :(
Comment 14 Detlev Casanova 2008-11-11 13:06:28 UTC
SVN commit 882759 by casanova:

 * Don't close file descriptor in kDebug().
CCBUG:172043


 M  +2 -1      videodevice.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=882759
Comment 15 S. Burmeister 2008-11-13 12:26:33 UTC
This works for me in trunk. Although I think it would be better to only the device if the respective module in the settings is selected. Currently it is opened as soon as one opens the settings, which might be a reason why the whole settings dialogue becomes slow.

If I open and close the device too quickly, i.e. open the settings, close them, open them again etc. kopete hangs, not sure where this is comming from, but it would be another bug anyway.

In branch I get a huge black window, which is different than before, but still not working.
Comment 16 David 2008-12-31 00:53:00 UTC
uvcvideo webcams does not work either in kopete from kde 4.1.3 branch. I've read it is solved in trunk. Would this changes to make this webcams work in kopete be applied in 4.1.4 release of KDE, or are they scheduled to another future release?
Comment 17 thnielsen 2008-12-31 17:23:30 UTC
I see the same on opensuse 11.1 (upgraded from all the betas, but also on opensuse 11)
kopete does it, webkam does it, luvcview does NOT.

uname -a
Linux linux-hm2m 2.6.27.7-9-pae #1 SMP 2008-12-04 18:10:04 +0100 i686 i686 i386 GNU/Linux

lsusb
..
Bus 005 Device 002: ID 04f2:b021 Chicony Electronics Co., Ltd ViewSonic 1.3M, USB2.0 Webcam
..

webkam                                                                       
VIDIOC_ENUMSTD: Invalid argument                                                            
VIDIOC_ENUM_FMT: Invalid argument                                                           
VIDIOC_ENUMSTD: Invalid argument                                                            
VIDIOC_ENUM_FMT: Invalid argument                                                           
VIDIOC_S_INPUT: Device or resource busy                                                     
VIDIOC_S_INPUT: Device or resource busy                                                     
VIDIOC_REQBUFS error 16, Device or resource busy                                            
VIDIOC_STREAMON error 16, Device or resource busy                                           
VIDIOC_DQBUF error 16, Device or resource busy                                              
VIDIOC_DQBUF error 16, Device or resource busy                                              
VIDIOC_DQBUF error 16, Device or resource busy                                              
VIDIOC_DQBUF error 16, Device or resource busy 
Comment 18 Michal Svec 2009-07-21 14:39:15 UTC
BTW, my webcam works with openSUSE 11.1 and kde4-kopete-4.2.4-3.10
(from KDE:42 repo). I have tried only the test dialog though.

The webcam is this:
usb 4-2.4: New USB device found, idVendor=041e, idProduct=4057
usb 4-2.4: New USB device strings: Mfr=2, Product=1, SerialNumber=0
usb 4-2.4: Product: Live! Cam Optia
usb 4-2.4: Manufacturer: Creative Labs
Comment 19 thnielsen 2009-07-21 14:49:50 UTC
Works for me as well - since a few version. Suggest to close?
Comment 20 sts 2009-07-21 16:53:16 UTC
works for me
Comment 21 Gerwin 2009-07-21 17:14:38 UTC
Works here too now, i'm currently on kde 4.3 rc2 ....