Closed ItzYanick closed 2 years ago
Do you have libusb-devel
installed?
Yes I do. Was also my first guess.
Can you try running both pkg-config --cflags --libs libusb-1.0
and pkg-config --cflags --libs libusb
?
Sure!
Output of pkg-config --cflags --libs libusb-1.0
:
-I/usr/include/libusb-1.0 -lusb-1.0
Output of pkg-config --cflags --libs libusb
:
-I/usr/include/libusb-1.0 -lusb
Weird, can you run /usr/lib/libusb*
?
Output:
[1] 12722 segmentation fault (core dumped) /usr/lib/libusb*
Ah wait, that should have been ls /usr/lib/libusb*
...
ah that makes more sense haha
Output:
lrwxrwxrwx. 1 root root 19 22. Feb 13:56 /usr/lib/libusb-1.0.so.0 -> libusb-1.0.so.0.3.0
-rwxr-xr-x. 1 root root 127504 22. Feb 13:56 /usr/lib/libusb-1.0.so.0.3.0
Ah ok, I think i know what's going on now.
Can you try replacing the $(shell pkg-config ... libusb)
in the Makefile with $(shell pkg-config ... libusb-1.0)
?
okay that seems to have done the trick! but now i realized lsusb
is not displaying the fingerprint reader anymore 😓 okay something is off here
okay that is interesting. I restarted my pc and ran lsusb
and it displayed me the fingerprint reader:
Bus 003 Device 003: ID 06cb:00be Synaptics, Inc.
then i ran sudo out/tudor test
and it outputted:
[sudo] password for yanick:
[INF] Initializing libcrypto...
[INF] Initializing libusb...
[INF] Found sensor USB device [bus 3 addr 3 vid 0x06cb pid 0x00be]
[INF] Opening sensor USB device...
[INF] Dropping root privileges... [new uid=1000 new gid=1000]
[INF] Initializing tudor driver...
[WRN] PE file contains unsupported resource data directory!
[WRN] PE file contains unsupported exception data directory!
[INF] Loaded driver DLL 'synaFpAdapter104.dll' [186656 bytes]
[WRN] PE file contains unsupported resource data directory!
[WRN] PE file contains unsupported exception data directory!
[WRN] Data directory 4 has invalid bounds! [end 0x17ebe0 > image end 0x17e000]
[INF] Loaded driver DLL 'synaWudfBioUsb104.dll' [1567712 bytes]
[INF] Initializing driver DLL 'synaFpAdapter104.dll'...
[INF] Initializing driver DLL 'synaWudfBioUsb104.dll'...
[INF] Loading data from data store 'test'...
[INF] Opening tudor device...
[ERR] libusb_reset_device failed: -5 [LIBUSB_ERROR_NOT_FOUND]
[ERR] Error opening tudor device!
and now running lsusb
again wont show the fingerprint reader anymore.
should I open a new Issue for that or do you want to figure it out here?
okay that is interesting. I restarted my pc and ran
lsusb
and it displayed me the fingerprint reader:Bus 003 Device 003: ID 06cb:00be Synaptics, Inc.
then i ran
sudo out/tudor test
and it outputted:[sudo] password for yanick: [INF] Initializing libcrypto... [INF] Initializing libusb... [INF] Found sensor USB device [bus 3 addr 3 vid 0x06cb pid 0x00be] [INF] Opening sensor USB device... [INF] Dropping root privileges... [new uid=1000 new gid=1000] [INF] Initializing tudor driver... [WRN] PE file contains unsupported resource data directory! [WRN] PE file contains unsupported exception data directory! [INF] Loaded driver DLL 'synaFpAdapter104.dll' [186656 bytes] [WRN] PE file contains unsupported resource data directory! [WRN] PE file contains unsupported exception data directory! [WRN] Data directory 4 has invalid bounds! [end 0x17ebe0 > image end 0x17e000] [INF] Loaded driver DLL 'synaWudfBioUsb104.dll' [1567712 bytes] [INF] Initializing driver DLL 'synaFpAdapter104.dll'... [INF] Initializing driver DLL 'synaWudfBioUsb104.dll'... [INF] Loading data from data store 'test'... [INF] Opening tudor device... [ERR] libusb_reset_device failed: -5 [LIBUSB_ERROR_NOT_FOUND] [ERR] Error opening tudor device!
and now running
lsusb
again wont show the fingerprint reader anymore.
That's weird, because this is before the driver even starts interacting with the sensor... Is there anything in your kernel log?
this seems to be the only things i can find in journalctl -e
regarding that
Output:
Mai 22 19:58:07 LAPTOP-yanick kernel: usb usb3-port9: Cannot enable. Maybe the USB cable is bad?
Mai 22 19:58:08 LAPTOP-yanick kernel: usb usb3-port9: Cannot enable. Maybe the USB cable is bad?
Mai 22 19:58:08 LAPTOP-yanick kernel: usb usb3-port9: attempt power cycle
Mai 22 19:58:09 LAPTOP-yanick kernel: usb usb3-port9: Cannot enable. Maybe the USB cable is bad?
Mai 22 19:58:10 LAPTOP-yanick kernel: usb usb3-port9: Cannot enable. Maybe the USB cable is bad?
Mai 22 19:58:10 LAPTOP-yanick kernel: usb usb3-port9: unable to enumerate USB device
Mai 22 19:58:37 LAPTOP-yanick kernel: usb 3-9: new full-speed USB device number 21 using xhci_hcd
Mai 22 19:58:37 LAPTOP-yanick kernel: usb 3-9: New USB device found, idVendor=06cb, idProduct=00be, bcdDevice= 0.00
Mai 22 19:58:37 LAPTOP-yanick kernel: usb 3-9: New USB device strings: Mfr=0, Product=0, SerialNumber=1
Mai 22 19:58:37 LAPTOP-yanick kernel: usb 3-9: SerialNumber: ff5e5ff14e26
Mai 22 19:58:37 LAPTOP-yanick mtp-probe[4190]: checking bus 3, device 21: "/sys/devices/pci0000:00/0000:00:14.0/usb3/3-9"
Mai 22 19:58:37 LAPTOP-yanick mtp-probe[4190]: bus: 3, device: 21 was not an MTP device
Mai 22 19:58:37 LAPTOP-yanick upowerd[966]: treating change event as add on /sys/devices/pci0000:00/0000:00:14.0/usb3/3-9
Mai 22 19:58:37 LAPTOP-yanick mtp-probe[4192]: checking bus 3, device 21: "/sys/devices/pci0000:00/0000:00:14.0/usb3/3-9"
Mai 22 19:58:37 LAPTOP-yanick mtp-probe[4192]: bus: 3, device: 21 was not an MTP device
Weird. Can you try restarting the computer?
Okay restarting and checking journalctl
again didnt show anything regarding usb and tudor. Checking lsusb
it showed the fingerprint reader again. Running out/tudor
gave me the same error message as nefore. But this time the fingerprint reader did not disappear from lsusb
This is my journalctl
now:
i 22 20:07:59 LAPTOP-yanick audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=virtqemud comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? termina>
Mai 22 20:08:03 LAPTOP-yanick systemd[2173]: Started vte-spawn-9ca0088a-8942-4dda-9d8f-f69157d1a622.scope - VTE child process 4078 launched by gnome-terminal-server process 3376.
Mai 22 20:08:23 LAPTOP-yanick audit: BPF prog-id=86 op=LOAD
Mai 22 20:08:23 LAPTOP-yanick systemd[1]: Starting fprintd.service - Fingerprint Authentication Daemon...
Mai 22 20:08:24 LAPTOP-yanick systemd[1]: Started fprintd.service - Fingerprint Authentication Daemon.
Mai 22 20:08:24 LAPTOP-yanick audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=fprintd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal>
Mai 22 20:08:26 LAPTOP-yanick audit[4448]: USER_AUTH pid=4448 uid=1000 auid=1000 ses=3 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:authentication grantors=pam_usertype,pam_localuser,pam_unix ac>
Mai 22 20:08:26 LAPTOP-yanick audit[4448]: USER_ACCT pid=4448 uid=1000 auid=1000 ses=3 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:accounting grantors=pam_unix,pam_localuser acct="yanick" exe=">
Mai 22 20:08:26 LAPTOP-yanick audit[4448]: USER_CMD pid=4448 uid=1000 auid=1000 ses=3 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='cwd="/home/yanick/tmp/synaTudor/relink" cmd=6F75742F7475646F7220746573>
Mai 22 20:08:26 LAPTOP-yanick sudo[4448]: yanick : TTY=pts/1 ; PWD=/home/yanick/tmp/synaTudor/relink ; USER=root ; COMMAND=out/tudor test
Mai 22 20:08:26 LAPTOP-yanick audit[4448]: CRED_REFR pid=4448 uid=1000 auid=1000 ses=3 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:setcred grantors=pam_localuser,pam_unix acct="root" exe="/usr/>
Mai 22 20:08:26 LAPTOP-yanick sudo[4448]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=1000)
Mai 22 20:08:26 LAPTOP-yanick audit[4448]: USER_START pid=4448 uid=1000 auid=1000 ses=3 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:session_open grantors=pam_keyinit,pam_limits,pam_keyinit,pam_>
Mai 22 20:08:26 LAPTOP-yanick kernel: process 'synaTudor/relink/out/tudor' started with executable stack
Mai 22 20:08:26 LAPTOP-yanick kernel: usb 3-9: reset full-speed USB device number 3 using xhci_hcd
Mai 22 20:08:27 LAPTOP-yanick kernel: usb usb3-port9: Cannot enable. Maybe the USB cable is bad?
Mai 22 20:08:27 LAPTOP-yanick kernel: usb 3-9: reset full-speed USB device number 3 using xhci_hcd
Mai 22 20:08:27 LAPTOP-yanick kernel: usb 3-9: hub failed to enable device, error -22
Mai 22 20:08:28 LAPTOP-yanick kernel: usb usb3-port9: Cannot enable. Maybe the USB cable is bad?
Mai 22 20:08:28 LAPTOP-yanick kernel: usb 3-9: reset full-speed USB device number 3 using xhci_hcd
Mai 22 20:08:29 LAPTOP-yanick kernel: usb 3-9: device not accepting address 3, error -22
Mai 22 20:08:29 LAPTOP-yanick kernel: usb 3-9: USB disconnect, device number 3
Mai 22 20:08:29 LAPTOP-yanick sudo[4448]: pam_unix(sudo:session): session closed for user root
Mai 22 20:08:29 LAPTOP-yanick audit[4448]: USER_END pid=4448 uid=1000 auid=1000 ses=3 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:session_close grantors=pam_keyinit,pam_limits,pam_keyinit,pam_l>
Mai 22 20:08:29 LAPTOP-yanick audit[4448]: CRED_DISP pid=4448 uid=1000 auid=1000 ses=3 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='op=PAM:setcred grantors=pam_localuser,pam_unix acct="root" exe="/usr/>
Mai 22 20:08:31 LAPTOP-yanick kernel: usb usb3-port9: Cannot enable. Maybe the USB cable is bad?
Mai 22 20:08:32 LAPTOP-yanick kernel: usb usb3-port9: Cannot enable. Maybe the USB cable is bad?
Mai 22 20:08:32 LAPTOP-yanick kernel: usb usb3-port9: attempt power cycle
Mai 22 20:08:32 LAPTOP-yanick kernel: usb 3-9: new full-speed USB device number 7 using xhci_hcd
Mai 22 20:08:32 LAPTOP-yanick kernel: usb 3-9: New USB device found, idVendor=06cb, idProduct=00be, bcdDevice= 0.00
Mai 22 20:08:32 LAPTOP-yanick kernel: usb 3-9: New USB device strings: Mfr=0, Product=0, SerialNumber=1
Mai 22 20:08:32 LAPTOP-yanick kernel: usb 3-9: SerialNumber: ff5e5ff14e26
Mai 22 20:08:32 LAPTOP-yanick fprintd[4449]: libusb: error [udev_hotplug_event] ignoring udev action change
Mai 22 20:08:32 LAPTOP-yanick upowerd[963]: treating change event as add on /sys/devices/pci0000:00/0000:00:14.0/usb3/3-9
Mai 22 20:08:32 LAPTOP-yanick fprintd[4449]: libusb: error [udev_hotplug_event] ignoring udev action unbind
Mai 22 20:08:32 LAPTOP-yanick mtp-probe[4487]: checking bus 3, device 7: "/sys/devices/pci0000:00/0000:00:14.0/usb3/3-9"
Mai 22 20:08:32 LAPTOP-yanick mtp-probe[4487]: bus: 3, device: 7 was not an MTP device
Mai 22 20:08:32 LAPTOP-yanick fprintd[4449]: libusb: error [udev_hotplug_event] ignoring udev action change
Mai 22 20:08:32 LAPTOP-yanick upowerd[963]: treating change event as add on /sys/devices/pci0000:00/0000:00:14.0/usb3/3-9
Mai 22 20:08:32 LAPTOP-yanick mtp-probe[4489]: checking bus 3, device 7: "/sys/devices/pci0000:00/0000:00:14.0/usb3/3-9"
Mai 22 20:08:32 LAPTOP-yanick mtp-probe[4489]: bus: 3, device: 7 was not an MTP device
idk if the audit parts and systemd parts are necessary but they say something about PAM so I thought I might add them
Hm, seems like the driver resetting your device somehow causes it to be unable to get re-enabled. I might be able to add a workaround for that
sounds great. Let me know if I should try it out again ^^
Ok, turns out I just had to read the documentation properly to find out what I had to do ._. I'm probably gonna push the fix in a few hours
@ItzYanick I just pushed some commits which should fix both of your issues, let me know if there are still problems
okay just tried it out and I got a new error
sudo out/tudor test
[sudo] password for yanick:
[INF] Initializing libcrypto...
[INF] Initializing libusb...
[INF] Found sensor USB device [bus 3 addr 3 vid 0x06cb pid 0x00be]
[INF] Opening sensor USB device...
[INF] Dropping root privileges... [new uid=1000 new gid=1000]
[INF] Initializing tudor driver...
[WRN] PE file contains unsupported resource data directory!
[WRN] PE file contains unsupported exception data directory!
[INF] Loaded driver DLL 'synaFpAdapter104.dll' [186656 bytes]
[WRN] PE file contains unsupported resource data directory!
[WRN] PE file contains unsupported exception data directory!
[WRN] Data directory 4 has invalid bounds! [end 0x17ebe0 > image end 0x17e000]
[INF] Loaded driver DLL 'synaWudfBioUsb104.dll' [1567712 bytes]
[INF] Initializing driver DLL 'synaFpAdapter104.dll'...
[INF] Initializing driver DLL 'synaWudfBioUsb104.dll'...
[INF] Loading data from data store 'test'...
[INF] Opening tudor device...
[INF] Re-enumerating USB device...
[INF] Found sensor USB device [bus 3 addr 3 vid 0x06cb pid 0x00be]
[INF] Opening sensor USB device...
[ERR] Error opening sensor USB device: -1 [LIBUSB_ERROR_IO]
[ERR] Error opening tudor device!
but I do suspect now that it is not your fault. When I booted up my pc today the fingerprint reader wasnt showing up in lsusb
so I rebooted and still not showing up. So i turned my laptop off and gave it a shake and with the next boot the reader was showing up again. So I suspect a loose connection inside the device that is giving the problems :/
but still thank you for your help and time. And great work you did there with this driver! If you still have any idea I would love to hear it, other than that I will close that issue tomorrow
okay just tried it out and I got a new error
sudo out/tudor test [sudo] password for yanick: [INF] Initializing libcrypto... [INF] Initializing libusb... [INF] Found sensor USB device [bus 3 addr 3 vid 0x06cb pid 0x00be] [INF] Opening sensor USB device... [INF] Dropping root privileges... [new uid=1000 new gid=1000] [INF] Initializing tudor driver... [WRN] PE file contains unsupported resource data directory! [WRN] PE file contains unsupported exception data directory! [INF] Loaded driver DLL 'synaFpAdapter104.dll' [186656 bytes] [WRN] PE file contains unsupported resource data directory! [WRN] PE file contains unsupported exception data directory! [WRN] Data directory 4 has invalid bounds! [end 0x17ebe0 > image end 0x17e000] [INF] Loaded driver DLL 'synaWudfBioUsb104.dll' [1567712 bytes] [INF] Initializing driver DLL 'synaFpAdapter104.dll'... [INF] Initializing driver DLL 'synaWudfBioUsb104.dll'... [INF] Loading data from data store 'test'... [INF] Opening tudor device... [INF] Re-enumerating USB device... [INF] Found sensor USB device [bus 3 addr 3 vid 0x06cb pid 0x00be] [INF] Opening sensor USB device... [ERR] Error opening sensor USB device: -1 [LIBUSB_ERROR_IO] [ERR] Error opening tudor device!
but I do suspect now that it is not your fault. When I booted up my pc today the fingerprint reader wasnt showing up in
lsusb
so I rebooted and still not showing up. So i turned my laptop off and gave it a shake and with the next boot the reader was showing up again. So I suspect a loose connection inside the device that is giving the problems :/but still thank you for your help and time. And great work you did there with this driver! If you still have any idea I would love to hear it, other than that I will close that issue tomorrow
Yeah, the first error was already hinting at something like this. If your laptop is servicable you could try opening it up and plugging the cable/whatever got loose back in, but other than that there's not much that can be done sadly.
I am running Fedora 36
I used the commands in the README and also installed libusb but running make failes with the following message: