Translations of this page:日本語

USB device support in Wine

Damjan Jovanovic is working on USB support in Wine now.

There are patches developed by Alexander Morozov (Etersoft) for USB software protection tokens support. These patches are only meant for USB dongles; they will not help with other types of USB devices. The patches are also old, and may not work in current Wine.

For those who wish to experiment, below are instructions on how to use them.

<!> Note: Drivers which depend on modules other than ntoskrnl.exe, hal.dll, usbd.sys will not work. Imported modules can be seen using winedump -j import driver.sys.

How to build Wine with USB patches

  1. Download patches for your Wine version from

  2. Run

    patch -p1 < 0001*.txt
    patch -p1 < 0002*.txt 
    in Wine source directory to apply patches.
  3. Only for versions before 1.1.22. Run

    in Wine source directory.
  4. Build Wine. See the section COMPILATION in the README file in Wine source directory.

How to use USB device drivers

Installing device drivers is not supported in Wine now. So you need to copy driver(s) and some registry keys from Windows system where your device was installed.

<!> Note: This instruction is only for cases when only one driver is needed for a device.

  1. Determine your device vendor and product IDs. Connect your device to Linux system and run


    You will see lines like this:

    Bus 001 Device 002: ID 0529:0001 Aladdin Knowledge Systems HASP v0.06 
    Here 0529 is a vendor ID and 0001 is a product ID.
  2. Import HKLM\System\CurrentControlSet\Enum\USB\Vid_<vid>&Pid_<pid> and HKLM\System\CurrentControlSet\Services\<driver name> from Windows registry as NT4 .reg files. Here <vid> is vendor ID, <pid> is product ID, <driver_name> is a string from HKLM\System\CurrentControlSet\Enum\USB\Vid_<vid>&Pid_<pid>\<instance id>\Service.

  3. Copy a driver. Driver path is contained in Windows registry in HKLM\System\CurrentControlSet\Services\<driver_name>\ImagePath.

  4. Set permissions for your USB device. Run


    to know bus and device numbers. Typically usb devices are in /dev/bus/usb. Run

    chmod a+rw /dev/bus/usb/<bus number>/<device number> 
    with root privileges. This will allow all to use your USB device until replugging it or rebooting your PC. Later if a device works with Wine you can create an udev rule for setting permissions.


USB (last edited 2015-07-25 00:49:45 by RosanneDiMesio)