dockur / dockur/windows

[Feature]: Support USB hot-plugging

Open
#1,675 3 comments 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Shell
Stars
53.3k
Forks
4.8k
Avg merge
31m
Merged PRs (30d)
34

Description

Operating system

CachyOS (Arch Linux)

Description

I've got the environment and device lines added to my compose file and on initial connection, the USB Storage device is recognized (a Uniden Scanner).

If I eject it from the Dockurr Windows system and unplug the USB, then later plug it back in, it does not show in Windows. What is the proper process for ejecting a passthrough USB device and reconnecting it later?

Docker compose
services:
  windows:
    image: dockurr/windows
    container_name: windows
    environment:
      VERSION: "11"
      ARGUMENTS: "-device usb-host,vendorid=0x1965,productid=0x001a"
    devices:
      - /dev/kvm
      - /dev/net/tun
      - /dev/bus/usb
    cap_add:
      - NET_ADMIN
    ports:
      - 8006:8006
      - 3389:3389/tcp
      - 3389:3389/udp
    volumes:
      - ./windows:/storage
      - ./shared:/shared
    restart: always
    stop_grace_period: 2m
Docker log
 ~/dockurr Windows  docker logs -f windows                                                                                                                                                       ✔  base   
❯ Starting Windows for Docker v5.14...
❯ For support visit https://github.com/dockur/windows
❯ CPU: AMD Ryzen 7 3800X | RAM: 13/63 GB | DISK: 1 TB (xfs) | KERNEL: 6.19.3-2-cachyos...

❯ Booting Windows using QEMU v10.0.6...
BdsDxe: loading Boot0004 "Windows Boot Manager" from HD(1,GPT,07AC745F-52EF-4272-8DE3-47B92029A129,0x800,0x40000)/\EFI\Microsoft\Boot\bootmgfw.efi
BdsDxe: starting Boot0004 "Windows Boot Manager" from HD(1,GPT,07AC745F-52EF-4272-8DE3-47B92029A129,0x800,0x40000)/\EFI\Microsoft\Boot\bootmgfw.efi
❯ Windows started successfully, visit http://127.0.0.1:8006/ to view the screen...
qemu-system-x86_64: libusb_release_interface: -4 [NO_DEVICE]
Screenshots (optional)

Here is the device in lsusb

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 0b95:6802 ASIX Electronics Corp. AX68002 KVM Switch SoC
Bus 001 Device 003: ID 2516:0051 Cooler Master Co., Ltd. AMD SR4 lamplight Control
Bus 001 Device 004: ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 001 Device 005: ID 3434:0761 Keychron Keychron B6 Pro
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 002: ID 0bda:5411 Realtek Semiconductor Corp. RTS5411 Hub
Bus 003 Device 003: ID 0bda:5411 Realtek Semiconductor Corp. RTS5411 Hub
Bus 003 Device 004: ID 154b:f010 PNY PNY PRO ELITE V2
Bus 003 Device 019: ID 1965:001a Uniden Corporation BCD436HP Scanner
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 004 Device 002: ID 0bda:0411 Realtek Semiconductor Corp. Hub
Bus 004 Device 003: ID 0bda:0411 Realtek Semiconductor Corp. Hub
Bus 004 Device 004: ID 154b:f00d PNY PNY ELITE PSSD
Bus 004 Device 005: ID 8564:4000 Transcend Information, Inc. microSD/SD/CF UHS-II Card Reader [RDF8, RDF9]
Bus 004 Device 006: ID 0781:5583 SanDisk Corp. Ultra Fit

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the provided Docker Compose service, the USB passthrough configuration, and the docker logs output; reproduce the sequence of ejecting, unplugging, and reconnecting the scanner while checking lsusb. Done means the USB device is available in Windows again after reconnection and the libusb_release_interface: -4 [NO_DEVICE] failure is no longer seen.

Written by the indexing model from the issue text.

Assessment

Tech stack
arch-linux, docker
Domain
infrastructure, operating-systems
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.