Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Enabling Lenovo Thinkpad T460p Webcam
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
wfthirtyfour
n00b
n00b


Joined: 21 May 2017
Posts: 5
Location: Moscow, RU

PostPosted: Sun May 21, 2017 7:34 pm    Post subject: Enabling Lenovo Thinkpad T460p Webcam Reply with quote

Hi, all.

I am trying to enable webcam on Thinkpad T460p with this kernel:
Code:

$ uname -r
4.9.6-gentoo-r1

Camera showsup as the following
Code:

lsusb:
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 5986:0708 Acer, Inc
Bus 001 Device 002: ID 138a:0090 Validity Sensors, Inc.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


Code:

dmesg:
[    2.185482] usb 1-8: New USB device found, idVendor=5986, idProduct=0708
[    2.186325] usb 1-8: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    2.187144] usb 1-8: Product: Integrated Camera
[    2.187954] usb 1-8: Manufacturer: SunplusIT Inc


I took two different approaches, both unsuccessfully.
First: following that post, I attempted to enable camera through UVC, even though my device id is not listed on official site.
USB_F_UVC [=y]
USB_CONFIGFS_F_UVC [=y]
USB_VIDEO_CLASS [=y]
Enabling these flags did nothing for me.

Than I resorted to GSPCA. One argument for is that they at least have sunplus module in kernel.
USB_GSPCA [=m]
USB_GSPCA_SUNPLUS [=m]
I will also stress that VIDEO_V4L2 [=y] is on.
To the best of my knowledge, VIDEO_V4L2 is responsible for v4l2-core.
However, gspca_main cannot be loaded, with following error:
Code:

[ 1113.911770] gspca_main: Unknown symbol v4l2_ctrl_poll (err 0)
[ 1113.911775] gspca_main: Unknown symbol video_ioctl2 (err 0)
[ 1113.911776] gspca_main: Unknown symbol v4l2_get_timestamp (err 0)
[ 1113.911778] gspca_main: Unknown symbol v4l2_device_put (err 0)
[ 1113.911786] gspca_main: Unknown symbol v4l2_fh_open (err 0)
[ 1113.911789] gspca_main: Unknown symbol v4l2_ctrl_handler_setup (err 0)
[ 1113.911792] gspca_main: Unknown symbol video_devdata (err 0)
[ 1113.911795] gspca_main: Unknown symbol __v4l2_ctrl_s_ctrl (err 0)
[ 1113.911798] gspca_main: Unknown symbol v4l2_fh_release (err 0)
[ 1113.911800] gspca_main: Unknown symbol v4l2_ctrl_subscribe_event (err 0)
[ 1113.911802] gspca_main: Unknown symbol video_unregister_device (err 0)
[ 1113.911805] gspca_main: Unknown symbol v4l2_device_disconnect (err 0)
[ 1113.911808] gspca_main: Unknown symbol v4l2_device_register (err 0)
[ 1113.911810] gspca_main: Unknown symbol __video_register_device (err 0)
[ 1113.911811] gspca_main: Unknown symbol v4l2_ctrl_g_ctrl (err 0)
[ 1113.911813] gspca_main: Unknown symbol v4l2_ctrl_handler_free (err 0)
[ 1113.911814] gspca_main: Unknown symbol v4l2_device_unregister (err 0)
[ 1113.911815] gspca_main: Unknown symbol video_device_release_empty (err 0)
[ 1113.911817] gspca_main: Unknown symbol v4l2_event_unsubscribe (err 0)
[ 1135.613122] kworker/dying (1066) used greatest stack depth: 12600 bytes left

Indeed,
Code:
less /proc/kallsyms | grep v4l2
is empty and it is a pure mystery to me why.
On top of that, grepping linux kernel sources with my device id also provides no ideas in which module I need to use for my camera.
I have put my full config here.
To sum up:

  • Due to some reason I don't have v4l2
  • Even if I remedy first problem, there is a thin hope that gspca_sunplus.ko will work for my cam


I have used Gentoo for more than 3 years now and it is first problem I could not solve on my own.
Thank you for participation!)
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 5963

PostPosted: Sun May 21, 2017 8:30 pm    Post subject: Reply with quote

You need to boot a kernel with V4L2. The one you're running doesn't have it.
Back to top
View user's profile Send private message
wfthirtyfour
n00b
n00b


Joined: 21 May 2017
Posts: 5
Location: Moscow, RU

PostPosted: Mon May 22, 2017 11:24 am    Post subject: Reply with quote

Ant P. wrote:
You need to boot a kernel with V4L2. The one you're running doesn't have it.

I will doublecheck, but I doubt that it is so simple. My config has the option turned on. How can I not have it?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 44013
Location: 56N 3W

PostPosted: Mon May 22, 2017 11:42 am    Post subject: Reply with quote

wfthirtyfour,

You omitted
Code:
mount /boot
so your kernel was silently installed to the wrong location, thats a common problem.
What is the date/time in
Code:
uname -a

That is the build date/time of the running kernel. Is it what you expect?

Unknown symbol errors can indicate that your kernel and modules do not belong to the same kernel configuration.
That could happen if you did everything correctly but the mount /boot step.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
wfthirtyfour
n00b
n00b


Joined: 21 May 2017
Posts: 5
Location: Moscow, RU

PostPosted: Mon May 22, 2017 7:17 pm    Post subject: Reply with quote

NeddySeagoon,
that was insightful suggestion.
However, I am still halfway to the understanding and bemused with what is happening on my device.

First, of course I have mounted boot properly. But, the current version of kernel is not what I expected.

Code:

wf34@wf34-tpad ~ $ uname -a
Linux wf34-tpad 4.9.6-gentoo-r1 #7 SMP Sun May 21 21:03:41 MSK 2017 x86_64 Intel(R) Core(TM) i5-6440HQ CPU @ 2.60GHz GenuineIntel GNU/Linux


Code:

wf34@wf34-tpad ~ $ l /boot/
total 22324
drwxr-xr-x  4 root root   16384 Jan  1  1970 .
drwxr-xr-x 22 root root    4096 Jan 31 22:40 ..
-rwxr-xr-x  1 root root  104044 Sep 24  2016 config-4.4.6-gentoo
-rwxr-xr-x  1 root root  115455 May 22 21:01 config-4.9.6-gentoo-r1
drwxr-xr-x  3 root root    8192 Jul 10  2016 EFI
drwxr-xr-x  6 root root    8192 May 22 21:06 grub
-rwxr-xr-x  1 root root       0 Feb  1 00:23 .keep
-rwxr-xr-x  1 root root 3526800 Sep 24  2016 System.map-4.4.6-gentoo
-rwxr-xr-x  1 root root 3810679 May 22 21:01 System.map-4.9.6-gentoo-r1
-rwxr-xr-x  1 root root 7274464 Sep 24  2016 vmlinuz-4.4.6-gentoo
-rwxr-xr-x  1 root root 7967280 May 22 21:01 vmlinuz-4.9.6-gentoo-r1


I don't even have any kernels dated May 21 now.
Where the hell did it load it from?
Is uname timestamp taken from kernel file creation date or is it something else?
Back to top
View user's profile Send private message
wfthirtyfour
n00b
n00b


Joined: 21 May 2017
Posts: 5
Location: Moscow, RU

PostPosted: Mon May 22, 2017 7:20 pm    Post subject: Reply with quote

NeddySeagoon,
update: the gspca_sunplus driver was what I needed for my device. The camera is working now.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 14290

PostPosted: Tue May 23, 2017 1:07 am    Post subject: Reply with quote

wfthirtyfour wrote:
Is uname timestamp taken from kernel file creation date or is it something else?
The kernel build captures the current time and includes it as text in the built kernel. That text will never change, regardless of the mtime on the kernel or where you copy it.
Back to top
View user's profile Send private message
wfthirtyfour
n00b
n00b


Joined: 21 May 2017
Posts: 5
Location: Moscow, RU

PostPosted: Tue May 23, 2017 6:52 pm    Post subject: Reply with quote

Hu,
this timestamp would not change if I run another kernel build with unchanged config?
Code:

sudo make && sudo make modules_install && sudo make install

The timestamp which I get know with uname (older one, 21 May) suggests this behavior. However, I find it a bit counter-intuitive.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 14290

PostPosted: Wed May 24, 2017 1:57 am    Post subject: Reply with quote

The timestamp will change if the object file in which it is stored is rebuilt. That file will be rebuilt according to build system rules that I have not studied, so I cannot tell you the exact conditions under which it will or will not be updated. If you have not changed the configuration, why would make (which should not need sudo) do anything?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 44013
Location: 56N 3W

PostPosted: Wed May 24, 2017 9:21 am    Post subject: Reply with quote

wfthirtyfour,

The rules for make examine the timestamps on the output files .o or .ko or whatever and compare them to
the timestamps on the input files that contribute to the output file.

When the output file is newer that all its input files, make does nothing for that output file as its already up to date.
Thus when you run make on an up to date kernel tree, make traverses the entire tree and finds nothing to do, so it does nothing.

If you really want to rebuild everything, you must run
Code:
make clean
to remove all the output files first.

This behaviour also explains why make gets confused if your system time ever goes backwards.
When that happens, changed input files can appear to be older than the output file but make won't spot it.

It also allows you to change a single line in the kernel source code and make will only rebuild affected files.
Thats much better than rebuilding lots of things that have not changed.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum