VM running through QEMU is unable to detect usb host devices.
I’ve tried several fixes and haven’t been able to fix this. Any help regarding this is highly appreciated !
System specs:
OS: Manjaro Linux x86_64
Host: Motherboard
Kernel: 6.11.10-2-MANJARO
Uptime: 5 hours, 25 mins
Packages: 1243 (pacman)
Shell: bash 5.2.37
Resolution: 1920x1080
DE: Plasma 6.2.4
WM: KWin
Theme: Breeze-Dark [GTK2], Breeze [GTK3]
Icons: breeze [GTK2/3]
Terminal: konsole
CPU: Cpu
GPU: Gpu
Memory: 2545MiB / 15917MiB
QEMU command:
qemu-system-x86_64 \
-enable-kvm \
-M q35 \
-m 4096 -smp 2 -cpu host \
-bios /home/user/uefi/OVMF.4m.fd \
-drive file=/home/user/qcow/vm.qcow2,format=qcow2,if=virtio \
-usb \
-device virtio-tablet \
-device virtio-keyboard \
-device qemu-xhci,id=xhci \
-device usb-host,hostbus=001,hostport=001 \
-device usb-host,hostbus=004,hostport=001 \
-machine vmport=off \
-device virtio-vga-gl \
-display sdl,gl=on \
-device ich9-intel-hda,id=sound0,bus=pcie.0,addr=0x1b \
-device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 \
-global ICH9-LPC.disable_s3=1 \
-global ICH9-LPC.disable_s4=1 \
-net nic,model=virtio,macaddr=52:54:00:00:00:01 \
-net bridge,br=br0
I’ve tried other arguments for the usb-host line:
-device usb-host,vendorid=0x1234,productid=0x1234
OR
-device usb-host,hostbus=003,hostaddr=001
but the behaviour remains the same:
While QEMU does not output any errors, the guest VM is not able to detect the usb device at all.
The ONLY method I’ve been able to get to work is when I mention the path of the usb device /dev/bus/usb/003/001
AND run qemu with sudo OR change the permissions of the usb device manually.
Is there any way to get usb-passthrough to work without needing sudo priviledges ?