# [solved, more questions] Problem: Webcam, AMD64, and Skype

## keet

Here is my situation:  I was using kernel 2.6.26-r4, in which everything ran fine.  I upgraded to kernel 2.6.27-r7, and now my webcam won't work properly.  My system is AMD64.  lsusb tells me that my webcam is this:

Bus 002 Device 005: ID 046d:08da Logitech, Inc. QuickCam Messanger

Apart from the question of what a 'Messanger' is (maybe it's what happens when someone has a messy fit?), I'm having trouble making it work.  Running spcaview just gives me green lines at the top of the window.  Skype crashes when I try to test my webcam.  Kopete shows a bunch of white lines in the image on a black background.  If I run one of these two:

```

 LD_PRELOAD=/usr/lib64/libv4l/v4l1compat.so spcaview

 LD_PRELOAD=/usr/lib64/libv4l/v4l1compat.so kopete

```

Then my webcam actually works properly.  However, running "LD_PRELOAD=/usr/lib64/libv4l/v4l1compat.so skype"  returns this:  "ERROR: ld.so: object '/usr/lib64/libv4l/v4l1compat.so' from LD_PRELOAD cannot be preloaded: ignored."  This leads me to believe that it's actually a problem with Skype, but I'm not sure.  My webcam worked fine in Skype with kernel 2.6.26-r4. Here are the relevent portions of my kernel configuration:

```

#

# Multimedia devices

#

#

# Multimedia core support

#

CONFIG_VIDEO_DEV=y

CONFIG_VIDEO_V4L2_COMMON=y

CONFIG_VIDEO_ALLOW_V4L1=y

CONFIG_VIDEO_V4L1_COMPAT=y

# CONFIG_DVB_CORE is not set

CONFIG_VIDEO_MEDIA=y

#

# Multimedia drivers

#

# CONFIG_MEDIA_ATTACH is not set

CONFIG_MEDIA_TUNER=y

# CONFIG_MEDIA_TUNER_CUSTOMIZE is not set

CONFIG_MEDIA_TUNER_SIMPLE=y

CONFIG_MEDIA_TUNER_TDA8290=y

CONFIG_MEDIA_TUNER_TDA9887=y

CONFIG_MEDIA_TUNER_TEA5761=y

CONFIG_MEDIA_TUNER_TEA5767=y

CONFIG_MEDIA_TUNER_MT20XX=y

CONFIG_MEDIA_TUNER_XC2028=y

CONFIG_MEDIA_TUNER_XC5000=y

CONFIG_VIDEO_V4L2=y

CONFIG_VIDEO_V4L1=y

CONFIG_VIDEO_CAPTURE_DRIVERS=y

# CONFIG_VIDEO_ADV_DEBUG is not set

CONFIG_VIDEO_HELPER_CHIPS_AUTO=y

# CONFIG_VIDEO_VIVI is not set

# CONFIG_VIDEO_BT848 is not set

# CONFIG_VIDEO_CPIA is not set

# CONFIG_VIDEO_CPIA2 is not set

# CONFIG_VIDEO_SAA5246A is not set

# CONFIG_VIDEO_SAA5249 is not set

# CONFIG_TUNER_3036 is not set

# CONFIG_VIDEO_STRADIS is not set

# CONFIG_VIDEO_SAA7134 is not set

# CONFIG_VIDEO_MXB is not set

# CONFIG_VIDEO_DPC is not set

# CONFIG_VIDEO_HEXIUM_ORION is not set

# CONFIG_VIDEO_HEXIUM_GEMINI is not set

# CONFIG_VIDEO_CX88 is not set

# CONFIG_VIDEO_IVTV is not set

# CONFIG_VIDEO_CAFE_CCIC is not set

CONFIG_V4L_USB_DRIVERS=y

CONFIG_USB_VIDEO_CLASS=y

CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y

CONFIG_USB_GSPCA=y

# CONFIG_VIDEO_PVRUSB2 is not set

# CONFIG_VIDEO_EM28XX is not set

# CONFIG_VIDEO_USBVISION is not set

CONFIG_VIDEO_USBVIDEO=y

# CONFIG_USB_VICAM is not set

# CONFIG_USB_IBMCAM is not set

# CONFIG_USB_KONICAWC is not set

CONFIG_USB_QUICKCAM_MESSENGER=y

# CONFIG_USB_ET61X251 is not set

# CONFIG_VIDEO_OVCAMCHIP is not set

# CONFIG_USB_W9968CF is not set

# CONFIG_USB_OV511 is not set

# CONFIG_USB_SE401 is not set

# CONFIG_USB_SN9C102 is not set

# CONFIG_USB_STV680 is not set

# CONFIG_USB_ZC0301 is not set

# CONFIG_USB_PWC is not set

# CONFIG_USB_ZR364XX is not set

# CONFIG_USB_STKWEBCAM is not set

# CONFIG_USB_S2255 is not set

# CONFIG_SOC_CAMERA is not set

# CONFIG_VIDEO_SH_MOBILE_CEU is not set

# CONFIG_RADIO_ADAPTERS is not set

# CONFIG_DAB is not set

```

Thanks for your help.Last edited by keet on Sun Jan 11, 2009 4:59 pm; edited 1 time in total

----------

## Kollin

Same with my logitech stx cam   :Confused: 

----------

## alet_roux

Same problem here.

----------

## keet

 *alet_roux wrote:*   

> Same problem here.

 

Ok, I finally fixed it.  It turns out that since I'm using an AMD64 installation, libv4l doesn't install 32-bit libraries.   Skype, being 32-bit and closed source, doesn't work with the 64-bit libv4l libraries.  Fortunately, Alexandre Rostovtsev posted a modified ebuild of libv4l-0.5.1 on Bugzilla here:

https://bugs.gentoo.org/240090

I copied it to my local overlay, made a digest, keyworded it, and masked higher versions for now.  After that, I installed it and modified /usr/bin/skype (it's in the bin directory, but it's actually a script) by adding one line before the end:

```
export LD_PRELOAD=/usr/lib32/libv4l/v4l1compat.so

exec /opt/skype/skype "$@"
```

Now my Logitech Quickcam Messenger works in Skype  :Smile: 

----------

## alet_roux

Thanks Keet, this solves the problem for me.

----------

## yvchu

The workaround with

 LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so xawtv

does not work for me:

libv4l2: error dequeuing buf: Invalid argument

ioctl: VIDIOC_DQBUF(index=0;type=VIDEO_CAPTURE;bytesused=0;flags=0x0 [];field=ANY;;timecode.type=0;timecode.flags=0;timecode.frames=0;timecode.seconds=0;timecode.minutes=0;timecode.hours=0;timecode.userbits="";sequence=0;memory=unknown): Invalid argument

the kernel driver works fine for a Logitech ID 046d:08d7 webcam, I can use mplayer using v4l2 to get playback.

I've tried both stable 0.5.3 and the latest (0.5.7 ) libv4l - the result is the same.

kernel 2.6.27-gentoo-r7 

Any ideas?

----------

## Kollin

 *keet wrote:*   

> 
> 
> https://bugs.gentoo.org/240090
> 
> 

 

Solved my skype problem on amd64 thank you   :Mr. Green: 

----------

## Mekoryuk

Neither works for me. Kopete refuses to believe a camera exists, even with the LD_PRELOAD; no error messages. Pointing Skype to the lib32 version of libv4l still brings the error that it can't load the library, so it's ignoring it. It's very frustrating. The only way I can get the camera to work is by:

```
mplayer tv:// -tv driver=v4l:width=352:height=288:outfmt=rgb24:device=/dev/video1:noaudio
```

This seems to not be dependent on doing LD_PRELOAD, it's just that the output format has to be very specific. How to pass this information to Skype or Kopete is beyond me.

----------

