Summary: | sys-apps/pcsc-lite-1.8.25-r1 stopped to handle GnuPG sticks | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Klaus Ethgen <Klaus+gentoo> |
Component: | Current packages | Assignee: | Gentoo's Team for Core System packages <base-system> |
Status: | UNCONFIRMED --- | ||
Severity: | normal | CC: | joe |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | pcscd out |
Description
Klaus Ethgen
2020-01-07 19:16:34 UTC
Hello! I have a few questions here: 1.) what is your output of the `pcscd -f -d -a` command 2.) is your regular user in the usb group? 3.) what dirvers do you have installed? 1. ~> pcscd -f -d -a 00000000 [140112731667328] /var/tmp/portage/sys-apps/pcsc-lite-1.8.24/work/pcsc-lite-1.8.24/src/debuglog.c:299:DebugLogSetLevel() debug level=debug 00000097 [140112731667328] /var/tmp/portage/sys-apps/pcsc-lite-1.8.24/work/pcsc-lite-1.8.24/src/debuglog.c:320:DebugLogSetCategory() Debug options: APDU 00000046 [140112731667328] /var/tmp/portage/sys-apps/pcsc-lite-1.8.24/work/pcsc-lite-1.8.24/src/pcscdaemon.c:481:main() file /run/pcscd/pcscd.comm already exists. 00000018 [140112731667328] /var/tmp/portage/sys-apps/pcsc-lite-1.8.24/work/pcsc-lite-1.8.24/src/pcscdaemon.c:483:main() Another pcscd (pid: 25066) seems to be running. Stopping pcscd service before: ~> pcscd -f -d -a 00000000 [140112731667328] /var/tmp/portage/sys-apps/pcsc-lite-1.8.24/work/pcsc-lite-1.8.24/src/debuglog.c:299:DebugLogSetLevel() debug level=debug 00000097 [140112731667328] /var/tmp/portage/sys-apps/pcsc-lite-1.8.24/work/pcsc-lite-1.8.24/src/debuglog.c:320:DebugLogSetCategory() Debug options: APDU 00000046 [140112731667328] /var/tmp/portage/sys-apps/pcsc-lite-1.8.24/work/pcsc-lite-1.8.24/src/pcscdaemon.c:481:main() file /run/pcscd/pcscd.comm already exists. 00000018 [140112731667328] /var/tmp/portage/sys-apps/pcsc-lite-1.8.24/work/pcsc-lite-1.8.24/src/pcscdaemon.c:483:main() Another pcscd (pid: 25066) seems to be running. chua: ?1 !11 ~> service pcscd stop * Stopping PC/SC Daemon ... [ ok ] chua: ?0 !12 ~> pcscd -f -d -a 00000000 [140127884934016] /var/tmp/portage/sys-apps/pcsc-lite-1.8.24/work/pcsc-lite-1.8.24/src/debuglog.c:299:DebugLogSetLevel() debug level=debug 00000274 [140127884934016] /var/tmp/portage/sys-apps/pcsc-lite-1.8.24/work/pcsc-lite-1.8.24/src/debuglog.c:320:DebugLogSetCategory() Debug options: APDU 00000268 [140127884934016] configfile.l:284:DBGetReaderListDir() Parsing conf directory: /etc/reader.conf.d 00000179 [140127884934016] configfile.l:320:DBGetReaderListDir() Skipping non regular file: . 00000131 [140127884934016] configfile.l:320:DBGetReaderListDir() Skipping non regular file: .. 00000126 [140127884934016] configfile.l:360:DBGetReaderList() Parsing conf file: /etc/reader.conf.d/ifd-gempc.conf 00000208 [140127884934016] configfile.l:210:evaluatetoken() Add reader: GemPC410 00000168 [140127884934016] /var/tmp/portage/sys-apps/pcsc-lite-1.8.24/work/pcsc-lite-1.8.24/src/readerfactory.c:1074:RFInitializeReader() Attempting startup of GemPC410 00 00 using /usr/lib64/readers/usb/serial/libGemPC410.so.1.0.7 00000303 [140127884934016] /var/tmp/portage/sys-apps/pcsc-lite-1.8.24/work/pcsc-lite-1.8.24/src/readerfactory.c:950:RFBindFunctions() Loading IFD Handler 3.0 00000170 [140127884934016] ifdhandler.c:51:IFDHCreateChannelByName() lun: 0, device: /dev/null 00000139 [140127884934016] gbpserial.c:328:OpenGBP() Lun: 0, device: /dev/null 00000177 [140127884934016] gbpserial.c:356:OpenGBP() tcflush() function error: Inappropriate ioctl for device 00000123 [140127884934016] gbpserial.c:361:OpenGBP() tcgetattr() function error: Inappropriate ioctl for device 00000128 [140127884934016] GemPC410Utils.c:31:OpenGemPC410ByName() OpenGBP failed 00000128 [140127884934016] ifdhandler.c:65:IFDHCreateChannelByName() OpenPort failed 00000140 [140127884934016] /var/tmp/portage/sys-apps/pcsc-lite-1.8.24/work/pcsc-lite-1.8.24/src/readerfactory.c:1105:RFInitializeReader() Open Port 0x0 Failed (/dev/null) 00000133 [140127884934016] /var/tmp/portage/sys-apps/pcsc-lite-1.8.24/work/pcsc-lite-1.8.24/src/readerfactory.c:376:RFAddReader() GemPC410 init failed. 00000123 [140127884934016] /var/tmp/portage/sys-apps/pcsc-lite-1.8.24/work/pcsc-lite-1.8.24/src/readerfactory.c:610:RFRemoveReader() UnrefReader() count was: 1 00000133 [140127884934016] /var/tmp/portage/sys-apps/pcsc-lite-1.8.24/work/pcsc-lite-1.8.24/src/readerfactory.c:1125:RFUnInitializeReader() Attempting shutdown of GemPC410 00 00. 00000120 [140127884934016] /var/tmp/portage/sys-apps/pcsc-lite-1.8.24/work/pcsc-lite-1.8.24/src/readerfactory.c:987:RFUnloadReader() Unloading reader driver. 00000161 [140127884934016] /var/tmp/portage/sys-apps/pcsc-lite-1.8.24/work/pcsc-lite-1.8.24/src/pcscdaemon.c:662:main() pcsc-lite 1.8.24 daemon ready. 00003655 [140127884934016] /var/tmp/portage/sys-apps/pcsc-lite-1.8.24/work/pcsc-lite-1.8.24/src/hotplug_libudev.c:295:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0001, path: /dev/bus/usb/003/001 00000339 [140127884934016] /var/tmp/portage/sys-apps/pcsc-lite-1.8.24/work/pcsc-lite-1.8.24/src/hotplug_libudev.c:295:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0001, path: /dev/bus/usb/003/001 00000331 [140127884934016] /var/tmp/portage/sys-apps/pcsc-lite-1.8.24/work/pcsc-lite-1.8.24/src/hotplug_libudev.c:295:get_driver() Looking for a driver for VID: 0x0A5C, PID: 0x2110, path: /dev/bus/usb/003/003 00000286 [140127884934016] /var/tmp/portage/sys-apps/pcsc-lite-1.8.24/work/pcsc-lite-1.8.24/src/hotplug_libudev.c:295:get_driver() Looking for a driver for VID: 0x0A5C, PID: 0x2110, path: /dev/bus/usb/003/003 00000285 [140127884934016] /var/tmp/portage/sys-apps/pcsc-lite-1.8.24/work/pcsc-lite-1.8.24/src/hotplug_libudev.c:295:get_driver() Looking for a driver for VID: 0x0A5C, PID: 0x2110, path: /dev/bus/usb/003/003 00000280 [140127884934016] /var/tmp/portage/sys-apps/pcsc-lite-1.8.24/work/pcsc-lite-1.8.24/src/hotplug_libudev.c:295:get_driver() Looking for a driver for VID: 0x0A5C, PID: 0x2110, path: /dev/bus/usb/003/003 00000349 [140127884934016] /var/tmp/portage/sys-apps/pcsc-lite-1.8.24/work/pcsc-lite-1.8.24/src/hotplug_libudev.c:295:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0001, path: /dev/bus/usb/004/001 00000318 [140127884934016] /var/tmp/portage/sys-apps/pcsc-lite-1.8.24/work/pcsc-lite-1.8.24/src/hotplug_libudev.c:295:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0002, path: /dev/bus/usb/001/001 00000331 [140127884934016] /var/tmp/portage/sys-apps/pcsc-lite-1.8.24/work/pcsc-lite-1.8.24/src/hotplug_libudev.c:295:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0001, path: /dev/bus/usb/005/001 00000299 [140127884934016] /var/tmp/portage/sys-apps/pcsc-lite-1.8.24/work/pcsc-lite-1.8.24/src/hotplug_libudev.c:295:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0001, path: /dev/bus/usb/005/001 00000281 [140127884934016] /var/tmp/portage/sys-apps/pcsc-lite-1.8.24/work/pcsc-lite-1.8.24/src/hotplug_libudev.c:295:get_driver() Looking for a driver for VID: 0x08E6, PID: 0x3438, path: /dev/bus/usb/005/006 00000162 [140127884934016] /var/tmp/portage/sys-apps/pcsc-lite-1.8.24/work/pcsc-lite-1.8.24/src/hotplug_libudev.c:436:HPAddDevice() Adding USB device: Gemalto USB Shell Token V2 00000195 [140127884934016] /var/tmp/portage/sys-apps/pcsc-lite-1.8.24/work/pcsc-lite-1.8.24/src/readerfactory.c:1074:RFInitializeReader() Attempting startup of Gemalto USB Shell Token V2 (9C07A058) 00 00 using /usr/lib64/readers/usb/ifd-ccid.bundle/Contents/Linux/libccid.so 00000529 [140127884934016] /var/tmp/portage/sys-apps/pcsc-lite-1.8.24/work/pcsc-lite-1.8.24/src/readerfactory.c:950:RFBindFunctions() Loading IFD Handler 3.0 00000164 [140127884934016] ifdhandler.c:1961:init_driver() Driver version: 1.4.30 00001250 [140127884934016] ifdhandler.c:1978:init_driver() LogLevel: 0x0003 00000148 [140127884934016] ifdhandler.c:1989:init_driver() DriverOptions: 0x0000 00000474 [140127884934016] ifdhandler.c:110:CreateChannelByNameOrChannel() Lun: 0, device: usb:08e6/3438:libudev:0:/dev/bus/usb/005/006 00000161 [140127884934016] ccid_usb.c:302:OpenUSBByName() Using: /usr/lib64/readers/usb/ifd-ccid.bundle/Contents/Info.plist 00001238 [140127884934016] ccid_usb.c:320:OpenUSBByName() ifdManufacturerString: Ludovic Rousseau (ludovic.rousseau@free.fr) 00000145 [140127884934016] ccid_usb.c:321:OpenUSBByName() ifdProductString: Generic CCID driver 00000172 [140127884934016] ccid_usb.c:322:OpenUSBByName() Copyright: This driver is protected by terms of the GNU Lesser General Public License version 2.1, or (at your option) any later version. 00004349 [140127884934016] ccid_usb.c:660:OpenUSBByName() Found Vendor/Product: 08E6/3438 (Gemalto USB Shell Token V2) 00000198 [140127884934016] ccid_usb.c:662:OpenUSBByName() Using USB bus/device: 5/6 00005162 [140127884934016] ccid_usb.c:1233:get_data_rates() declared: 12903 bps 00000017 [140127884934016] ccid_usb.c:1233:get_data_rates() declared: 25806 bps 00000011 [140127884934016] ccid_usb.c:1233:get_data_rates() declared: 51613 bps 00000022 [140127884934016] ccid_usb.c:1233:get_data_rates() declared: 103226 bps 00000010 [140127884934016] ccid_usb.c:1233:get_data_rates() declared: 206452 bps 00000010 [140127884934016] ccid_usb.c:1233:get_data_rates() declared: 412903 bps 00000009 [140127884934016] ccid_usb.c:1233:get_data_rates() declared: 825806 bps 00000009 [140127884934016] ccid_usb.c:1233:get_data_rates() declared: 154839 bps 00000018 [140127884934016] ccid_usb.c:1233:get_data_rates() declared: 258065 bps 00000010 [140127884934016] ccid_usb.c:1233:get_data_rates() declared: 17204 bps 00000009 [140127884934016] ccid_usb.c:1233:get_data_rates() declared: 34409 bps 00000009 [140127884934016] ccid_usb.c:1233:get_data_rates() declared: 68817 bps 00000010 [140127884934016] ccid_usb.c:1233:get_data_rates() declared: 137634 bps 00000009 [140127884934016] ccid_usb.c:1233:get_data_rates() declared: 275269 bps 00000018 [140127884934016] ccid_usb.c:1233:get_data_rates() declared: 550538 bps 00000010 [140127884934016] ccid_usb.c:1233:get_data_rates() declared: 172043 bps 00000022 [140127884934016] ccid_usb.c:1233:get_data_rates() declared: 24806 bps 00000011 [140127884934016] ccid_usb.c:1233:get_data_rates() declared: 49612 bps 00000009 [140127884934016] ccid_usb.c:1233:get_data_rates() declared: 99225 bps 00000009 [140127884934016] ccid_usb.c:1233:get_data_rates() declared: 198450 bps 00000013 [140127884934016] ccid_usb.c:1233:get_data_rates() declared: 396899 bps 00000009 [140127884934016] ccid_usb.c:1233:get_data_rates() declared: 74419 bps 00000009 [140127884934016] ccid_usb.c:1233:get_data_rates() declared: 124031 bps 00000009 [140127884934016] ccid_usb.c:1233:get_data_rates() declared: 86022 bps 00000012 [140127884934016] ccid_usb.c:1233:get_data_rates() declared: 38710 bps 00000010 [140127884934016] ccid_usb.c:1233:get_data_rates() declared: 64516 bps 00000009 [140127884934016] ccid_usb.c:1233:get_data_rates() declared: 20645 bps 00000010 [140127884934016] ccid_usb.c:1233:get_data_rates() declared: 41290 bps 00000009 [140127884934016] ccid_usb.c:1233:get_data_rates() declared: 82581 bps 00000009 [140127884934016] ccid_usb.c:1233:get_data_rates() declared: 165161 bps 00000017 [140127884934016] ccid_usb.c:1233:get_data_rates() declared: 30968 bps 00000013 [140127884934016] ccid_usb.c:1233:get_data_rates() declared: 18750 bps 00000009 [140127884934016] ccid_usb.c:1233:get_data_rates() declared: 37500 bps 00000009 [140127884934016] ccid_usb.c:1233:get_data_rates() declared: 75000 bps 00000021 [140127884934016] ccid_usb.c:1233:get_data_rates() declared: 150000 bps 00000020 [140127884934016] ccid_usb.c:1233:get_data_rates() declared: 300000 bps 00000020 [140127884934016] ccid_usb.c:1233:get_data_rates() declared: 600000 bps 00000020 [140127884934016] ccid_usb.c:1233:get_data_rates() declared: 112500 bps 00000020 [140127884934016] ccid_usb.c:1233:get_data_rates() declared: 187500 bps 00000019 [140127884934016] ccid_usb.c:1233:get_data_rates() declared: 25000 bps 00000020 [140127884934016] ccid_usb.c:1233:get_data_rates() declared: 50000 bps 00000019 [140127884934016] ccid_usb.c:1233:get_data_rates() declared: 100000 bps 00000020 [140127884934016] ccid_usb.c:1233:get_data_rates() declared: 200000 bps 00000019 [140127884934016] ccid_usb.c:1233:get_data_rates() declared: 400000 bps 00000020 [140127884934016] ccid_usb.c:1233:get_data_rates() declared: 125000 bps 00000020 [140127884934016] ccid_usb.c:1233:get_data_rates() declared: 56250 bps 00000020 [140127884934016] ccid_usb.c:1233:get_data_rates() declared: 93750 bps 00000019 [140127884934016] ccid_usb.c:1233:get_data_rates() declared: 62500 bps 00000020 [140127884934016] ccid_usb.c:1233:get_data_rates() declared: 28125 bps 00000019 [140127884934016] ccid_usb.c:1233:get_data_rates() declared: 46875 bps 00115282 [140127884934016] commands.c:1004:CmdEscapeCheck error on byte 10 00000019 [140127884934016] ccid.c:240:set_gemalto_firmware_features() GET_FIRMWARE_FEATURES failed: 612, len=0 00000013 [140127884934016] ifdhandler.c:381:IFDHGetCapabilities() tag: 0xFB3, usb:08e6/3438:libudev:0:/dev/bus/usb/005/006 (lun: 0) 00000017 [140127884934016] /var/tmp/portage/sys-apps/pcsc-lite-1.8.24/work/pcsc-lite-1.8.24/src/readerfactory.c:396:RFAddReader() Using the reader polling thread 00002021 [140127884934016] ifdhandler.c:381:IFDHGetCapabilities() tag: 0xFAE, usb:08e6/3438:libudev:0:/dev/bus/usb/005/006 (lun: 0) 00000017 [140127884934016] ifdhandler.c:476:IFDHGetCapabilities() Reader supports 1 slot(s) 00000339 [140127884934016] /var/tmp/portage/sys-apps/pcsc-lite-1.8.24/work/pcsc-lite-1.8.24/src/hotplug_libudev.c:295:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0001, path: /dev/bus/usb/006/001 00000205 [140127884934016] /var/tmp/portage/sys-apps/pcsc-lite-1.8.24/work/pcsc-lite-1.8.24/src/hotplug_libudev.c:295:get_driver() Looking for a driver for VID: 0x1D6B, PID: 0x0002, path: /dev/bus/usb/002/001 00000087 [140127884934016] /var/tmp/portage/sys-apps/pcsc-lite-1.8.24/work/pcsc-lite-1.8.24/src/readerfactory.c:1409:RFWaitForReaderInit() Waiting init for reader: Gemalto USB Shell Token V2 (9C07A058) 00 00 00003284 [140127865816832] ifdhandler.c:1154:IFDHPowerICC() action: PowerUp, usb:08e6/3438:libudev:0:/dev/bus/usb/005/006 (lun: 0) 00006866 [140127884934016] /var/tmp/portage/sys-apps/pcsc-lite-1.8.24/work/pcsc-lite-1.8.24/src/readerfactory.c:1409:RFWaitForReaderInit() Waiting init for reader: Gemalto USB Shell Token V2 (9C07A058) 00 00 00010204 [140127884934016] /var/tmp/portage/sys-apps/pcsc-lite-1.8.24/work/pcsc-lite-1.8.24/src/readerfactory.c:1409:RFWaitForReaderInit() Waiting init for reader: Gemalto USB Shell Token V2 (9C07A058) 00 00 00010181 [140127884934016] /var/tmp/portage/sys-apps/pcsc-lite-1.8.24/work/pcsc-lite-1.8.24/src/readerfactory.c:1409:RFWaitForReaderInit() Waiting init for reader: Gemalto USB Shell Token V2 (9C07A058) 00 00 00010168 [140127884934016] /var/tmp/portage/sys-apps/pcsc-lite-1.8.24/work/pcsc-lite-1.8.24/src/readerfactory.c:1409:RFWaitForReaderInit() Waiting init for reader: Gemalto USB Shell Token V2 (9C07A058) 00 00 00010183 [140127884934016] /var/tmp/portage/sys-apps/pcsc-lite-1.8.24/work/pcsc-lite-1.8.24/src/readerfactory.c:1409:RFWaitForReaderInit() Waiting init for reader: Gemalto USB Shell Token V2 (9C07A058) 00 00 00010171 [140127884934016] /var/tmp/portage/sys-apps/pcsc-lite-1.8.24/work/pcsc-lite-1.8.24/src/readerfactory.c:1409:RFWaitForReaderInit() Waiting init for reader: Gemalto USB Shell Token V2 (9C07A058) 00 00 00006269 [140127865816832] /var/tmp/portage/sys-apps/pcsc-lite-1.8.24/work/pcsc-lite-1.8.24/src/eventhandler.c:289:EHStatusHandlerThread() powerState: POWER_STATE_POWERED 00000080 [140127865816832] Card ATR: 3B DA 18 FF 81 B1 FE 75 1F 03 00 31 C5 73 C0 01 40 00 90 00 0C Note that this is the version 1.8.24 as I depending on a working GnuPG card. I got the ebuild from the git history of gentoo source. It would have helped if that would have remained in the official source. 2. No. But I even tried gpg --card-status as root and it didn't work too. 3. I do not understand that question. I do not use any driver. It is a gemalto usb stick/card reader. It just worked in the past with installed pcsc-lite. Why do you file the bug against 1.8.25 but show 1.8.24 output? > Why do you file the bug against 1.8.25 but show 1.8.24 output?
Cause the 1.8.25 version is the broken one and after I filed the report I had to go back to 1.8.24 as I am depending on a working GnuPG setup (as I mentioned in my last comment)!
I masked 1.8.25-r1 also.
(In reply to Klaus Ethgen from comment #4) > > Why do you file the bug against 1.8.25 but show 1.8.24 output? > Cause the 1.8.25 version is the broken one and after I filed the report I > had to go back to 1.8.24 as I am depending on a working GnuPG setup (as I > mentioned in my last comment)! > > I masked 1.8.25-r1 also. I asked you to provide outputs with version that does not work for you, providing outputs with working versions are pointless as they are working :), otherwise it is simoly unclear what exactly wrong. I seems to have found the bug. One has to be sure that pcscd user is in group usb (which it isn't with the new package using acct-user/pcscd). The problem occur (as I already wrote) that the device (/dev/bus/usb/005/023) is first created with group pcscd and after just a second reowned by group usb. I think, udev does something really strange here. However, for completeness I'll upload the output of pcscd -f -d -a. Created attachment 602930 [details]
pcscd out
(In reply to Klaus Ethgen from comment #6) > I seems to have found the bug. One has to be sure that pcscd user is in > group usb (which it isn't with the new package using acct-user/pcscd). > > The problem occur (as I already wrote) that the device > (/dev/bus/usb/005/023) is first created with group pcscd and after just a > second reowned by group usb. I think, udev does something really strange > here. > > However, for completeness I'll upload the output of pcscd -f -d -a. The thing is that acct-* things only replace enewgroup/enewuser calls with pre-determined GID/UID, so I wonder how the older version worked for you if this is the case. The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3c38b81acc906906dee1ad50600e795d97c1a101 commit 3c38b81acc906906dee1ad50600e795d97c1a101 Author: Mikle Kolyada <zlogene@gentoo.org> AuthorDate: 2020-01-10 21:13:52 +0000 Commit: Mikle Kolyada <zlogene@gentoo.org> CommitDate: 2020-01-10 21:14:14 +0000 acct-group/usb: initial commit Bug: https://bugs.gentoo.org/704946 Package-Manager: Portage-2.3.79, Repoman-2.3.16 Signed-off-by: Mikle Kolyada <zlogene@gentoo.org> acct-group/usb/metadata.xml | 8 ++++++++ acct-group/usb/usb-0.ebuild | 8 ++++++++ 2 files changed, 16 insertions(+) Should be fixed. I think I need to reopen that bug. But the error looks not that trivial as I thought before. The old pcscd worked reliable, that is known and did not change. But the new version does work "sometimes". When I want to use the GnuPG card, I have to restart pcscd often, kill the scdaemon or replugin the USB stick (with the card) to different ports until it work. I did not find a reliable way to make it work always. Maybe that has to do with the reowning part I described in the report earlier. It looks like a race condition when powering the card. What I seen is that, even that there is a running pcscd daemon via init.d, there is a udev rule to start the pcscd too. However, I think, the idea was to only start it when it is needed but that never worked. Could you please provide more data? Otherwise it sounds like "roll a dice" I think, that it is a conflict between the pcscd running as daemon and the one started by eudev when plugging in the device respective a race condition. Is there any way to see what eudev is doing exactly when plugging in the device? I have no idea what exactly eudev is doing in that case. reopen if still happens to the never versions, I am using pcscd as the main gpg reader provider and it has been fine now for ages. Please reopen, I have had this bug for some time (up to 1.9.9 now). gnupg seems to spawn its own pcscd process as I can list and edit card when pcscd-lite is stopped. I have both my user and pcscd added to usb group: > usb:x:85:joecool,pcscd udevadm monitor output (on plugging in yubikey4) yubioath-desktop works fine, gpg nonfunctional (as root or user) in this state. Plugging in also starts the pcscd initscript if I use udev and enable the hotplug option in rc.conf : KERNEL[12460.706101] add /devices/pci0000:00/0000:00:14.0/usb1/1-6 (usb) KERNEL[12460.708357] add /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0 (usb) KERNEL[12460.708816] add /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:1050:0407.0015 (hid) KERNEL[12460.708937] add /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:1050:0407.0015/input/input29 (input) KERNEL[12460.761908] add /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:1050:0407.0015/input/input29/input29::numlock (leds) KERNEL[12460.761964] change /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:1050:0407.0015/input/input29/input29::numlock (leds) KERNEL[12460.762007] add /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:1050:0407.0015/input/input29/input29::capslock (leds) KERNEL[12460.762045] change /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:1050:0407.0015/input/input29/input29::capslock (leds) KERNEL[12460.762075] add /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:1050:0407.0015/input/input29/input29::scrolllock (leds) KERNEL[12460.762102] change /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:1050:0407.0015/input/input29/input29::scrolllock (leds) KERNEL[12460.762127] add /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:1050:0407.0015/input/input29/input29::compose (leds) KERNEL[12460.762186] add /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:1050:0407.0015/input/input29/input29::kana (leds) KERNEL[12460.762221] change /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:1050:0407.0015/input/input29/input29::kana (leds) KERNEL[12460.762394] add /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:1050:0407.0015/input/input29/event18 (input) KERNEL[12460.762456] add /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:1050:0407.0015/hidraw/hidraw0 (hidraw) KERNEL[12460.762510] bind /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:1050:0407.0015 (hid) KERNEL[12460.762558] bind /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0 (usb) KERNEL[12460.762947] add /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.1 (usb) KERNEL[12460.763506] add /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.1/0003:1050:0407.0016 (hid) KERNEL[12460.763612] add /class/usbmisc (class) KERNEL[12460.763739] add /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.1/usbmisc/hiddev0 (usbmisc) KERNEL[12460.763852] add /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.1/0003:1050:0407.0016/hidraw/hidraw1 (hidraw) KERNEL[12460.763912] bind /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.1/0003:1050:0407.0016 (hid) KERNEL[12460.763946] bind /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.1 (usb) KERNEL[12460.764178] add /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.2 (usb) KERNEL[12460.764388] bind /devices/pci0000:00/0000:00:14.0/usb1/1-6 (usb) UDEV [12460.770740] add /class/usbmisc (class) UDEV [12460.787513] add /devices/pci0000:00/0000:00:14.0/usb1/1-6 (usb) UDEV [12460.790759] add /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.1 (usb) UDEV [12460.790939] add /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0 (usb) UDEV [12460.791721] add /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.2 (usb) UDEV [12460.793662] add /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.1/0003:1050:0407.0016 (hid) UDEV [12460.794217] add /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:1050:0407.0015 (hid) UDEV [12460.794664] add /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.1/usbmisc/hiddev0 (usbmisc) UDEV [12460.797253] add /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:1050:0407.0015/input/input29 (input) UDEV [12460.798777] add /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.1/0003:1050:0407.0016/hidraw/hidraw1 (hidraw) UDEV [12460.799567] add /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:1050:0407.0015/hidraw/hidraw0 (hidraw) UDEV [12460.801007] add /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:1050:0407.0015/input/input29/input29::numlock (leds) UDEV [12460.801521] add /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:1050:0407.0015/input/input29/input29::scrolllock (leds) UDEV [12460.801636] bind /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.1/0003:1050:0407.0016 (hid) UDEV [12460.802386] add /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:1050:0407.0015/input/input29/input29::compose (leds) UDEV [12460.802501] add /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:1050:0407.0015/input/input29/input29::capslock (leds) UDEV [12460.803226] add /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:1050:0407.0015/input/input29/input29::kana (leds) UDEV [12460.803816] change /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:1050:0407.0015/input/input29/input29::numlock (leds) UDEV [12460.804255] change /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:1050:0407.0015/input/input29/input29::scrolllock (leds) UDEV [12460.804825] bind /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.1 (usb) UDEV [12460.804948] change /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:1050:0407.0015/input/input29/input29::capslock (leds) UDEV [12460.805566] change /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:1050:0407.0015/input/input29/input29::kana (leds) UDEV [12460.813025] add /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:1050:0407.0015/input/input29/event18 (input) UDEV [12460.815263] bind /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/0003:1050:0407.0015 (hid) UDEV [12460.817297] bind /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0 (usb) UDEV [12460.821512] bind /devices/pci0000:00/0000:00:14.0/usb1/1-6 (usb) I think this should be documented in an ewarn for app-crypt/gnupg. I figured out the cause and a workaround through a lot of searching. This guy writes about it: https://ludovicrousseau.blogspot.com/2019/06/gnupg-and-pcsc-conflicts.html TL;DR: If you use stuff a yubikey (and their apps, which need pcsc-lite) and you want to use gpg for signing, need to add disable-ccid (and run 'gpgconf --kill scdaemon' after adding) to ~/.gnupg/scdaemon.conf, otherwise you have to pick one or the other to run at once. user joecool requested this be reopened via IRC and they seem to have added additional information and a lead on a solution More related reports: - https://github.com/LudovicRousseau/PCSC/issues/65 - https://bugzilla.redhat.com/show_bug.cgi?id=1941346 Ok so here's where I'm at with this: It is probably not a good idea to build gnupg with its own ccid support unless you really know what you're doing or it's being confined to something like initramfs usage. On a system using those other apps, they will use pcsc-lite usually. If gnupg is built without its internal ccid support, it will fallback to using pcsc-lite just fine with a usb smartcard reader. As a user right now if you hit this bug, you have 3 options: 1. Shut off pcsc-lite everytime you use gpg, and kill gpg-agent everytime you want to use pcsc-lite. (this is annoying situation I was in) 2. Add disable-ccid to $HOMEDIR/.gnupg/scdaemon.conf 3. Rebuild app-crypt/gnupg with -usb. app-crypt/gnupg maintainer suggestions: - change USE flag for app-crypt/gnupg to ccid as USB functions will work fine in the absence of it. - It might be good to put a RDEPEND on pcsc-lite if +smartcard -usb - ewarn when built with +smartcard +usb that disable-ccid should be added if intending to use with pcsc-lite. - ewarn when with +smartcard -usb that pcsc-lite should be installed and running in order to use smartcards. |