Qubes crashes starting sys-usb

Hey Qubes Community,

I’m struggeling with the following issue:

If I have any USB Device pluged in to my laptop, Qubes os crashes while booting. The crash occures after I enter my disk encryption password, when it’s starting the sys-usb qube.

My current workaround is to unplug all USB devices before I start my laptop and plug them back in later.

I already tried to disable sys-usb autostart (with qvm-prefs sys-usb autostart False) which prevents the crash on startup but when I start sys-usb manually it will crash.

I’m running Qubes release 4.1.2 and Kernel 5.15.94-1.fc32

Any ideas or advice to fix that would be much appreciated.

Can you provide crash log from dom0 journalctl?

Can you help me isolate the relevant part? I can’t realy tell where it is crashing and the entire log is to long to post here.

Open dom0 terminal and execute:
sudo journalctl -f
Open another dom0 terminal and execute:
sudo tail -f /var/log/libvirt/libxl/libxl-driver.log
Then start sys-usb and check the log outputs in dom0.

Need to see more of journalctl log. Can you upload the journalctl log from the moment you start sys-usb?
Also, how exactly is it crashing when you start sys-usb manually? System hangs or you just see notification that sys-usb failed to start (if yes, then what’s the message?)?

May 02 13:33:24 dom0 qubesd[42151]: vm.sys-usb: Starting sys-usb
May 02 13:33:24 dom0 kernel: xhci_hcd 0000:04:00.4: remove, state 4
May 02 13:33:24 dom0 kernel: usb usb4: USB disconnect, device number 1
May 02 13:33:24 dom0 kernel: xhci_hcd 0000:04:00.4: USB bus 4 deregistered
May 02 13:33:24 dom0 kernel: audit: type=1137 audit(1683027204.747:370): pid=41903 uid=0 auid=4294967295 ses=4294967295 msg='op="removed-device" device="/devices/pci0000:00/0000:00:08.1/0000:04:00.4/usb4" device_rule=616C6C6F7720696420316436623A30303033206E616D6520227848434920486F737420436F6E74726F6C6C657222207669612D706F72742022757362342220776974682D696E746572666163652030393A30303A303020776974682D636F6E6E6563742D74797065202222 exe="/usr/sbin/usbguard-daemon" hostname=? addr=? terminal=? res=success'
May 02 13:33:24 dom0 kernel: xhci_hcd 0000:04:00.4: remove, state 1
May 02 13:33:24 dom0 kernel: usb usb3: USB disconnect, device number 1
May 02 13:33:24 dom0 kernel: usb 3-4: USB disconnect, device number 2
May 02 13:33:24 dom0 kernel: audit: type=1137 audit(1683027204.747:371): pid=41903 uid=0 auid=4294967295 ses=4294967295 msg='op="removed-device" device="/devices/pci0000:00/0000:00:08.1/0000:04:00.4/usb3/3-4" device_rule=626C6F636B20696420303466323A62373362206E616D65202248502048442043616D65726122207669612D706F72742022332D342220776974682D696E74657266616365207B2030653A30313A30312030653A30323A30312030653A30323A30312030653A30323A30312030653A30323A30312030653A30323A30312030653A30323A30312030653A30323A30312030653A30323A30312030653A30313A30312030653A30323A30312030653A30323A30312030653A30323A30312030653A30323A30312030653A30323A30312030653A30323A30312030653A30323A30312030653A30323A30312066653A30313A3031207D20776974682D636F6E6E6563742D74797065202268617264776972656422 exe="/usr/sbin/usbguard-daemon" hostname=? addr=? terminal=? res=success'
May 02 13:33:24 dom0 audit[41903]: USER_DEVICE pid=41903 uid=0 auid=4294967295 ses=4294967295 msg='op="removed-device" device="/devices/pci0000:00/0000:00:08.1/0000:04:00.4/usb4" device_rule=616C6C6F7720696420316436623A30303033206E616D6520227848434920486F737420436F6E74726F6C6C657222207669612D706F72742022757362342220776974682D696E746572666163652030393A30303A303020776974682D636F6E6E6563742D74797065202222 exe="/usr/sbin/usbguard-daemon" hostname=? addr=? terminal=? res=success'
May 02 13:33:24 dom0 audit[41903]: USER_DEVICE pid=41903 uid=0 auid=4294967295 ses=4294967295 msg='op="removed-device" device="/devices/pci0000:00/0000:00:08.1/0000:04:00.4/usb3/3-4" device_rule=626C6F636B20696420303466323A62373362206E616D65202248502048442043616D65726122207669612D706F72742022332D342220776974682D696E74657266616365207B2030653A30313A30312030653A30323A30312030653A30323A30312030653A30323A30312030653A30323A30312030653A30323A30312030653A30323A30312030653A30323A30312030653A30323A30312030653A30313A30312030653A30323A30312030653A30323A30312030653A30323A30312030653A30323A30312030653A30323A30312030653A30323A30312030653A30323A30312030653A30323A30312066653A30313A3031207D20776974682D636F6E6E6563742D74797065202268617264776972656422 exe="/usr/sbin/usbguard-daemon" hostname=? addr=? terminal=? res=success'
May 02 13:33:24 dom0 audit[41903]: USER_DEVICE pid=41903 uid=0 auid=4294967295 ses=4294967295 msg='op="removed-device" device="/devices/pci0000:00/0000:00:08.1/0000:04:00.4/usb3" device_rule=616C6C6F7720696420316436623A30303032206E616D6520227848434920486F737420436F6E74726F6C6C657222207669612D706F72742022757362332220776974682D696E746572666163652030393A30303A303020776974682D636F6E6E6563742D74797065202222 exe="/usr/sbin/usbguard-daemon" hostname=? addr=? terminal=? res=success'
May 02 13:33:24 dom0 kernel: audit: type=1137 audit(1683027204.748:372): pid=41903 uid=0 auid=4294967295 ses=4294967295 msg='op="removed-device" device="/devices/pci0000:00/0000:00:08.1/0000:04:00.4/usb3" device_rule=616C6C6F7720696420316436623A30303032206E616D6520227848434920486F737420436F6E74726F6C6C657222207669612D706F72742022757362332220776974682D696E746572666163652030393A30303A303020776974682D636F6E6E6563742D74797065202222 exe="/usr/sbin/usbguard-daemon" hostname=? addr=? terminal=? res=success'
May 02 13:33:24 dom0 kernel: xhci_hcd 0000:04:00.4: USB bus 3 deregistered
May 02 13:33:24 dom0 kernel: pciback 0000:04:00.4: xen_pciback: seizing device
May 02 13:33:24 dom0 kernel: xen: registering gsi 38 triggering 0 polarity 1
May 02 13:33:24 dom0 kernel: Already setup the GSI :38
May 02 13:33:24 dom0 kernel: xhci_hcd 0000:04:00.3: remove, state 1
May 02 13:33:24 dom0 kernel: usb usb2: USB disconnect, device number 1
May 02 13:33:24 dom0 kernel: usb 2-1: USB disconnect, device number 10
May 02 13:33:24 dom0 kernel: usb 2-1.3: USB disconnect, device number 11
May 02 13:33:24 dom0 kernel: audit: type=1137 audit(1683027204.795:373): pid=41903 uid=0 auid=4294967295 ses=4294967295 msg='op="removed-device" device="/devices/pci0000:00/0000:00:08.1/0000:04:00.3/usb2/2-1/2-1.3" device_rule=616C6C6F7720696420303366303A30373662206E616D6520225553423537333422207669612D706F72742022322D312E332220776974682D696E746572666163652030393A30303A303020776974682D636F6E6E6563742D747970652022756E6B6E6F776E22 exe="/usr/sbin/usbguard-daemon" hostname=? addr=? terminal=? res=success'
May 02 13:33:24 dom0 audit[41903]: USER_DEVICE pid=41903 uid=0 auid=4294967295 ses=4294967295 msg='op="removed-device" device="/devices/pci0000:00/0000:00:08.1/0000:04:00.3/usb2/2-1/2-1.3" device_rule=616C6C6F7720696420303366303A30373662206E616D6520225553423537333422207669612D706F72742022322D312E332220776974682D696E746572666163652030393A30303A303020776974682D636F6E6E6563742D747970652022756E6B6E6F776E22 exe="/usr/sbin/usbguard-daemon" hostname=? addr=? terminal=? res=success'
May 02 13:33:24 dom0 kernel: usb 2-1.4: USB disconnect, device number 12
May 02 13:33:24 dom0 audit[41903]: USER_DEVICE pid=41903 uid=0 auid=4294967295 ses=4294967295 msg='op="removed-device" device="/devices/pci0000:00/0000:00:08.1/0000:04:00.3/usb2/2-1/2-1.4" device_rule=626C6F636B20696420306264613A38313533206E616D6520225553422031302F3130302F31303030204C414E22207669612D706F72742022322D312E342220776974682D696E74657266616365207B2066663A66663A30302030323A30363A30302030613A30303A30302030613A30303A3030207D20776974682D636F6E6E6563742D747970652022756E6B6E6F776E22 exe="/usr/sbin/usbguard-daemon" hostname=? addr=? terminal=? res=success'
May 02 13:33:24 dom0 audit[41903]: USER_DEVICE pid=41903 uid=0 auid=4294967295 ses=4294967295 msg='op="removed-device" device="/devices/pci0000:00/0000:00:08.1/0000:04:00.3/usb2/2-1" device_rule=616C6C6F7720696420303366303A30363662206E616D6520224850205553422D4320446F636B20473522207669612D706F72742022322D312220776974682D696E746572666163652030393A30303A303020776974682D636F6E6E6563742D747970652022686F74706C756722 exe="/usr/sbin/usbguard-daemon" hostname=? addr=? terminal=? res=success'
May 02 13:33:24 dom0 kernel: audit: type=1137 audit(1683027204.804:374): pid=41903 uid=0 auid=4294967295 ses=4294967295 msg='op="removed-device" device="/devices/pci0000:00/0000:00:08.1/0000:04:00.3/usb2/2-1/2-1.4" device_rule=626C6F636B20696420306264613A38313533206E616D6520225553422031302F3130302F31303030204C414E22207669612D706F72742022322D312E342220776974682D696E74657266616365207B2066663A66663A30302030323A30363A30302030613A30303A30302030613A30303A3030207D20776974682D636F6E6E6563742D747970652022756E6B6E6F776E22 exe="/usr/sbin/usbguard-daemon" hostname=? addr=? terminal=? res=success'
May 02 13:33:24 dom0 kernel: audit: type=1137 audit(1683027204.804:375): pid=41903 uid=0 auid=4294967295 ses=4294967295 msg='op="removed-device" device="/devices/pci0000:00/0000:00:08.1/0000:04:00.3/usb2/2-1" device_rule=616C6C6F7720696420303366303A30363662206E616D6520224850205553422D4320446F636B20473522207669612D706F72742022322D312220776974682D696E746572666163652030393A30303A303020776974682D636F6E6E6563742D747970652022686F74706C756722 exe="/usr/sbin/usbguard-daemon" hostname=? addr=? terminal=? res=success'
May 02 13:33:24 dom0 audit[41903]: USER_DEVICE pid=41903 uid=0 auid=4294967295 ses=4294967295 msg='op="removed-device" device="/devices/pci0000:00/0000:00:08.1/0000:04:00.3/usb2" device_rule=616C6C6F7720696420316436623A30303033206E616D6520227848434920486F737420436F6E74726F6C6C657222207669612D706F72742022757362322220776974682D696E746572666163652030393A30303A303020776974682D636F6E6E6563742D74797065202222 exe="/usr/sbin/usbguard-daemon" hostname=? addr=? terminal=? res=success'
May 02 13:33:24 dom0 audit[41903]: USER_DEVICE pid=41903 uid=0 auid=4294967295 ses=4294967295 msg='op="removed-device" device="/devices/pci0000:00/0000:00:08.1/0000:04:00.3/usb1/1-1/1-1.2" device_rule=626C6F636B20696420303366303A30353662206E616D65202255534220417564696F22207669612D706F72742022312D312E322220776974682D696E74657266616365207B2030313A30313A30302030313A30323A30302030313A30323A30302030313A30323A30302030313A30323A30302030333A30303A3030207D20776974682D636F6E6E6563742D747970652022756E6B6E6F776E22 exe="/usr/sbin/usbguard-daemon" hostname=? addr=? terminal=? res=success'
May 02 13:33:24 dom0 audit[41903]: USER_DEVICE pid=41903 uid=0 auid=4294967295 ses=4294967295 msg='op="removed-device" device="/devices/pci0000:00/0000:00:08.1/0000:04:00.3/usb1/1-1/1-1.3/1-1.3.3" device_rule=626C6F636B20696420323335373A30313264206E616D6520223830322E31316163204E494322207669612D706F72742022312D312E332E332220776974682D696E746572666163652066663A66663A666620776974682D636F6E6E6563742D747970652022756E6B6E6F776E22 exe="/usr/sbin/usbguard-daemon" hostname=? addr=? terminal=? res=success'
May 02 13:33:24 dom0 kernel: xhci_hcd 0000:04:00.3: USB bus 2 deregistered
May 02 13:33:24 dom0 kernel: audit: type=1137 audit(1683027204.820:376): pid=41903 uid=0 auid=4294967295 ses=4294967295 msg='op="removed-device" device="/devices/pci0000:00/0000:00:08.1/0000:04:00.3/usb2" device_rule=616C6C6F7720696420316436623A30303033206E616D6520227848434920486F737420436F6E74726F6C6C657222207669612D706F72742022757362322220776974682D696E746572666163652030393A30303A303020776974682D636F6E6E6563742D74797065202222 exe="/usr/sbin/usbguard-daemon" hostname=? addr=? terminal=? res=success'
May 02 13:33:24 dom0 kernel: xhci_hcd 0000:04:00.3: remove, state 1
May 02 13:33:24 dom0 kernel: usb usb1: USB disconnect, device number 1
May 02 13:33:24 dom0 kernel: usb 1-1: USB disconnect, device number 11
May 02 13:33:24 dom0 kernel: usb 1-1.2: USB disconnect, device number 12
May 02 13:33:24 dom0 kernel: usb 1-1.3: USB disconnect, device number 13
May 02 13:33:24 dom0 kernel: usb 1-1.3.3: USB disconnect, device number 15
May 02 13:33:24 dom0 kernel: audit: type=1137 audit(1683027204.820:377): pid=41903 uid=0 auid=4294967295 ses=4294967295 msg='op="removed-device" device="/devices/pci0000:00/0000:00:08.1/0000:04:00.3/usb1/1-1/1-1.2" device_rule=626C6F636B20696420303366303A30353662206E616D65202255534220417564696F22207669612D706F72742022312D312E322220776974682D696E74657266616365207B2030313A30313A30302030313A30323A30302030313A30323A30302030313A30323A30302030313A30323A30302030333A30303A3030207D20776974682D636F6E6E6563742D747970652022756E6B6E6F776E22 exe="/usr/sbin/usbguard-daemon" hostname=? addr=? terminal=? res=success'
May 02 13:33:24 dom0 kernel: usb 1-1.3.4: USB disconnect, device number 16
May 02 13:33:24 dom0 kernel: audit: type=1137 audit(1683027204.820:378): pid=41903 uid=0 auid=4294967295 ses=4294967295 msg='op="removed-device" device="/devices/pci0000:00/0000:00:08.1/0000:04:00.3/usb1/1-1/1-1.3/1-1.3.3" device_rule=626C6F636B20696420323335373A30313264206E616D6520223830322E31316163204E494322207669612D706F72742022312D312E332E332220776974682D696E746572666163652066663A66663A666620776974682D636F6E6E6563742D747970652022756E6B6E6F776E22 exe="/usr/sbin/usbguard-daemon" hostname=? addr=? terminal=? res=success'
May 02 13:33:24 dom0 audit[41903]: USER_DEVICE pid=41903 uid=0 auid=4294967295 ses=4294967295 msg='op="removed-device" device="/devices/pci0000:00/0000:00:08.1/0000:04:00.3/usb1/1-1/1-1.3/1-1.3.4" device_rule=616C6C6F7720696420303436643A63353334206E616D65202255534220526563656976657222207669612D706F72742022312D312E332E342220776974682D696E74657266616365207B2030333A30313A30312030333A30313A3032207D20776974682D636F6E6E6563742D747970652022756E6B6E6F776E22 exe="/usr/sbin/usbguard-daemon" hostname=? addr=? terminal=? res=success'
May 02 13:33:24 dom0 kernel: audit: type=1137 audit(1683027204.870:379): pid=41903 uid=0 auid=4294967295 ses=4294967295 msg='op="removed-device" device="/devices/pci0000:00/0000:00:08.1/0000:04:00.3/usb1/1-1/1-1.3/1-1.3.4" device_rule=616C6C6F7720696420303436643A63353334206E616D65202255534220526563656976657222207669612D706F72742022312D312E332E342220776974682D696E74657266616365207B2030333A30313A30312030333A30313A3032207D20776974682D636F6E6E6563742D747970652022756E6B6E6F776E22 exe="/usr/sbin/usbguard-daemon" hostname=? addr=? terminal=? res=success'
May 02 13:33:24 dom0 audit[41903]: USER_DEVICE pid=41903 uid=0 auid=4294967295 ses=4294967295 msg='op="removed-device" device="/devices/pci0000:00/0000:00:08.1/0000:04:00.3/usb1/1-1/1-1.3" device_rule=616C6C6F7720696420303366303A30383662206E616D6520225553423237333422207669612D706F72742022312D312E332220776974682D696E746572666163652030393A30303A303020776974682D636F6E6E6563742D747970652022756E6B6E6F776E22 exe="/usr/sbin/usbguard-daemon" hostname=? addr=? terminal=? res=success'
May 02 13:33:24 dom0 audit[41903]: USER_DEVICE pid=41903 uid=0 auid=4294967295 ses=4294967295 msg='op="removed-device" device="/devices/pci0000:00/0000:00:08.1/0000:04:00.3/usb1/1-1/1-1.5" device_rule=626C6F636B20696420303366303A30343662206E616D6520224850205553422D4320446F636B20473522207669612D706F72742022312D312E352220776974682D696E74657266616365207B2031313A30303A30302066663A30333A30302030333A30303A3030207D20776974682D636F6E6E6563742D747970652022756E6B6E6F776E22 exe="/usr/sbin/usbguard-daemon" hostname=? addr=? terminal=? res=success'
May 02 13:33:24 dom0 audit[41903]: USER_DEVICE pid=41903 uid=0 auid=4294967295 ses=4294967295 msg='op="removed-device" device="/devices/pci0000:00/0000:00:08.1/0000:04:00.3/usb1/1-1" device_rule=616C6C6F7720696420303366303A30333662206E616D6520224850205553422D4320446F636B20473522207669612D706F72742022312D312220776974682D696E746572666163652030393A30303A303020776974682D636F6E6E6563742D747970652022686F74706C756722 exe="/usr/sbin/usbguard-daemon" hostname=? addr=? terminal=? res=success'
May 02 13:33:24 dom0 kernel: usb 1-1.5: USB disconnect, device number 14
May 02 13:33:24 dom0 kernel: usb 1-3: USB disconnect, device number 3
May 02 13:33:24 dom0 kernel: usb 1-4: USB disconnect, device number 5
May 02 13:33:24 dom0 audit[41903]: USER_DEVICE pid=41903 uid=0 auid=4294967295 ses=4294967295 msg='op="removed-device" device="/devices/pci0000:00/0000:00:08.1/0000:04:00.3/usb1/1-3" device_rule=626C6F636B20696420303438393A65306436206E616D65202222207669612D706F72742022312D332220776974682D696E74657266616365207B2065303A30313A30312065303A30313A30312065303A30313A30312065303A30313A30312065303A30313A30312065303A30313A30312065303A30313A30312065303A30313A30312065303A30313A3031207D20776974682D636F6E6E6563742D74797065202268617264776972656422 exe="/usr/sbin/usbguard-daemon" hostname=? addr=? terminal=? res=success'
May 02 13:33:24 dom0 audit[41903]: USER_DEVICE pid=41903 uid=0 auid=4294967295 ses=4294967295 msg='op="removed-device" device="/devices/pci0000:00/0000:00:08.1/0000:04:00.3/usb1/1-4" device_rule=626C6F636B20696420303466333A30633765206E616D652022454C414E3A41524D2D4D3422207669612D706F72742022312D342220776974682D696E746572666163652066663A30303A303020776974682D636F6E6E6563742D74797065202268617264776972656422 exe="/usr/sbin/usbguard-daemon" hostname=? addr=? terminal=? res=success'
May 02 13:33:24 dom0 audit[41903]: USER_DEVICE pid=41903 uid=0 auid=4294967295 ses=4294967295 msg='op="removed-device" device="/devices/pci0000:00/0000:00:08.1/0000:04:00.3/usb1" device_rule=616C6C6F7720696420316436623A30303032206E616D6520227848434920486F737420436F6E74726F6C6C657222207669612D706F72742022757362312220776974682D696E746572666163652030393A30303A303020776974682D636F6E6E6563742D74797065202222 exe="/usr/sbin/usbguard-daemon" hostname=? addr=? terminal=? res=success'
May 02 13:33:24 dom0 kernel: xhci_hcd 0000:04:00.3: USB bus 1 deregistered
May 02 13:33:24 dom0 kernel: pciback 0000:04:00.3: xen_pciback: seizing device
May 02 13:33:24 dom0 kernel: xen: registering gsi 37 triggering 0 polarity 1
May 02 13:33:24 dom0 kernel: Already setup the GSI :37
May 02 13:33:25 dom0 lvm[41104]: No longer monitoring thin pool qubes_dom0-vm--pool-tpool.
May 02 13:33:25 dom0 lvm[41104]: Monitoring thin pool qubes_dom0-vm--pool-tpool.
May 02 13:33:25 dom0 lvm[41104]: No longer monitoring thin pool qubes_dom0-vm--pool-tpool.
May 02 13:33:25 dom0 lvm[41104]: Monitoring thin pool qubes_dom0-vm--pool-tpool.
May 02 13:33:25 dom0 root[45461]: /etc/xen/scripts/block: add XENBUS_PATH=backend/vbd/4/51712
May 02 13:33:25 dom0 root[45459]: /etc/xen/scripts/block: add XENBUS_PATH=backend/vbd/4/51728
May 02 13:33:25 dom0 root[45466]: /etc/xen/scripts/block: add XENBUS_PATH=backend/vbd/4/51744
May 02 13:33:25 dom0 root[45470]: /etc/xen/scripts/block: add XENBUS_PATH=backend/vbd/4/51760
May 02 13:33:25 dom0 root[45608]: /etc/xen/scripts/block: Writing backend/vbd/4/51712/physical-device fd:3c to xenstore.
May 02 13:33:25 dom0 root[45610]: /etc/xen/scripts/block: Writing backend/vbd/4/51712/physical-device-path /dev/dm-60 to xenstore.
May 02 13:33:25 dom0 root[45612]: /etc/xen/scripts/block: Writing backend/vbd/4/51712/hotplug-status connected to xenstore.
May 02 13:33:25 dom0 root[45687]: /etc/xen/scripts/block: Writing backend/vbd/4/51728/physical-device fd:3d to xenstore.
May 02 13:33:25 dom0 root[45689]: /etc/xen/scripts/block: Writing backend/vbd/4/51728/physical-device-path /dev/dm-61 to xenstore.
May 02 13:33:25 dom0 root[45691]: /etc/xen/scripts/block: Writing backend/vbd/4/51728/hotplug-status connected to xenstore.
May 02 13:33:25 dom0 root[45763]: /etc/xen/scripts/block: Writing backend/vbd/4/51744/physical-device fd:3b to xenstore.
May 02 13:33:25 dom0 root[45765]: /etc/xen/scripts/block: Writing backend/vbd/4/51744/physical-device-path /dev/dm-59 to xenstore.
May 02 13:33:25 dom0 root[45767]: /etc/xen/scripts/block: Writing backend/vbd/4/51744/hotplug-status connected to xenstore.
May 02 13:33:25 dom0 kernel: loop3: detected capacity change from 0 to 952192
May 02 13:33:25 dom0 root[45793]: /etc/xen/scripts/block: Writing backend/vbd/4/51760/node /dev/loop3 to xenstore.
May 02 13:33:25 dom0 root[45802]: /etc/xen/scripts/block: Writing backend/vbd/4/51760/physical-device 7:3 to xenstore.
May 02 13:33:25 dom0 root[45809]: /etc/xen/scripts/block: Writing backend/vbd/4/51760/physical-device-path /dev/loop3 to xenstore.
May 02 13:33:25 dom0 root[45813]: /etc/xen/scripts/block: Writing backend/vbd/4/51760/hotplug-status connected to xenstore.
May 02 13:33:26 dom0 root[45876]: /etc/xen/scripts/block: add XENBUS_PATH=backend/vbd/5/51712
May 02 13:33:26 dom0 root[45883]: /etc/xen/scripts/block: add XENBUS_PATH=backend/vbd/5/51728
May 02 13:33:26 dom0 root[45893]: /etc/xen/scripts/block: add XENBUS_PATH=backend/vbd/5/51744
May 02 13:33:26 dom0 root[45903]: /etc/xen/scripts/block: add XENBUS_PATH=backend/vbd/5/51760
May 02 13:33:26 dom0 root[46053]: /etc/xen/scripts/block: Writing backend/vbd/5/51712/physical-device fd:3c to xenstore.
May 02 13:33:26 dom0 root[46055]: /etc/xen/scripts/block: Writing backend/vbd/5/51712/physical-device-path /dev/dm-60 to xenstore.
May 02 13:33:26 dom0 root[46057]: /etc/xen/scripts/block: Writing backend/vbd/5/51712/hotplug-status connected to xenstore.
May 02 13:33:26 dom0 root[46151]: /etc/xen/scripts/block: Writing backend/vbd/5/51728/physical-device fd:3d to xenstore.
May 02 13:33:26 dom0 root[46153]: /etc/xen/scripts/block: Writing backend/vbd/5/51728/physical-device-path /dev/dm-61 to xenstore.
May 02 13:33:26 dom0 root[46155]: /etc/xen/scripts/block: Writing backend/vbd/5/51728/hotplug-status connected to xenstore.
May 02 13:33:26 dom0 root[46246]: /etc/xen/scripts/block: Writing backend/vbd/5/51744/physical-device fd:3b to xenstore.
May 02 13:33:26 dom0 root[46248]: /etc/xen/scripts/block: Writing backend/vbd/5/51744/physical-device-path /dev/dm-59 to xenstore.
May 02 13:33:26 dom0 root[46250]: /etc/xen/scripts/block: Writing backend/vbd/5/51744/hotplug-status connected to xenstore.
May 02 13:33:26 dom0 kernel: loop4: detected capacity change from 0 to 952192
May 02 13:33:26 dom0 root[46276]: /etc/xen/scripts/block: Writing backend/vbd/5/51760/node /dev/loop4 to xenstore.
May 02 13:33:26 dom0 root[46285]: /etc/xen/scripts/block: Writing backend/vbd/5/51760/physical-device 7:4 to xenstore.
May 02 13:33:26 dom0 root[46292]: /etc/xen/scripts/block: Writing backend/vbd/5/51760/physical-device-path /dev/loop4 to xenstore.
May 02 13:33:26 dom0 root[46296]: /etc/xen/scripts/block: Writing backend/vbd/5/51760/hotplug-status connected to xenstore.
May 02 13:33:26 dom0 kernel: pciback 0000:04:00.3: xen_pciback: vpci: assign to virtual slot 0
May 02 13:33:26 dom0 kernel: pciback 0000:04:00.3: registering for 5
May 02 13:33:26 dom0 kernel: pciback 0000:04:00.4: xen_pciback: vpci: assign to virtual slot 0 func 4
May 02 13:33:26 dom0 kernel: pciback 0000:04:00.4: registering for 5
May 02 13:33:26 dom0 kernel: xen-blkback: backend/vbd/5/51712: using 1 queues, protocol 1 (x86_64-abi) persistent grants
May 02 13:33:26 dom0 kernel: xen: registering gsi 37 triggering 0 polarity 1
May 02 13:33:26 dom0 kernel: Already setup the GSI :37
May 02 13:33:26 dom0 kernel: xen: registering gsi 37 triggering 0 polarity 1
May 02 13:33:26 dom0 kernel: Already setup the GSI :37
May 02 13:33:26 dom0 kernel: xen: registering gsi 37 triggering 0 polarity 1
May 02 13:33:26 dom0 kernel: Already setup the GSI :37
May 02 13:33:26 dom0 kernel: xen: registering gsi 37 triggering 0 polarity 1
May 02 13:33:26 dom0 kernel: Already setup the GSI :37
May 02 13:33:26 dom0 kernel: xen: registering gsi 37 triggering 0 polarity 1
May 02 13:33:26 dom0 kernel: Already setup the GSI :37
May 02 13:33:26 dom0 kernel: xen: registering gsi 37 triggering 0 polarity 1
May 02 13:33:26 dom0 kernel: Already setup the GSI :37
May 02 13:33:26 dom0 kernel: xen: registering gsi 37 triggering 0 polarity 1
May 02 13:33:26 dom0 kernel: Already setup the GSI :37
May 02 13:33:26 dom0 kernel: pciback 0000:04:00.3: xen-pciback: Driver tried to write to a read-only configuration space field at offset 0x2a6, size 2. This may be harmless, but if you have problems with your device:

The whole system crashes. It just turns black and starts booting up again.

I don’t have any suggestions based on this log. You can try to open an issue on github, maybe there’ll be someone who have more insight:
Issues · QubesOS/qubes-issues · GitHub

To summarise:
With no USB device plugged in Qubes starts as normal with sys-usb on
autostart.
With any USB device plugged in Qubes does not start with sys-usb on
autostart.
With Qubes running and sys-usb running, plugging in any USB device
causes Qubes to reboot.

It would be helpful if you could say (if you are comfortable doing so)
what machine you are using.
Can you confirm you’ve used a variety of USB devices.
How many controllers do you have allocated to sys-usb?
Does changing the controller allocation make any difference?
Does it matter which port the USB device is plugged in to?

I never presume to speak for the Qubes team. When I comment in the Forum or in the mailing lists I speak for myself.

Probably you assigned some PCI device to sys-usb that causes the crash on start. Try to play around with the assigned devices to see which one it is.

My issue for that was [1].

[1] Reboot loop or freeze on sys-usb start with newer Xen & dom0 kernels · Issue #7637 · QubesOS/qubes-issues · GitHub

But OP reports that their “current workaround is to unplug all USB
devices before I start my laptop and plug them back in later”, and
allocated PCI devices wouldn’t be affected by that.

I did some more testing and found out, that the problem seems to be limited to my USB-c docking station, which is weird because I remember having that issue with other USB devices before I had the docking station. But since that I reinstalled Qubes which might have fixed the issue for other devices.

I am using a HP ProBook 455 G9 and the docking station is a HP USB-C Dock G5. I also have access to a second laptop of the same make and model which doesn’t has that issue and I tried a second docking station of the same make and model with my laptop and the same issue occurs. Since I only have one usb-c port I couldn’t try another port. I have two usb controllers allocated to sys-usb and nothing else.

Would you mind sharing the output of lscpi -mm -n for that device?

You can check lspci -mm to find the right one.

If it’s not starting with 02, Qubes OS will leave it in dom0 and you should probably try the method I mentioned before.
0c03 is hidden from dom0 for most configurations (depends, not all) as well.

To be more precise: I’m talking about the PCI controller belonging to the USB port you connect your docking station to.

@unman was right about the fact that USB devices != PCI devices. However each USB device is managed by a USB controller, which in turn is a PCI device. If that controller is in dom0 for whatever reason, the respective USB drivers are loaded during boot and you may get a kernel panic once you assign the PCI device to sys-usb when it starts. If the USB devices are removed, usually drivers aren’t loaded and you may not get a kernel panic.

Anyway it may be something different, too.

04:00.3 "0c03" "1022" "1639" -p30 "103c" "8b17"

So if i got that right 0c03 means it is left in dom0? But I’m not sure what to do about that.

0c03 is a standard USB controller and it shouldn’t be in dom0, if you have rd.qubes.hide_all_usb in your kernel command line (check cat /proc/cmdline in dom0).

I.e. it’s something different in that case. Check on qubes-issues whether you find anything related to your issue and/or create a new issue.

If you don’t have rd.qubes.hide_all_usb in your kernel command line, try with that (see qubes-doc) or use rd.qubes.hide_pci as I had previously advised.

Seems like I don’t know how to add to the kernel command line. I tried it as described in How to add custom kernel options in v4.1? - #4 by bungali

But after rebooting nothing changes in /proc/cmdline. Not sure what I’m doing wrong.

output of what I did for reference :

[FBO@dom0 ~]$ sudo vim /etc/default/grub
[FBO@dom0 ~]$ sudo grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub configuration file ...
Found theme: /boot/grub2/themes/qubes/theme.txt
Found linux image: /boot/vmlinuz-5.15.94-1.qubes.fc32.x86_64
Found initrd image: /boot/initramfs-5.15.94-1.qubes.fc32.x86_64.img
Found linux image: /boot/vmlinuz-5.15.94-1.qubes.fc32.x86_64
Found initrd image: /boot/initramfs-5.15.94-1.qubes.fc32.x86_64.img
done
[FBO@dom0 ~]$ sudo dracut -f
cat: /sys/power/resume: No such file or directory

and content of /etc/default/grub :

GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=false
GRUB_TERMINAL_OUTPUT="gfxterm"
GRUB_CMDLINE_LINUX="rd.luks.uuid=luks-7a7c7a0b-c150-4a46-9c44-94d89c1b19db rd.lvm.lv=qubes_dom0/root rd.lvm.lv=qubes_dom0/swap plymouth.ignore-serial-consoles rd.driver.pre=btrfs rhgb quiet rd.qubes.hide_all_usb"
GRUB_DISABLE_RECOVERY="true"
GRUB_THEME="/boot/grub2/themes/qubes/theme.txt"
GRUB_CMDLINE_XEN_DEFAULT="console=none dom0_mem=min:1024M dom0_mem=max:4096M ucode=scan smt=off gnttab_max_frames=2048 gnttab_max_maptrack_frames=4096"
GRUB_DISABLE_OS_PROBER="true"
GRUB_CMDLINE_LINUX="$GRUB_CMDLINE_LINUX usbcore.authorized_default=0"

I used

grub2-mkconfig -o /boot/grub2/grub.cfg

instead of

grub2-mkconfig -o /boot/efi/EFI/qubes/grub.cfg

for EFI.
Now it’s booting fine, except my usb keyboard isn’t working on boot (obviously). Thanks a lot for all the help.