Description of problem: USB device is not available for client Windows10, if: 1. remote-viewer is invoked with --spice-disable-usbredir. 2. USB autoshare is ON: console.vv file has enable-usb-autoshare=1 --spice-disable-usbredir option disables USB redirection. USB device should be available for client all time. spice-client-msi-x86-4.1-6.el7ev.noarch How reproducible: always Steps to Reproduce: 1. Login to RHV user portal. 2. Select any VM. It could be RHEL or Windows guest. 3. Edit its console options. Set "Enable USB Auto-Share" to ON. 4. Press "CONSOLE" button to save .vv file. 5. Open cmd/powershell 6. Run remote-viewer.exe --spice-disable-usbredir console.vv 7. Make sure remote-viewer window is active. 8. Plug-in USB device. Actual results: USB device doesn't appear in client, neither in guest. Expected results: USB device should appear in client. Additional info: RHEL7.3 client doesn't have such problem.
Created attachment 1261931 [details] mingw remote-viewer log
if you intentionally add --spice-disable-usbredir then you cannot be surprised that usb redirection is not available From spice-gtk man page/remote-viewer --help-spice: --spice-disable-usbredir Disable USB redirection support
We had discussion at IRC. It indeed is as a bug.
Created attachment 1262011 [details] USB devices list Device of interest is: "Kingston".
Created attachment 1262012 [details] Driver Text Traces As described at: https://cgit.freedesktop.org/spice/win32/usbdk/tree/Documentation/Tracing.txt#n21
Created attachment 1262014 [details] Driver Traces in Text As described at: https://cgit.freedesktop.org/spice/win32/usbdk/tree/Documentation/Tracing.txt#n66
(In reply to Andrei Stepanov from comment #3) > We had discussion at IRC. It indeed is as a bug. Can you provide more details about this IRC discussion you had?
Andrei, Is it reproducible on windows 7?
User needs to set --spice-disable-usbredir in the command line to trigger this. It's not a blocker for 4.1.
In reply to Comment 9 https://bugzilla.redhat.com/show_bug.cgi?id=1431137#c9 : Windows 7 32 client + spice-client-msi-x86-4.1-6.el7ev.noarch doesn't have this bug.
It might be that setting hide rules from inside of spice-gtk is not synchronized with --spice-disable-usbredir CLI parameter. We will check this...
Proposed fix accepted upstream: 12e77f5c5ecfd7e096effb86689cc1e7f9b85b68 "usb-device-manager: Do not hide devices on client if USB redirection disabled"
What is the procedure to apply the fix to downstream? Shall we change the owner?
(In reply to ybendito from comment #14) > What is the procedure to apply the fix to downstream? > Shall we change the owner? Yes, moved to mingw-virt-viewer. Thanks! This does not seems urgent to have a z-stream build so it will land on 4.2.
Fixing virt-viewer version that this bug should really be fixed. Previous build did not pick the correct dependencies with the backported patches.
The fix doesn't work for me in the current build (UsbDk 0.19 + mvv 2.0-240/spice-client-msi-x64-4.2-1): when the --spice-disable-usbredir option is used, USB sharing keeps being disabled regardless of autoshare setting in .vv file. I still don't understand however why is this a bug, shouldn't have the "disable usbredir" option have precedence over the autoshare option?
(In reply to David Jaša from comment #18) > I still don't understand however why is this a bug, shouldn't have the > "disable usbredir" option have precedence over the autoshare option? I think the log from proposed fix is quite good explanation: commit 12e77f5c5ecfd7e096effb86689cc1e7f9b85b68 Author: Yuri Benditovich <yuri.benditovich> Date: Tue Apr 11 11:43:03 2017 +0300 usb-device-manager: Do not hide devices on client if USB redirection disabled https://bugzilla.redhat.com/show_bug.cgi?id=1431137 When auto sharing of USB devices is enabled in remote-viewer's configuration file, Windows spice client hides connected USB devices on client machine even if USB redirection is disabled by --spice-disable-usbredir I'll check again if I missed something with the backporting.
So the desired behaviour is to display all the devices just with disabled checkboxes? My thinking would be that --spice-disable-usbredir makes all autoshare actions NOOP.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2018:1543
BZ<2>Jira Resync