Home > getting the lenovo sl300 camera to work on linux

getting the lenovo sl300 camera to work on linux

I recently got a Lenovo SL300 Laptop, with a built in camera and was pretty keen to get onto using the camera with Skype, but it wouldn’t work – I couldn’t get a video feed from the camera. To cut a long story short, after two days of Googling and playing around I found a solution (though I can’t remember where I found it) – here’s how!

Tested on (K)Ubuntu Hardy & Intrepid (See bottom for Jaunty fix)

By default the webcam works on all Linux kernels 2.6.25+. However, the problem is that when the kernel loads the uvcvideo module, it loads it with the wrong parameters.

To correct this first unload the uvcvideo module:

~# sudo modprobe -r uvcvideo

Then reload the module with the correct parameter:

~# sudo modprobe uvcvideo quirks=16

Exactly what quirks are, I’m not sure – all I know is that various values for the quirks parameter work (I tried up to 50) without any noticeable performance difference.

Automating the Process

Now one would expect that you would want to automate this process and that’s also really simple – all you need to do is add an option to pass the quirks parameter to your kernel when the module is loaded. Exactly how you do this might vary depending on your linux distribution.

On Ubuntu do the following:

~# cd /etc/modprobe.d
~# nano options

At the bottom add the following line:

options uvcvideo quirks=16

And that’s it! Either reload the module with modprobe -r uvcvideo or restart your computer, and you won’t have to worry about it again!

I’ve only tested this solution on the Lenovo SL300 running Kubuntu Hardy and Intrepid, but I’m pretty sure it will work with all UVC webcams which aren’t displaying a picture.

Update: Upgrading to Jaunty breaks this fix. I think the reason is that modprobe no longer makes use of the options file, but instead replaces it with a series of conf files. To get the camera working again do the following:

~# cd /etc/modprobe.d
~# sudo nano uvcvideo.conf

Once again add the following line:
options uvcvideo quirks=16

And then reload the uvcvideo module with “sudo modprobe -r uvcvideo” and then “sudo modprobe uvcvideo”

Edit: If anyone successfully used this solution on a SL400 or SL500, please let me know.

Categories: (k)ubuntu, linux, open source
  1. Emidio
    March 18th, 2009 at 17:58 | #1

    The firts part of this trick work on my SL300 but when I change the file “options” and I add the line “options quirks=16″ and I restart modprobe with command “modprobe -r uvcvideo” the system say:

    WARNING: /etc/modprobe.d/options line 14: ignoring bad line starting with ‘options’

    and the cab doesn’t work.

    Thank you

  2. March 18th, 2009 at 20:42 | #2

    Thanks for letting me know. I realised that I left something out of what you must put in the options file.

    Instead of:
    options quirks=16

    Put:
    options uvcvideo quirks=16

    And then it will work.

    Basically what you’re doing here, is you’re telling the system that whenever it loads the uvcvideo module, it must load it with the quirks=16 option.

    I have edited the original post so that it now shows the correct way of doing it.

  3. Emidio
    March 18th, 2009 at 22:26 | #3

    Great.
    It works.
    Thank you!

  4. Kees
    September 13th, 2009 at 16:58 | #4

    After following the instructions under update my webcam finally works! (sl300 ubuntu 9.4

    Thanks!

    Kees

  5. September 13th, 2009 at 17:02 | #5

    @Kees
    Great to hear!

  6. Ramesh
    October 2nd, 2009 at 13:17 | #6

    hi, I am using sl-300 with Ubuntu 9.04 (clean install). I tried to fix my webcam but instead got this error message after running this command

    ramesh@ubuntu-rocks:~$ cd /etc/modprobe.d
    ramesh@ubuntu-rocks:/etc/modprobe.d$ sudo gedit uvcvideo.conf
    [sudo] password for ramesh:

    ramesh@ubuntu-rocks:/etc/modprobe.d$ sudo modprobe -r uvcvideo
    WARNING: All config files need .conf: /etc/modprobe.d/blacklist, it will be ignored in a future release.
    ramesh@ubuntu-rocks:/etc/modprobe.d$ sudo modprobe uvcvideo
    WARNING: All config files need .conf: /etc/modprobe.d/blacklist, it will be ignored in a future release.
    FATAL: Error inserting uvcvideo (/lib/modules/2.6.28-15-generic/kernel/drivers/media/video/uvc/uvcvideo.ko): Invalid argument

    Now, when I try to configure my webcam through aMSN, it says it cannot find any webcam, previously, I used to see light of my webcam (green light) but no picture now nothing. Runs well in Windows.

    What went wrong?

  7. Ramesh
    October 2nd, 2009 at 14:45 | #7

    hi, I tried again and this time it worked!!! I deleted the file uvcvideo.conf. I unloaded the module with ‘sudo rmmod uvcvideo’ then then loaded like you said ‘modprobe uvcvideo quirks = 16′ & voila, I got my picture when tested with ‘luvcview’!

    To make the change persistent, I edited /etc/modprobe.d/options – and added the following line “options uvcvideo quirks=16″. I havent tried if it works after restart, which I’m doing now.

  8. October 2nd, 2009 at 14:49 | #8

    @Ramesh
    Awesome to hear! I was just in the process of writing possible troubleshooting options when I got your comment that it worked :)

    Let me know if adding the line to the options file works, it’s easier than creating the conf file. Also, your modprobe is complaining that you blacklist file doesn’t contain a .conf extension so I would recommend renaming “blacklist” to “blacklist.conf”

  9. Ramesh
    October 2nd, 2009 at 15:17 | #9

    unfortunately, it didn’t work :( Do you have any suggestion? regarding, blacklist.conf.. I do have a file name blacklist.conf & blacklist as well!! Should I delete the file blacklist?

  10. October 2nd, 2009 at 15:29 | #10

    @Ramesh
    Hmmm…I have a few suggestions but I suspect it will be easier to work through them via gtalk/jabber. Add me as kylewilliams@jabber.co.za and we can troubleshoot the problem.

  11. Ramesh
    October 4th, 2009 at 15:48 | #11

    Thanks very much Kyle for helping me personally using gtalk/jabber. Now, I have uvcvideo.conf file and the solution is persistent and works fine. Thanks once again. :-)

  12. George
    November 20th, 2009 at 09:31 | #12

    Kyle, thanks for this post. I also own a SL300 (w/ Nvidia Graphics Card) It helped me run my webcam under Ubuntu 9.10. Just followed the instructions you laid out on Jaunty.

    George L.

  13. September 5th, 2011 at 00:34 | #13

    I used this fix again yesterday to get my webcam to work on a fresh install of Maverick. Will probably file a bug later this week.

  14. Mark
    November 22nd, 2011 at 10:21 | #14

    Kyle,
    Sorted! I’ve just loaded Oneiric x32 on my SL300 and was grinding teeth about the webcam.
    lsusb -v reports Syntek model 17ef:480a . There appears to be a kernel driver for the 17ef:480b which is in the SL400 and 500. Everything appeared fine in my webcam, the light came on, ‘Syntek Webcam’ was in the settings menu, Cheese and all webcam programs seemed very happy, no errors reported anywhere….BUT no freakin’ picture ever appeared!
    Editing (well creating bcos I didn’t already have one) the options file as per yr above instructions has solved it completely.
    So…thank you very very much for this extremely helpful post/blog
    Mark

  15. tapper
    July 8th, 2012 at 19:06 | #15

    Thanks a lot! This fix worked on my SL300 with Ubuntu 12.04LTS and lsusb reporting “Bus 002 Device 002: ID 17ef:480a Lenovo” for my webcam..

  1. No trackbacks yet.