sys-usb issues recognizing devices & maintaining drive connections

173 views
Skip to first unread message

scal...@posteo.net

unread,
Jan 3, 2020, 5:02:24 PM1/3/20
to qubes...@googlegroups.com
Since Qubes 3.2 I've had issues with sys-usb not recognizing devices. My
solution has been to reboot until it works. 1 in 4 times it seems to
work correctly.

The device that I have the most trouble with is a trackpad. Sometimes
after using the machine successfully for days, I'll wake it up and the
trackpad mouse speed will be slowed down. Sometimes rebooting sys-usb
will fix this. Other times I have to reboot the whole machine.

All that i've been able to live with.

But the other problem I've had with sys-usb is connecting to external
drives. Here are the copy speeds I get on my machine to an external usb
device:

Tails OS 33mb/sec
Qubes OS 12mb/sec

HOWEVER, the Qubes # is misleading because it seems to have regular i/o
issues so it is 12mb/sec when it is working, which is off and on. Then
after some time the whole device will become read only and i'll get a
i/o error message after copying for some time. This has become a serious
problem because i can no longer do Backups to external drives. (Copying
smaller files to/from usb is manageable.)

Therefore I've decided to ask for help here. A search for "sys-usb"
didn't reveal any examples of others having similar problems, but maybe
someone can help me narrow down the problem here.

This is my hardware: https://www.coreboot.org/Board:asus/kgpe-d16

Any advice is much appreciated.

scallyob

Lorenzo Lamas

unread,
Jan 3, 2020, 5:37:00 PM1/3/20
to qubes-users
I may have a similar problem.
It started with Qubes 4.0 for me. I have 2 usb controllers, one for USB 3.0 and one for USB 2.0.
The USB 2.0 ports also don't recognize devices a lot of the time and I have to reboot as well, also probably works about 1 in 4 times. The strange thing is, when it was summer, and the temperature inside the house was warmer, I rarely had this issue, but now that it's colder again, it happens a lot again.
When it is not recognizing devices, the Qubes Devices Widget shows an additional device: "sys-usb:2-1:1 - 138a_003c_0030009d7e88". It is not visible when everything works fine. Do you have that as well?

When it works it is also slow for me, just mounting and opening the folder of an USB drive seems to take ages, transferring small files as well. I don't know if it would also become read-only after a while, because I don't use it that long, because I use my USB 3.0 ports for that, which still work fine fortunately.

I haven't found a solution, so I can't help you there, unfortunately.
I'm on a 2nd gen Intel i5 laptop btw.

awokd

unread,
Jan 4, 2020, 4:51:47 AM1/4/20
to qubes...@googlegroups.com
Lorenzo Lamas:
>
> On Friday, January 3, 2020 at 11:02:24 PM UTC+1, scal...@posteo.net wrote:

>> But the other problem I've had with sys-usb is connecting to external
>> drives. Here are the copy speeds I get on my machine to an external usb
>> device:
>>
>> Tails OS 33mb/sec
>> Qubes OS 12mb/sec

Try adding irqpoll to the end of your kernelopts in qvm-prefs sys-usb.
Had similar behavior with my Corebooted AMD. Please let me know if it
helps you. I think root cause is IRQ setup table issues in Coreboot, but
I'm not sure yet how to confirm or fix.

> When it is not recognizing devices, the Qubes Devices Widget shows an
> additional device: "sys-usb:2-1:1 - 138a_003c_0030009d7e88". It is not
> visible when everything works fine. Do you have that as well?

An "lsusb" inside sys-usb might help identify that device.

> I haven't found a solution, so I can't help you there, unfortunately.
> I'm on a 2nd gen Intel i5 laptop btw.

Suspect it is a different problem than above, but agree the symptoms
seem similar.

--
- don't top post
Mailing list etiquette:
- trim quoted reply to only relevant portions
- when possible, copy and paste text instead of screenshots

Lorenzo Lamas

unread,
Jan 4, 2020, 7:25:19 AM1/4/20
to qubes-users


On Saturday, January 4, 2020 at 10:51:47 AM UTC+1, awokd wrote:
> When it is not recognizing devices, the Qubes Devices Widget shows an
> additional device: "sys-usb:2-1:1 - 138a_003c_0030009d7e88". It is not
> visible when everything works fine. Do you have that as well?

An "lsusb" inside sys-usb might help identify that device.


This is the output of lsusb:
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 003: ID 138a:003c Validity Sensors, Inc. VFS471 Fingerprint Reader
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 0627:0001 Adomax Technology Co., Ltd QEMU USB Tablet
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

scal...@posteo.net

unread,
Jan 4, 2020, 1:17:34 PM1/4/20
to qubes-users


-------- Original Message --------
Subject: Re: [qubes-users] Re: sys-usb issues recognizing devices &
maintaining drive connections
Date: 04.01.2020 19:14
From: scal...@posteo.net
To: awokd <aw...@danwin1210.me>

On 04.01.2020 10:51, 'awokd' via qubes-users wrote:
> Lorenzo Lamas:
>>
>> On Friday, January 3, 2020 at 11:02:24 PM UTC+1, scal...@posteo.net
>> wrote:
>
>>> But the other problem I've had with sys-usb is connecting to external
>>> drives. Here are the copy speeds I get on my machine to an external
>>> usb
>>> device:
>>>
>>> Tails OS 33mb/sec
>>> Qubes OS 12mb/sec
>
>>> This is my hardware: https://www.coreboot.org/Board:asus/kgpe-d16
>
> Try adding irqpoll to the end of your kernelopts in qvm-prefs sys-usb.
> Had similar behavior with my Corebooted AMD. Please let me know if it
> helps you. I think root cause is IRQ setup table issues in Coreboot,
> but
> I'm not sure yet how to confirm or fix.
>

Unfortunately it doesn't seem to have changed anything. My kernel opts
are currently set to:

dom0] qvm-prefs sys-usb
...
kernelopts - nopat iommu=soft swiotlb=8192 irqpoll
...

I rebooted sys-usb and am trying to copy a backup to an external USB
drive and getting the same pauses and low transfer rates (if not worse
actually).

253,591,552 0% 249.48kB/s 181:19:51 ^C
rsync error: received SIGINT, SIGTERM, or SIGHUP (code 20) at
rsync.c(644) [sender=3.1.3]
[sender] io timeout after 60 seconds -- exiting


Thanks for the suggestion though.

>> When it is not recognizing devices, the Qubes Devices Widget shows an
>> additional device: "sys-usb:2-1:1 - 138a_003c_0030009d7e88". It is not
>> visible when everything works fine. Do you have that as well?
>

Lorenzo Lamas:

I do not get this 'ghost' device. I either get none or a partial list of
what should be there.

But that is promising that your USB 3.0 works fine, maybe I should try
installing an additional USB card. I currently have the onboard usb
slots on the motherboard and a couple built into my case. They seem to
behave similarly. Though in the past sometimes switching between them I
could get things to show up. That was back on Qubes 3.2 though and have
found rebooting to be the more effective solution when things aren't
recognized at all.

awokd

unread,
Jan 4, 2020, 2:04:19 PM1/4/20
to qubes...@googlegroups.com
scal...@posteo.net:
>
>
> -------- Original Message --------
> Subject: Re: [qubes-users] Re: sys-usb issues recognizing devices &
> maintaining drive connections
> Date: 04.01.2020 19:14
> From: scal...@posteo.net
> To: awokd <aw...@danwin1210.me>
>
> On 04.01.2020 10:51, 'awokd' via qubes-users wrote:

>> Try adding irqpoll to the end of your kernelopts in qvm-prefs sys-usb.
>> Had similar behavior with my Corebooted AMD. Please let me know if it
>> helps you. I think root cause is IRQ setup table issues in Coreboot, but
>> I'm not sure yet how to confirm or fix.
>>
>
> Unfortunately it doesn't seem to have changed anything. My kernel opts
> are currently set to:
>
> dom0] qvm-prefs sys-usb
> ...
> kernelopts            -  nopat iommu=soft swiotlb=8192 irqpoll
> ...
>
> I rebooted sys-usb and am trying to copy a backup to an external USB
> drive and getting the same pauses and low transfer rates (if not worse
> actually).

Thanks for trying. Probably best to remove it then; I could see how it
could make it worse. Once you do, check journalctl -b for sys-usb and
see if there are any complaints when in loads the USB drivers and/or
when they are in use.

Lorenzo Lamas

unread,
Jan 11, 2020, 3:33:43 AM1/11/20
to qubes-users
Well I tried disabling the Fingerprint reader in Bios, that stopped the 'ghost' device from showing up, but doesn't fix anything.

Антон Чехов

unread,
Aug 3, 2020, 1:54:01 PM8/3/20
to qubes-users
Hi,

I just wanted to ask if there is hope getting sys-usb to work on the G505s in the future? I tried sys-usb in Qubes 4.0 and 4.1 with and without kernelopts irqpoll but unfortunately it doesn't work for me.

Off-topic:
Suspend doesn't work in 4.0 but it works in 4.1.

awokd

unread,
Aug 7, 2020, 2:20:07 PM8/7/20
to Антон Чехов, qubes-users
'Антон Чехов' via qubes-users:
Sys-usb works on mine with that irqpoll option, but it's pretty slow.
Might be picky about USB devices. Suspect it's actually something to do
with how Coreboot set up interrupt tables, not Qubes, but could be way off.

Антон Чехов

unread,
Aug 9, 2020, 11:37:56 AM8/9/20
to qubes-users
 Hi,

thanks for your answer. It does work indeed! :-)

I tried again because we have the same laptop and I thought if it works for you it has to work for me as well. At first I tried again without the kernelopts: I did install sys-usb and then I did reboot without trying it out. After rebooting a random hard disk was recognized and I was happy. Unfortunately, after another reboot I got error messages again and it only worked now and then. It rather didn't.

I once again tried the kernelopts and I saw my mistake during the first time I tried. I left a minus before nopats. I hadn't noticed that before but after looking at other kernelopts in different VM in the Qubes Settings I noticed that the '-' did look out of place and so I was running the command again ( qvm-prefs sys-usb kernelopts 'nopat iommu=soft swiotlb=8192 irqpoll') and after a reboot it now works.

I have a handful ob Yubikeys (v.2 to v.4) and I really want to make use of them with Qubes as well. So the next thing will be U2Fproxy and YubikeyLogin.
There is some weird (?) behavior when attaching a Yubikey and the Personalization Tool in sys-usb is open. The key is recognized but I get a never-ending loop of warnings: "Denied: qubes.InputKeyboard
Denied qubes.InputKeyboard from sys-usb to dom0"

I think that this is the right behavior but as long as I switch to the Personalization Tool these warnings never stop. Elsewhere I get this warning just the one time when I plug the key in.

Антон Чехов

unread,
Aug 9, 2020, 4:06:12 PM8/9/20
to qubes-users
Just a little update: Both YubikeyLogin and U2Fproxy are working fine. I tried the latter with a Fedora32 AppVM and my Google Account.

awokd

unread,
Aug 9, 2020, 4:07:25 PM8/9/20
to qubes...@googlegroups.com
'Антон Чехов' via qubes-users:

> I have a handful ob Yubikeys (v.2 to v.4) and I really want to make use of
> them with Qubes as well. So the next thing will be U2Fproxy and
> YubikeyLogin.
> There is some weird (?) behavior when attaching a Yubikey and the
> Personalization Tool in sys-usb is open. The key is recognized but I get a
> never-ending loop of warnings: "Denied: qubes.InputKeyboard
> Denied qubes.InputKeyboard from sys-usb to dom0"
>
> I think that this is the right behavior but as long as I switch to the
> Personalization Tool these warnings never stop. Elsewhere I get this
> warning just the one time when I plug the key in.

From
https://www.qubes-os.org/doc/usb-qubes/#enable-a-usb-keyboard-for-login
under Manual setup, I wonder if you can edit
/etc/qubes-rpc/policy/qubes.InputKeyboard to something like sys-usb
sys-usb ask,default_target=sys-usb. Should be more documentation on that
file somewhere out there.

Антон Чехов

unread,
Aug 12, 2020, 5:22:28 AM8/12/20
to qubes-users
Sorry for the late response. I tried that but the warning remained. Thinking a while about it I am of the opinion that it wasn't bad seeing this message. It only shows up once when plugging in a Yubikey (or I guess any device that is recognized as a keyboard) together with the message that a Yubikey is available.
I don't need the Personalization Tool very often. On the contrary, once the slots are configured they usually stay that way for a long time.

My conclusion for now is, that I can live with this message. Or is this not the expected  behavior? What do you think about it?
It may be connected with some policy file for the Yubikey but I don't know and didn't have the time to seriously investigate these policy files & documentation.

I am thinking about setting up 'sys-usb' as a disposable VM along the lines of the following documentation.
Have you or others tried that out and is this documentation up to date?

awokd

unread,
Aug 12, 2020, 5:08:54 PM8/12/20
to qubes...@googlegroups.com
'Антон Чехов' via qubes-users:

> I don't need the Personalization Tool very often. On the contrary, once the
> slots are configured they usually stay that way for a long time.
>
> My conclusion for now is, that I can live with this message. Or is this not
> the expected behavior? What do you think about it?
> It may be connected with some policy file for the Yubikey but I don't know
> and didn't have the time to seriously investigate these policy files &
> documentation.

I've been meaning to try out a Yubikey or equivalent, but haven't gotten
there yet. Hopefully someone else has more thoughts on it.

> I am thinking about setting up 'sys-usb' as a disposable VM along the lines
> of the following documentation.
> https://www.qubes-os.org/doc/disposablevm-customization/
> Have you or others tried that out and is this documentation up to date?
>
Yes, it worked when I tried it. Don't think much has changed in that
regard since, so it should still work.
Reply all
Reply to author
Forward
0 new messages