USB storage devices stop working some time after being attached to qubes

Hi all,

I often work with data stored on USB sticks. I can attach them to specific qubes,and detach them, no problem, both as data/block devices and as USB devices. In both cases, I can open, edit and save files on the USB sticks. However, after a short period of inactivity, the USB sticks become inaccessible.

When I have attached them as data/block devices, I can no longer save open files. In thunar, the device can still be seen, but its file structure can’t be navigated. When I detach and then re-attach the same device, I see multiple instances of it in Thunar - the old one, that can’t be navigated, and the new one that can be navigated.

When I attach them as USB devices, the issue is slightly different - after a short period of inactivity, the devices detach from the qube. Sometimes, fixing that is as simple as reattaching the USb stick. Other times, it requires a restart of the qube.

Any insights appreciated. I’m running Qubes 4.2.3 on a System76 Darter Pro.

Thanks!

Hello @Simdar,

I do not see any replies, but I do not know the answer.

Maybe you can tell us about the hardware…

Edit: You did tell us! I did not read properly…

For me, I have seen many strange things with USB when the power supply is not good.

Do you see the same things with every USB port?

Do you have USB keyboard or mouse? Do they also disappear?

The main thing wasn’t said: full info about qube that manages usb controller.

1 Like

Thanks phceac. It’s the same with all USB ports. Mouse and external keyboard connected to dom0 via SysUSB stay connected and do not show the same issue. However, Yubikeys connected to various qubes do disconnect after a period of inactivity.

Good point. Mainly, I’m attaching the USB sticks to an app VM based on the Debian 12 template in PVH mode and with no network access. However, I’m also attaching Yubikeys to a range of Debian app VMs, and also Debian disposable VMs, all in PVH mode but with network access, and in all cases the Yubikeys disconnect after a period of inactivity.

Haha, if it was good, then I wasn’t clear enough it seems. It’s not about sticks, but about “sticking”. Which qube (now it looks its name’s “SysUSB”) of which template holds USB controller that enables “sticking” sticks TO whatever.

Hmm. I’m not an expert, but I would look for a problem related to USB selective suspend.

Maybe you have installed some software for improving battery lifetime. Also, using an unusual template for sys-usb might change the power management behaviour.

I guess you already tried watching the system logs with journalctl -f in all the different VMs (Dom0, sys-usb, plus the client VM where the key is attached.)

Sys-usb is a disposable VM in HVM mode based on the default dvm template, which is Debian 12. I haven’t made any modifications to sys-usb so assume that is the default config.

Thanks - will look into the battery management issue and also check the logs as you suggest.

1 Like

Great! Did you try the one based on fedora? You should. Because, when “you are buying a car, you ask the car seller which car he/she drives” And we know which car devs are “driving” - fedora. That is default sys-usb template?

1 Like

Yes! Trying a sys-usb based on Fedora AppVm might be a good idea.

I think I remember that the installer makes it easy to select and de-select different templates… maybe that is why there is disposable Debian sys-usb.

I tried that configuration (disp/Deb) on an earlier 4.2 release and it didn’t work for me. I think some package(s) were missing.

1 Like

Maybe it’s all related but depending on the flash drive/partition/format? I often do not have the option to attach the block. When I do and detach the device, the option to attach the block is no longer available.

Restarting the usb qube restores the option to attach the block. I’m using disp qubes so, maybe that has something to do with it.

Good suggestion - I tried switching to a Fedora qube, but same result.

Thanks, will test it with different file systems.

Then it’s probably about dom0…