# Webcam



## Ependi Silalahi (Mar 2, 2017)

I have Lenovo T430 . Freebsd 11
How do I enable the webcam. 
I think the webcam is Intel.
I am not good yet.
Anybody out there have Lenovo T430?


----------



## aragats (Mar 3, 2017)

Install multimedia/cuse4bsd-kmod and load the kernel module:
	
	



```
# pkg install cuse4bsd-kmod
# kldload cuse4bsd
```
To make it persistent add the following line to your /boot/loader.conf:
	
	



```
cuse4bsd_load="YES"
```
Now you can test it by running:
	
	



```
$ mplayer tv:// -tv device=/dev/video0:driver=v4l2
```
You'll need to enable V4L (video4linux2) when building mplayer/mplayer2 (I believe it's not enabled by default).


----------



## tobik@ (Mar 3, 2017)

aragats said:


> Install multimedia/cuse4bsd-kmod and load the kernel module:
> 
> 
> 
> ...


This is not necessary anymore on FreeBSD 11.0. It comes with the system, so just use cuse_load="YES" in /boot/loader.conf.

You also need to install multimedia/webcamd and set it up. Refer to the message that is printed when you install it.


----------



## Ependi Silalahi (Mar 3, 2017)

thanks for help but unfortunately still doesnt work


----------



## fernandel (Mar 3, 2017)

Do we need to have in /etc/rc.conf

```
webcamd_enable="YES"
```

Thank you.


----------



## aragats (Mar 3, 2017)

Yo may need to set the right device explicitly. Run:
	
	



```
# usbconfig list
ugen0.1: <XHCI root HUB 0x8086> at usbus0, cfg=0 md=HOST spd=SUPER (5.0Gbps) pwr=SAVE (0mA)
ugen2.1: <EHCI root HUB Intel> at usbus2, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)
ugen1.1: <EHCI root HUB Intel> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)
ugen2.2: <product 0x0024 vendor 0x8087> at usbus2, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)
ugen1.2: <product 0x0024 vendor 0x8087> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)
ugen1.3: <Integrated Smart Card Reader Lenovo> at usbus1, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (100mA)
ugen1.4: <Integrated Camera Ricoh Company Ltd.> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (200mA)
```
Then add the corresponding flag "-d 1.4" to your /etc/rc.conf

```
webcamd_enable="YES"
webcamd_0_flags="-d 1.4 -i 0 -v 0"
```
[EDIT] fixing a typo in the file name.


----------



## Ependi Silalahi (Mar 3, 2017)

aragats thanks for keep helping. Still doesnt work i run the #usbconfig list.I have the same one you have but where do i add at /etc/rc.d
Btw I still dont see cuse4 app .
This webcam is build into the system. This is lenovo T430
Thanks


----------



## aragats (Mar 3, 2017)

Sorry, I mistyped, you should add it in /etc/rc.conf.
I'm on T430. Do you see the actual process running? E.g.:
	
	



```
$ ps aux | grep webcamd
root       27614   0.0  0.1   43876   9948  -  Is   Fri21       7:10.97 /usr/local/sbin/webcamd -i 0 -d ugen1.4 -B -U
```


----------



## Ependi Silalahi (Mar 6, 2017)

aragats 
here is the snapshots I have on my lenovo T430. still doesnt work I use 1.4 also not working


----------



## Ependi Silalahi (Mar 6, 2017)

aragats , since you have T430, can you use slim? I can't . using slim it make my login screen split two virtual windows. 
but using KDE windows manager i have no problem and using startx is als fine.
Sorry for late responds.


----------



## aragats (Mar 6, 2017)

Ependi Silalahi , you may try running `webcamd` manually first:
	
	



```
# webcamd
Available device(s):
webcamd [-d ugen0.1] -N XHCI-root-HUB-0x8086 -S unknown -M 0
webcamd [-d ugen2.1] -N EHCI-root-HUB-Intel -S unknown -M 0
webcamd [-d ugen1.1] -N EHCI-root-HUB-Intel -S unknown -M 1
webcamd [-d ugen1.2] -N product-0x0024-vendor-0x8087 -S unknown -M 0
webcamd [-d ugen2.2] -N product-0x0024-vendor-0x8087 -S unknown -M 1
webcamd [-d ugen1.3] -N Integrated-Smart-Card-Reader-Lenovo -S unknown -M 0
webcamd [-d ugen1.4] -N product-0x02d5-vendor-0x5986 -S unknown -M 0
Show webcamd usage:
webcamd -h

# webcamd -d ugen1.4
Attached to ugen1.4[0]
Creating /dev/video0
```
(Regarding slim(1) I'll write you directly or you can create another thread)


----------

