Description of problem: When I boot my Fedora 32 system, it fails to detect my Yubikey 5 NFC smart-card device. It looks like a race-condition of some sort, because if I run `systemctl restart pcscd.service` after startup, it's detected properly. Version-Release number of selected component (if applicable): pcsc-lite-1.9.0-1.fc32.x86_64 How reproducible: Every time Steps to Reproduce: 1. Reboot the system with Yubikey 5 NFC inserted into a USB port. 2. Run `systemctl status pcscd.service` 3. Run `gpg2 --card-status` (if set up as a hardware token for GPG keys) Actual results: "systemctl status" journal logs: Jul 02 08:42:30 sgallaghp50.sgallagh.rht systemd[1]: Started PC/SC Smart Card Daemon. Jul 02 08:42:30 sgallaghp50.sgallagh.rht pcscd[1393]: 00000000 ifdhandler.c:150:CreateChannelByNameOrChannel() failed Jul 02 08:42:30 sgallaghp50.sgallagh.rht pcscd[1393]: 00000081 readerfactory.c:1105:RFInitializeReader() Open Port 0x200000 Failed (usb:1050/0407:libudev:0:/dev/bus/usb/001/003) Jul 02 08:42:30 sgallaghp50.sgallagh.rht pcscd[1393]: 00000012 readerfactory.c:376:RFAddReader() Yubico YubiKey OTP+FIDO+CCID init failed. Jul 02 08:42:30 sgallaghp50.sgallagh.rht pcscd[1393]: 00005952 ifdhandler.c:150:CreateChannelByNameOrChannel() failed Jul 02 08:42:30 sgallaghp50.sgallagh.rht pcscd[1393]: 00000008 readerfactory.c:1105:RFInitializeReader() Open Port 0x200000 Failed (usb:1050/0407:libudev:1:/dev/bus/usb/001/003) Jul 02 08:42:30 sgallaghp50.sgallagh.rht pcscd[1393]: 00000002 readerfactory.c:376:RFAddReader() Yubico YubiKey OTP+FIDO+CCID init failed. gpg --card-status: gpg: selecting card failed: No such device gpg: OpenPGP card not available: No such device Expected results: The Yubikey should be detected and function properly as a smart-card device. Additional info: After login, running `systemctl restart pcscd.service` results in proper operation.
I don't know what changed, but I haven't seen this issue in a couple months.
I seem to have stumbled on the same error.
systemd[1]: Started PC/SC Smart Card Daemon. pcscd[38448]: 00000000 ccid_usb.c:1285:ControlUSB() control failed (1/2): -7 LIBUSB_ERROR_TIMEOUT pcscd[38448]: 30787769 ifdhandler.c:150:CreateChannelByNameOrChannel() failed pcscd[38448]: 00000019 readerfactory.c:1105:RFInitializeReader() Open Port 0x200001 Failed (usb:1050/0407:libudev:0:/dev/bus/usb/001/016) pcscd[38448]: 00000004 readerfactory.c:376:RFAddReader() Yubico YubiKey OTP+FIDO+CCID init failed. pcscd[38448]: 00002475 ifdhandler.c:150:CreateChannelByNameOrChannel() failed pcscd[38448]: 00000015 readerfactory.c:1105:RFInitializeReader() Open Port 0x200001 Failed (usb:1050/0407:libudev:1:/dev/bus/usb/001/016) pcscd[38448]: 00000004 readerfactory.c:376:RFAddReader() Yubico YubiKey OTP+FIDO+CCID init failed. pcscd[38448]: 65084277 ccid_usb.c:857:WriteUSB() write failed (1/16): -4 LIBUSB_ERROR_NO_DEVICE pcscd[38448]: 03800384 ifdhandler.c:150:CreateChannelByNameOrChannel() failed
I am also stuck in the same problem, and the sad news is that restarting pcscd is not helping from last night. Nov 18 09:26:13 localhost.localdomain systemd[1]: Started PC/SC Smart Card Daemon. Nov 18 09:26:13 localhost.localdomain pcscd[23254]: 00000000 ifdhandler.c:150:CreateChannelByNameOrChannel() failed Nov 18 09:26:13 localhost.localdomain pcscd[23254]: 00000074 readerfactory.c:1105:RFInitializeReader() Open Port 0x200000 Failed (usb:1050/0407:libudev:0:/dev/bus/usb/001/016) Nov 18 09:26:13 localhost.localdomain pcscd[23254]: 00000003 readerfactory.c:376:RFAddReader() Yubico YubiKey OTP+FIDO+CCID init failed. Nov 18 09:26:13 localhost.localdomain pcscd[23254]: 00005652 ifdhandler.c:150:CreateChannelByNameOrChannel() failed Nov 18 09:26:13 localhost.localdomain pcscd[23254]: 00000014 readerfactory.c:1105:RFInitializeReader() Open Port 0x200000 Failed (usb:1050/0407:libudev:1:/dev/bus/usb/001/016) Nov 18 09:26:13 localhost.localdomain pcscd[23254]: 00000002 readerfactory.c:376:RFAddReader() Yubico YubiKey OTP+FIDO+CCID init failed.
I have the same problem since I migrated to Fedora 33. It was working like a charm in 31 and 32! Nov 18 14:06:14 olivia.strider.local pcscd[469535]: 00000003 readerfactory.c:376:RFAddReader() Yubico YubiKey OTP+FIDO+CCID init failed. Nov 18 14:06:17 olivia.strider.local pcscd[469535]: 02987958 ccid_usb.c:857:WriteUSB() write failed (1/31): -4 LIBUSB_ERROR_NO_DEVICE Nov 18 14:06:17 olivia.strider.local pcscd[469535]: 00000024 ifdwrapper.c:364:IFDStatusICC() Card not transacted: 617 Nov 18 14:06:18 olivia.strider.local pcscd[469535]: 01000347 ccid_usb.c:857:WriteUSB() write failed (1/31): -4 LIBUSB_ERROR_NO_DEVICE Nov 18 14:06:23 olivia.strider.local pcscd[469535]: 05742805 ifdhandler.c:150:CreateChannelByNameOrChannel() failed Nov 18 14:06:23 olivia.strider.local pcscd[469535]: 00000064 readerfactory.c:1105:RFInitializeReader() Open Port 0x200000 Failed (usb:1050/0407:libudev:0:/dev/bus/usb/001/032) Nov 18 14:06:23 olivia.strider.local pcscd[469535]: 00000004 readerfactory.c:376:RFAddReader() Yubico YubiKey OTP+FIDO+CCID init failed. Nov 18 14:06:23 olivia.strider.local pcscd[469535]: 00031708 ifdhandler.c:150:CreateChannelByNameOrChannel() failed Nov 18 14:06:23 olivia.strider.local pcscd[469535]: 00000010 readerfactory.c:1105:RFInitializeReader() Open Port 0x200001 Failed (usb:1050/0407:libudev:1:/dev/bus/usb/001/032) Nov 18 14:06:23 olivia.strider.local pcscd[469535]: 00000003 readerfactory.c:376:RFAddReader() Yubico YubiKey OTP+FIDO+CCID init failed.
I can confirm the issue for Fedora 33. Also, the common fix proposed in [1] does not work for me :/ Nov 18 23:00:47 fedora33 pcscd[3958]: 17465950 ccid_usb.c:1420:InterruptStop() libusb_cancel_transfer failed: LIBUSB_ERROR_NO_DEVICE Nov 18 23:00:48 fedora33 pcscd[3958]: 00400597 ccid_usb.c:857:WriteUSB() write failed (6/7): -4 LIBUSB_ERROR_NO_DEVICE Nov 18 23:00:51 fedora33 pcscd[3958]: 03056390 ifdhandler.c:150:CreateChannelByNameOrChannel() failed Nov 18 23:00:51 fedora33 pcscd[3958]: 00000026 readerfactory.c:1105:RFInitializeReader() Open Port 0x200001 Failed (usb:1050/0407:libudev:0:/dev/bus/usb/006/008) Nov 18 23:00:51 fedora33 pcscd[3958]: 00000006 readerfactory.c:376:RFAddReader() Yubico YubiKey OTP+FIDO+CCID init failed. Nov 18 23:00:51 fedora33 pcscd[3958]: 00037002 ifdhandler.c:150:CreateChannelByNameOrChannel() failed Nov 18 23:00:51 fedora33 pcscd[3958]: 00000026 readerfactory.c:1105:RFInitializeReader() Open Port 0x200002 Failed (usb:1050/0407:libudev:1:/dev/bus/usb/006/008) Nov 18 23:00:51 fedora33 pcscd[3958]: 00000006 readerfactory.c:376:RFAddReader() Yubico YubiKey OTP+FIDO+CCID init failed. [1] https://ludovicrousseau.blogspot.com/2019/06/gnupg-and-pcsc-conflicts.html
Upstream says that there are regressions in 2.2.23: https://dev.gnupg.org/T5143
Regressions in gpg 2.2.23* It's possible the two aren't wholly unrelated
(In reply to niemand from comment #6) > I can confirm the issue for Fedora 33. Also, the common fix proposed in [1] > does not work for me :/ > > Nov 18 23:00:47 fedora33 pcscd[3958]: 17465950 > ccid_usb.c:1420:InterruptStop() libusb_cancel_transfer failed: > LIBUSB_ERROR_NO_DEVICE > Nov 18 23:00:48 fedora33 pcscd[3958]: 00400597 ccid_usb.c:857:WriteUSB() > write failed (6/7): -4 LIBUSB_ERROR_NO_DEVICE > Nov 18 23:00:51 fedora33 pcscd[3958]: 03056390 > ifdhandler.c:150:CreateChannelByNameOrChannel() failed > Nov 18 23:00:51 fedora33 pcscd[3958]: 00000026 > readerfactory.c:1105:RFInitializeReader() Open Port 0x200001 Failed > (usb:1050/0407:libudev:0:/dev/bus/usb/006/008) > Nov 18 23:00:51 fedora33 pcscd[3958]: 00000006 > readerfactory.c:376:RFAddReader() Yubico YubiKey OTP+FIDO+CCID init failed. > Nov 18 23:00:51 fedora33 pcscd[3958]: 00037002 > ifdhandler.c:150:CreateChannelByNameOrChannel() failed > Nov 18 23:00:51 fedora33 pcscd[3958]: 00000026 > readerfactory.c:1105:RFInitializeReader() Open Port 0x200002 Failed > (usb:1050/0407:libudev:1:/dev/bus/usb/006/008) > Nov 18 23:00:51 fedora33 pcscd[3958]: 00000006 > readerfactory.c:376:RFAddReader() Yubico YubiKey OTP+FIDO+CCID init failed. > > [1] > https://ludovicrousseau.blogspot.com/2019/06/gnupg-and-pcsc-conflicts.html Yes using disable-ccid in scdaemon.conf doesn't work at all. Only restarting the pcscd.socket works!
I installed gnupg 2.2.24 and it seems to work a bit better, it would be nice if that update is released to everyone ASAP.
(In reply to Taavi from comment #10) > I installed gnupg 2.2.24 and it seems to work a bit better, it would be nice > if that update is released to everyone ASAP. The update to gnupg 2.2.24 just landed on my machine (Fedora 33) and now the key is recognized as expected.
I still have the issue with gnupg 2.2.25 and pcsc-lite 1.9.0. on Fedora 33. # gpg2 --card-status gpg: selecting card failed: No such device gpg: OpenPGP card not available: No such device logs: dec 15 16:45:56 xxx pcscd[2375]: 10517237 ifdhandler.c:150:CreateChannelByNameOrChannel() failed dec 15 16:45:56 xxx pcscd[2375]: 00000394 readerfactory.c:1105:RFInitializeReader() Open Port 0x200000 Failed (usb:1050/0407:libudev:0:/dev/bus/usb/001/010) dec 15 16:45:56 xxx pcscd[2375]: 00000007 readerfactory.c:376:RFAddReader() Yubico YubiKey OTP+FIDO+CCID init failed. dec 15 16:45:56 xxx pcscd[2375]: 00006166 ifdhandler.c:150:CreateChannelByNameOrChannel() failed dec 15 16:45:56 xxx pcscd[2375]: 00000012 readerfactory.c:1105:RFInitializeReader() Open Port 0x200000 Failed (usb:1050/0407:libudev:1:/dev/bus/usb/001/010) dec 15 16:45:56 xxx pcscd[2375]: 00000002 readerfactory.c:376:RFAddReader() Yubico YubiKey OTP+FIDO+CCID init failed.
I also have this problem not only with pnupg but also with Thunderbird or the yubikey authenticator. All those applications hang sometimes and only a restart of pcscd helps for a while. I see the same errors as in the posts above.
It would appear this issue is also discussed in https://bugzilla.redhat.com/show_bug.cgi?id=1893131 , so perhaps those two can/should be merged together?
Continuing discussion, I have had the same issue ever since I've updated to the Fedora 33 (from 32). The issue was that my Yubikey wasn't recognized as GPG smartcard without opensc package, so I had to: sudo dnf install opensc And then configure my GNUPG cat <<EOF > ~/.gnupg/scdaemon.conf pcsc-driver /usr/lib64/libpcsclite.so.1 card-timeout 5 disable-ccid EOF In addition to that I also have following in my /etc/opensc.conf card_attr SERIAL:NUMBER:... { name = "YubiKey 5 NFC" driver = "openpgp" } Where SERIAL:NUMBER... part is the output of pcsc_scan 00 00 00 00 00 00 00 00 00... Disabling and removing packages related to opensc/pcsc-lite results in Yubikey not being visible at all. This is the only way I've found it works for me, but as others mentioned, I have to restart openscd.service after each reboot...
This message is a reminder that Fedora 33 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora 33 on 2021-11-30. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '33'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 33 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 35 Workstation has the same issue.
Created attachment 1840702 [details] pcscd debug log for issue 1853347 Full pcscd debug log for issue 1853347 (Fedora 35 WS)
(In reply to KirillP from comment #17) > Fedora 35 Workstation has the same issue. Can you described your "same issue"? This bug already discussed several different issues over the span of one and half year. The Fedora 35 got recently update of gnupg2 which should avoid similar issues.
1) Install the new Fedora 35 Workstation. 2) Install updates. 3) Boot up the computer with the connected Yubikey. 4) When trying to access gpg --card-status says No such device. If you pull out the Yubikey and insert it back. Nothing changes. If you restart the pcscd service. It works fine.
Does it work for you with pcsc-shared option in the ~/.gnupg/scdaemon.conf ?
When adding pcsc-shared to ~/.gnupg/scdaemon.conf. gpg --card-status is working. Thank you. But SSH doesn't see the key on Yubikey. I'm experimenting and trying to figure out why. In other distributions that I have used before. Such problems have never happened.
*** This bug has been marked as a duplicate of bug 1893131 ***