Windows USB integration with R4.1

[2021-07-17 20:16:11] + echo '-qubes-net:client_ip=10.137.0.63,dns_0=10.139.1.1,dns_1=10.139.1.2,gw=10.137.0.23,netmask=255.255.255.255'
[2021-07-17 20:16:11] + net_netmask=255.255.255.255
[2021-07-17 20:16:11] + get_net_arg gw
[2021-07-17 20:16:11] + sed -n 's/^.*[:,]gw=\([^,]\+\).*$/\1/p'
[2021-07-17 20:16:11] + echo '-qubes-net:client_ip=10.137.0.63,dns_0=10.139.1.1,dns_1=10.139.1.2,gw=10.137.0.23,netmask=255.255.255.255'
[2021-07-17 20:16:11] + net_gw=10.137.0.23
[2021-07-17 20:16:11] + xenstore-read target
[2021-07-17 20:16:11] + udhcpd -f -I 10.137.0.23 -
[2021-07-17 20:16:11] + target=19
[2021-07-17 20:16:11] + device_model=device-model/19
[2021-07-17 20:16:11] + mkdir /tmp/qmp
[2021-07-17 20:16:11] udhcpd: started, v1.31.1
[2021-07-17 20:16:11] + kernel=
[2021-07-17 20:16:11] + grep -q ^-append
[2021-07-17 20:16:11] + echo '-xen-domid
[2021-07-17 20:16:11] 19
[2021-07-17 20:16:11] -no-shutdown
[2021-07-17 20:16:11] -nodefaults
[2021-07-17 20:16:11] -no-user-config
[2021-07-17 20:16:11] -name
[2021-07-17 20:16:11] gpu_WHVM-back
[2021-07-17 20:16:11] -display
[2021-07-17 20:16:11] none
[2021-07-17 20:16:11] -device
[2021-07-17 20:16:11] VGA,vgamem_mb=16
[2021-07-17 20:16:11] -boot
[2021-07-17 20:16:11] order=dc
[2021-07-17 20:16:11] -device
[2021-07-17 20:16:11] usb-ehci,id=ehci
[2021-07-17 20:16:11] -device
[2021-07-17 20:16:11] usb-tablet,bus=ehci.0
[2021-07-17 20:16:11] -soundhw
[2021-07-17 20:16:11] ich9
[2021-07-17 20:16:11] -smp
[2021-07-17 20:16:11] 16,maxcpus=16
[2021-07-17 20:16:11] -device
[2021-07-17 20:16:11] rtl8139,id=nic0,netdev=net0,mac=00:16:3e:5e:6c:00
[2021-07-17 20:16:11] -netdev
[2021-07-17 20:16:11] type=tap,id=net0,ifname=vif19.0-emu,script=no,downscript=no
[2021-07-17 20:16:11] -display
[2021-07-17 20:16:11] qubes-gui,domid=0,log-level=0
[2021-07-17 20:16:11] -machine
[2021-07-17 20:16:11] xenfv
[2021-07-17 20:16:11] -m
[2021-07-17 20:16:11] 5484
[2021-07-17 20:16:11] -drive
[2021-07-17 20:16:11] file=/dev/xvda,if=ide,index=0,media=disk,format=host_device,cache=writeback
[2021-07-17 20:16:11] -drive
[2021-07-17 20:16:11] file=/dev/xvdb,if=ide,index=1,media=disk,format=host_device,cache=writeback
[2021-07-17 20:16:11] -drive
[2021-07-17 20:16:11] file=/dev/xvdc,if=ide,index=2,media=disk,format=host_device,cache=writeback'
[2021-07-17 20:16:11] + mkfifo /tmp/qmp/qemu.in /tmp/qmp/qemu.out
[2021-07-17 20:16:11] + set +x
[2021-07-17 20:16:11] Clearing kmsg buffer...
[2021-07-17 20:16:11] + set +x
[2021-07-17 20:16:11] + set +x
[2021-07-17 20:16:11] + sed 's/\$STUBDOM_RESTORE_INCOMING_ARG/fd:3/'+ echo '-xen-domid
[2021-07-17 20:16:11] 19
[2021-07-17 20:16:11] -no-shutdown
[2021-07-17 20:16:11] -nodefaults
[2021-07-17 20:16:11] -no-user-config
[2021-07-17 20:16:11] -name
[2021-07-17 20:16:11] gpu_WHVM-back
[2021-07-17 20:16:11] -display
[2021-07-17 20:16:11] none
[2021-07-17 20:16:11] -device
[2021-07-17 20:16:11] VGA,vgamem_mb=16
[2021-07-17 20:16:11] -boot
[2021-07-17 20:16:11] order=dc
[2021-07-17 20:16:11] -device
[2021-07-17 20:16:11] usb-ehci,id=ehci
[2021-07-17 20:16:11] -device
[2021-07-17 20:16:11] usb-tablet,bus=ehci.0
[2021-07-17 20:16:11] -soundhw
[2021-07-17 20:16:11] ich9
[2021-07-17 20:16:11] -smp
[2021-07-17 20:16:11] 16,maxcpus=16
[2021-07-17 20:16:11] -device
[2021-07-17 20:16:11] rtl8139,id=nic0,netdev=net0,mac=00:16:3e:5e:6c:00
[2021-07-17 20:16:11] -netdev
[2021-07-17 20:16:11] type=tap,id=net0,ifname=vif19.0-emu,script=no,downscript=no
[2021-07-17 20:16:11] -display
[2021-07-17 20:16:11] qubes-gui,domid=0,log-level=0
[2021-07-17 20:16:11] -machine
[2021-07-17 20:16:11] xenfv
[2021-07-17 20:16:11] -m
[2021-07-17 20:16:11] 5484
[2021-07-17 20:16:11] -drive
[2021-07-17 20:16:11] file=/dev/xvda,if=ide,index=0,media=disk,format=host_device,cache=writeback
[2021-07-17 20:16:11] -drive
[2021-07-17 20:16:11] file=/dev/xvdb,if=ide,index=1,media=disk,format=host_device,cache=writeback
[2021-07-17 20:16:11] -drive
[2021-07-17 20:16:11] file=/dev/xvdc,if=ide,index=2,media=disk,format=host_device,cache=writeback'
[2021-07-17 20:16:11] 
[2021-07-17 20:16:11] + dm_args='-xen-domid
[2021-07-17 20:16:11] 19
[2021-07-17 20:16:11] -no-shutdown
[2021-07-17 20:16:11] -nodefaults
[2021-07-17 20:16:11] -no-user-config
[2021-07-17 20:16:11] -name
[2021-07-17 20:16:11] gpu_WHVM-back
[2021-07-17 20:16:11] -display
[2021-07-17 20:16:11] none
[2021-07-17 20:16:11] -device
[2021-07-17 20:16:11] VGA,vgamem_mb=16
[2021-07-17 20:16:11] -boot
[2021-07-17 20:16:11] order=dc
[2021-07-17 20:16:11] -device
[2021-07-17 20:16:11] usb-ehci,id=ehci
[2021-07-17 20:16:11] -device
[2021-07-17 20:16:11] usb-tablet,bus=ehci.0
[2021-07-17 20:16:11] -soundhw
[2021-07-17 20:16:11] ich9
[2021-07-17 20:16:11] -smp
[2021-07-17 20:16:11] 16,maxcpus=16
[2021-07-17 20:16:11] -device
[2021-07-17 20:16:11] rtl8139,id=nic0,netdev=net0,mac=00:16:3e:5e:6c:00
[2021-07-17 20:16:11] -netdev
[2021-07-17 20:16:11] type=tap,id=net0,ifname=vif19.0-emu,script=no,downscript=no
[2021-07-17 20:16:11] -display
[2021-07-17 20:16:11] qubes-gui,domid=0,log-level=0
[2021-07-17 20:16:11] -machine
[2021-07-17 20:16:11] xenfv
[2021-07-17 20:16:11] -m
[2021-07-17 20:16:11] 5484
[2021-07-17 20:16:11] -drive
[2021-07-17 20:16:11] file=/dev/xvda,if=ide,index=0,media=disk,format=host_device,cache=writeback
[2021-07-17 20:16:11] -drive
[2021-07-17 20:16:11] file=/dev/xvdb,if=ide,index=1,media=disk,format=host_device,cache=writeback
[2021-07-17 20:16:11] -drive
[2021-07-17 20:16:11] file=/dev/xvdc,if=ide,index=2,media=disk,format=host_device,cache=writeback'
[2021-07-17 20:16:11] + xenstore-read device/console/2
[2021-07-17 20:16:11] + xenstore-read device/console/1
[2021-07-17 20:16:11] + IFS='
[2021-07-17 20:16:11] '
[2021-07-17 20:16:11] + set -f
[2021-07-17 20:16:11] + set +f
[2021-07-17 20:16:11] + unset IFS
[2021-07-17 20:16:11] + qemu_pid=209
[2021-07-17 20:16:11] + '[' '!' -e /tmp/qemu.qmp ]
[2021-07-17 20:16:11] + sleep 0.1
[2021-07-17 20:16:11] + qemu -sandbox 'on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny' -chardev 'pipe,path=/tmp/qmp/qemu,id=m' -mon 'chardev=m,mode=control' -chardev 'socket,server,nowait,path=/tmp/qemu.qmp,id=m2' -mon 'chardev=m2,mode=control' -xen-domid 19 -no-shutdown -nodefaults -no-user-config -name gpu_WHVM-back -display none -device 'VGA,vgamem_mb=16' -boot 'order=dc' -device 'usb-ehci,id=ehci' -device 'usb-tablet,bus=ehci.0' -soundhw ich9 -smp '16,maxcpus=16' -device 'rtl8139,id=nic0,netdev=net0,mac=00:16:3e:5e:6c:00' -netdev 'type=tap,id=net0,ifname=vif19.0-emu,script=no,downscript=no' -display 'qubes-gui,domid=0,log-level=0' -machine xenfv -m 5484 -drive 'file=/dev/xvda,if=ide,index=0,media=disk,format=host_device,cache=writeback' -drive 'file=/dev/xvdb,if=ide,index=1,media=disk,format=host_device,cache=writeback' -drive 'file=/dev/xvdc,if=ide,index=2,media=disk,format=host_device,cache=writeback' -audiodev 'pa,id=qemupa,server=unix:/tmp/pa.sock' -device 'nec-usb-xhci,id=xhci'
[2021-07-17 20:16:11] + tee /proc/self/fd/2
[2021-07-17 20:16:11] + echo '{"execute": "qmp_capabilities"}'
[2021-07-17 20:16:11] {"QMP": {"version": {"qemu": {"micro": 0, "minor": 2, "major": 4}, "package": ""}, "capabilities": ["oob"]}}
[2021-07-17 20:16:11] {"execute": "qmp_capabilities"}
[2021-07-17 20:16:11] br0: port 2(vif19.0-emu) entered blocking state
[2021-07-17 20:16:11] br0: port 2(vif19.0-emu) entered disabled state
[2021-07-17 20:16:11] device vif19.0-emu entered promiscuous mode
[2021-07-17 20:16:11] br0: port 2(vif19.0-emu) entered blocking state
[2021-07-17 20:16:11] br0: port 2(vif19.0-emu) entered forwarding state
[2021-07-17 20:16:11] audio: Device hda: audiodev default parameter is deprecated, please specify audiodev=qemupa
[2021-07-17 20:16:11] E: [vchan-sink] module-vchan-sink.c: .[1;31msink cork req state =0, now state=1.[0m
[2021-07-17 20:16:11] E: [vchan-sink] module-vchan-sink.c: .[1;31msource cork req state =0, now state=1.[0m
[2021-07-17 20:16:11] qubes_gui/init: 572
[2021-07-17 20:16:11] qubes_gui/init: 581
[2021-07-17 20:16:11] qubes_gui/init: 583
[2021-07-17 20:16:11] qubes_gui/init[610]: version sent, waiting for xorg conf
[2021-07-17 20:16:12] + '[' '!' -e /tmp/qemu.qmp ]
[2021-07-17 20:16:12] + '[' -e /proc/self/fd/4 ]
[2021-07-17 20:16:12] + '[' -e /proc/self/fd/3 ]
[2021-07-17 20:16:12] + true
[2021-07-17 20:16:12] + printf '==== Press enter for shell ====\n'
[2021-07-17 20:16:12] ==== Press enter for shell ====
[2021-07-17 20:16:12] + read
[2021-07-17 20:16:12] {"return": {}}
[2021-07-17 20:16:12] + vchan-socket-proxy 0 device-model/19/qmp-vchan /tmp/qemu.qmp
[2021-07-17 20:16:12] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x730cac38ca2, max_idle_ns: 881591066539 ns
[2021-07-17 20:16:12] pcifront pci-0: Installing PCI frontend
[2021-07-17 20:16:12] xen:swiotlb_xen: Warning: only able to allocate 4 MB for software IO TLB
[2021-07-17 20:16:12] software IO TLB: mapped [mem 0x06000000-0x06400000] (4MB)
[2021-07-17 20:16:12] pcifront pci-0: Creating PCI Frontend Bus 0000:00
[2021-07-17 20:16:12] pcifront pci-0: PCI host bridge to bus 0000:00
[2021-07-17 20:16:12] pci_bus 0000:00: root bus resource [io  0x0000-0xffff]
[2021-07-17 20:16:12] pci_bus 0000:00: root bus resource [mem 0x00000000-0x7fffffffff]
[2021-07-17 20:16:12] pci_bus 0000:00: root bus resource [bus 00-ff]
[2021-07-17 20:16:12] pci 0000:00:00.1: [1002:aaf8] type 00 class 0x040300
[2021-07-17 20:16:12] pci 0000:00:00.1: reg 0x10: [mem 0xef9a0000-0xef9a3fff]
[2021-07-17 20:16:12] pci 0000:00:00.1: enabling Extended Tags
[2021-07-17 20:16:12] pcifront pci-0: New device on 0000:00:00.1 found.
[2021-07-17 20:16:12] pcifront pci-0: claiming resource 0000:00:00.1/0
[2021-07-17 20:16:12] pcifront pci-0: Rescanning PCI Frontend Bus 0000:00
[2021-07-17 20:16:12] pci 0000:00:00.0: [1002:687f] type 00 class 0x030000
[2021-07-17 20:16:12] pci 0000:00:00.0: reg 0x10: [mem 0xb0000000-0xbfffffff 64bit pref]
[2021-07-17 20:16:12] pci 0000:00:00.0: reg 0x18: [mem 0xc0000000-0xc01fffff 64bit pref]
[2021-07-17 20:16:12] pci 0000:00:00.0: reg 0x20: [io  0xd000-0xd0ff]
[2021-07-17 20:16:12] pci 0000:00:00.0: reg 0x24: [mem 0xef900000-0xef97ffff]
[2021-07-17 20:16:12] pci 0000:00:00.0: reg 0x30: [mem 0xef980000-0xef99ffff pref]
[2021-07-17 20:16:12] pci 0000:00:00.0: enabling Extended Tags
[2021-07-17 20:16:12] pcifront pci-0: New device on 0000:00:00.0 found.
[2021-07-17 20:16:12] pcifront pci-0: claiming resource 0000:00:00.0/0
[2021-07-17 20:16:12] pcifront pci-0: claiming resource 0000:00:00.0/2
[2021-07-17 20:16:12] pcifront pci-0: claiming resource 0000:00:00.0/4
[2021-07-17 20:16:12] pcifront pci-0: claiming resource 0000:00:00.0/5
[2021-07-17 20:16:12] pcifront pci-0: claiming resource 0000:00:00.0/6
[2021-07-17 20:16:12] written 110 bytes to vchan
[2021-07-17 20:16:12] written 34 bytes to vchan
[2021-07-17 20:16:12] [00:08.0] xen_pt_realize: Assigning real physical device 04:00.1 to devfn 0x40
[2021-07-17 20:16:12] [00:08.0] xen_pt_register_regions: IO region 0 registered (size=0x00004000 base_addr=0xef9a0000 type: 0)
[2021-07-17 20:16:12] [00:08.0] xen_pt_config_reg_init: Offset 0x0010 mismatch! Emulated=0x0000, host=0xef9a0000, syncing to 0xef9a0000.
[2021-07-17 20:16:12] [00:08.0] xen_pt_config_reg_init: Offset 0x0052 mismatch! Emulated=0x0000, host=0x0003, syncing to 0x0003.
[2021-07-17 20:16:12] [00:08.0] xen_pt_config_reg_init: Offset 0x00a2 mismatch! Emulated=0x0000, host=0x0080, syncing to 0x0080.
[2021-07-17 20:16:12] [00:08.0] xen_pt_config_reg_init: Offset 0x0068 mismatch! Emulated=0x0000, host=0x8fa1, syncing to 0x8fa1.
[2021-07-17 20:16:12] [00:08.0] xen_pt_config_reg_init: Offset 0x0076 mismatch! Emulated=0x0000, host=0x1103, syncing to 0x1103.
[2021-07-17 20:16:12] [00:08.0] xen_pt_pci_intx: intx=2
[2021-07-17 20:16:12] [00:08.0] xen_pt_realize: Real physical device 04:00.1 registered successfully
[2021-07-17 20:16:12] written 34 bytes to vchan
[2021-07-17 20:16:12] written 2048 bytes to vchan
[2021-07-17 20:16:12] written 1404 bytes to vchan
[2021-07-17 20:16:12] written 110 bytes to vchan
[2021-07-17 20:16:12] written 34 bytes to vchan
[2021-07-17 20:16:12] [00:09.0] xen_pt_realize: Assigning real physical device 04:00.0 to devfn 0x48
[2021-07-17 20:16:12] [00:09.0] xen_pt_register_regions: IO region 0 registered (size=0x10000000 base_addr=0xb0000000 type: 0x4)
[2021-07-17 20:16:12] [00:09.0] xen_pt_register_regions: IO region 2 registered (size=0x00200000 base_addr=0xc0000000 type: 0x4)
[2021-07-17 20:16:12] [00:09.0] xen_pt_register_regions: IO region 4 registered (size=0x00000100 base_addr=0x0000d000 type: 0x1)
[2021-07-17 20:16:12] [00:09.0] xen_pt_register_regions: IO region 5 registered (size=0x00080000 base_addr=0xef900000 type: 0)
[2021-07-17 20:16:12] [00:09.0] xen_pt_register_regions: Expansion ROM registered (size=0x00020000 base_addr=0xef980000)
[2021-07-17 20:16:12] [00:09.0] xen_pt_config_reg_init: Offset 0x0010 mismatch! Emulated=0x0000, host=0xb000000c, syncing to 0xb000000c.
[2021-07-17 20:16:12] [00:09.0] xen_pt_config_reg_init: Offset 0x0018 mismatch! Emulated=0x0000, host=0xc000000c, syncing to 0xc000000c.
[2021-07-17 20:16:12] [00:09.0] xen_pt_config_reg_init: Offset 0x0020 mismatch! Emulated=0x0000, host=0xd001, syncing to 0xd001.
[2021-07-17 20:16:12] [00:09.0] xen_pt_config_reg_init: Offset 0x0024 mismatch! Emulated=0x0000, host=0xef900000, syncing to 0xef900000.
[2021-07-17 20:16:12] [00:09.0] xen_pt_config_reg_init: Offset 0x0052 mismatch! Emulated=0x0000, host=0x0003, syncing to 0x0003.
[2021-07-17 20:16:12] [00:09.0] xen_pt_config_reg_init: Offset 0x00a2 mismatch! Emulated=0x0000, host=0x0080, syncing to 0x0080.
[2021-07-17 20:16:12] [00:09.0] xen_pt_config_reg_init: Offset 0x0068 mismatch! Emulated=0x0000, host=0x8fa1, syncing to 0x8fa1.
[2021-07-17 20:16:12] [00:09.0] xen_pt_config_reg_init: Offset 0x0076 mismatch! Emulated=0x0000, host=0x1103, syncing to 0x1103.
[2021-07-17 20:16:12] [00:09.0] xen_pt_pci_intx: intx=1
[2021-07-17 20:16:12] [00:09.0] xen_pt_realize: Real physical device 04:00.0 registered successfully
[2021-07-17 20:16:12] written 34 bytes to vchan
[2021-07-17 20:16:12] written 2048 bytes to vchan
[2021-07-17 20:16:12] written 2048 bytes to vchan
[2021-07-17 20:16:12] written 17 bytes to vchan
[2021-07-17 20:16:12] written 110 bytes to vchan
[2021-07-17 20:16:12] written 34 bytes to vchan
[2021-07-17 20:16:12] written 34 bytes to vchan
[2021-07-17 20:16:12] qubes_gui/init[621]: got xorg conf, creating window
[2021-07-17 20:16:12] qubes_gui/init: 631
[2021-07-17 20:16:12] configure msg, x/y 1289 55 (was 0 0), w/h 600 462
[2021-07-17 20:16:13] configure msg, x/y 1289 55 (was 1289 55), w/h 600 462
[2021-07-17 20:16:13] random: crng init done
[2021-07-17 20:16:13] random: 1 urandom warning(s) missed due to ratelimiting
[2021-07-17 20:16:13] configure msg, x/y 1289 55 (was 1289 55), w/h 600 462
[2021-07-17 20:16:28] {"timestamp": {"seconds": 1626545788, "microseconds": 988480}, "event": "RESET", "data": {"guest": true, "reason": "guest-reset"}}
[2021-07-17 20:16:28] {"timestamp": {"seconds": 1626545788, "microseconds": 990302}, "event": "RESET", "data": {"guest": true, "reason": "guest-reset"}}
[2021-07-17 20:16:29] pcifront pci-0: Rescanning PCI Frontend Bus 0000:00
[2021-07-17 20:16:29] pcifront pci-0: Rescanning PCI Frontend Bus 0000:00

Could you check that memory balancing is not enabled?
It is better to set qvm-prefs [qube-name] maxmem 0 to all windows HVMs

It is set to 0.
One thing I did with the first HVM where it worked was to install xenvbd.tar and xenbus.tar from the Xen website, then install Qubes Windows Tools from build.
Tried to do that on the new one but now it only hangs on the boot screen.
Guess I have to try yet again with another backup.

According logfile you have real PCI device assigned to qube? Might be a problem?

Also looks like it started correctly and drew window

No needs to do it with QWT-cross version

Shouldn’t be. GPU passthrough has been my goal all along, and it worked previously. It just halts with this config after 30 sec or so.
I’ve installed QWT 4.1.65 on all my Windows HVM’s.

In case QWT qvm-feature qrexec needs to be set too.
qvm-features [qube-name] qrexec 1

Yes, with only qrexec the VM launches, but cannot use USB passthrough.
I had to remove audio-model too, as neither ich6 nor ĂŹch9 worked for me. USB passthrough a headset worked though previously.

I seem to be confused. What are the symptoms or messages with stubdom-qrexec?

The giant paste I sent was with stubdom-qrexec 1. It wasn’t that helpful tbh. It just halts after 30 or so secs.
But I’ll keep trying different stuff until it works again.

I haven’t noticed any sound lag. Then again, my sound card appears as a built-in PCI board and not USB.

Vey Cool. Thanks

I don’t understand how to do this part. What is the command?

if you are using fedora-based sys-usb run in the template terminal:
sudo dnf config-manager --enable qubes-vm-r4.1-current-testing
sudo dnf update
and restart sys-usb

2 Likes

How did you get so incredible at all of this? Thank you!

IT WORKS.

YES IS COMPLETE

HERE IS EXTRA WORDS

This is antire phrase.

1 Like

Making a Fedora sys-usb sounded like a good attempt, but my hopes were crushed yet again.

stubdom-qrexec 1 won’t boot the VM at all. qrexec 1 boots, but still gives the Failed to open data vchan connection error when attaching USB devices in dom0.
Qubes Copy/Paste in the VM appears to fail after a few pastes also. Had to restart once to paste these few logs.
I have these error logs from my Windows 10 HVM:

qubesdb-daemon.log

[20210726.130449.979-3184-E] XcOpen: XenIface handle: 0000000000000174
[20210726.130450.135-3184-E] libvchan_client_init: (0000000000000000)Wait for xenstore (2) failed: 0x0

[20210726.130450.198-3184-E] XcOpen: XenIface handle: 00000000000001A4
[20210726.110450.055-3364-E] QpsReaderThread: ReadFile failed with error 109: The pipe has been ended.
[20210726.110450.070-3372-E] pipe_thread_client: QpsRead failed with error 87: The parameter is incorrect.
[20210726.110551.879-3416-E] QpsReaderThread: ReadFile failed with error 109: The pipe has been ended.
[20210726.110551.895-3424-E] pipe_thread_client: QpsRead failed with error 87: The parameter is incorrect.

qrexec-wrapper.log

[20210726.112203.810-6068-?] XcOpen: XenIface handle: 0000000000000120
[20210726.112203.919-6068-?] libvchan_client_init: (0000000000000000)Wait for xenstore (2) failed: 0x0

[20210726.112203.919-6068-?] XcOpen: XenIface handle: 0000000000000160
[20210726.112203.919-6068-E] CreatePipedProcessAsUser: CreateProcessAsUser failed with error 2: The system cannot find the file specified.
[20210726.112203.919-6068-E] StartChild: CreatePipedProcessAsCurrentUser failed with error 2: The system cannot find the file specified.

qrexec-agent.log

[20210726.112131.417-3596-E] QpsConnect: open read pipe failed with error 2: The system cannot find the file specified.
[20210726.112131.417-3596-E] connect_to_daemon: connect to server failed with error 2: The system cannot find the file specified.
[20210726.112132.448-3596-E] XcOpen: XenIface handle: 00000000000001CC
[20210726.112142.350-3080-E] QpsReaderThread: ReadFile failed with error 109: The pipe has been ended.
[20210726.112203.794-3596-E] InterceptRPCRequest: CreateFile failed with error 2: The system cannot find the file specified.
[20210726.112203.794-3596-E] InterceptRPCRequest: Failed to open service 'qubes.USBAttach' configuration file (C:\Program Files\Invisible Things Lab\Qubes Tools\qubes-rpc\qubes.USBAttach)
[20210726.112203.794-3596-E] HandleExecCommon: InterceptRPCRequest failed

I’ve followed a guide regarding patching stubdom to remove the maximum limit of 3.5GB RAM in the HVM. Specifically, this paragraph is added:

# Patch 3.5 Go limit
vm_name=$(xenstore-read "/local/domain/$domid/name")
# Apply the patch only if the qube name start by "gpu_"
if [ $(echo "$vm_name" | grep -iEc '^gpu_' ) -eq 1 ]; then
 dm_args=$(echo "$dm_args" | sed -n '1h;2,$H;${g;s/\(-machine\nxenfv\)/\1,max-ram-below-4g=3.5G/g;p}')
fi

Maybe this could be a source of some issues?

Relevant running processes in Windows 10 are qrexec-agent, qubesdb-daemon, xenagent and XENBUS_MONITOR.

After installing QWT, both features should be enabled.

I can’t help here, never tried this

It seems to be the RAM limit patch that doesn’t play well with stubdom-qrexec, not the sys-usb template. Setting RAM to 3.5G or below works. Anything above works without stubdom-qrexec, but doesn’t allow me USB passthrough.
That’s a bummer.

Perhaps you patched wrong file. Look at stubdom-full rootfs, they are different.

2 Likes

I will try. According to the guide, for R4.1 you need to patch qemu-stubdom-linux-rootfs. Which works, but not with stubdom-qrexec feature.
But I need to patch qemu-stubdom-linux-full-rootfs also?

1 Like