Solved Thinkpad T460s: integrated webcam (12.1)

Hi,
I have some troubles to start my webcam on my laptop T460s, (FreeBSD 12.1-RELEASE amd64)
I can't even start manually my webcam.
Could you help me ?

Steps alreday done:
1 - # pkg install webcamd
2 - # usbconfig list
ugen0.1: <0x8086 XHCI root HUB> at usbus0, cfg=0 md=HOST spd=SUPER (5.0Gbps) pwr=SAVE (0mA)
ugen0.2: <PixArt USB Optical Mouse> at usbus0, cfg=0 md=HOST spd=LOW (1.5Mbps) pwr=ON (100mA)
ugen0.3: <vendor 0x8087 product 0x0a2b> at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (100mA)
ugen0.4: <Chicony Electronics Co.,Ltd. Integrated Camera> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA)
ugen0.5: <vendor 0x138a product 0x0090> at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (100mA)
3- % webcamd -d ugen0.4
webcamd: Could not open /dev/cuse. Did you kldload cuse4bsd?
4 - # kldload cuse4bsd
kldload: can't load cuse4bsd: module already loaded or in kernel

Thanks for your support,
B
 
1. Do you have /dev/cuse?
Maybe webcamd needs more permissions to access this special file.

2. Oh, and also, from the man file of webcamd():
webcamd requires the cuse4bsd(3) kernel module from ports in versions of
FreeBSD prior to 11.x and the cuse(3) kernel module in versions of Free-
BSD starting at 11.0.
 
Ensure you've done the following:

Code:
sudo sysrc -f /boot/loader.conf cuse_load=YES
sudo kldload cuse
sudo sysrc webcamd_enable=YES
sudo pw groupmod webcamd -m <your_username>
sudo service webcamd start

That should be all you need to get your webcam working
 
sysrc -v kld_list='${kld_list} cuse'
pw groupmod webcamd -m myuser
pkg install webcamoid
service webcamd enable
service webcamd start

I'm not shure if webcamd needs hald & dbus.
Also consider to install sysutils/devcpu-data & sysutils/cpupdate and start/enable them from loader.conf(5) and rc.conf(5), resp. (just in case you have any CPU bugs)

hi mjollni,
Thanks for the info. I installed both pkgs, and only sysutils/devcpu-data is enabled (loader.conf and rc.conf). I am not how to enable sysutils/cpupdate
Could you provide me the code I should add to enable : sysutils/cpupdate?
Thanks,
B
 
Ensure you've done the following:

Code:
sudo sysrc -f /boot/loader.conf cuse_load=YES
sudo kldload cuse
sudo sysrc webcamd_enable=YES
sudo pw groupmod webcamd -m <your_username>
sudo service webcamd start

That should be all you need to get your webcam working

Hi,
All steps are done on the shell I can apparently start the webcam:
Code:
<User>:~ % service webcamd start
Starting webcamd.
<root>:~ # service webcamd start
Starting webcamd.
But when I launch Chesse, I have the following error message "There was an error playing from from the webcam"

Thanks for your help.
 
But when I launch Chesse, I have the following error message "There was an error playing from from the webcam"
Thanks for your help.

Have you added your user to the webcamd group? As in sudo pw groupmod webcamd -m <your_username>

Edit: hmm, you said you did all those steps, so I guess the answer is yes. I'm afraid I don't know how to troubleshoot this any further. Those steps made it work on my computer (T480)
 
Have you added your user to the webcamd group? As in sudo pw groupmod webcamd -m <your_username>

Edit: hmm, you said you did all those steps, so I guess the answer is yes. I'm afraid I don't how to troubleshoot this any further. Those steps made it work on my computer (T480)

hi,
Yes the user has been added
<user>@bb:~ % groups
<user> wheel video webcamd

If needed I can provide extraction from my rc.conf and loader.
thanks,
Bertrand
 
@guidok
sudo sysrc -f /boot/loader.conf cuse_load=YES
You can do that, but general guideline is to start services and load drivers from rc.conf(5) unless absolutely needed at boot, e.g.

opensolaris_load="YES"
zfs_load="YES"

but load cuse(4) in /etc/rc.conf: kld_list="${kld_list} cuse"
likewise put sysctl(8) knobs in sysctl.conf(5) unless absolutely neccessary in /boot/loader.conf.
BB_ if Cheese does not work try webcamoid
pgrep -l webcamd will tell you how many webcamd's are running. You started twice? (as user & root)
  • After you added your user to group webcam, you have to log out & log in again to your GUI!

  • sudo sysrc cpupdate_enable=YES
    sudo service cpupdate start
 
You can do that, but general guideline is to start services from rc.conf(5) unless absolutely needed at boot, e.g.

opensolaris_load="YES"
zfs_load="YES"

likewise put sysctl(8) knobs in sysctl.conf(5) unless absolutely neccessary in /boot/loader.conf.
guidok if Cheese does not work try webcamoid
pgrep -l webcamd will tell you how many webcamd's are running. You started twice? (as user & root)

hi,
Yes, I launched the command twice (root and user).

the result of pgrep -l webcamd:

root@bb:~ # pgrep -l webcamd
669 webcamd
 
Hi Everyone!!!
Thanks for your help, Cheeese is not working (thanks Phishfry for your comment), but I successfully started my webcam with my browser (firefox)!!
Thanks all for your great support!!!
B
 
You can add to the alias section of /usr/local/etc/pkg.conf:

message: "query '[%C/%n] %M'",
rmessage: query -i "[%C/%n-%v] %M",

and then go through all package messages: pkg message|less. You may have to adjust some system settings...
what does groups tell you when you do that as user? Or groups bb as root?
And kldstat | grep cuse?
 
You can add to the alias section of /usr/local/etc/pkg.conf:

message: "query '[%C/%n] %M'",
rmessage: query -i "[%C/%n-%v] %M",

and then go through all package messages: pkg message|less. You may have to adjust some system settings...
what does groups tell you when you do that as user? Or groups bb as root?
And kldstat | grep cuse?
Hi,
Alias added, I have plenty of pages to read... I will take me time, anything specific or keyword I should search ?

I believe that groups tell you the all groups assigned to a us.

root@bb:~ # kldstat | grep cuse
2 1 0xffffffff82944000 c408 cuse.ko

result is impossible for me interpret.

By the way, I successfully started my webcam with my browser.
Thanks!!!
 
Yes great, congratulations! That was just to check the cuse(4) driver is loaded. Remember FreeBSD is not Linux. Not better (well, many here do think so, incl. me) not worse, but different. The package maintainers give hints/suggestions that you can/can not follow. And you have to do that yourself. When a message tells you: kldload xyz_driver you have to make that permanent in rc.conf(5). If it tells you sysctl net.inet.xyz=123456 minimum, you have to make that permanent in sysctl.conf(5) (sometimes /boot/loader.conf) etc.pp. Install the docs: pkg install {de,en}-freebsd-doc replace de with your native tongue. pkg list en-freebsd-doc tells you where the files are installed.
  • EDIT: set the thread solved: Click on the "..." on the 1st post, select edit thread, then you can set the prefix.
 
  • Thanks
Reactions: BB_
Back
Top