After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 747600 - Windows no longer recognizes smartcard in USB reader device
Windows no longer recognizes smartcard in USB reader device
Status: RESOLVED OBSOLETE
Product: gnome-boxes
Classification: Applications
Component: spice
3.16.x
Other Linux
: Normal normal
: --
Assigned To: GNOME Boxes maintainer(s)
GNOME Boxes maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2015-04-10 06:26 UTC by Jason S. Wagner
Modified: 2016-09-20 08:15 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jason S. Wagner 2015-04-10 06:26:23 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!
Comment 1 Zeeshan Ali 2015-04-10 11:25:05 UTC
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.
Comment 2 Jason S. Wagner 2015-04-10 20:54:51 UTC
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
Comment 3 Jason S. Wagner 2015-04-10 20:56:27 UTC
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.
Comment 4 Zeeshan Ali 2015-04-10 21:10:20 UTC
(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.
Comment 5 Jason S. Wagner 2015-04-15 04:18:55 UTC
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!
Comment 6 Zeeshan Ali 2015-04-15 11:29:07 UTC
(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.
Comment 7 Zeeshan Ali 2015-04-15 11:32:37 UTC
Hmm.. wait! Are you using smartcard through the usb redirection and you explicitly enable the redirection of this USB device from Boxes' properties dialog?
Comment 8 Zeeshan Ali 2015-04-15 11:38:34 UTC
Could you please run as `G_MESSAGES_DEBUG=Boxes gnome-boxes` and try enabling the redirection of this device and provide output here?
Comment 9 Zeeshan Ali 2015-04-15 12:10:36 UTC
<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
Comment 10 Jason S. Wagner 2015-04-16 04:33:40 UTC
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
Comment 11 Jason S. Wagner 2015-04-16 04:59:06 UTC
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.
Comment 12 Zeeshan Ali 2015-04-16 13:27:05 UTC
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.
Comment 13 Zeeshan Ali 2015-04-29 19:08:09 UTC
*** Bug 748665 has been marked as a duplicate of this bug. ***
Comment 14 Lasse Schuirmann 2015-04-29 20:35:56 UTC
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!
Comment 15 Zeeshan Ali 2015-04-29 21:23:21 UTC
(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.
Comment 16 Jason S. Wagner 2015-08-01 06:40:18 UTC
No repro with current package versions.  Thanks everyone, and sorry for leaving this open for so long.
Comment 17 Zeeshan Ali 2015-08-01 13:32:03 UTC
(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.