USB-C port doesn't work if nothing is connected at boot

Thinkpad P51, which has one USB-C 3.1 port (Thunderbolt 3).
Qubes OS 4.2 fresh install.

If no device is connected to the USB-C port at the time of boot, then a flash drive or USB-C hub is not discovered when connecting it after the OS has started.

However, if a flash drive is connected at the time of boot, then it is shown in the list of devices, then it works fine, and I can attach it do individual VMs.

The following surprises me most: If an USB-C hub was connected to USB-C at the time of boot, then it works to hot-plug flash drives at Qubes runtime.

I wonder if there is a plausible explanation of this behavior, or if it seems like a hardware/BIOS bug.

I haven’t yet tried to boot a live USB system on that laptop, to check whether the behavior is the same with other Linux flavors.

Check the BIOS settings, there may be an option to only init the USB devices on boot time.

USB-A ports already work fine.
Only USB-C has that behavior.

Are there any options in BIOS related to Thunderbolt or USB-C specifically?

USB-A and USB-C are controlled independently. Read user manual. Snippet below . . .

After you install another operating system, you can enable the Thunderbolt 3 technology in ThinkPad Setup by doing the following:

1. Restart the computer and press F1 when the logo screen is displayed.
2. Select Config ➙ Thunderbolt™ 3 ➙ Security level.
3. Change the settings from Display Port and USB to any other selection.

Trying different related BIOS options didn’t have any impact on the reported behavior.

However, I noticed one more interesting detail.

It isn’t necessary to do a full reboot to get Qubes to discover the device connected to the USB-C port.

It is sufficient to restart the qube that handles the USB devices. (In my scenario, it’s sys-net which handles USB, too.)

So it doesn’t look like a BIOS issue, but rather an issue at the Qubes level? Is it possible that Qubes doesn’t re-scan the USB-C port during runtime, but only scans it on initial startup of the respective USB qube?

Do you need to have USB device connected during sys-usb restart?
Or if you restart sys-usb without USB device connected and connect USB device after sys-usb is started then it’ll work?

It must be connected at the time sys-usb starts.

If the port is empty at the time sys-usb starts, then no devices are detected for the remaining runtime of sys-usb.

(Or, it works, if a hub is connected at the time sys-usb starts. Then, devices connected to the hub at a later time will also be detected.)

Do you see anything in sys-usb log when you connect the USB device and it’s not recognized?
Restart sys-usb without USB device connected.
Run in sys-usb terminal:

sudo journalctl -f -n0

And connect the USB device.
Check the log.