Discussion:
[gentoo-user] webcam on Gentoo Logitech C270
(too old to reply)
Joseph
2014-12-21 17:00:02 UTC
Permalink
I have a Logitech C270 webcam but I can not make it to work with linux/skype

USB sound in kernel is ON:
CONFIG_SND_USB_AUDIO=y

lsusb
...
Bus 008 Device 006: ID 046d:0825 Logitech, Inc. Webcam C270

When I plug the USB cam I get an error:

xhci_hcd 0000:02:00.0: ERROR: unexpected command completion code 0x11.
usb 8-1: Not enough bandwidth for altsetting 4
6:3:4: usb_set_interface failed (-22)
--
Joseph
Joseph
2014-12-21 17:10:01 UTC
Permalink
Post by Joseph
I have a Logitech C270 webcam but I can not make it to work with linux/skype
CONFIG_SND_USB_AUDIO=y
lsusb
...
Bus 008 Device 006: ID 046d:0825 Logitech, Inc. Webcam C270
xhci_hcd 0000:02:00.0: ERROR: unexpected command completion code 0x11.
usb 8-1: Not enough bandwidth for altsetting 4
6:3:4: usb_set_interface failed (-22)
I have plug the webcam to standard USB-2 port and it is recognized I think:

[ 3321.717170] usb 3-2: usb_probe_device
[ 3321.717173] usb 3-2: configuration #1 chosen from 1 choice
[ 3321.717337] usb 3-2: adding 3-2:1.0 (config #1, interface 0)
[ 3321.717369] usb 3-2: adding 3-2:1.1 (config #1, interface 1)
[ 3321.717387] usb 3-2: adding 3-2:1.2 (config #1, interface 2)
[ 3321.717406] snd-usb-audio 3-2:1.2: usb_probe_interface
[ 3321.717409] snd-usb-audio 3-2:1.2: usb_probe_interface - got id
[ 3323.136617] set resolution quirk: cval->res = 384
[ 3323.137048] usb 3-2: adding 3-2:1.3 (config #1, interface 3)

But I can not see it in skype setting.
--
Joseph
w***@gmail.com
2014-12-21 17:40:02 UTC
Permalink
Am Sonntag, 21.12.2014 um 10:00
Post by Joseph
I have a Logitech C270 webcam but I can not make it to work with linux/skype
CONFIG_SND_USB_AUDIO=y
I guess you should also take a look at
Device Drivers > Multimedia support > Media USB Adapters

e.g.
MEDIA_USB_SUPPORT
MEDIA_CAMERA_SUPPORT
MEDIA_CONTROLLER
...

Regards
wabe
m***@gmx.de
2014-12-21 18:00:02 UTC
Permalink
Post by w***@gmail.com
Am Sonntag, 21.12.2014 um 10:00
Post by Joseph
I have a Logitech C270 webcam but I can not make it to work with linux/skype
CONFIG_SND_USB_AUDIO=y
I guess you should also take a look at
Device Drivers > Multimedia support > Media USB Adapters
e.g.
MEDIA_USB_SUPPORT
MEDIA_CAMERA_SUPPORT
MEDIA_CONTROLLER
...
Regards
wabe
You need UVC-Support:
CONFIG_USB_F_UVC=y

Best
Meino
Joseph
2014-12-21 18:30:02 UTC
Permalink
Post by m***@gmx.de
Post by w***@gmail.com
Am Sonntag, 21.12.2014 um 10:00
Post by Joseph
I have a Logitech C270 webcam but I can not make it to work with linux/skype
CONFIG_SND_USB_AUDIO=y
I guess you should also take a look at
Device Drivers > Multimedia support > Media USB Adapters
e.g.
MEDIA_USB_SUPPORT
MEDIA_CAMERA_SUPPORT
MEDIA_CONTROLLER
...
Regards
wabe
CONFIG_USB_F_UVC=y
I'm using kernle: linux-3.10.7
but there is no CONFIG_USB_F_UVC setting, I can not find anything for UVC

grep UVC .config
I get empty line.
--
Joseph
Joseph
2014-12-21 18:50:01 UTC
Permalink
Post by Joseph
Post by m***@gmx.de
Post by w***@gmail.com
Am Sonntag, 21.12.2014 um 10:00
Post by Joseph
I have a Logitech C270 webcam but I can not make it to work with linux/skype
CONFIG_SND_USB_AUDIO=y
I guess you should also take a look at
Device Drivers > Multimedia support > Media USB Adapters
e.g.
MEDIA_USB_SUPPORT
MEDIA_CAMERA_SUPPORT
MEDIA_CONTROLLER
...
Regards
wabe
CONFIG_USB_F_UVC=y
I'm using kernle: linux-3.10.7
but there is no CONFIG_USB_F_UVC setting, I can not find anything for UVC
grep UVC .config
I get empty line.
I have fond setting in kernel 3.10 for UVC

grep USB_VIDEO_CLASS .config
CONFIG_USB_VIDEO_CLASS=y (USB Video Class (UVC))

but I still don't see the USB camera in skype.
--
Joseph
Alexander Kapshuk
2014-12-21 20:10:02 UTC
Permalink
Post by Joseph
Post by Joseph
Post by m***@gmx.de
Post by w***@gmail.com
Am Sonntag, 21.12.2014 um 10:00
Post by Joseph
I have a Logitech C270 webcam but I can not make it to work with linux/skype
CONFIG_SND_USB_AUDIO=y
I guess you should also take a look at
Device Drivers > Multimedia support > Media USB Adapters
e.g.
MEDIA_USB_SUPPORT
MEDIA_CAMERA_SUPPORT
MEDIA_CONTROLLER
...
Regards
wabe
CONFIG_USB_F_UVC=y
I'm using kernle: linux-3.10.7
but there is no CONFIG_USB_F_UVC setting, I can not find anything for UVC
grep UVC .config
I get empty line.
I have fond setting in kernel 3.10 for UVC
grep USB_VIDEO_CLASS .config
CONFIG_USB_VIDEO_CLASS=y (USB Video Class (UVC))
but I still don't see the USB camera in skype.
--
Joseph
Do you have these enabled and set?

grep '^CONFIG.*V4L' /usr/src/linux/.config
CONFIG_VIDEO_V4L2=m
CONFIG_V4L_PLATFORM_DRIVERS=y

CONFIG_MEDIA_SUPPORT=m
CONFIG_USB_VIDEO_CLASS=m
CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y
CONFIG_USB_GSPCA=m
CONFIG_MEDIA_PCI_SUPPORT=y

grep -s ^LD_PRELOAD .*
.bash_profile:LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so

Also, you may want to try plugging you webcam into a USB2 port, if
available, instead of a USB3 one, as suggested here,
http://linux-kernel.2935.n7.nabble.com/3-15-8-USB-issue-with-uvc-cam-td920378.html
.

Hope this helps.
Joseph
2014-12-22 02:50:02 UTC
Permalink
Post by Alexander Kapshuk
grep '^CONFIG.*V4L' /usr/src/linux/.config
CONFIG_VIDEO_V4L2=m
CONFIG_V4L_PLATFORM_DRIVERS=y
CONFIG_MEDIA_SUPPORT=m
CONFIG_USB_VIDEO_CLASS=m
CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y
CONFIG_USB_GSPCA=m
CONFIG_MEDIA_PCI_SUPPORT=y
grep -s ^LD_PRELOAD .*
.bash_profile:LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so
Also, you may want to try plugging you webcam into a USB2 port, if
available, instead of a USB3 one, as suggested here,
[6]http://linux-kernel.2935.n7.nabble.com/3-15-8-USB-issue-with-uvc-cam
-td920378.html.
Hope this helps.
When I try to run: guvcview

I get:
guvcview 1.6.1
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.0.28/work/alsa-lib-1.0.28/src/pcm/pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.0.28/work/alsa-lib-1.0.28/src/pcm/pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.0.28/work/alsa-lib-1.0.28/src/pcm/pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.0.28/work/alsa-lib-1.0.28/src/pcm/pcm_route.c:947:(find_matching_chmap) Found no matching channel map
video device: /dev/video0
ERROR opening V4L2 interface for /dev/video0
unable to detect video devices on your system (0)
ERROR opening V4L interface: Permission denied
Init video returned -1
VIDIOC_REQBUFS - Failed to delete buffers: Inappropriate ioctl for device (errno 25)
cleaned allocations - 100%
Closing portaudio ...OK
--
Joseph
m***@gmx.de
2014-12-22 03:10:02 UTC
Permalink
Post by Joseph
Post by Alexander Kapshuk
grep '^CONFIG.*V4L' /usr/src/linux/.config
CONFIG_VIDEO_V4L2=m
CONFIG_V4L_PLATFORM_DRIVERS=y
CONFIG_MEDIA_SUPPORT=m
CONFIG_USB_VIDEO_CLASS=m
CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y
CONFIG_USB_GSPCA=m
CONFIG_MEDIA_PCI_SUPPORT=y
grep -s ^LD_PRELOAD .*
.bash_profile:LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so
Also, you may want to try plugging you webcam into a USB2 port, if
available, instead of a USB3 one, as suggested here,
[6]http://linux-kernel.2935.n7.nabble.com/3-15-8-USB-issue-with-uvc-cam
-td920378.html.
Hope this helps.
When I try to run: guvcview
guvcview 1.6.1
ALSA lib
/var/tmp/portage/media-libs/alsa-lib-1.0.28/work/alsa-lib-1.0.28/src/pcm/pcm.c:2239:(snd_pcm_open_noupdate)
Unknown PCM cards.pcm.rear
ALSA lib
/var/tmp/portage/media-libs/alsa-lib-1.0.28/work/alsa-lib-1.0.28/src/pcm/pcm.c:2239:(snd_pcm_open_noupdate)
Unknown PCM cards.pcm.center_lfe
ALSA lib
/var/tmp/portage/media-libs/alsa-lib-1.0.28/work/alsa-lib-1.0.28/src/pcm/pcm.c:2239:(snd_pcm_open_noupdate)
Unknown PCM cards.pcm.side
ALSA lib
/var/tmp/portage/media-libs/alsa-lib-1.0.28/work/alsa-lib-1.0.28/src/pcm/pcm_route.c:947:(find_matching_chmap)
Found no matching channel map
video device: /dev/video0 ERROR opening V4L2 interface for /dev/video0
unable to detect video devices on your system (0)
ERROR opening V4L interface: Permission denied
Init video returned -1
VIDIOC_REQBUFS - Failed to delete buffers: Inappropriate ioctl for device (errno 25)
cleaned allocations - 100%
Closing portaudio ...OK
--
Joseph
Hi Joseph,

in conjucntion with the C920 I found that guvcview does not plai well
with it.

First try to get anything from your webcam, before trying Skype or
such - so you have to fight against too many "open ends" or failure
sources.

Do you have gstreamer installed?

Try this command/shell script:
You have to adopt the device options to you setup.
It will record and display the video stream.

#! /bin/zsh
td=`date +%Y-%m-%d-%Hh%Mh%Ss`
fn=c920-$td.mp4
gst-launch-1.0 v4l2src device=/dev/video1 ! video/x-h264,width=1920,height=1080,framerate=30/1 ! h264parse ! muxout. alsasrc device="hw:3,0" ! queue ! audioconvert ! lamemp3enc ! muxout. matroskamux name=muxout streamable=true ! filesink location=$fn &
mplayer $fn &

HTH!
Best regards,
Meino
Joseph
2014-12-22 03:30:01 UTC
Permalink
Post by m***@gmx.de
Post by Joseph
Post by Alexander Kapshuk
grep '^CONFIG.*V4L' /usr/src/linux/.config
CONFIG_VIDEO_V4L2=m
CONFIG_V4L_PLATFORM_DRIVERS=y
CONFIG_MEDIA_SUPPORT=m
CONFIG_USB_VIDEO_CLASS=m
CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y
CONFIG_USB_GSPCA=m
CONFIG_MEDIA_PCI_SUPPORT=y
grep -s ^LD_PRELOAD .*
.bash_profile:LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so
Also, you may want to try plugging you webcam into a USB2 port, if
available, instead of a USB3 one, as suggested here,
[6]http://linux-kernel.2935.n7.nabble.com/3-15-8-USB-issue-with-uvc-cam
-td920378.html.
Hope this helps.
When I try to run: guvcview
guvcview 1.6.1
ALSA lib
/var/tmp/portage/media-libs/alsa-lib-1.0.28/work/alsa-lib-1.0.28/src/pcm/pcm.c:2239:(snd_pcm_open_noupdate)
Unknown PCM cards.pcm.rear
ALSA lib
/var/tmp/portage/media-libs/alsa-lib-1.0.28/work/alsa-lib-1.0.28/src/pcm/pcm.c:2239:(snd_pcm_open_noupdate)
Unknown PCM cards.pcm.center_lfe
ALSA lib
/var/tmp/portage/media-libs/alsa-lib-1.0.28/work/alsa-lib-1.0.28/src/pcm/pcm.c:2239:(snd_pcm_open_noupdate)
Unknown PCM cards.pcm.side
ALSA lib
/var/tmp/portage/media-libs/alsa-lib-1.0.28/work/alsa-lib-1.0.28/src/pcm/pcm_route.c:947:(find_matching_chmap)
Found no matching channel map
video device: /dev/video0 ERROR opening V4L2 interface for /dev/video0
unable to detect video devices on your system (0)
ERROR opening V4L interface: Permission denied
Init video returned -1
VIDIOC_REQBUFS - Failed to delete buffers: Inappropriate ioctl for device (errno 25)
cleaned allocations - 100%
Closing portaudio ...OK
--
Joseph
Hi Joseph,
in conjucntion with the C920 I found that guvcview does not plai well
with it.
First try to get anything from your webcam, before trying Skype or
such - so you have to fight against too many "open ends" or failure
sources.
Do you have gstreamer installed?
You have to adopt the device options to you setup.
It will record and display the video stream.
#! /bin/zsh
td=`date +%Y-%m-%d-%Hh%Mh%Ss`
fn=c920-$td.mp4
gst-launch-1.0 v4l2src device=/dev/video1 ! video/x-h264,width=1920,height=1080,framerate=30/1 ! h264parse ! muxout. alsasrc device="hw:3,0" ! queue ! audioconvert ! lamemp3enc ! muxout. matroskamux name=muxout streamable=true ! filesink location=$fn &
mplayer $fn &
HTH!
Best regards,
Meino
I can get a video when I run "guvcview" with banch of errors:

vid:046d
pid:0825
driver:uvcvideo
mapping control for Pan (relative)
UVCIOC_CTRL_MAP - Error: No such file or directory
mapping control for Tilt (relative)
UVCIOC_CTRL_MAP - Error: No such file or directory
mapping control for Pan Reset
UVCIOC_CTRL_MAP - Error: No such file or directory
mapping control for Tilt Reset
UVCIOC_CTRL_MAP - Error: No such file or directory
mapping control for Focus (absolute)
UVCIOC_CTRL_MAP - Error: No such file or directory
mapping control for LED1 Mode
UVCIOC_CTRL_MAP - Error: No such file or directory
mapping control for LED1 Frequency
UVCIOC_CTRL_MAP - Error: No such file or directory
mapping control for Disable video processing
UVCIOC_CTRL_MAP - Error: No such file or directory
mapping control for Raw bits per pixel
UVCIOC_CTRL_MAP - Error: No such file or directory
mapping control for Off
UVCIOC_CTRL_MAP - Error: Inappropriate ioctl for device
checking format: 1196444237
VIDIOC_G_COMP:: Inappropriate ioctl for device
fps is set to 1/25
drawing controls

Checking video mode ***@32bpp : OK
Could not grab image (select timeout): Resource temporarily unavailable

When I try to record anything bunch of errors messages popping up in command line:

(guvcview:5004): GConf-WARNING **: error creating revert set: Client failed to connect to the D-BUS daemon:
Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout
expired, or the network connection was broken.

I don't think this web-cam is Linux friendly :-/
Are there any alternative, web-cam that support Linux 100%
--
Joseph
Daniel Frey
2014-12-22 04:00:02 UTC
Permalink
Post by Joseph
When I try to run: guvcview
video device: /dev/video0 ERROR opening V4L2 interface for /dev/video0
unable to detect video devices on your system (0)
ERROR opening V4L interface: Permission denied
It can't open the device. You probably aren't in the right group for access.

I suspect it'd be the video group, just do:

ls -lhd /dev/video0

...and see what the permissions are, it's probably going to be root:video.

For my mythtv card, I know for sure it's root:video.

If that's all it is, use gpasswd and add yourself to the group then log
out and in again.

Dan
Joseph
2014-12-22 04:30:01 UTC
Permalink
Post by Daniel Frey
Post by Joseph
When I try to run: guvcview
video device: /dev/video0 ERROR opening V4L2 interface for /dev/video0
unable to detect video devices on your system (0)
ERROR opening V4L interface: Permission denied
It can't open the device. You probably aren't in the right group for access.
ls -lhd /dev/video0
...and see what the permissions are, it's probably going to be root:video.
For my mythtv card, I know for sure it's root:video.
If that's all it is, use gpasswd and add yourself to the group then log
out and in again.
Dan
YES, that was it. I was fighting with it all afternoon and it was so simple :-/

Though, the video and voice work with guvcview and can record it and save it but with skype only video works.
I think the problem is "pulse" audio, skype only show "pulse" audio option; guvcview allow me to switch to:
USB Device 0x46d:0x825 Audio.

How to force skype to USB Device Audio?
--
Joseph
Joseph
2014-12-22 02:50:02 UTC
Permalink
Post by Alexander Kapshuk
Do you have these enabled and set?
grep '^CONFIG.*V4L' /usr/src/linux/.config
CONFIG_VIDEO_V4L2=m
CONFIG_V4L_PLATFORM_DRIVERS=y
CONFIG_MEDIA_SUPPORT=m
CONFIG_USB_VIDEO_CLASS=m
CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y
CONFIG_USB_GSPCA=m
CONFIG_MEDIA_PCI_SUPPORT=y
grep -s ^LD_PRELOAD .*
.bash_profile:LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so
Also, you may want to try plugging you webcam into a USB2 port, if
available, instead of a USB3 one, as suggested here,
[6]http://linux-kernel.2935.n7.nabble.com/3-15-8-USB-issue-with-uvc-cam
-td920378.html.
Hope this helps.
References
6. http://linux-kernel.2935.n7.nabble.com/3-15-8-USB-issue-with-uvc-cam-td920378.html
I just did:

grep '^CONFIG.*V4L' /usr/src/linux/.config
CONFIG_VIDEO_V4L2=y
CONFIG_V4L_PLATFORM_DRIVERS=y

CONFIG_MEDIA_SUPPORT=y
CONFIG_USB_VIDEO_CLASS=y
CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y
CONFIG_USB_GSPCA=m
I think there is no need to enable the above: CONFIG_USB_GSPCA=m since nome of the dirvr are enabled as module.

CONFIG_MEDIA_PCI_SUPPORT=y

I run as user:
LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so

Yes, USB web-cam is plugged to USB2
But still skype does not recogines it :-(
--
Joseph
m***@gmx.de
2014-12-21 18:50:02 UTC
Permalink
Post by Joseph
Post by m***@gmx.de
Post by w***@gmail.com
Am Sonntag, 21.12.2014 um 10:00
Post by Joseph
I have a Logitech C270 webcam but I can not make it to work with linux/skype
CONFIG_SND_USB_AUDIO=y
I guess you should also take a look at
Device Drivers > Multimedia support > Media USB Adapters
e.g.
MEDIA_USB_SUPPORT
MEDIA_CAMERA_SUPPORT
MEDIA_CONTROLLER
...
Regards
wabe
CONFIG_USB_F_UVC=y
I'm using kernle: linux-3.10.7
but there is no CONFIG_USB_F_UVC setting, I can not find anything for UVC
grep UVC .config
I get empty line.
--
Joseph
Hi Joseph,

Ooops...I am using 3.18.1 vanilla here.

Derek Molloy runs this camera on a beaglebone black
(an ambedded Linux system)...
Forget the part regarding the Beaglebone Black,
but Linux is Linux is Linux is Linux :)
Therefore the hints on kernel configuration
items should be hopefully usable for you.
His webpage is here:
http://derekmolloy.ie/tag/c920/
May be this is of interest for you too:
http://www.oz9aec.net/index.php/gstreamer/473-using-the-logitech-c920-webcam-with-gstreamer
http://forum.ubuntuusers.de/topic/logitech-c920-webcam/
*** This links were presented to you by Google ***
;)

HTH!
Best
Meino
Joseph
2014-12-21 18:40:02 UTC
Permalink
Post by w***@gmail.com
Am Sonntag, 21.12.2014 um 10:00
Post by Joseph
I have a Logitech C270 webcam but I can not make it to work with linux/skype
CONFIG_SND_USB_AUDIO=y
I guess you should also take a look at
Device Drivers > Multimedia support > Media USB Adapters
e.g.
MEDIA_USB_SUPPORT
MEDIA_CAMERA_SUPPORT
MEDIA_CONTROLLER
I have enable CONFIG_MEDIA_USB_SUPPORT and CONFIG_MEDIA_CAMERA_SUPPORT but skype still is not recogizing it.

grep MEDIA .config
CONFIG_MEDIA_SUPPORT=y
CONFIG_MEDIA_CAMERA_SUPPORT=y
# CONFIG_MEDIA_ANALOG_TV_SUPPORT is not set
# CONFIG_MEDIA_DIGITAL_TV_SUPPORT is not set
# CONFIG_MEDIA_RADIO_SUPPORT is not set
# CONFIG_MEDIA_RC_SUPPORT is not set
# CONFIG_MEDIA_CONTROLLER is not set
CONFIG_MEDIA_USB_SUPPORT=y
# CONFIG_MEDIA_PCI_SUPPORT is not set
CONFIG_MEDIA_SUBDRV_AUTOSELECT=y
CONFIG_SND_HDA_CODEC_CMEDIA=y
# CONFIG_STAGING_MEDIA is not set

What other setting did I miss?
--
Joseph
Loading...