GNOME Bugzilla – Bug 747600
Windows no longer recognizes smartcard in USB reader device
Last modified: 2016-09-20 08:15:55 UTC
This is on Arch Linux. Today I upgraded from 3.14.3.1-1 to 3.16.0-1. I use an "ActivCard USB Reader V2.0" device, which is required for me to establish a VPN connection to my work environment. After upgrading, I enabled the USB reader in the VM Properties sheet as usual, but when I attempted to establish the VPN connection, Windows asked me to insert a Smartcard. Tried reseating the Smartcard in the reader, and disabling/re-enabling the USB redirection with no change in behavior. After downgrading to 3.14.3.1-1, my smartcard was detected by Windows. I've only just tried this on Arch, so I'm not sure if this reproduces on other 3.16-based distributions. I'm not sure what logging information would be useful here, so let me know if there is additional information I can provide. Thanks!
There is a special smartcard support in both Boxes and spice and it needs to be enabled during build. I don't know what configure flags Arch uses for building Boxes and spice-gtk but could you first make sure they pass --enable-smartcard option to configure script of both when packaging? TBH, since I don't have a smart card reader I have never personally tested this feature. Having said that, Boxes mostly relies on spice for this and in spice world this is a well-tested and demanded feature so I'd guess its most likely it somehow got accidently disabled in Arch linux.
Hmm. I'm not a developer or package maintainer, but it looks like --enable-smartcard is being passed to me. https://projects.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/gnome-boxes
Whoops, missed that you also mentioned spice-gtk (or spice-gtk3, as Arch has it packaged): https://projects.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/spice-gtk3 And it doesn't look like '--enable-smartcard' is passed here. I'll report a bug there and see if that solves the issue for me.
(In reply to Jason S. Wagner from comment #3) > Whoops, missed that you also mentioned spice-gtk (or spice-gtk3, as Arch has > it packaged): > > https://projects.archlinux.org/svntogit/community.git/tree/trunk/ > PKGBUILD?h=packages/spice-gtk3 > > And it doesn't look like '--enable-smartcard' is passed here. I'll report a > bug there and see if that solves the issue for me. Yeah and we'd need to see if the required deps of smartcard support are present so please ask the packager to have a look at or provide URL of the build log.
Had some free time to look at this tonight. I added '--enable-smartcard' to the PKGBUILD, compiled and installed the new package, but the behavior I reported here persists. Can someone take a look at the PKGBUILD ( https://projects.archlinux.org/svntogit/community.git/plain/trunk/PKGBUILD?h=packages/spice-gtk3) and see if there are any additional dependencies that are required? Thanks!
(In reply to Jason S. Wagner from comment #5) > Had some free time to look at this tonight. I added '--enable-smartcard' to > the PKGBUILD, compiled and installed the new package, but the behavior I > reported here persists. It seems the default action is 'auto' meaning that if the dependencies are present, it will be enabled for you automatically. Also if you hadn't had all the dependencies for it, configure script will error out if you explicitly request smart card support with --enable-smartcard. So if you didn't get any error from configure, spice-gtk should have that support. So I'm a bit out of clues here. :( I'll ask some spice devs for help.
Hmm.. wait! Are you using smartcard through the usb redirection and you explicitly enable the redirection of this USB device from Boxes' properties dialog?
Could you please run as `G_MESSAGES_DEBUG=Boxes gnome-boxes` and try enabling the redirection of this device and provide output here?
<teuf> but yeah comment #7 is my initial reaction <teuf> zeenix: fwiw, there was http://cgit.freedesktop.org/spice/spice-gtk/commit/?id=f047ffdd174ad076f981a96d40099cec3a2e302d fixed recently in spice-gtk <teuf> maybe he should try to shutdown the VM and restart it and see if that helps <teuf> but it's weird it gets back to work if he downgrades
Yes, this is USB redirection managed by Boxes. Arch upgraded me to gnome-boxes-3.16.1-1 today, and this output (as requested in #8) is taken with that package installed: http://pastebin.com/PkkZgw1Y
So my bug reporting was flawed. I had previously assumed that the Smartcard reader was being passed through because a "Smart card readers" device category appeared in the guest Windows 7 Device Manager. But it looks like that device is always there, whether the passthrough is active or not. On the old version of Boxes, I see an additional device in that same category, as well as another category called "Smart cards". So I was left wondering if USB redirection is working at all, so I tried a few other devices. The closest I got was a game controller. It briefly flashed in the guest's Device Manager, then a "The driver for this device could not be started" (paraphrasing) popup notification briefly appeared, then both vanished. I couldn't make this re-occur.
Well yeah for USB its a bit confusing. There is the generic USB redirection support coming from SPICE and smartcard support coming from libvirt and Qemu in addition to spice. So if you have previously used the native smartcard support (i-e didn't need to redirect the USB device), its possible that its qemu and/or libvirt that is lacking this support now. I see a bug in Boxes now though: The "Smartcard support" option is only presented if it enabled in the build and support is not already present in the VM. Once you have added the support to the VM, the option isn't shown. You can verify if this is the case by seeing if this command shows anything: virsh dumpxml VM_NAME | grep smartcard , where VM_NAME can by found through virsh list --all command. If it shows something, it means you previously added this support to the VM and don't need to do that anymore. About USB redirection, game controller should work fine. If it did appear in the guest and then stopped working, its mostly likely some spice bug. If you could reproduce your issues with virt-manager, that would help a lot in pinpointing the issues.
*** Bug 748665 has been marked as a duplicate of this bug. ***
You seem to have several issues within this report. 1. The SmartCard support doesnt work. 2. The USB Redirection doesnt work. For the latter we have https://bugzilla.gnome.org/show_bug.cgi?id=748665 . We'd appreciate it if you could open an own bug for 1. describing solely this issue related to the smartcard support so we can get a clear image without superposing the issues, then closing this issue. Thanks for your report and help!
(In reply to Lasse Schuirmann from comment #14) > You seem to have several issues within this report. > > 1. The SmartCard support doesnt work. > 2. The USB Redirection doesnt work. > > For the latter we have https://bugzilla.gnome.org/show_bug.cgi?id=748665 . > We'd appreciate it if you could open an own bug for 1. describing solely > this issue related to the smartcard support so we can get a clear image > without superposing the issues, then closing this issue. I don't think there is any need to open a new one. Let's keep this open for smartcard support and if this turns out to be really a dup of bug#748665 after all, we can mark this one as dup.
No repro with current package versions. Thanks everyone, and sorry for leaving this open for so long.
(In reply to Jason S. Wagner from comment #16) > No repro with current package versions. Thanks everyone, and sorry for > leaving this open for so long. Would have been nice if you had provided the information asked for so we can be sure that any changes in any of the components solve your issue.