Can't get Labtec Webcam to work in Mint 7 (SOLVED)

Questions about hardware,drivers and peripherals
Forum rules
Before you post please read this

Can't get Labtec Webcam to work in Mint 7 (SOLVED)

Postby mintyboy on Sat Sep 19, 2009 5:23 pm

Hi,

just getting to grips with Linux Mint 7 main edition, got my soundcard and microphone working fine but not my labtec webcam in anything from aMSN, Kopete or Skype

I need help and full instructions on what to do.

here is my data from running lsusb in terminal:
$ lsusb
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
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
Bus 002 Device 002: ID 046d:0929 Logitech, Inc. Labtec WebCam Pro
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

lspci -nn
00:00.0 Host bridge [0600]: Intel Corporation 82865G/PE/P DRAM Controller/Host-Hub Interface [8086:2570] (rev 02)
00:01.0 PCI bridge [0604]: Intel Corporation 82865G/PE/P PCI to AGP Controller [8086:2571] (rev 02)
00:1d.0 USB Controller [0c03]: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #1 [8086:24d2] (rev 02)
00:1d.1 USB Controller [0c03]: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #2 [8086:24d4] (rev 02)
00:1d.2 USB Controller [0c03]: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #3 [8086:24d7] (rev 02)
00:1d.3 USB Controller [0c03]: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #4 [8086:24de] (rev 02)
00:1d.7 USB Controller [0c03]: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB2 EHCI Controller [8086:24dd] (rev 02)
00:1e.0 PCI bridge [0604]: Intel Corporation 82801 PCI Bridge [8086:244e] (rev c2)
00:1f.0 ISA bridge [0601]: Intel Corporation 82801EB/ER (ICH5/ICH5R) LPC Interface Bridge [8086:24d0] (rev 02)
00:1f.1 IDE interface [0101]: Intel Corporation 82801EB/ER (ICH5/ICH5R) IDE Controller [8086:24db] (rev 02)
00:1f.2 IDE interface [0101]: Intel Corporation 82801EB (ICH5) SATA Controller [8086:24d1] (rev 02)
00:1f.3 SMBus [0c05]: Intel Corporation 82801EB/ER (ICH5/ICH5R) SMBus Controller [8086:24d3] (rev 02)
00:1f.5 Multimedia audio controller [0401]: Intel Corporation 82801EB/ER (ICH5/ICH5R) AC'97 Audio Controller [8086:24d5] (rev 02)
01:00.0 VGA compatible controller [0300]: nVidia Corporation NV44A [GeForce 6200] [10de:0221] (rev a1)
02:07.0 Ethernet controller [0200]: Broadcom Corporation NetXtreme BCM5788 Gigabit Ethernet [14e4:169c] (rev 03)
02:0d.0 FireWire (IEEE 1394) [0c00]: Agere Systems FW323 [11c1:5811] (rev 61)


if any more info is required just ask and will list it.

cheers in advance :)
Last edited by mintyboy on Tue Sep 29, 2009 12:18 pm, edited 1 time in total.
mintyboy
Level 1
Level 1
 
Posts: 10
Joined: Fri Apr 10, 2009 2:10 pm

Linux Mint is funded by ads and donations.
 

Re: Can't get Labtec Webcam to work in Mint 7

Postby rich_roast on Sat Sep 19, 2009 8:56 pm

Hi,

According to this your webcam needs a wrapper which some applications (like the ones you mentioned) might not know about it.

Try this to "teach" them:

Code: Select all
LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so skype


(Replace skype with whatever the name of the application you want to run is)

If it works the commands in your mintMenu can be changed accordingly, so either way, let us know.
User avatar
rich_roast
Level 6
Level 6
 
Posts: 1136
Joined: Sat Sep 05, 2009 4:37 pm

Re: Can't get Labtec Webcam to work in Mint 7

Postby mintyboy on Sun Sep 20, 2009 9:32 am

That done the trick in Kopete and Skype, thank you!!! :P

However it dosent work in aMSN?

I notice in aMSN preferences it says "starting port for direct connections (needed for file transfers and webcam)" it tells me I am behind a router so if I open the port on my router will that help?

So what do I do for Kopete adn Skype so I dont have to type "LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so skype" each time?

cheers in advance :)
mintyboy
Level 1
Level 1
 
Posts: 10
Joined: Fri Apr 10, 2009 2:10 pm

Re: Can't get Labtec Webcam to work in Mint 7

Postby rich_roast on Sun Sep 20, 2009 12:33 pm

Good, I'm glad it worked. The real pita is that the programs in question aren't aware of the library in the first place, because we're hearing about this a lot. But I'm guessing that the devs have their reasons.

For aMSN, there are instructions here about port forwarding. Hopefully they'll help sort that out. Looks like it's a common thing.

To get the apps have the environment variable exported when you click on their icons in mintMenu, it's quite straightforward, unless I've missed something. Should be possible to open mintMenu -> Preferences -> Main Menu, find the app in question, click on the Properties button and then put the full command, as you would in terminal, in the "Command box". Hope this fixes things up.
User avatar
rich_roast
Level 6
Level 6
 
Posts: 1136
Joined: Sat Sep 05, 2009 4:37 pm

Re: Can't get Labtec Webcam to work in Mint 7

Postby mintyboy on Mon Sep 21, 2009 2:17 pm

Ok have gone into Minmenu-> Preferneces -> Mainmenu the actual application, clicked on properties and put in the full command for each in the "Command box"

so each one is like this:
LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so skype

LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so amsn

LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so kopete

but now when i go to Mintmenu -> Internet -> then whatever application i want to run it does nothing? am i missing something?

cheers in advance :)
mintyboy
Level 1
Level 1
 
Posts: 10
Joined: Fri Apr 10, 2009 2:10 pm

Re: Can't get Labtec Webcam to work in Mint 7

Postby rich_roast on Tue Sep 22, 2009 9:14 am

Hi,

Well, this one caught me off guard. I've marked alacarte up as an application I dislike.

We're gonna have to make some uber short bash scripts as "replacement" programs; these just pass that environment variable to the app. Then we'll tell the menu to open the script. It's the only way I could find to make the menu to pay me any attention.

Become root.

Code: Select all
su


Then

Code: Select all
cat >> /usr/local/bin/skypecompat << "eof"
#!/bin/sh
# Compatibility script for skype

LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so camorama
eof


And for the other apps:

Code: Select all
cat >> /usr/local/bin/amsncompat << "eof"
#!/bin/sh
# Compatibility script for amsn

LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so amsn
eof


Code: Select all
cat >> /usr/local/bin/kopetecompat << "eof"
#!/bin/sh
# Compatibility script for kopete

LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so kopete
eof


Then, make them all executable

Code: Select all
chmod 755 /usr/local/bin/skypecompat
chmod 755 /usr/local/bin/amsncompat
chmod 755 /usr/local/bin/kopetecompat


Stop being root.

Code: Select all
exit


Close the terminal, if desired. In the menu tool, get each application to point to the new executable, so "skype" to "skypecompat". Don't worry about paths or anything, your path should already be configured to look in /usr/local/bin so just the name "skypecompat" or whatever is fine.

Now the app should start cleanly.

On a related note, to the general everyone, what the heck? I can't believe this is the best way of achieving this, but it was the only way I could find that worked. I tried everything under the sun using alacarte on its own, and directly editing every .desktop file around, but it didn't give a ****, it wouldn't open these apps with a simple environment declaration in front. I mean, what gives? What am I missing?

[edit] fixed typo in commands. Always check when copying/pasting commands as root. No harm'd've been done, but still.
User avatar
rich_roast
Level 6
Level 6
 
Posts: 1136
Joined: Sat Sep 05, 2009 4:37 pm

Re: Can't get Labtec Webcam to work in Mint 7

Postby mintyboy on Tue Sep 22, 2009 2:34 pm

Hi,

ok done as intructed and aMSN and Kopete work fine (however still havent done the port forwarding to get the webcam working in aMSN, but i will :)), but skype is doing nothing when i and click on it in the Mainmenu -> internet -> Skype.

I see in the bash script for skype it differs from the other two as instead of saying skpe after "LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so" you have camorama, is this a mistake or right?

cat >> /usr/local/bin/skypecompat << "eof"
#!/bin/sh
# Compatibility script for skype

LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so camorama
eof

This is all new to me, so seeing as I have entered all this how do I change it using the terminal.

cheers in advance :)
mintyboy
Level 1
Level 1
 
Posts: 10
Joined: Fri Apr 10, 2009 2:10 pm

Re: Can't get Labtec Webcam to work in Mint 7

Postby rich_roast on Tue Sep 22, 2009 11:06 pm

mintyboy wrote:I see in the bash script for skype it differs from the other two as instead of saying skpe after "LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so" you have camorama, is this a mistake or right?

cat >> /usr/local/bin/skypecompat << "eof"
#!/bin/sh
# Compatibility script for skype

LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so camorama
eof

This is all new to me, so seeing as I have entered all this how do I change it using the terminal.

cheers in advance :)


Cripes, right, another typo. Yeah, I tested with camorama on my own system knowing that I needed a different compatibility library, v4l1compat.so, to make my camera work and since I just use pidgin for messengering at the moment I decided on using camorama as my test app. Good stuff checking the script :D . GUI way to change it would be to alt+f2 (to run something), and "gksu gedit" in there to open the text editor, open the file and just make the appropriate correction.

But the game seems afoot, so we'll go with terminal. You could use rm (remove) it and cat again but let's go for another useful utility and use sed (stream editor):

Code: Select all
sed -i 's/camorama/skype/' /usr/local/bin/skypecompat


You'll need to be root, remember. But always check the command before running as root. Wouldn't want to run

Code: Select all
rm -rf /<not really>*


without the <not really> bit in by accident. Seriously. Beware of the potential for damage when taking instructions from a stranger (I'm well meaning but as you've seen not averse to typos, though I'd hope anyone would be super careful to avoid giving out potentially destructive commands in code tags it's not impossible).

The -i option replaces the file (I remember this as "in place (of)"), the 's' ("substitute") bit is a search and replace for the regular expression "camorama" to be replaced with "skype" (the / let sed know which bit is which), and of course finally there's the name of the file we're "i"-ing.

If you're interested, (bet you already looked it up :wink: ) the cat command is for concatenating bits from different files into a single file, but it's handy for a quick text editor as it was used for here. It's versatile too. The "eof" bit (end of file) and the arrows let cat know when to quit, and "eof" doesn't end up going in our scripts. The #!/bin/sh bit is to call the shell to run the command, which isn't strictly necessary at all times when writing a shell script, but Gnome menu wouldn't run the script without it - I actually tested this.

These commands don't even begin to touch on what cat and sed can do for you. There's lots online about them in addition to their manual pages:

Code: Select all
man cat
man sed


Remember that man pages are pretty dry and it takes about five goes just to get the gist of them; online tutorials and tips are bountiful and make up for the reference.

This is as about as crude and straightforward as shell scripting gets; shell scripts can be an extremely useful way of getting things to work the way you want them to. The advice here is not even scratching the surface of what is possible; this was just a quick fix for an irritating bug with a few apps not preloading a compatibility library. Ultimately, shell scripts provide a way for a user to order programs around directly.

Whew... :wink:
User avatar
rich_roast
Level 6
Level 6
 
Posts: 1136
Joined: Sat Sep 05, 2009 4:37 pm

Re: Can't get Labtec Webcam to work in Mint 7

Postby mintyboy on Wed Sep 23, 2009 2:50 pm

Well thats that then! :D Sorted

Excellent instructions and very well explained steps, you certainly know your stuff.

My kids are growing up in Montrose in Scotland and its funny to hear the local dialect, here in Montrose they commonly use the word 'Doss' to describe something thats really good.
It makes me laugh when I hear it being used as it sounds like Dos the operating system at least thats what I find - maybe its just the computer geek in me :)

Anyway as they would say your Doss! :lol:

Thanks again Mintyboy :D
mintyboy
Level 1
Level 1
 
Posts: 10
Joined: Fri Apr 10, 2009 2:10 pm

Re: Can't get Labtec Webcam to work in Mint 7

Postby theidiamin on Fri Sep 25, 2009 7:57 pm

I have a related problem which is currently giving me some frustration. I have installed a Mikomi usb webcam for which I managed to find a driver and which is recognised by the system. It works under Skype, Ekiga and all other software but will not work with Camorama which reports that it is unable to access the device. I have tried all the usual choices available, sudo camorama in a terminal etc., to no avail.

This is a nuisance in that those software's which do work do not offer an opportunity to tweak the camera's video settings which are by default extremely dark.

Does anyone have an idea what is going wrong or know of an alternative method of tweaking the video settings for this device?
theidiamin
Level 1
Level 1
 
Posts: 1
Joined: Fri Sep 25, 2009 10:25 am

Re: Can't get Labtec Webcam to work in Mint 7

Postby mintyboy on Sun Sep 27, 2009 1:39 pm

theidiamin wrote:This is a nuisance in that those software's which do work do not offer an opportunity to tweak the camera's video settings which are by default extremely dark.

Does anyone have an idea what is going wrong or know of an alternative method of tweaking the video settings for this device?


My Labtec Webcam has a focus function which is the ring in front of the camera, all u have to do is turn it left or right until you get a clear image I think your Mikomi USB webcam is the same.

With regards to the dark settings I find mine dosen't cope well at night with just the main room light on and I find a desktop lamp helps.

cheers Mintyboy :)
mintyboy
Level 1
Level 1
 
Posts: 10
Joined: Fri Apr 10, 2009 2:10 pm

Linux Mint is funded by ads and donations.
 

Return to Hardware Support

Who is online

Users browsing this forum: No registered users and 7 guests