# [SOLVED] Built-in lenovo webcam: Which driver?

## muebi

Hi, 

I have a built-in webcam in my Lenovo W500 laptop. Does anybody know which driver/kernel module I need to get it up and working?

lsusb gives:

Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Bus 006 Device 002: ID 046d:c03e Logitech, Inc. Premium Optical Wheel Mouse

Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Bus 001 Device 004: ID 17ef:4807 Lenovo

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Bus 004 Device 003: ID 0a5c:2145 Broadcom Corp.

Bus 004 Device 002: ID 08ff:2810 AuthenTec, Inc.

Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

I believe the webcam is the device Bus 001 Device 004: ID 17ef:4807 Lenovo.Last edited by muebi on Mon Jan 11, 2010 4:08 am; edited 1 time in total

----------

## codergeek42

That's a UVC webcam - I have the same in my T500. You need to enable the uvcvideo kernel driver for it (either as a module or built-in).

----------

## SamuliSuominen

 *muebi wrote:*   

> Hi, 
> 
> I believe the webcam is the device Bus 001 Device 004: ID 17ef:4807 Lenovo.

 

I found this from Linux 2.6.31 source tree,

Documentation/video4linux/gspca.txt:vc032x              17ef:4802       Lenovo Vc0323+MI1310_SOC

But there is nothing for 17ef:4807.

Perhaps in 2.6.32.1 or newer?

----------

## muebi

I couldn't find the appropriate option in the kernel. Can you please tell me where I can find uvcvideo in the kernel menuconfig?

----------

## dmpogo

 *muebi wrote:*   

> I couldn't find the appropriate option in the kernel. Can you please tell me where I can find uvcvideo in the kernel menuconfig?

 

Device Drivers -> Multimedia Support -> Video Capture Adapters -> V4L USB devices -> USB video class

(if it is 2.6.31 kernel, earlier kernels did not have Multumedia Support section)

----------

## muebi

dmpogo, 

Thanks for your hint. I finally found it.

I followed this guide: http://en.gentoo-wiki.com/wiki/Webcam

However, if it comes to testing the webcam with mplayer I run into the following problem:

 mplayer tv:// -tv driver=v4l:width=352:height=288:device=/dev/video

0 

MPlayer SVN-r29463-4.3.4 (C) 2000-2009 MPlayer Team

Playing tv://.

TV file format detected.

Selected driver: v4l

 name: Video 4 Linux input

 author: Alex Beregszaszi

 comment: under development

=================================================================

 WARNING: YOU ARE USING V4L DEMUXER WITH V4L2 DRIVERS!!!

 As the V4L1 compatibility layer is broken, this may not work.

 If you encounter any problems, use driver=v4l2 instead.

 Bugreports on driver=v4l with v4l2 drivers will be ignored.

=================================================================

Selected device: UVC Camera (17ef:4807)

 Capabilites: capture 

 Device type: 1

 Supported sizes: 48x32 => 1280x1024

 Inputs: 1

ioctl get channel failed: Invalid argument

ioctl set chan failed: Invalid argument

ioctl set chan failed: Invalid argument

Error: Cannot set norm!

Selected input hasn't got a tuner!

ioctl set picture failed: Invalid argument

The 'outfmt' of 'Planar YV12' is likely not supported by your card

Munmap failed: Invalid argument

Exiting... (End of file)

Any ideas what's wrong?

----------

## muebi

It's me again. I tried the v4l2 driver as suggested in the output and it seems to work now.

I get the following:

mplayer tv:// -tv driver=v4l2:width=352:height=288:device=/dev/video0 

MPlayer SVN-r29463-4.3.4 (C) 2000-2009 MPlayer Team

Playing tv://.

TV file format detected.

Selected driver: v4l2

 name: Video 4 Linux 2 input

 author: Martin Olschewski <olschewski@zpr.uni-koeln.de>

 comment: first try, more to come  :Wink: 

v4l2: your device driver does not support VIDIOC_G_STD ioctl, VIDIOC_G_PARM was 

used instead.

Selected device: UVC Camera (17ef:4807)

 Capabilites:  video capture  streaming

 supported norms:

 inputs: 0 = Camera 1;

 Current input: 0

 Current format: YUYV

v4l2: ioctl set format failed: Invalid argument

v4l2: ioctl set format failed: Invalid argument

v4l2: ioctl set format failed: Invalid argument

tv.c: norm_from_string(pal): Bogus norm parameter, setting default.

v4l2: ioctl enum norm failed: Invalid argument

Error: Cannot set norm!

Selected input hasn't got a tuner!

v4l2: ioctl set mute failed: Invalid argument

==========================================================================

Opening video decoder: [raw] RAW Uncompressed Video

VDec: vo config request - 320 x 240 (preferred colorspace: Packed YUY2)

VDec: using Packed YUY2 as output csp (no 0)

Movie-Aspect is undefined - no prescaling applied.

VO: [xv] 320x240 => 320x240 Packed YUY2 

Selected video codec: [rawyuy2] vfm: raw (RAW YUY2)

==========================================================================

Audio: no sound

Starting playback...

v4l2: select timeout

V:   0.0 2836/2836 ??% ??% ??,?% 0 0 

However, from the errors in the output I am still not sure if it's the right driver...

----------

## dmpogo

I don't know about mplayer for capture. If you want to see whether your camera works, you can try

media-video/luvcview

----------

## muebi

luvcview -f vuf only works as root otherwise I get a "permission denied"

----------

## dmpogo

 *muebi wrote:*   

> luvcview -f vuf only works as root otherwise I get a "permission denied"

 

Did you add yourself to 'video' group ?

----------

## muebi

how can I do this?

----------

## dmpogo

 *muebi wrote:*   

> how can I do this?

 

as root

usermod -a -G video yourusername

----------

## vincent-

You need to be into usb group too:

```
usermod -a -G usb your_user_name
```

----------

## dmpogo

 *peratu wrote:*   

> You need to be into usb group too:
> 
> ```
> usermod -a -G usb your_user_name
> ```
> ...

 

I am not in usb group on my machine, and video works just fine.

----------

## cach0rr0

 *dmpogo wrote:*   

> 
> 
> I am not in usb group on my machine, and video works just fine.

 

++

there is no need to be in the 'usb' group. 

You need only permissions to access /dev/video*

```

meat@laptop02 ~ $ id

uid=1000(meat) gid=1001(meat) groups=10(wheel),18(audio),19(cdrom),27(video),35(games),80(cdrw),100(users),1001(meat),1004(haldaemon),1005(plugdev),1010(wireshark)

meat@laptop02 ~ $ ls -alh /dev/video0

crw-rw---- 1 root video 81, 0 Dec 19 13:58 /dev/video0

```

----------

