[138a:0011] Fingerprint reader Validity Sensors not recognized

Bug #790183 reported by Paolo G
510
This bug affects 98 people
Affects Status Importance Assigned to Milestone
libfprint
Fix Released
Wishlist
libfprint (Fedora)
New
Undecided
Unassigned
libfprint (Ubuntu)
Fix Released
Wishlist
AceLan Kao

Bug Description

This bug concerns the fingerprint reader "Validity Sensor" listed as: Bus 002 Device 003: ID 138a:0011 Validity Sensors, Inc.
In my case this bug concerns a DELL Vostro 3550 running Ubuntu 11.04 and libfprint 1:0.4.0.

Bus 002 Device 003: ID 138a:0011 Validity Sensors, Inc.
Device Descriptor:
  bLength 18
  bDescriptorType 1
  bcdUSB 1.10
  bDeviceClass 255 Vendor Specific Class
  bDeviceSubClass 17
  bDeviceProtocol 255
  bMaxPacketSize0 8
  idVendor 0x138a Validity Sensors, Inc.
  idProduct 0x0011
  bcdDevice 0.78
  iManufacturer 0
  iProduct 0
  iSerial 1 21b8142b09ea
  bNumConfigurations 1
  Configuration Descriptor:
    bLength 9
    bDescriptorType 2
    wTotalLength 46
    bNumInterfaces 1
    bConfigurationValue 1
    iConfiguration 0
    bmAttributes 0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower 100mA
    Interface Descriptor:
      bLength 9
      bDescriptorType 4
      bInterfaceNumber 0
      bAlternateSetting 0
      bNumEndpoints 4
      bInterfaceClass 255 Vendor Specific Class
      bInterfaceSubClass 0
      bInterfaceProtocol 0
      iInterface 0
      Endpoint Descriptor:
        bLength 7
        bDescriptorType 5
        bEndpointAddress 0x01 EP 1 OUT
        bmAttributes 2
          Transfer Type Bulk
          Synch Type None
          Usage Type Data
        wMaxPacketSize 0x0040 1x 64 bytes
        bInterval 0
      Endpoint Descriptor:
        bLength 7
        bDescriptorType 5
        bEndpointAddress 0x81 EP 1 IN
        bmAttributes 2
          Transfer Type Bulk
          Synch Type None
          Usage Type Data
        wMaxPacketSize 0x0040 1x 64 bytes
        bInterval 0
      Endpoint Descriptor:
        bLength 7
        bDescriptorType 5
        bEndpointAddress 0x82 EP 2 IN
        bmAttributes 2
          Transfer Type Bulk
          Synch Type None
          Usage Type Data
        wMaxPacketSize 0x0040 1x 64 bytes
        bInterval 0
      Endpoint Descriptor:
        bLength 7
        bDescriptorType 5
        bEndpointAddress 0x83 EP 3 IN
        bmAttributes 3
          Transfer Type Interrupt
          Synch Type None
          Usage Type Data
        wMaxPacketSize 0x0008 1x 8 bytes
        bInterval 4
Device Status: 0x0000
  (Bus Powered)

Revision history for this message
Lidinei (lidinei-gmail) wrote :

I have problem with the same reader.
 138a:0011 DigitalPersona, Inc

My laptop is a Dell .

More info:

Bus 001 Device 004: ID 138a:0011 DigitalPersona, Inc
Device Descriptor:
  bLength 18
  bDescriptorType 1
  bcdUSB 1.10
  bDeviceClass 255 Vendor Specific Class
  bDeviceSubClass 17
  bDeviceProtocol 255
  bMaxPacketSize0 8
  idVendor 0x138a DigitalPersona, Inc
  idProduct 0x0011
  bcdDevice 0.78
  iManufacturer 0
  iProduct 0
  iSerial 1 8404322826cf
  bNumConfigurations 1
  Configuration Descriptor:
    bLength 9
    bDescriptorType 2
    wTotalLength 46
    bNumInterfaces 1
    bConfigurationValue 1
    iConfiguration 0
    bmAttributes 0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower 100mA
    Interface Descriptor:
      bLength 9
      bDescriptorType 4
      bInterfaceNumber 0
      bAlternateSetting 0
      bNumEndpoints 4
      bInterfaceClass 255 Vendor Specific Class
      bInterfaceSubClass 0
      bInterfaceProtocol 0
      iInterface 0
      Endpoint Descriptor:
        bLength 7
        bDescriptorType 5
        bEndpointAddress 0x01 EP 1 OUT
        bmAttributes 2
          Transfer Type Bulk
          Synch Type None
          Usage Type Data
        wMaxPacketSize 0x0040 1x 64 bytes
        bInterval 0
      Endpoint Descriptor:
        bLength 7
        bDescriptorType 5
        bEndpointAddress 0x81 EP 1 IN
        bmAttributes 2
          Transfer Type Bulk
          Synch Type None
          Usage Type Data
        wMaxPacketSize 0x0040 1x 64 bytes
        bInterval 0
      Endpoint Descriptor:
        bLength 7
        bDescriptorType 5
        bEndpointAddress 0x82 EP 2 IN
        bmAttributes 2
          Transfer Type Bulk
          Synch Type None
          Usage Type Data
        wMaxPacketSize 0x0040 1x 64 bytes
        bInterval 0
      Endpoint Descriptor:
        bLength 7
        bDescriptorType 5
        bEndpointAddress 0x83 EP 3 IN
        bmAttributes 3
          Transfer Type Interrupt
          Synch Type None
          Usage Type Data
        wMaxPacketSize 0x0008 1x 8 bytes
        bInterval 4
Device Status: 0x0000
  (Bus Powered)

Revision history for this message
Elliott Sales de Andrade (qulogic) wrote :

I also see this problem on a Dell Vostro 3450. According to the Dell support site, this model is a VFS5011.

tags: added: 3450 vfs5011
Changed in libfprint (Ubuntu):
status: New → Confirmed
Revision history for this message
TitusX (titusx) wrote :

Hello, I've a HP ProBook 6460b with following (not recognized) fingerprint reader:
"Bus 001 Device 003: ID 138a:003c DigitalPersona, Inc"
I'm using Ubuntu 11.04 and allready tried the "ppa:fingerprint/fprint". Thanx.

Revision history for this message
Max N Kutsevol (max-kutsevol-com) wrote :

I'm on ubuntu 11.10, notebook dell vostro 3750
lsusb gives me:
Bus 001 Device 003: ID 138a:0011 Validity Sensors, Inc.

Not working :(

Revision history for this message
Max N Kutsevol (max-kutsevol-com) wrote :

http://www.ubuntu.com/certification/catalog/make/usb:138A
States that
VFS5011 Fingerprint Reader
[138a:0011]

is supported as of 10.10. Strange. Doesn't work for me.

tags: added: 3750
tags: added: 8560w elitebook hp
Revision history for this message
Peter (piombo) wrote :

HP ProBook 4730s
138a:003c

Bus 001 Device 003: ID 138a:003c Validity Sensors, Inc.
Device Descriptor:
  bLength 18
  bDescriptorType 1
  bcdUSB 1.10
  bDeviceClass 255 Vendor Specific Class
  bDeviceSubClass 18
  bDeviceProtocol 255
  bMaxPacketSize0 8
  idVendor 0x138a Validity Sensors, Inc.
  idProduct 0x003c
  bcdDevice 0.86
  iManufacturer 0
  iProduct 0
  iSerial 1
  bNumConfigurations 1
  Configuration Descriptor:
    bLength 9
    bDescriptorType 2
    wTotalLength 46
    bNumInterfaces 1
    bConfigurationValue 1
    iConfiguration 0
    bmAttributes 0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower 100mA
    Interface Descriptor:
      bLength 9
      bDescriptorType 4
      bInterfaceNumber 0
      bAlternateSetting 0
      bNumEndpoints 4
      bInterfaceClass 255 Vendor Specific Class
      bInterfaceSubClass 0
      bInterfaceProtocol 0
      iInterface 0
      Endpoint Descriptor:
        bLength 7
        bDescriptorType 5
        bEndpointAddress 0x01 EP 1 OUT
        bmAttributes 2
          Transfer Type Bulk
          Synch Type None
          Usage Type Data
        wMaxPacketSize 0x0040 1x 64 bytes
        bInterval 0
      Endpoint Descriptor:
        bLength 7
        bDescriptorType 5
        bEndpointAddress 0x81 EP 1 IN
        bmAttributes 2
          Transfer Type Bulk
          Synch Type None
          Usage Type Data
        wMaxPacketSize 0x0040 1x 64 bytes
        bInterval 0
      Endpoint Descriptor:
        bLength 7
        bDescriptorType 5
        bEndpointAddress 0x82 EP 2 IN
        bmAttributes 2
          Transfer Type Bulk
          Synch Type None
          Usage Type Data
        wMaxPacketSize 0x0040 1x 64 bytes
        bInterval 0
      Endpoint Descriptor:
        bLength 7
        bDescriptorType 5
        bEndpointAddress 0x83 EP 3 IN
        bmAttributes 3
          Transfer Type Interrupt
          Synch Type None
          Usage Type Data
        wMaxPacketSize 0x0008 1x 8 bytes
        bInterval 4

Revision history for this message
Alexey Brodkin (alexey-brodkin) wrote :

Seems like "Bus 001 Device 003: ID 138a:003c DigitalPersona, Inc" is VFS451 model from Validity and according to this message (http://lists.freedesktop.org/archives/fprint/2011-August/000046.html) Validity is going to deliver its own proprietary drivers for wide range of their fingerprint readers in April of 2012

==========
It will support VFS301, 5011, 5111 and 5131 in addition to VFS451, 471 & 491.
==========

But as for VFS301 it seems like libfprint just got support for this device. More info in this bug: https://bugs.launchpad.net/ubuntu/+source/libfprint/+bug/744310

Revision history for this message
Zoubidoo (zoubidoo) wrote :

According to Ubuntu certification, Fingerprint reader 138a:0011 should work.
http://www.ubuntu.com/certification/catalog/make/usb:138A

I bought a laptop based on this information and now have hardware that is unusable or requires proprietary drivers.

Misleading information is not cool.

summary: - Fingerprint reader Validity Sensors not recognized
+ [138a:0011] Fingerprint reader Validity Sensors not recognized
Changed in libfprint (Ubuntu):
status: Confirmed → Triaged
importance: Undecided → Wishlist
Revision history for this message
Michał Flakowski (michal-flakowski) wrote :

The same in new vostro 3360.
Validity Sensors, Inc. VFS5011 Fingerprint Reader
(0x138a)

Revision history for this message
aleksey (aleksey-skripka) wrote :

Dell Vostro 3750
Ubuntu 12.04
Bus 001 Device 004: ID 138a:0011 Validity Sensors, Inc. VFS5011 Fingerprint Reader
not detecting this device

Revision history for this message
Alisher (alif) wrote :

Dell Vostro v131
Ubuntu 12.04
Bus 002 Device 004: ID 138a:0011 Validity Sensors, Inc. VFS5011 Fingerprint Reader
Bus 002 Device 004: ID 138a:0011 Validity Sensors, Inc. VFS5011 Fingerprint Reader
Device Descriptor:
  bLength 18
  bDescriptorType 1
  bcdUSB 1.10
  bDeviceClass 255 Vendor Specific Class
  bDeviceSubClass 17
  bDeviceProtocol 255
  bMaxPacketSize0 8
  idVendor 0x138a Validity Sensors, Inc.
  idProduct 0x0011 VFS5011 Fingerprint Reader
  bcdDevice 0.78
  iManufacturer 0
  iProduct 0
  iSerial 1 45a671801afe
  bNumConfigurations 1
  Configuration Descriptor:
    bLength 9
    bDescriptorType 2
    wTotalLength 46
    bNumInterfaces 1
    bConfigurationValue 1
    iConfiguration 0
    bmAttributes 0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower 100mA
    Interface Descriptor:
      bLength 9
      bDescriptorType 4
      bInterfaceNumber 0
      bAlternateSetting 0
      bNumEndpoints 4
      bInterfaceClass 255 Vendor Specific Class
      bInterfaceSubClass 0
      bInterfaceProtocol 0
      iInterface 0
      Endpoint Descriptor:
        bLength 7
        bDescriptorType 5
        bEndpointAddress 0x01 EP 1 OUT
        bmAttributes 2
          Transfer Type Bulk
          Synch Type None
          Usage Type Data
        wMaxPacketSize 0x0040 1x 64 bytes
        bInterval 0
      Endpoint Descriptor:
        bLength 7
        bDescriptorType 5
        bEndpointAddress 0x81 EP 1 IN
        bmAttributes 2
          Transfer Type Bulk
          Synch Type None
          Usage Type Data
        wMaxPacketSize 0x0040 1x 64 bytes
        bInterval 0
      Endpoint Descriptor:
        bLength 7
        bDescriptorType 5
        bEndpointAddress 0x82 EP 2 IN
        bmAttributes 2
          Transfer Type Bulk
          Synch Type None
          Usage Type Data
        wMaxPacketSize 0x0040 1x 64 bytes
        bInterval 0
      Endpoint Descriptor:
        bLength 7
        bDescriptorType 5
        bEndpointAddress 0x83 EP 3 IN
        bmAttributes 3
          Transfer Type Interrupt
          Synch Type None
          Usage Type Data
        wMaxPacketSize 0x0008 1x 8 bytes
        bInterval 4
Device Status: 0x0000
  (Bus Powered)

Revision history for this message
Francisco Keppler Silva Alecrim (alecrim) wrote :

I'm with the same problem.

DELL Vostro 3550

$ lsusb | grep Finger
Bus 002 Device 003: ID 138a:0011 Validity Sensors, Inc. VFS5011 Fingerprint Reader
$ fingerprint-identifier
Found no devices that can identify. Aborting.

Any idea?

Revision history for this message
Alexander Herrmann (darignac) wrote :

Well, I'm also stuck. Laptop is a Dell Vostro V131:

$ lsusb | grep Finger
Bus 002 Device 004: ID 138a:0011 Validity Sensors, Inc. VFS5011 Fingerprint Reader
$ fingerprint-identifier
Found no devices that can identify. Aborting.

Suggestions anyone? Thanks!

Revision history for this message
Glotzbach (glotzbach) wrote :

Is there anything we can do to get this device supported? I'd be happy to stalk Dell, for example, but what should I ask for? Source code of the Windows drivers? (Sorry if this is a weird suggestion; I have no clue how Ubuntu drivers would be made)

Revision history for this message
Alexey Brodkin (alexey-brodkin) wrote :

We may do 2 things:
1. Convince Validity Inc. to contribute to libfprint with corresponding drivers.
2. Do some study (tips on getting data to look at are here https://github.com/andree182/vfs301) and implement those drivers ourselves as Andrej Krutak did for vfs301.

tags: added: v131
tags: added: 3460
Revision history for this message
Removed by request (removed4008174) wrote :

Same problem.

Dell Vostro 3750

ID 138a:0011

Revision history for this message
Peter Meiser (meiser79) wrote :

Someone is working on a driver. -> http://permalink.gmane.org/gmane.linux.fprint/2199

Revision history for this message
Markus Krenn (markus-krenn) wrote :

Same here: Dell Vostro 3550 @Ubuntu 11.10

Arti Zirk (artizirk)
tags: added: 3360
Revision history for this message
Lars Fehr (lars-fehr) wrote :
Revision history for this message
^_Pepe_^ (jose-angel-fernandez-freire) wrote :

Hi all.

Thanks to all for the driver.

Please if finally somebody creates a .deb package, please share.

Revision history for this message
Pavel Zastavnyi (assedoo-l) wrote :

Hi All.

It's realy easy to install this library.

1. Install al needed packages: (list may be changed)

:~$ sudo apt-get install libperl-dev libgtk2.0-dev libusb-1.0-0-dev libnss3-dev

2. Download full source tree archive: https://github.com/ars3niy/fprint_vfs5011/archive/master.zi:

:~$ wget https://github.com/ars3niy/fprint_vfs5011/archive/master.zip

3. Unzip archive:

:~$ unzip ./master.zip

4. Open unziped folder:

:~$ cd ./fprint_vfs5011-master

5. Configure

:~$ ./configure

6. Make package

:~$ make

7. Install package

:~$ sudo make install

8. Install fprint demo

:~$ sudo apt-get install fprint-demo fprintd fprintd-doc libfprint0

9. Invoke fprint demo with root privileges

:~$ sudo fprint_demo

Enjoy :)

Revision history for this message
Marcelo Fernandez (fernandezm) wrote :

Hi people,

The package seems to work perfectly!

Ubuntu 12.10, "ID 138a:0011 Validity Sensors, Inc. VFS5011 Fingerprint Reader" device.

The Pavel's instructions lacked "8.5 - reboot the computer" so the device could be detected (maybe a "sudo udev restart" or something like could work too).

Thank you!

Revision history for this message
Marcelo Fernandez (fernandezm) wrote :

Only to add that I've had to install libpam-fprintd and gksu-polkit packages to make authentication at login (LightDM), unlock screen, etc., work.

Regards

Revision history for this message
Pavel Zastavnyi (assedoo-l) wrote :

Hi all I've faced with next defect: https://bugs.launchpad.net/ubuntu/+source/fprint-demo/+bug/850232

But I've found a workaround:

1. Add to /etc/rc.local file next commamnd:

:~$ chgrp -R plugdev /dev/bus/usb/

2. Add your user to plugdev group by executing next command

:~$ sudo usermod -a -G plugdev $USER

And one more if you already used fprint_demo under root privileges (:~$ sudo fprint_demo), change ~/.fprint/ folder owner:

:~$ sudo chown -R $USER ~/.fprint/

:~$ Sudo chgrp -R $USER ~/.fprint/

or just remove folder ~./fprint (DO NOT REMOVE IT IF YOU ALREADY CREATED YOUR FINGER PRINTS AND DON'T WANT TO LOSE THEM)

:~$ sudo rm -r ~/.fprintcopy/

Start fprint_demo without sudo

:~$ fprint_demo

Regards

Revision history for this message
In , Arseniy (arseniy) wrote :

Created attachment 75783
Patch (against latest git version) with driver implementation

So far no one said that my driver sucks, so maybe let's try to merge it.

I tried to create a proper patch, please have a look at it. I'll be happy to make any necessary changes to the patch and/or my code.

Revision history for this message
Alexander Herrmann (darignac) wrote :

The experimental driver works like a charm for me!

Revision history for this message
Peter (piombo) wrote :

Is there a chance that I / someone will get this working with 138A:003C?
I posted the "features" here one year before.
I don't know if this recent driver is just a step away to make my reader work or it's lightyears.
Thanks anyway!

Revision history for this message
In , anarsoul (anarsoul) wrote :

Comment on attachment 75783
Patch (against latest git version) with driver implementation

Review of attachment 75783:
-----------------------------------------------------------------

::: libfprint/drivers/vfs5011.c
@@ +25,5 @@
> +}
> +
> +static void debugprint(const char *line)
> +{
> +#ifdef DEBUG

There's fp_dbg/fp_err/fp_whatever already. Please don't reinvent a wheel

@@ +67,5 @@
> +static int usb_send(libusb_device_handle *handle, unsigned char *data, unsigned size)
> +{
> + int transferred = 0;
> + int r = libusb_bulk_transfer(handle, VFS5011_OUT_ENDPOINT, data, size,
> + &transferred, VFS5011_DEFAULT_WAIT_TIMEOUT);

No synchronous transfers are allowed in driver

@@ +85,5 @@
> +static int usb_recv(libusb_device_handle *handle, unsigned endpoint, unsigned char *buf,
> + unsigned max_bytes, int *transferred)
> +{
> + int r = libusb_bulk_transfer(handle, endpoint, buf, max_bytes, transferred,
> + VFS5011_DEFAULT_WAIT_TIMEOUT);

Same

@@ +404,5 @@
> +
> +// Rescale image to account for variable swiping speed
> +int vfs5011_rescale_image(unsigned char *image, int input_lines,
> + unsigned char *output, int max_output_lines)
> +{

Could you use existing scale functions?

@@ +435,5 @@
> +// if (! on_good_offsets && (i >= GOOD_OFFSETS_CRITERION)) {
> +// if (get_deviation_int(offsets + i - GOOD_OFFSETS_CRITERION, GOOD_OFFSETS_CRITERION) <
> +// GOOD_OFFSETS_THRESHOLD)
> +// on_good_offsets = 1;
> +// }

Please drop commented out blocks of code

@@ +876,5 @@
> +struct fp_img_driver vfs5011_driver =
> +{
> + .driver =
> + {
> + .id = 12,

Please don't use hardcoded ID anymore, define your own in driver_ids.h and use that one

@@ +886,5 @@
> +
> + .flags = 0,
> + .img_width = VFS5011_IMAGE_WIDTH,
> + .img_height = -1,
> + .bz3_threshold = 20,

Why threshold is so low?

Revision history for this message
In , Arseniy (arseniy) wrote :

> Why threshold is so low?

I wrote an e-mail to the mailing list explaining the situation in detail back in December: http://lists.freedesktop.org/archives/fprint/2012-December/000376.html

> No synchronous transfers are allowed in driver

The fact that you didn't tell this before is a bit surprising given that the code has been available for more than a month now.

Switching to asynchronous transfers is a major change that would require some effort. And let me put it frankly: your reply does not exactly motivate me to do that.

Revision history for this message
In , anarsoul (anarsoul) wrote :

(In reply to comment #2)
> > Why threshold is so low?
>
> I wrote an e-mail to the mailing list explaining the situation in detail
> back in December:
> http://lists.freedesktop.org/archives/fprint/2012-December/000376.html

OK

> > No synchronous transfers are allowed in driver
>
> The fact that you didn't tell this before is a bit surprising given that the
> code has been available for more than a month now.

You didn't ask for assistance in driver development, and I didn't pay enough attention to maillist for last months.

> Switching to asynchronous transfers is a major change that would require
> some effort. And let me put it frankly: your reply does not exactly motivate
> me to do that.

Well, I'll try to explain you why it's an requirement:
see libfprint/libfprint/poll.c quote:

 * libfprint does not create internal library threads and hence can only
 * execute when your application is calling a libfprint function. However,
 * libfprint often has work to be do, such as handling of completed USB
 * transfers, and processing of timeouts required in order for the library
 * to function. Therefore it is essential that your own application must
 * regularly "phone into" libfprint so that libfprint can handle any pending
 * events.
 *
 * The function you must call is fp_handle_events() or a variant of it. This
 * function will handle any pending events, and it is from this context that
 * all asynchronous event callbacks from the library will occur. You can view
 * this function as a kind of iteration function.

Usually application adds libfprint FDs to its poll/select call and calls fp_handle_events_timeout() on any event for those FDs. That basically means that libfprint runs in main loop, same loop in which UI runs. So it's not a good idea to use synchronous libusb calls, because they can take >1s to complete, so it can "freeze" UI for 1s.

Anyway, it's not complicated to convert your driver to asynchronous model. Join #<email address hidden> IRC channel and I'll try to help you

Revision history for this message
In , Arseniy (arseniy) wrote :

Marco Hoffmeier reports that 138a:0018 also works with this driver: https://github.com/ars3niy/fprint_vfs5011/pull/1

Revision history for this message
In , Arseniy (arseniy) wrote :

Created attachment 77561
Patch with driver implementation (suits both 0.5.0 and latest git snapshot)

I've updated the driver, partially switched to asynchronous transfers for device initialization together with some code cleanup.

There's still a short initialization sequence that has to be done before capturing, which is done synchronously.

If I understand correctly, an application using libfprint assumes that the device is ready for capturing the image right after fp_async_enroll/verify/identify_start returns.

So that if pre-capture initialization is done asynchronously, the user will be asked to deploy his finger right away, before the initalization is completed. And if there is a delay during initialization and the user is quick enough, hse will actually swipe the finger before the device is initialized.

I'm not sure that this is better than UI freeze, that's why I left synchronous transfers there. Some kind of intermediate "now you can swipe your finger" callback could seem a better solution, but that's a lot of work.

In any case, I'm also attaching a patch to make all initialization asynchronous.

Revision history for this message
In , Arseniy (arseniy) wrote :

Created attachment 77562
Make all USB transfer asynchronous

description: updated
Revision history for this message
Fenrirkhan (lostkosatdonreply) wrote :

Hello there, three cheers for the development of a such a driver. It has however not worked for me:
laptop model: dell 3560 - DE: ubuntu 12.04 x86 3.2.0-40-generic - Device: VFS5011 ID 138a:0011

autogen would only work if the configure option "--enable-x11-examples-build" was removed.
configure went ok
make went without errors but produced some warnings http://pastebin.com/Twj1r3bA
make install went alright

And then (even after a reboot) fprint doesn't see the device. sadly.
Any advices?
Still, good work on that driver development.

Revision history for this message
In , Bugzilla-x (bugzilla-x) wrote :

Vasily, can you review it?

Revision history for this message
In , anarsoul (anarsoul) wrote :

Comment on attachment 77561
Patch with driver implementation (suits both 0.5.0 and latest git snapshot)

Review of attachment 77561:
-----------------------------------------------------------------

::: libfprint/drivers/vfs5011.c
@@ +1,1 @@
> +#include <stdio.h>

Please add a copyright header to vfs5011.c and vfs5011.h, you can borrow one from any driver

@@ +10,5 @@
> +#include "driver_ids.h"
> +
> +#include "vfs5011_proto.h"
> +
> +static char *get_debugfiles_path(void)

Please use fp_dbg macro, don't introduce driver-specific debug stuff.

@@ +147,5 @@
> + fpi_ssm_mark_aborted(ssm, -EINVAL);
> + goto out;
> + }
> +
> + struct usb_action *action = &data->actions[ssm->cur_state];

Please don't mix declarations with code

@@ +189,5 @@
> + fpi_ssm_mark_aborted(ssm, -EINVAL);
> + return;
> + }
> +
> + struct usb_action *action = &data->actions[ssm->cur_state];

Same as above

@@ +300,5 @@
> +}
> +
> +//====================== utils =======================
> +
> +#if VFS5011_LINE_SIZE > INT_MAX/(256*256)

It would be better to perform this test somewhere in configure.ac, I don't think that it's a good
idea to emit compilation error after configure script succeed

@@ +365,5 @@
> +
> +static void median_filter(int *data, int size, int filtersize)
> +{
> + int i;
> + int *result = (int *)malloc(size*sizeof(int));

Please use g_malloc from glib, or implement error handling, I prefer first way.

@@ +508,5 @@
> +};
> +
> +enum {
> + DEV_OPEN_START,
> +// DEV_OPEN_INIT_COMPLETE,

No dead code please, even a single line

@@ +585,5 @@
> + return 0;
> +}
> +
> +void save_pgm(const char *filename, unsigned char *data, int width, int height)
> +{

Remove all debug stuff that was used during development, I don't think we need it

@@ +984,5 @@
> + return r;
> + }
> +
> + struct fpi_ssm *ssm;
> + ssm = fpi_ssm_new(dev->dev, open_loop, DEV_OPEN_NUM_STATES);

Don't perform device initialization in dev_open, right place to do init is dev_activate.
Please note that image capture loop should not finish until explicit dev_deactivate call.

Typical loop looks like this:
(1) device init -> (2) start finger detect -> (3) finger detected -> (4) image capture -> (5) send image to lib -> (6) jump to (2)

Revision history for this message
In , anarsoul (anarsoul) wrote :

Arseniy, could you catch me in IRC, so we can discuss all driver details and avoid another submit/review round?

Revision history for this message
In , Arseniy (arseniy) wrote :

> Don't perform device initialization in dev_open, right place to do init is
> dev_activate.

Right now putting it in dev_open is the best choice. Doing it in dev_activate would cause a problem which I mentioned in comment #5 (any thought on this, by the way?) – only much worse since this initialization takes a second or two.

Also, AFAIR windows does this initialization immediately when I plug in the device into USB port. (Thin is embedded sensor in a laptop but one can still "plug it in" in VirtualBox).

Revision history for this message
In , anarsoul (anarsoul) wrote :

(In reply to comment #10)
> > Don't perform device initialization in dev_open, right place to do init is
> > dev_activate.
>
> Right now putting it in dev_open is the best choice. Doing it in
> dev_activate would cause a problem which I mentioned in comment #5 (any
> thought on this, by the way?) – only much worse since this initialization
> takes a second or two.

Could you implement some check too see if initialization was completed earlier? Maybe some register value changes after init, etc? Library doesn't expect any device init in dev_open, so it's not a good idea.

Anyway, I don't like workarounds, clean solution is always better. Maybe we need to add another state into fp_imgdev_state, something like IMGDEV_STATE_INITIALIZING, right before AWAIT_FINGER_ON, so libfprint user will be aware when it's necessary to show "scan your finger" message.

> Also, AFAIR windows does this initialization immediately when I plug in the
> device into USB port. (Thin is embedded sensor in a laptop but one can still
> "plug it in" in VirtualBox).

That's OK, but unfortunately libfprint driver is "stateless", i.e. it can't preserve any data between fp scan sessions, so we can't mimic _that_ windows behavior

Revision history for this message
In , Arseniy (arseniy) wrote :

> Could you implement some check too see if initialization was completed
> earlier? Maybe some register value changes after init, etc?

Unfortunately I don't know how to query registers on this device. During initialization I'm sending some blobs and occasionally read something back, but I have no idea what it all means :-/

But it does not harm to do this initialization many times. It would not harm to do it every time dev_activate is called – the hardware seems to be fine with that.

The only problem is how to handle the delay which happens during this initialization properly, so that it won't disappoint the user.

> Library doesn't expect any device init in dev_open, so it's not a good idea.

But is there some technical reason why it should not be there right now? I mean, can this (doing device initialization in dev_open) break things, cause incorrect behavior in some situations?

By the way, I also have an unrelated question. If an application opens the device and then enrolls/verifies/identifies fingers a few times, will dev_activate be called every time when the finger needs to be scanned, or just once?

Sorry, I cannot chat now, I don't have more time today.

Revision history for this message
In , anarsoul (anarsoul) wrote :

(In reply to comment #12)
> > Could you implement some check too see if initialization was completed
> > earlier? Maybe some register value changes after init, etc?
>
> Unfortunately I don't know how to query registers on this device. During
> initialization I'm sending some blobs and occasionally read something back,
> but I have no idea what it all means :-/

Maybe it makes sense to reverse-engineer protocol a bit? I'll take a look at it probably this weekend

> But it does not harm to do this initialization many times. It would not harm
> to do it every time dev_activate is called – the hardware seems to be fine
> with that.
>
> The only problem is how to handle the delay which happens during this
> initialization properly, so that it won't disappoint the user.
>
>
> > Library doesn't expect any device init in dev_open, so it's not a good idea.
>
> But is there some technical reason why it should not be there right now? I
> mean, can this (doing device initialization in dev_open) break things, cause
> incorrect behavior in some situations?

Yes, there's no synchronization points for dev_open, so you can't use async transfers in it, and synchronous transfers are not allowed in libfprint.

> By the way, I also have an unrelated question. If an application opens the
> device and then enrolls/verifies/identifies fingers a few times, will
> dev_activate be called every time when the finger needs to be scanned, or
> just once?

Depends on libfprint internal usage. Current master calls dev_activate for each scan, but I've a pending commit that changes enroll routine to perform 5 scans, and it uses single dev_activate for 5 scans.

> Sorry, I cannot chat now, I don't have more time today.

OK

Revision history for this message
In , Arseniy (arseniy) wrote :

> there's no synchronization points for dev_open, so you can't use async
> transfers in it, and synchronous transfers are not allowed in libfprint.

But it works for me with async transfers in dev_open :-/ Both fprint_demo that uses asynchronous API and command-line examples using synchronous API work fine.

You gave a theoretical explanation why it's bad, but I'm not a computer programmer, I'm a physicist, and I don't understand this theory. Can you please also give a practical explanation, i.e. what exactly will break and in which situation?

As a side note, vfs301 driver, which just happened to be the one I used as an example, has synchronous transfers :p (and even separate debug system).

Revision history for this message
In , anarsoul (anarsoul) wrote :

(In reply to comment #14)
> > there's no synchronization points for dev_open, so you can't use async
> > transfers in it, and synchronous transfers are not allowed in libfprint.
>
> But it works for me with async transfers in dev_open :-/ Both fprint_demo
> that uses asynchronous API and command-line examples using synchronous API
> work fine.
>
> You gave a theoretical explanation why it's bad, but I'm not a computer
> programmer, I'm a physicist, and I don't understand this theory. Can you
> please also give a practical explanation, i.e. what exactly will break and
> in which situation?

Just a simple race:

app calls dev_open -> init async transfer starts -> app calls dev_activate -> another async transfer starts -> it breaks initialization (e.g. response from init is interpreted as response from activate) -> driver failure

> As a side note, vfs301 driver, which just happened to be the one I used as
> an example, has synchronous transfers :p (and even separate debug system).

I didn't review vfs301 driver, so I'm not responsible for its inclusion :)

Revision history for this message
In , Bugzilla-x (bugzilla-x) wrote :

(In reply to comment #15)
> (In reply to comment #14)
<snip>
> > As a side note, vfs301 driver, which just happened to be the one I used as
> > an example, has synchronous transfers :p (and even separate debug system).
>
> I didn't review vfs301 driver, so I'm not responsible for its inclusion :)

I'm probably the one who reviewed it. It worked (at least the original author claimed it did), and I'm really not familiar with the libfprint drivers, seeing as I mostly worked on fprintd and the integration with the rest of the user-space.

Revision history for this message
In , Arseniy (arseniy) wrote :

> app calls dev_open -> init async transfer starts -> app calls dev_activate
> -> another async transfer starts -> it breaks initialization

Hang on. Don't you need a pointer to fp_dev to activate a device? And you only get this pointer from fp_dev_open_cb callback, which callback is invoked after all async transfers in dev_open are completed. Am I missing something?

Revision history for this message
Ruben Carlo Benante (beco) wrote :

After:

 apt-get install fprint-demo libfprint-dev libfprint0 libpam-fprintd

and calling fprint_demo, I got:

"no devices found"

Thanks

Revision history for this message
Elliott Sales de Andrade (qulogic) wrote :

@Ruben: This is only a patch for the existing libfprint. First it needs to be reviewed and then applied upstream to libfprint code. Then it will be packaged and available in Ubuntu. If you want to use it now, you need to compile it yourself following the instructions above.

Changed in libfprint:
importance: Unknown → Wishlist
status: Unknown → Confirmed
Revision history for this message
Sampi (kalaka) wrote :

Sorry, I seem to have misclicked and accidentally changed the status of the bug! Can't change it back to Triaged, could the bug supervisor please change it back?

Thanks and sorry for the mishap.

Changed in libfprint (Ubuntu):
status: Triaged → In Progress
AceLan Kao (acelankao)
Changed in libfprint (Ubuntu):
status: In Progress → Triaged
status: Triaged → Confirmed
Revision history for this message
Das Auge (0815jo) wrote :

I have the problem with the same reader on Dell 3360.

Looking forward to see a Driver.

Revision history for this message
Rodrigo Augusto Bariviera (380j-rodrigo) wrote :

Same problem with Dell Vostro 3450.

Revision history for this message
In , AceLan Kao (acelankao) wrote :

*poke*
Could you please speed up the review process?
There are many users suffered from this.
Thanks.

Revision history for this message
In , anarsoul (anarsoul) wrote :

(In reply to comment #18)
> *poke*
> Could you please speed up the review process?
> There are many users suffered from this.
> Thanks.

It's already reviewed, and there were no new version to review.
I won't accept driver with synchronous transfers.

Revision history for this message
In , AceLan Kao (acelankao) wrote :

Could you advice us which driver is good for reference, so that Arseniy could follow that one to rewrite it.
Or if Arseniy is unavailable to do it now, I can give it a try.
Thanks.

Revision history for this message
AceLan Kao (acelankao) wrote :

I applied the patch from here[1] and upload the package to my ppa[2]
It works on my Dell V131 machine, and probably work for the same chip on other machines.
Just need to install the libfprint from my ppa.

1. https://bugs.freedesktop.org/show_bug.cgi?id=61692
2. https://launchpad.net/~acelankao/+archive/fprint

Revision history for this message
Arseniy Lartsev (receive-spam) wrote :

Hello everyone,

It's the developer of vfs5011 driver here. Getting my driver merged into libfprint turned out to be more difficult than writing it. I'm sorry to say that I failed to do that. Could please someone help getting the driver merged?

The latest version of the driver is here: https://github.com/ars3niy/fprint_vfs5011/tree/release

Freedesktop bug where I tried to get my driver included without much success: https://bugs.freedesktop.org/show_bug.cgi?id=61692

With best regards,
Arseniy

Revision history for this message
In , Arseniy (arseniy) wrote :

(In reply to comment #20)
> Could you advice us which driver is good for reference, so that Arseniy
> could follow that one to rewrite it.

There's no need to rewrite my driver, just minor changes here and there.

> Or if Arseniy is unavailable to do it now, I can give it a try.

I'm generally available, but Vasily has been somewhat impolite to me. Never answered my question in comment #17, for example. That's why I'm not putting too much effort into speeding up the process, simply because it's not exactly fun.

There is, however, fully asynchronous version of the driver: https://bugs.freedesktop.org/attachment.cgi?id=77562.

Revision history for this message
In , anarsoul (anarsoul) wrote :

(In reply to comment #21)
> (In reply to comment #20)
> > Could you advice us which driver is good for reference, so that Arseniy
> > could follow that one to rewrite it.
>
> There's no need to rewrite my driver, just minor changes here and there.
>
> > Or if Arseniy is unavailable to do it now, I can give it a try.
>
> I'm generally available, but Vasily has been somewhat impolite to me.

I'm very sorry if I was impolite to you, it wasn't intended. I'm just a bit tired of arguing why drivers MUST be asynchronous. I'll write a libfprint driver guideline when I get some spare time

> Never
> answered my question in comment #17, for example.

Missed that one. Anyway:

> Hang on. Don't you need a pointer to fp_dev to activate a device? And you only > get this pointer from fp_dev_open_cb callback, which callback is invoked after > all async transfers in dev_open are completed. Am I missing something?

See img_dev_open(), it doesn't wait for any async xfers from dev_open(), only if you explicitly wait for async transfers to complete in dev_open()

> That's why I'm not putting
> too much effort into speeding up the process, simply because it's not
> exactly fun.

Heh

> There is, however, fully asynchronous version of the driver:
> https://bugs.freedesktop.org/attachment.cgi?id=77562.

OK, will take a look tonight. Could you squash 2 patches into single meanwhile? Thanks!

P.S. You still can catch me in IRC for faster communication...

AceLan Kao (acelankao)
Changed in libfprint (Ubuntu):
status: Confirmed → In Progress
assignee: nobody → AceLan Kao (acelankao)
Revision history for this message
In , AceLan Kao (acelankao) wrote :

Please allow me to do the boring job.
I refine the code by removing the tailing space, cutting off at 80 chars, moving the open brace, and removing the C99 // comments.
Hoping this will make the process more smoothly.

Revision history for this message
In , AceLan Kao (acelankao) wrote :

Created attachment 82310
0001-lib-Add-VFS5011-driver.patch

Revision history for this message
In , anarsoul (anarsoul) wrote :

Comment on attachment 82310
0001-lib-Add-VFS5011-driver.patch

Review of attachment 82310:
-----------------------------------------------------------------

::: libfprint/drivers/vfs5011.c
@@ +33,5 @@
> + }
> + fp_dbg(s);
> +#endif
> +}
> +

Please drop all debugging stuff from driver. Only debug logs via fp_dbg are allowed.

@@ +321,5 @@
> +static void median_filter(int *data, int size, int filtersize)
> +{
> + int i;
> + int *result = (int *)malloc(size*sizeof(int));
> + int *sortbuf = (int *)malloc(filtersize*sizeof(int));

Please use g_malloc or g_malloc0 here.

@@ +329,5 @@
> + if (i1 < 0)
> + i1 = 0;
> + if (i2 >= size)
> + i2 = size-1;
> + memmove(sortbuf, data+i1, (i2-i1+1)*sizeof(int));

g_memmove()

@@ +330,5 @@
> + i1 = 0;
> + if (i2 >= size)
> + i2 = size-1;
> + memmove(sortbuf, data+i1, (i2-i1+1)*sizeof(int));
> + qsort(sortbuf, i2-i1+1, sizeof(int), cmpint);

I wonder if there's glib wrapper for that one...

@@ +364,5 @@
> + };
> + int i;
> + float y = 0.0;
> + int line_ind = 0;
> + int *offsets = (int *)malloc(input_lines * sizeof(int));

g_malloc()

@@ +372,5 @@
> +
> + if (debugpath != NULL) {
> + sprintf(name, "%s/offsets%d.dat", debugpath, (int)time(NULL));
> + debugfile = fopen(name, "wb");
> + }

Drop debug stuff except logs

@@ +945,5 @@
> + array_n_elements(vfs5011_initialization);
> + data->init_sequence.actions = vfs5011_initialization;
> + data->init_sequence.device = dev;
> + data->init_sequence.receive_buf =
> + malloc(VFS5011_RECEIVE_BUF_SIZE);

g_malloc()

@@ +989,5 @@
> + int r = libusb_reset_device(dev->udev);
> + if (r != 0) {
> + fp_err("Failed to reset the device");
> + return r;
> + }

Is it necessary? Btw, doc says that handle may be invalid after reset, and you're reusing same handle later.

@@ +1000,5 @@
> +
> + struct fpi_ssm *ssm;
> + ssm = fpi_ssm_new(dev->dev, open_loop, DEV_OPEN_NUM_STATES);
> + ssm->priv = dev;
> + fpi_ssm_start(ssm, open_loop_complete);

And no one waits for this ssm (and async USB reqs) to complete here. It's a race condition I've described earlier. Please move device initialization into dev_activate().

@@ +1035,5 @@
> +}
> +
> +static void dev_deactivate(struct fp_img_dev *dev)
> +{
> + fpi_imgdev_deactivate_complete(dev);

How do you ensure that _all_ transfers are completed now? fpi_imgdev_deactivate_complete should be called only after deactivation has been completed. For this driver "cancel" button in fprint_demo won't work.

Revision history for this message
In , anarsoul (anarsoul) wrote :

Btw, I feel like not all issues from previous patch were fixed

Revision history for this message
In , Bugzilla-x (bugzilla-x) wrote :

(In reply to comment #25)
> @@ +330,5 @@
> > + i1 = 0;
> > + if (i2 >= size)
> > + i2 = size-1;
> > + memmove(sortbuf, data+i1, (i2-i1+1)*sizeof(int));
> > + qsort(sortbuf, i2-i1+1, sizeof(int), cmpint);
>
> I wonder if there's glib wrapper for that one...

https://developer.gnome.org/glib/2.34/glib-Miscellaneous-Utility-Functions.html#g-qsort-with-data

Might not be necessary to use the GLib wrapper.

Revision history for this message
In , AceLan Kao (acelankao) wrote :

Sorry for reply late, I was on vacation, I'll try to revise those part of code soon.

Revision history for this message
In , anarsoul (anarsoul) wrote :

(In reply to comment #28)
> Sorry for reply late, I was on vacation, I'll try to revise those part of
> code soon.

No pb, I was busy as well :)

Revision history for this message
In , AceLan Kao (acelankao) wrote :

Created attachment 83699
0001-lib-Add-VFS5011-driver.patch

Sorry to take so long to resend the patch.

@@ +1000,5 @@
>> +
>> + struct fpi_ssm *ssm;
>> + ssm = fpi_ssm_new(dev->dev, open_loop, DEV_OPEN_NUM_STATES);
>> + ssm->priv = dev;
>> + fpi_ssm_start(ssm, open_loop_complete);
>
>And no one waits for this ssm (and async USB reqs) to complete here. It's a race >condition I've described earlier. Please move device initialization into >dev_activate().
The code is required and I can imagine the race condition you mentioned, but the fingerprint device won't work if move the code to dev_activate() function.
So, I add a check in dev_activate() function to make sure open_loop_complete() have finished to continue.

And you had mentioned that do we need to do reset in dev_open()
r = libusb_reset_device(dev->udev);
        if (r != 0) {
                fp_err("Failed to reset the device");
                return r;
        }
I checked if I removed the code, the device doesn't work.

I'm learning libfprint by modifying the code, so please give me more explicit advise, so that I can know how to fix it.
Thanks.

Revision history for this message
In , anarsoul (anarsoul) wrote :

(In reply to comment #30)
> Created attachment 83699 [details] [review]
> 0001-lib-Add-VFS5011-driver.patch
>
> Sorry to take so long to resend the patch.
>
> @@ +1000,5 @@
> >> +
> >> + struct fpi_ssm *ssm;
> >> + ssm = fpi_ssm_new(dev->dev, open_loop, DEV_OPEN_NUM_STATES);
> >> + ssm->priv = dev;
> >> + fpi_ssm_start(ssm, open_loop_complete);
> >
> >And no one waits for this ssm (and async USB reqs) to complete here. It's a race >condition I've described earlier. Please move device initialization into >dev_activate().

> The code is required and I can imagine the race condition you mentioned, but
> the fingerprint device won't work if move the code to dev_activate()
> function.

Because you need to wait for completion of these transfers, but probably you don't.

> So, I add a check in dev_activate() function to make sure
> open_loop_complete() have finished to continue.

Please, no workarounds, let's fix an issue instead.

> And you had mentioned that do we need to do reset in dev_open()
> r = libusb_reset_device(dev->udev);
> if (r != 0) {
> fp_err("Failed to reset the device");
> return r;
> }
> I checked if I removed the code, the device doesn't work.

I guess it doesn't work on second time, because there's no proper deinit sequence and device is still in active state.

> I'm learning libfprint by modifying the code, so please give me more
> explicit advise, so that I can know how to fix it.
> Thanks.

Take a look at other drivers, almost all for AuthenTec devices are pretty simple. Try to catch me on IRC (#<email address hidden>) if you have further questions.

Revision history for this message
In , Johannes Becker (jb-c) wrote :

Really looking forward to see this Patch included. Thanks for the hard work to all involved!

Revision history for this message
Julian Alarcon (julian-alarcon) wrote :

this is great!! But the last words of Dustin Kirkland from Canonical made me think
http://blog.dustinkirkland.com/2013/10/fingerprints-are-user-names-not.html
https://launchpad.net/~kirkland

Revision history for this message
In , AceLan Kao (acelankao) wrote :

Sorry to take so long to re-submit the patch,
I'm not familiar with the lib, so takes some time to study it.

For your questions.
1. Because you need to wait for completion of these transfers, but probably you don't.
Actually, we don't have to wait.
When open the device, it won't continue to next state
if fpi_imgdev_open_complete() is not be called.
And we call it at open_loop_complete(), so that makes sure the transfers are all done. There is no race condition.

2. Please, no workarounds, let's fix an issue instead.
Okay, I removed them.
And this issue is not exist as explanation above.

3. I guess it doesn't work on second time, because there's no proper deinit sequence and device is still in active state.
I don't know the deinit commands.
Arseniy, please give me some advice if you know how to get the deinit commands.
BTW, since we don't have the deinit commands, so we call libusb_reset_device() every time when we open the device.
That will probably reset the device and then it can be init again.

Revision history for this message
In , AceLan Kao (acelankao) wrote :

Created attachment 88670
0001-lib-Add-VFS5011-driver-v2.patch

Revision history for this message
In , anarsoul (anarsoul) wrote :

(In reply to comment #33)
> Sorry to take so long to re-submit the patch,
> I'm not familiar with the lib, so takes some time to study it.
>
> For your questions.
> 1. Because you need to wait for completion of these transfers, but probably
> you don't.
> Actually, we don't have to wait.
> When open the device, it won't continue to next state
> if fpi_imgdev_open_complete() is not be called.
> And we call it at open_loop_complete(), so that makes sure the transfers are
> all done. There is no race condition.

OK, you're right

> 2. Please, no workarounds, let's fix an issue instead.
> Okay, I removed them.
> And this issue is not exist as explanation above.

OK

> 3. I guess it doesn't work on second time, because there's no proper deinit
> sequence and device is still in active state.
> I don't know the deinit commands.
> Arseniy, please give me some advice if you know how to get the deinit
> commands.
> BTW, since we don't have the deinit commands, so we call
> libusb_reset_device() every time when we open the device.
> That will probably reset the device and then it can be init again.

Anyway, I'm OK for libusb_reset_device() here for now, but only if someone will continue to investigate how to deinit device properly.

Out of curiosity, is this device available as a standalone USB device?

Revision history for this message
In , AceLan Kao (acelankao) wrote :

I'll write "Validity Sensors" an email to see if they can provide us the commands.
And I don't know if there is a standalone USB drive with this chip. There is no information from their website.
http://www.validityinc.com/index.php

Revision history for this message
In , AceLan Kao (acelankao) wrote :

I don't get any reply from Validity Sensors for a whole week.
So, I think this is probably the best we can do for now.

Revision history for this message
In , anarsoul (anarsoul) wrote :

(In reply to comment #37)
> I don't get any reply from Validity Sensors for a whole week.
> So, I think this is probably the best we can do for now.

Could you also estimate power consumption (via powertop) before first use of the fingerprint scanner (i.e. after fresh boot) and after first use? I'm a bit worrying that since scanner is not stopped properly it'll consume more power.

Revision history for this message
In , AceLan Kao (acelankao) wrote :

Created attachment 89064
powertop snapshot before and after running fprint_demo

I took 4 snapshots of powertop.
1. Before running fprint_demo
2. After running fprint_demo and do scan and verify fingerprint
3. Reboot my laptop and remove all USB devices and then do powertop
4. After running fprint_demo and do verify fingerprint
Looks good to me, no visible power loss.

AceLan Kao (acelankao)
Changed in libfprint (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
In , Keerthan Jaic (jckeerthan) wrote :

Based on the windows driver readme here: http://download.lenovo.com/ibmdl/pub/pc/pccbbs/mobiles/lz4xr3a2.txt , I am inclined to beleive this patch will work for PIDs 0015 and 0017 too.

I should receive my T440p which has a 138a:0017 Validity Sensors fingerprint reader in a couple of weeks, I will confirm then.

Revision history for this message
In , abbradar (nikoamia) wrote :

Created attachment 91917
Validity :0017 support

This patch is indeed working for :0017 Validity sensor, I've attached a small patch which enables its support.

Revision history for this message
In , Mail2ghost (mail2ghost) wrote :

(In reply to comment #41)
> Created attachment 91917 [details] [review]
> Validity :0017 support
>
> This patch is indeed working for :0017 Validity sensor, I've attached a
> small patch which enables its support.

Confirming that the patch for :0017 is working on my T440 with no issues so far.

Revision history for this message
In , Ladnymichal (ladnymichal) wrote :

What is chance to include this path in next release?

Revision history for this message
In , anarsoul (anarsoul) wrote :

(In reply to comment #43)
> What is chance to include this path in next release?

It'll be included. I still need to finish several features and a single driver for a next release.

Revision history for this message
In , Ladnymichal (ladnymichal) wrote :

(In reply to comment #44)
> (In reply to comment #43)
> > What is chance to include this path in next release?
>
> It'll be included. I still need to finish several features and a single
> driver for a next release.

Thank you for reply. :) You save my day.

Revision history for this message
In , Peter Meiser (meiser79) wrote :

*** Bug 74635 has been marked as a duplicate of this bug. ***

Revision history for this message
In , abbradar (nikoamia) wrote :

I use this driver and I have run into bug when sudo with pam_fprintd cannot be killed with ^C or anything besides SIGKILL when fingerprint is awaited. I can't check this for any driver besides this one, but I suspect that this is driver's issue.

Revision history for this message
In , abbradar (nikoamia) wrote :

Also, when I get "Swipe your finger again", the reader is shutted down. It doesn't react to my finger until "Verification timed out" is printed. After that, until fprintd dies (which stays running for some time), PAM module does not work.

Revision history for this message
In , abbradar (nikoamia) wrote :

Created attachment 98874
Validity :0017 support (v2)

Removed unnecessary .rules file patching.

Revision history for this message
Danny Yates (mail4danny) wrote :

Any idea when this fix will be released for Ubuntu?

Danny Yates (mail4danny)
tags: added: lenovo x1
Revision history for this message
In , Peter Meiser (meiser79) wrote :

I can't use the driver with Ubuntu 14.04.

One of the 3 following things happens:
1. fprintd-enroll segfaults.
2. The message "Enroll result: enroll-completed" is shown, but there're no prints under ~/.fprint/prints.
3. I get the error message:
   Enroll result: enroll-unknown-error
   VerifyStop failed: Message did not receive a reply (timeout by message bus)

Revision history for this message
In , AceLan Kao (acelankao) wrote :

Whoopie,
The libfprint doesn't release new version yet.
If you would like to try it on Ubuntu 14.04, you can try the package I built.
http://people.ubuntu.com/~acelan/libfprint/

Revision history for this message
In , Peter Meiser (meiser79) wrote :

AceLan,

I patched libfprint git with the attached patch from this bugreport. Even with your compiled version, I have the same results as described above.

Revision history for this message
In , Peter Meiser (meiser79) wrote :

The syslog shows:

Oct 1 13:47:29 v131 kernel: [212177.755988] usb 2-1.3: reset full-speed USB device number 3 using ehci-pci
Oct 1 13:47:31 v131 kernel: [212179.490094] traps: fprintd[20034] trap int3 ip:7f3c9bb5dc13 sp:7fff06996f70 error:0

Revision history for this message
emerbbs (emer-bass) wrote :

Driver for VFS5011 Fingerprint Reader (138a:0011) on Dell Vostro 5470

Revision history for this message
In , Michael Scherer (misc-zarb) wrote :

I tried the git version ( 35e356f62 ) and the 2 patchs on a RHEL 7 with a t440s, and it work fine. that work fine, no segfault on my side with fprintd-enroll and verify.

Revision history for this message
In , Michael Scherer (misc-zarb) wrote :

Ok, spoke too fast, it always say "no match"

Revision history for this message
In , Michael Scherer (misc-zarb) wrote :

So, testing with others people fingers, the problem is the speed of sliding the finger. So it work fine for me, provided I do slide more slowly.

Revision history for this message
Arend van Spriel (aspriel) wrote :

Just bought a Toshiba Portege z30 which has a Validity Sensors fingerprint reader with id [138a:0010]. I applied the vfs5011 patch and added my device id. It works although I also observe the freezes that other people mention from time to time.

Revision history for this message
Arend van Spriel (aspriel) wrote :

Here my lsusb output:

Bus 001 Device 009: ID 138a:0010 Validity Sensors, Inc.
Device Descriptor:
  bLength 18
  bDescriptorType 1
  bcdUSB 1.10
  bDeviceClass 255 Vendor Specific Class
  bDeviceSubClass 17
  bDeviceProtocol 255
  bMaxPacketSize0 8
  idVendor 0x138a Validity Sensors, Inc.
  idProduct 0x0010
  bcdDevice 0.78
  iManufacturer 0
  iProduct 0
  iSerial 1 3723cf7c2210
  bNumConfigurations 1
  Configuration Descriptor:
    bLength 9
    bDescriptorType 2
    wTotalLength 46
    bNumInterfaces 1
    bConfigurationValue 1
    iConfiguration 0
    bmAttributes 0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower 100mA
    Interface Descriptor:
      bLength 9
      bDescriptorType 4
      bInterfaceNumber 0
      bAlternateSetting 0
      bNumEndpoints 4
      bInterfaceClass 255 Vendor Specific Class
      bInterfaceSubClass 0
      bInterfaceProtocol 0
      iInterface 0
      Endpoint Descriptor:
        bLength 7
        bDescriptorType 5
        bEndpointAddress 0x01 EP 1 OUT
        bmAttributes 2
          Transfer Type Bulk
          Synch Type None
          Usage Type Data
        wMaxPacketSize 0x0040 1x 64 bytes
        bInterval 0
      Endpoint Descriptor:
        bLength 7
        bDescriptorType 5
        bEndpointAddress 0x81 EP 1 IN
        bmAttributes 2
          Transfer Type Bulk
          Synch Type None
          Usage Type Data
        wMaxPacketSize 0x0040 1x 64 bytes
        bInterval 0
      Endpoint Descriptor:
        bLength 7
        bDescriptorType 5
        bEndpointAddress 0x82 EP 2 IN
        bmAttributes 2
          Transfer Type Bulk
          Synch Type None
          Usage Type Data
        wMaxPacketSize 0x0040 1x 64 bytes
        bInterval 0
      Endpoint Descriptor:
        bLength 7
        bDescriptorType 5
        bEndpointAddress 0x83 EP 3 IN
        bmAttributes 3
          Transfer Type Interrupt
          Synch Type None
          Usage Type Data
        wMaxPacketSize 0x0008 1x 8 bytes
        bInterval 4
Device Status: 0x0000
  (Bus Powered)

Revision history for this message
In , anarsoul (anarsoul) wrote :

Created attachment 110999
0001-lib-Add-VFS5011-driver.patch

Please test if this version works for you.

Revision history for this message
In , Peter Meiser (meiser79) wrote :

With the lastest version, I get the error message:
   Enroll result: enroll-unknown-error
   VerifyStop failed: Message did not receive a reply (timeout by message bus)

The syslog shows:
Dec 18 21:07:52 v131 kernel: [26042.424432] usb 2-1.3: reset full-speed USB device number 3 using ehci-pci
Dec 18 21:07:54 v131 kernel: [26044.143346] traps: fprintd[20976] trap int3 ip:7f1ca1119c13 sp:7fffbcfcecd0 error:0

Revision history for this message
In , anarsoul (anarsoul) wrote :

(In reply to Whoopie from comment #58)
> With the lastest version, I get the error message:
> Enroll result: enroll-unknown-error
> VerifyStop failed: Message did not receive a reply (timeout by message
> bus)
>
> The syslog shows:
> Dec 18 21:07:52 v131 kernel: [26042.424432] usb 2-1.3: reset full-speed USB
> device number 3 using ehci-pci
> Dec 18 21:07:54 v131 kernel: [26044.143346] traps: fprintd[20976] trap int3
> ip:7f1ca1119c13 sp:7fffbcfcecd0 error:0

Well, I've only replaced free() calls with g_free() and time() with g_get_real_time(). AceLan, could you check what's wrong?

Revision history for this message
In , AceLan Kao (acelankao) wrote : Re: [Bug 790183]
Download full text (4.4 KiB)

I'm on vacation until EOY, I'll try to get the machine and see what I can
do when I'm available.

On Sun, Dec 21, 2014, 04:40 anarsoul <email address hidden> wrote:

> (In reply to Whoopie from comment #58)
> > With the lastest version, I get the error message:
> > Enroll result: enroll-unknown-error
> > VerifyStop failed: Message did not receive a reply (timeout by message
> > bus)
> >
> > The syslog shows:
> > Dec 18 21:07:52 v131 kernel: [26042.424432] usb 2-1.3: reset full-speed
> USB
> > device number 3 using ehci-pci
> > Dec 18 21:07:54 v131 kernel: [26044.143346] traps: fprintd[20976] trap
> int3
> > ip:7f1ca1119c13 sp:7fffbcfcecd0 error:0
>
> Well, I've only replaced free() calls with g_free() and time() with
> g_get_real_time(). AceLan, could you check what's wrong?
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/790183
>
> Title:
> [138a:0011] Fingerprint reader Validity Sensors not recognized
>
> Status in libfprint:
> Confirmed
> Status in libfprint package in Ubuntu:
> Fix Committed
> Status in libfprint package in Fedora:
> New
>
> Bug description:
> This bug concerns the fingerprint reader "Validity Sensor" listed as:
> Bus 002 Device 003: ID 138a:0011 Validity Sensors, Inc.
> In my case this bug concerns a DELL Vostro 3550 running Ubuntu 11.04 and
> libfprint 1:0.4.0.
>
> Bus 002 Device 003: ID 138a:0011 Validity Sensors, Inc.
> Device Descriptor:
> bLength 18
> bDescriptorType 1
> bcdUSB 1.10
> bDeviceClass 255 Vendor Specific Class
> bDeviceSubClass 17
> bDeviceProtocol 255
> bMaxPacketSize0 8
> idVendor 0x138a Validity Sensors, Inc.
> idProduct 0x0011
> bcdDevice 0.78
> iManufacturer 0
> iProduct 0
> iSerial 1 21b8142b09ea
> bNumConfigurations 1
> Configuration Descriptor:
> bLength 9
> bDescriptorType 2
> wTotalLength 46
> bNumInterfaces 1
> bConfigurationValue 1
> iConfiguration 0
> bmAttributes 0xa0
> (Bus Powered)
> Remote Wakeup
> MaxPower 100mA
> Interface Descriptor:
> bLength 9
> bDescriptorType 4
> bInterfaceNumber 0
> bAlternateSetting 0
> bNumEndpoints 4
> bInterfaceClass 255 Vendor Specific Class
> bInterfaceSubClass 0
> bInterfaceProtocol 0
> iInterface 0
> Endpoint Descriptor:
> bLength 7
> bDescriptorType 5
> bEndpointAddress 0x01 EP 1 OUT
> bmAttributes 2
> Transfer Type Bulk
> Synch Type None
> Usage Type Data
> wMaxPacketSize 0x0040 1x 64 bytes
> bInterval 0
> Endpoint Descriptor:
> bLength ...

Read more...

Revision history for this message
In , AceLan Kao (acelankao) wrote :

Hi, I'm on vacation until EOY.
I'll see what I can do when I'm available.

Revision history for this message
In , Peter Meiser (meiser79) wrote :

Got it working with the change mentioned in http://article.gmane.org/gmane.linux.fprint/2490 (removing the line 770
in file libfprint/drivers/vfs5011.c --"RECV(VFS5011_IN_ENDPOINT_CTRL2,
8)").

Changed in libfprint (Ubuntu):
status: Fix Committed → Incomplete
Revision history for this message
Ankur Joshi (pharmankur) wrote :

I have same issue.
I am using Ubuntu 14.04 & 14.10 (Both 64 bit) on Lenovo Thinkpad E431
Specifics -->
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 005: ID 04f2:b398 Chicony Electronics Co., Ltd
Bus 001 Device 004: ID 138a:0011 Validity Sensors, Inc. VFS5011 Fingerprint Reader
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Fingerprint Device is not getting detected.

Revision history for this message
In , diega (diega) wrote :

I can confirm this patch works fine applied on top of libfprint_0.5.1-1 from the Debian Archives. I just _debianized_ it for ease applying at https://gist.github.com/diega/2e1d2dbbbb7700480de0 (I though it was better to upload there instead of taint this bug report with another file)

Revision history for this message
In , anarsoul (anarsoul) wrote :

(In reply to Diego López León from comment #62)
> I can confirm this patch works fine applied on top of libfprint_0.5.1-1 from
> the Debian Archives. I just _debianized_ it for ease applying at
> https://gist.github.com/diega/2e1d2dbbbb7700480de0 (I though it was better
> to upload there instead of taint this bug report with another file)

Diego, please test it against git master. There were some changes since 0.5.1, such as several scans during enrollment for all imaging scanners.

Revision history for this message
In , diega (diega) wrote :

Vasily,
Thanks for your recommendation, I just tested it against current master and it seems to work fine.

I can even notice a better matching rate comparing with 5.1. I don't know if the differences between 5.1 and master justifies this behavior or it is just my impression, but it worth to mention.

Again, the patch for applying it on top of a debian build for master@35e356f is in https://gist.github.com/diega/3b8a8cc5f5588076fd39

Revision history for this message
In , anarsoul (anarsoul) wrote :

(In reply to Diego López León from comment #64)
> Vasily,
> Thanks for your recommendation, I just tested it against current master and
> it seems to work fine.
>
> I can even notice a better matching rate comparing with 5.1. I don't know if
> the differences between 5.1 and master justifies this behavior or it is just
> my impression, but it worth to mention.
>
> Again, the patch for applying it on top of a debian build for master@35e356f
> is in https://gist.github.com/diega/3b8a8cc5f5588076fd39

Thanks for testing!

Revision history for this message
In , Bugzilla-x (bugzilla-x) wrote :

Vasily, let me know when you've merged/reviewed, and I'll do a release.
I'm a bit lost on the status :)

Revision history for this message
In , anarsoul (anarsoul) wrote :

(In reply to Bastien Nocera from comment #66)
> Vasily, let me know when you've merged/reviewed, and I'll do a release.
> I'm a bit lost on the status :)

Sure.

Revision history for this message
In , anarsoul (anarsoul) wrote :
Changed in libfprint:
status: Confirmed → Fix Released
AceLan Kao (acelankao)
Changed in libfprint (Ubuntu):
status: Incomplete → Fix Released
Revision history for this message
Mauricio Farell Perezgrovas (mfarell) wrote :

Ok, the reader now gets detected but it takes more than 40 seconds to enroll or verify!!! Usually times out or gives an error...

Revision history for this message
Sushovan Mukherjee (mukherjee-sushovan) wrote :

My device is:
Bus 002 Device 005: ID 138a:0050 Validity Sensors, Inc.

How to get detected this device?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.