Saturday, May 31, 2008

How to install a Sony Vaio MotionEye webcam driver (ricoh r5u870) on Kubuntu 8.04 Hardy Heron

The webcam (Sony Vaio VGN-FZ21M, this guide applies to almost every Sony Vaio notebook webcam model though) was a bit tricky. I've tried multiple drivers, including the mediati one. At some point I even had to recover my system by booting from an installation CD, mounting my hard drive and removing the driver files and configuration entries in /etc/modules manually, because my Hardy Heron's attempts to load the driver at boot were going into failure/retry dead loop.

The one that worked for me was a driver package from Here's my installation steps:

  1. Author claims that r5u870 module is not compatible with the module uvcvideo, so check if you have it installed and remove it first if necessary.
  2. Current Kubuntu 8.04 Hardy Heron uses kernel version 2.6.24, so the appropriate driver distribution is this one: r5u870-0.11.2.
  3. Kubuntu distribution had kernel headers already installed, so you can proceed further. Otherwise you will need to install at least linux-headers-generic package
  4. Unpack the driver:
    tar xvfz r5u870-0.11.2.tar.gz
    cd r5u870-0.11.2

  5. Build driver:
    sudo make
  6. Install driver:
    sudo make install
  7. Push the newly-build module into kernel:
    sudo modprobe r5u870
  8. The webcam should become available immediately. Test it with Skype, Cheese or whatever. (the device for webcam will be /dev/video0)
  9. Now, if it works, add it to autoboot. Under root privileges, open /etc/modules and add the following lines:

    It's a small letter "L" in "v4l1-compat" and "v4l2-common", not capital letter "i".
  10. Save the file.
  11. Keep the original installation directory — in case your kernel version is updated, you will need to repeat the steps 5-7.

That should be it.

Navigate this thread:
Previous: How to disable touchpad while typing in Kubuntu 8.04 Hardy Heron
said thank you for this page

Liked this article? Bookmark/share it with others: Didn't like the article, found a mistake or just want to express your own opinion? Post a comment!


Anonymous said...

Fantastic it works. Thanks for your HowTo and the time spend to find the right driver. Cheers, Petroid

Cranked said...

Cheers :) Hope you have as much fun with your webcam as I have with mine ;)

Anonymous said...

hello im having sony vaio web cam in not working for two weeks ...i tried everything ...can u give me advice. thanks

Cranked said...

Let's start with... steps described in this post? :) Did you try them? :)

Anonymous said...

Hi boss I just wanted to know it the steps will work with Ubuntu 9.04 and which file do I download in, as I am not sure what my kernel is

Anonymous said...

I found this article trying to find a solution for my non-working webcam.
I have a ricoh 183a webcam, it used to work with r5u870, but that doesn't build anymore with recent linux kernels.
uvcvideo replaced r5u870, but it doesn't work in 320x240, only in 640x480.
Is there any solution?

Post a Comment

Have anything to say? Leave a comment!
Too shy or got a too private question? Email me
Alternatively, you can drop me a line on Twitter