From e8d6f1bd011389a915c22800707aabcbdc8e9ebe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Wed, 25 Nov 2020 18:41:35 +0100 Subject: [PATCH] debian/patches: Ensure we do not waste power for unsupported devices LP: #1905603 --- debian/patches/series | 2 + ...orted-devices-from-wiki-page-to-rule.patch | 101 ++++++++++++++++++ ...generate-from-wiki-to-include-VFS495.patch | 23 ++++ 3 files changed, 126 insertions(+) create mode 100644 debian/patches/udev-rules-Add-unsupported-devices-from-wiki-page-to-rule.patch create mode 100644 debian/patches/udev-rules-Regenerate-from-wiki-to-include-VFS495.patch diff --git a/debian/patches/series b/debian/patches/series index 54ee0157..b898d166 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -10,3 +10,5 @@ synaptics-Fix-missing-reference-to-interrupt-transfer.patch vfs301-Fix-device-pointer-handling-in-callback.patch vfs301-Start-capture-only-on-state-change-to-AWAIT_FINGER.patch tests-Add-a-new-test-for-vfs301.patch +udev-rules-Add-unsupported-devices-from-wiki-page-to-rule.patch +udev-rules-Regenerate-from-wiki-to-include-VFS495.patch diff --git a/debian/patches/udev-rules-Add-unsupported-devices-from-wiki-page-to-rule.patch b/debian/patches/udev-rules-Add-unsupported-devices-from-wiki-page-to-rule.patch new file mode 100644 index 00000000..c29c9174 --- /dev/null +++ b/debian/patches/udev-rules-Add-unsupported-devices-from-wiki-page-to-rule.patch @@ -0,0 +1,101 @@ +From: Benjamin Berg +Date: Wed, 18 Nov 2020 18:58:31 +0100 +Subject: udev-rules: Add unsupported devices from wiki page to rules + +This ensures we are putting all these devices (which are unusable) into +power save mode. + +Origin: https://gitlab.freedesktop.org/libfprint/libfprint/-/commit/2caeb8c + +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/libfprint/+bug/1905603 +--- + libfprint/fprint-list-udev-rules.c | 74 ++++++++++++++++++++++++++++++++++++-- + 1 file changed, 71 insertions(+), 3 deletions(-) + +diff --git a/libfprint/fprint-list-udev-rules.c b/libfprint/fprint-list-udev-rules.c +index 00bfa92..a921776 100644 +--- a/libfprint/fprint-list-udev-rules.c ++++ b/libfprint/fprint-list-udev-rules.c +@@ -25,11 +25,79 @@ + #include "fpi-device.h" + + static const FpIdEntry whitelist_id_table[] = { +- /* Unsupported (for now) Validity Sensors finger print readers */ +- { .vid = 0x138a, .pid = 0x0090 }, /* Found on e.g. Lenovo T460s */ ++ /* Currently known and unsupported devices. ++ * You can generate this list from the wiki page using e.g.: ++ * gio cat https://gitlab.freedesktop.org/libfprint/wiki/-/wikis/Unsupported-Devices.md | sed -n 's!|.*\([0-9a-fA-F]\{4\}\):\([0-9a-fA-F]\{4\}\).*|.*! { .vid = 0x\1, .pid = 0x\2 },!p' ++ */ ++ { .vid = 0x04f3, .pid = 0x036b }, ++ { .vid = 0x04f3, .pid = 0x0c00 }, ++ { .vid = 0x04f3, .pid = 0x0c4b }, ++ { .vid = 0x04f3, .pid = 0x0c4c }, ++ { .vid = 0x04f3, .pid = 0x0c4d }, ++ { .vid = 0x04f3, .pid = 0x0c4f }, ++ { .vid = 0x04f3, .pid = 0x0c57 }, ++ { .vid = 0x04f3, .pid = 0x2706 }, ++ { .vid = 0x06cb, .pid = 0x0081 }, ++ { .vid = 0x06cb, .pid = 0x0088 }, ++ { .vid = 0x06cb, .pid = 0x008a }, ++ { .vid = 0x06cb, .pid = 0x009a }, ++ { .vid = 0x06cb, .pid = 0x009b }, ++ { .vid = 0x06cb, .pid = 0x00a2 }, ++ { .vid = 0x06cb, .pid = 0x00b7 }, ++ { .vid = 0x06cb, .pid = 0x00bb }, ++ { .vid = 0x06cb, .pid = 0x00be }, ++ { .vid = 0x06cb, .pid = 0x00c2 }, ++ { .vid = 0x06cb, .pid = 0x00c9 }, ++ { .vid = 0x06cb, .pid = 0x00cb }, ++ { .vid = 0x06cb, .pid = 0x00d8 }, ++ { .vid = 0x06cb, .pid = 0x00da }, ++ { .vid = 0x06cb, .pid = 0x00e7 }, ++ { .vid = 0x0a5c, .pid = 0x5801 }, ++ { .vid = 0x0a5c, .pid = 0x5805 }, ++ { .vid = 0x0a5c, .pid = 0x5834 }, ++ { .vid = 0x0a5c, .pid = 0x5843 }, ++ { .vid = 0x10a5, .pid = 0x0007 }, ++ { .vid = 0x1188, .pid = 0x9545 }, ++ { .vid = 0x138a, .pid = 0x0007 }, ++ { .vid = 0x138a, .pid = 0x003c }, ++ { .vid = 0x138a, .pid = 0x003d }, ++ { .vid = 0x138a, .pid = 0x003f }, ++ { .vid = 0x138a, .pid = 0x0090 }, + { .vid = 0x138a, .pid = 0x0091 }, ++ { .vid = 0x138a, .pid = 0x0092 }, + { .vid = 0x138a, .pid = 0x0094 }, +- { .vid = 0x138a, .pid = 0x0097 }, /* Found on e.g. Lenovo T470s */ ++ { .vid = 0x138a, .pid = 0x0097 }, ++ { .vid = 0x138a, .pid = 0x009d }, ++ { .vid = 0x138a, .pid = 0x00ab }, ++ { .vid = 0x147e, .pid = 0x1002 }, ++ { .vid = 0x1491, .pid = 0x0088 }, ++ { .vid = 0x16d1, .pid = 0x1027 }, ++ { .vid = 0x1c7a, .pid = 0x0300 }, ++ { .vid = 0x1c7a, .pid = 0x0570 }, ++ { .vid = 0x1c7a, .pid = 0x0575 }, ++ { .vid = 0x1d6b, .pid = 0x0002 }, ++ { .vid = 0x27c6, .pid = 0x5042 }, ++ { .vid = 0x27c6, .pid = 0x5110 }, ++ { .vid = 0x27c6, .pid = 0x5117 }, ++ { .vid = 0x27c6, .pid = 0x5201 }, ++ { .vid = 0x27c6, .pid = 0x521d }, ++ { .vid = 0x27c6, .pid = 0x5301 }, ++ { .vid = 0x27c6, .pid = 0x530c }, ++ { .vid = 0x27c6, .pid = 0x532d }, ++ { .vid = 0x27c6, .pid = 0x533c }, ++ { .vid = 0x27c6, .pid = 0x5381 }, ++ { .vid = 0x27c6, .pid = 0x5385 }, ++ { .vid = 0x27c6, .pid = 0x538c }, ++ { .vid = 0x27c6, .pid = 0x538d }, ++ { .vid = 0x27c6, .pid = 0x5395 }, ++ { .vid = 0x27c6, .pid = 0x5584 }, ++ { .vid = 0x27c6, .pid = 0x55a2 }, ++ { .vid = 0x27c6, .pid = 0x55a4 }, ++ { .vid = 0x27c6, .pid = 0x55b4 }, ++ { .vid = 0x27c6, .pid = 0x5740 }, ++ { .vid = 0x2808, .pid = 0x9338 }, ++ { .vid = 0x298d, .pid = 0x2033 }, ++ { .vid = 0x3538, .pid = 0x0930 }, + { .vid = 0 }, + }; + diff --git a/debian/patches/udev-rules-Regenerate-from-wiki-to-include-VFS495.patch b/debian/patches/udev-rules-Regenerate-from-wiki-to-include-VFS495.patch new file mode 100644 index 00000000..f4c2ce2d --- /dev/null +++ b/debian/patches/udev-rules-Regenerate-from-wiki-to-include-VFS495.patch @@ -0,0 +1,23 @@ +From: =?utf-8?b?Ik1hcmNvIFRyZXZpc2FuIChUcmV2acOxbyki?= +Date: Wed, 25 Nov 2020 18:28:41 +0100 +Subject: udev-rules: Regenerate from wiki to include VFS495 + +Origin: https://gitlab.freedesktop.org/libfprint/libfprint/-/commit/fa3bdb8 + +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/libfprint/+bug/1905603 +--- + libfprint/fprint-list-udev-rules.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/libfprint/fprint-list-udev-rules.c b/libfprint/fprint-list-udev-rules.c +index a921776..6fbafe2 100644 +--- a/libfprint/fprint-list-udev-rules.c ++++ b/libfprint/fprint-list-udev-rules.c +@@ -59,6 +59,7 @@ static const FpIdEntry whitelist_id_table[] = { + { .vid = 0x10a5, .pid = 0x0007 }, + { .vid = 0x1188, .pid = 0x9545 }, + { .vid = 0x138a, .pid = 0x0007 }, ++ { .vid = 0x138a, .pid = 0x003a }, + { .vid = 0x138a, .pid = 0x003c }, + { .vid = 0x138a, .pid = 0x003d }, + { .vid = 0x138a, .pid = 0x003f },