Popax21 / synaTudor

GNU Lesser General Public License v2.1
89 stars 10 forks source link

Building relink failes #1

Closed ItzYanick closed 2 years ago

ItzYanick commented 2 years ago

I am running Fedora 36

I used the commands in the README and also installed libusb but running make failes with the following message:

/usr/bin/clang -O0 -g3 -Wall -D_GNU_SOURCE -Wl,--copy-dt-needed-entries -lpthread -lcrypto -lusb  -o out/tudor bin/src/datastore.o bin/src/loader.o bin/src/main.o bin/src/stub.o bin/src/wdf.o bin/src/pe/coff_header.o bin/src/pe/data_dir.o bin/src/pe/exception.o bin/src/pe/export.o bin/src/pe/import.o bin/src/pe/opt_header.o bin/src/pe/pe.o bin/src/pe/reloc.o bin/src/pe/resource.o bin/src/pe/sect.o bin/src/pe/tls.o bin/src/tudor/device.o bin/src/tudor/driver.o bin/src/tudor/pairdata.o bin/src/tudor/reg.o bin/src/tudor/storage.o bin/src/winapi/api.o bin/src/winapi/error.o bin/src/winapi/handle.o bin/src/winapi/heap.o bin/src/winapi/io.o bin/src/winapi/list.o bin/src/winapi/log.o bin/src/winapi/module.o bin/src/winapi/pipe.o bin/src/winapi/proc.o bin/src/winapi/prop.o bin/src/winapi/reg.o bin/src/winapi/string.o bin/src/winapi/suspend.o bin/src/winapi/sync.o bin/src/winapi/system.o bin/src/winapi/thread.o bin/src/winapi/time.o bin/src/winapi/bcrypt/aes.o bin/src/winapi/bcrypt/bcrypt.o bin/src/winapi/bcrypt/ecc.o bin/src/winapi/crypt/crypt.o bin/src/winapi/crypt/evp_digest.o bin/src/winapi/crypt/hmac.o bin/src/winapi/crypt/rsa_aes.o bin/src/winapi/wdf/device.o bin/src/winapi/wdf/driver.o bin/src/winapi/wdf/evtqueue.o bin/src/winapi/wdf/file.o bin/src/winapi/wdf/log.o bin/src/winapi/wdf/mem.o bin/src/winapi/wdf/object.o bin/src/winapi/wdf/queue.o bin/src/winapi/wdf/reg.o bin/src/winapi/wdf/request.o bin/src/winapi/wdf/string.o bin/src/winapi/wdf/usb.o bin/windrv/synaFpAdapter104.o bin/windrv/synaWudfBioUsb104.o
/usr/bin/ld: bin/src/main.o: in function `main':
/home/yanick/tmp/synaTudor/relink/src/main.c:328: undefined reference to `libusb_init'
/usr/bin/ld: /home/yanick/tmp/synaTudor/relink/src/main.c:329: undefined reference to `libusb_error_name'
/usr/bin/ld: /home/yanick/tmp/synaTudor/relink/src/main.c:422: undefined reference to `libusb_close'
/usr/bin/ld: /home/yanick/tmp/synaTudor/relink/src/main.c:426: undefined reference to `libusb_exit'
/usr/bin/ld: bin/src/main.o: in function `open_sensor_device':
/home/yanick/tmp/synaTudor/relink/src/main.c:60: undefined reference to `libusb_get_device_list'
/usr/bin/ld: /home/yanick/tmp/synaTudor/relink/src/main.c:62: undefined reference to `libusb_error_name'
/usr/bin/ld: /home/yanick/tmp/synaTudor/relink/src/main.c:72: undefined reference to `libusb_get_device_descriptor'
/usr/bin/ld: /home/yanick/tmp/synaTudor/relink/src/main.c:73: undefined reference to `libusb_error_name'
/usr/bin/ld: /home/yanick/tmp/synaTudor/relink/src/main.c:81: undefined reference to `libusb_get_bus_number'
/usr/bin/ld: /home/yanick/tmp/synaTudor/relink/src/main.c:81: undefined reference to `libusb_get_device_address'
/usr/bin/ld: /home/yanick/tmp/synaTudor/relink/src/main.c:85: undefined reference to `libusb_free_device_list'
/usr/bin/ld: /home/yanick/tmp/synaTudor/relink/src/main.c:95: undefined reference to `libusb_open'
/usr/bin/ld: /home/yanick/tmp/synaTudor/relink/src/main.c:96: undefined reference to `libusb_error_name'
/usr/bin/ld: bin/src/main.o: in function `libusb_poll_thread_func':
/home/yanick/tmp/synaTudor/relink/src/main.c:107: undefined reference to `libusb_handle_events'
/usr/bin/ld: /home/yanick/tmp/synaTudor/relink/src/main.c:108: undefined reference to `libusb_error_name'
/usr/bin/ld: bin/src/tudor/device.o: in function `tudor_open':
/home/yanick/tmp/synaTudor/relink/src/tudor/device.c:25: undefined reference to `libusb_reset_device'
/usr/bin/ld: /home/yanick/tmp/synaTudor/relink/src/tudor/device.c:26: undefined reference to `libusb_error_name'
/usr/bin/ld: bin/src/winapi/wdf/usb.o: in function `WdfUsbTargetDeviceCreate':
/home/yanick/tmp/synaTudor/relink/src/winapi/wdf/usb.c:172: undefined reference to `libusb_reset_device'
/usr/bin/ld: /home/yanick/tmp/synaTudor/relink/src/winapi/wdf/usb.c:173: undefined reference to `libusb_error_name'
/usr/bin/ld: /home/yanick/tmp/synaTudor/relink/src/winapi/wdf/usb.c:176: undefined reference to `libusb_get_device'
/usr/bin/ld: /home/yanick/tmp/synaTudor/relink/src/winapi/wdf/usb.c:176: undefined reference to `libusb_get_config_descriptor'
/usr/bin/ld: /home/yanick/tmp/synaTudor/relink/src/winapi/wdf/usb.c:177: undefined reference to `libusb_error_name'
/usr/bin/ld: /home/yanick/tmp/synaTudor/relink/src/winapi/wdf/usb.c:180: undefined reference to `libusb_set_configuration'
/usr/bin/ld: /home/yanick/tmp/synaTudor/relink/src/winapi/wdf/usb.c:181: undefined reference to `libusb_error_name'
/usr/bin/ld: /home/yanick/tmp/synaTudor/relink/src/winapi/wdf/usb.c:187: undefined reference to `libusb_kernel_driver_active'
/usr/bin/ld: /home/yanick/tmp/synaTudor/relink/src/winapi/wdf/usb.c:189: undefined reference to `libusb_detach_kernel_driver'
/usr/bin/ld: /home/yanick/tmp/synaTudor/relink/src/winapi/wdf/usb.c:190: undefined reference to `libusb_error_name'
/usr/bin/ld: bin/src/winapi/wdf/usb.o: in function `WdfUsbTargetDeviceGetDeviceDescriptor':
/home/yanick/tmp/synaTudor/relink/src/winapi/wdf/usb.c:216: undefined reference to `libusb_get_device'
/usr/bin/ld: /home/yanick/tmp/synaTudor/relink/src/winapi/wdf/usb.c:216: undefined reference to `libusb_get_device_descriptor'
/usr/bin/ld: /home/yanick/tmp/synaTudor/relink/src/winapi/wdf/usb.c:217: undefined reference to `libusb_error_name'
/usr/bin/ld: bin/src/winapi/wdf/usb.o: in function `WdfUsbTargetDeviceResetPortSynchronously':
/home/yanick/tmp/synaTudor/relink/src/winapi/wdf/usb.c:229: undefined reference to `libusb_reset_device'
/usr/bin/ld: /home/yanick/tmp/synaTudor/relink/src/winapi/wdf/usb.c:230: undefined reference to `libusb_error_name'
/usr/bin/ld: bin/src/winapi/wdf/usb.o: in function `WdfUsbTargetDeviceGetInterface':
/home/yanick/tmp/synaTudor/relink/src/winapi/wdf/usb.c:252: undefined reference to `libusb_claim_interface'
/usr/bin/ld: /home/yanick/tmp/synaTudor/relink/src/winapi/wdf/usb.c:253: undefined reference to `libusb_error_name'
/usr/bin/ld: bin/src/winapi/wdf/usb.o: in function `usb_if_destr':
/home/yanick/tmp/synaTudor/relink/src/winapi/wdf/usb.c:136: undefined reference to `libusb_release_interface'
/usr/bin/ld: /home/yanick/tmp/synaTudor/relink/src/winapi/wdf/usb.c:137: undefined reference to `libusb_error_name'
/usr/bin/ld: bin/src/winapi/wdf/usb.o: in function `WdfUsbTargetDeviceFormatRequestForControlTransfer':
/home/yanick/tmp/synaTudor/relink/src/winapi/wdf/usb.c:466: undefined reference to `libusb_alloc_transfer'
/usr/bin/ld: bin/src/winapi/wdf/usb.o: in function `usb_transfer_start':
/home/yanick/tmp/synaTudor/relink/src/winapi/wdf/usb.c:433: undefined reference to `libusb_submit_transfer'
/usr/bin/ld: /home/yanick/tmp/synaTudor/relink/src/winapi/wdf/usb.c:434: undefined reference to `libusb_error_name'
/usr/bin/ld: bin/src/winapi/wdf/usb.o: in function `usb_transfer_cleanup':
/home/yanick/tmp/synaTudor/relink/src/winapi/wdf/usb.c:443: undefined reference to `libusb_free_transfer'
/usr/bin/ld: bin/src/winapi/wdf/usb.o: in function `WdfUsbTargetPipeFormatRequestForRead':
/home/yanick/tmp/synaTudor/relink/src/winapi/wdf/usb.c:511: undefined reference to `libusb_alloc_transfer'
/usr/bin/ld: bin/src/winapi/wdf/usb.o: in function `WdfUsbTargetPipeFormatRequestForWrite':
/home/yanick/tmp/synaTudor/relink/src/winapi/wdf/usb.c:557: undefined reference to `libusb_alloc_transfer'
/usr/bin/ld: bin/src/winapi/wdf/usb.o: in function `pipe_transfer_callback':
/home/yanick/tmp/synaTudor/relink/src/winapi/wdf/usb.c:373: undefined reference to `libusb_error_name'
clang-14: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Makefile:27: out/tudor] Error 1
Popax21 commented 2 years ago

Do you have libusb-devel installed?

ItzYanick commented 2 years ago

Yes I do. Was also my first guess.

Popax21 commented 2 years ago

Can you try running both pkg-config --cflags --libs libusb-1.0 and pkg-config --cflags --libs libusb?

ItzYanick commented 2 years ago

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

Popax21 commented 2 years ago

Weird, can you run /usr/lib/libusb*?

ItzYanick commented 2 years ago

Output: [1] 12722 segmentation fault (core dumped) /usr/lib/libusb*

Popax21 commented 2 years ago

Ah wait, that should have been ls /usr/lib/libusb*...

ItzYanick commented 2 years ago

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
Popax21 commented 2 years ago

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)?

ItzYanick commented 2 years ago

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

ItzYanick commented 2 years ago

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.

ItzYanick commented 2 years ago

should I open a new Issue for that or do you want to figure it out here?

Popax21 commented 2 years ago

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?

ItzYanick commented 2 years ago

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
Popax21 commented 2 years ago

Weird. Can you try restarting the computer?

ItzYanick commented 2 years ago

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

Popax21 commented 2 years ago

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

ItzYanick commented 2 years ago

sounds great. Let me know if I should try it out again ^^

Popax21 commented 2 years ago

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

Popax21 commented 2 years ago

@ItzYanick I just pushed some commits which should fix both of your issues, let me know if there are still problems

ItzYanick commented 2 years ago

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

Popax21 commented 2 years ago

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.