Error QubesException - device attach failed - Attach timeout

Hello QuBes Forum,

a new development with sys-usb

There is no way of attaching any USB Device plugged directly or via a USB HUB

No changes to the config of this system were done
and, everything was working fine

Where should i look to find relevant info to debug this error ?

in dom0, appVM (target), sys-usb (source)

Thanks in Advance

1 Like

The redacted AppVM name within a /usr/lib/qubes/usb-import file.

I don’t understand your comment.

usb-import is a script in the TARGET-vault

The section of the script that generates the error messages is shown below:

ERROR() {
  (
    echo "$* "
    echo "VM: \"`hostname`\" File: \"$0\" "
    echo "Version Control: "
    echo -n "https://github.com/QubesOS/qubes-app-linux-usb-proxy"
    echo "/blob/master/src/usb-import"
  ) >&2;
  exit 1
}

.
in the TARGET-vault, there was no entries in the journalctrl at the error point

it seems that the problem is related to the TEMPLATE used by the TARGET-vault
having changed it to a different Template allows for the USB device to be attached

Nevertheless, I need to fix the problematic template now.

where are those logs ?

.
in sys-usb, the following is found when the error happens:

# journalctl -f

[ . . . ]

Jun 11 04:57:02 sys-usb kernel: usbip-host 2-5: recv a header, 0
Jun 11 04:57:03 sys-usb kernel: usbip-host 2-5: reset full-speed USB device number 10 using xhci_hcd
Jun 11 04:57:03 sys-usb kernel: usbip-host 2-5: device reset
Jun 11 04:57:03 sys-usb qubes.USB+2-5-TARGET-vault[2453]: Failed to remove qubesdb-write
Jun 11 04:57:03 sys-usb qubes.USB+2-5-TARGET-vault[2453]: Failed to remove
Jun 11 04:57:03 sys-usb qrexec-agent[2420]: pam_unix(qrexec:session): session closed for user root
Jun 11 04:57:03 sys-usb audit[2420]: USER_END pid=2420 uid=0 auid=0 ses=10 subj=system_u:system_r:local_login_t:s0-s0:c0.c1023 msg='op=PAM:session_close grantors=pam_selinux,pam_loginuid,pam_selinux,pam_keyinit,pam_limits,pam_systemd,pam_unix,pam_umask,pam_lastlog acct="root" exe="/usr/lib/qubes/qrexec-agent" hostname=? addr=? terminal=? res=success'
Jun 11 04:57:03 sys-usb audit[2420]: CRED_DISP pid=2420 uid=0 auid=0 ses=10 subj=system_u:system_r:local_login_t:s0-s0:c0.c1023 msg='op=PAM:setcred grantors=pam_rootok acct="root" exe="/usr/lib/qubes/qrexec-agent" hostname=? addr=? terminal=? res=success'
Jun 11 04:57:03 sys-usb kernel: kauditd_printk_skb: 3 callbacks suppressed
Jun 11 04:57:03 sys-usb kernel: audit: type=1106 audit(1749632223.776:289): pid=2420 uid=0 auid=0 ses=10 subj=system_u:system_r:local_login_t:s0-s0:c0.c1023 msg='op=PAM:session_close grantors=pam_selinux,pam_loginuid,pam_selinux,pam_keyinit,pam_limits,pam_systemd,pam_unix,pam_umask,pam_lastlog acct="root" exe="/usr/lib/qubes/qrexec-agent" hostname=? addr=? terminal=? res=success'
Jun 11 04:57:03 sys-usb kernel: audit: type=1104 audit(1749632223.776:290): pid=2420 uid=0 auid=0 ses=10 subj=system_u:system_r:local_login_t:s0-s0:c0.c1023 msg='op=PAM:setcred grantors=pam_rootok acct="root" exe="/usr/lib/qubes/qrexec-agent" hostname=? addr=? terminal=? res=success'
Jun 11 04:57:03 sys-usb qrexec-agent[2418]: 2025-06-11 04:57:03.790 qrexec-agent[2418]: qrexec-agent-data.c:288:handle_new_process_common: pid 2420 exited with 1
Jun 11 04:57:03 sys-usb systemd[1]: session-10.scope: Deactivated successfully.

[ . . . ]

Thanks for your help

1 Like

as a way to solve the issue, the template was recreated based on Debian 12 Minimal

Additional packages were installed and the size was 3.5 GB smaller than previous template based on Debian 12 XFCE

It took some time to try all the tool and resolve their dependencies.

Thanks

1 Like