Differences between revisions 14 and 15
Revision 14 as of 2006-04-26 22:15:18
Size: 16765
Editor: p54B3B940
Comment: Cleaned up and updated for Dapper
Revision 15 as of 2006-04-26 22:18:17
Size: 17043
Editor: p54B3B940
Comment: added solution for "no space left on device" problem.
Deletions are marked like this. Additions are marked like this.
Line 150: Line 150:

  * If you get the error message `No space left on device`, first unplug all other USB devices from your USB port. If the webcam works then, you might want to experiment with which USB port to use, as it seems to have these problems when on the same bus as e.g. a USB mouse.

Content: TableOfContents()

Newer Logitech Quick Cam Express Webcams and a lot of other Webcams are supported by the [http://mxhaard.free.fr/download.html spca5xx] driver, a branch of the [http://spca50x.sourceforge.net spca50x] driver. The spca5xx driver supports a wider range of cameras, but classifies itselves as experimental. (This means it might crash your kernel in the worst case.)

The spca5xx driver is included in the Ubuntu kernel and works out of the box in Dapper Drake (6.06). In Breezy Badger (5.10) the included driver is unfortunately buggy and will freeze your system, once the webcam is accessed. That's why you have to replace it by a self-compiled one (see below).

Dapper Drake (6.06)

You don't have to do anything, just go ahead and plugin your webcam. Then you can use any application (e.g. gqcam, kopete, ...) to access the webcam. If it does not work, see the Troubleshooting section below.

Breezy Badger (5.10)

If you want to replace the spca5xx driver delivered with Ubuntu Breezy Badger, this text shows you how. A compilation of the kernel is not necessary.

Warning /!\ The spca5xx module delivered with Ubuntu Breezy is buggy and needs to be replaced, if you want to use it. This bug manifests itself by crashing the system when the camera is activated.

This howto is partially based on information found in arnieboy's posting: [http://www.ubuntuforums.org/showthread.php?t=70657&page=3]

Step 1: Get the spca5xx source code

First download the current spca5xx source from Michel Xhaard's homepage and store it in your home directory. At the time of writing 20051212 is the latest version.

cd ~
wget http://mxhaard.free.fr/spca50x/Download/spca5xx-20051212.tar.gz

But check out his site for a newer version at [http://mxhaard.free.fr/download.html] BR Change any occurance of spca5xx-20051212 in this how-to to the version you have downloaded.

Step 2: Become root

For administrative task Ubuntu uses the sudo command. This will not work here. (We have to change an environment variable (see below). If we use sudo this change will be discarded when the execution of the sudo commands ends, i.e. immediately.)

So, we use this method: BR Open a terminal window and enter:

{{{sudo -s }}}

When prompted for your password, enter your user password.

The prompt should change to: {{{root@yourmachine: }}}

Step 3: Download the necessary packages

In order to compile and integrate the drivers, the following packages are needed from the Ubuntu repositories:

  1. linux-headers-`uname -r`

  2. linux-restricted-modules-`uname -r`

  3. build-essential

  4. gcc-3.4

linux-... - The construct `uname -r` will evaluate to the version of the running kernel, e.g. (may vary on your system). The "linux" packages will download the headers of your kernel and the restricted modules from the repositories.

build-essential - contains utilities for compiling source code.

gcc-3.4 - The GNU C compiler. By default Breezy installs gcc-4.0 on your system. But the current kernel is compiled with gcc-3.4. Kernel modules MUST be compiled with the same compiler version as the kernel itself, so we need the older version. BR Warning /!\ This information is valid for Breezy and may change in later versions of Ubuntu.

The command to install these packages is:

{{{apt-get install linux-headers-uname -r linux-restricted-modules-uname -r build-essential gcc-3.4 }}}

Step 4: Compiling the spca5xx source code

The linux stuff is installed under /usr/src. So I suggest, you go there:

{{{cd /usr/src }}}

and move the spca5xx source from your home directory to this location: {{{mv ~/spca5xx-20051212.tar.gz . }}}

Unpack it {{{tar xfvz spca5xx-20051212.tar.gz }}}

Enter the spca5xx directory {{{cd spca5xx-20051212 }}}

Workaround to make the Makefile use gcc-3.4

The Makefile which controls the compiling process for this driver has to be told to use gcc-3.4 instead of the default version 4.0:

export CC=gcc-3.4

This sets the environment variable CC, which is used in the spac5xx Makefile to select the compiler.


Furthermore the spca5xx Makefile expect a pointer to the kernel source at a specific location. Let's create it: {{{ln -s /usr/src/linux-headers-uname -r /lib/modules/uname -r/build }}} (Note: If you compile a kernel, this link is usually there. But as we use a pre-compiled kernel, we have to cheat.)

Compiling the spca5xx source code

Spca5xx (last edited 2008-08-06 16:34:39 by localhost)