New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when attaching USB Ethernet adapter to sys-net #2860

Open
petaramesh opened this Issue Jun 20, 2017 · 3 comments

Comments

Projects
None yet
5 participants
@petaramesh

Qubes OS version (e.g., R3.2):

R3.2

sys-net + sys-usb

Expected behavior:

I have an USB Ethernet adapter (Asus laptop unfortunately has no internal Ethernet port). I was instructed in the mailing-list that I should create a sys-usb VM to be able to use it by giving it to the sys-net VM using from dom0 i.e.:
qvm-usb --attach sys-net sys-usb:3-6

Actual behavior:

The first time I typed said command in dom0 terminal, it didn't answer anything, but the sys-usb VM imediately crashed (disappeared from VM-Manager while mouse stopped working).

I had to restart it manually.

Since, everytime I try to type the same command (this is consistent over reboots...) I get the following message:
« ERROR: Device attach failed: /usr/lib/qubes/usb-import: line 37: [: sta: integer expression expected/usr/lib/qubes/usb-import: line 51: printf: write error: Invalid argument »

Steps to reproduce the behavior:

  • Create a sys-usb VM
  • Plug an USB Ethernet adapter
  • From a dom0 terminal, try to attach the adapter to sys-net using « qvm-usb --attach sys-net sys-usb:3-6 »
@adrelanos

This comment has been minimized.

Show comment
Hide comment
@adrelanos

adrelanos Nov 30, 2017

Member

Device attach failed: /usr/lib/qubes/usb-import: line 37: [: sta: integer expression expected/usr

This is a harmless parsing bug. The protocol header reads "sta" first
before any other output. If "sta", the loop should continue (in bash
terms), i.e. go on with the next iteration.

Can you make head or tail of this and fix this please?

/lib/qubes/usb-import: line51: printf: write error: Invalid argument

The rest I don't know.

Member

adrelanos commented Nov 30, 2017

Device attach failed: /usr/lib/qubes/usb-import: line 37: [: sta: integer expression expected/usr

This is a harmless parsing bug. The protocol header reads "sta" first
before any other output. If "sta", the loop should continue (in bash
terms), i.e. go on with the next iteration.

Can you make head or tail of this and fix this please?

/lib/qubes/usb-import: line51: printf: write error: Invalid argument

The rest I don't know.

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Nov 30, 2017

Member

Is it USB 3.0 (or USB 3.1) device? I'm afraid those do not work with qvm-usb yet. Check sys-net kernel messages for details.

If this is the case, your option is to use single VM for both network and usb - i.e. attach USB controllers to sys-net. There are provided salt formulas for that to ease the task, but you need to remove sys-usb manually first:

qvm-remove sys-usb
sudo qubesctl state.sls qvm.sys-net-with-usb
Member

marmarek commented Nov 30, 2017

Is it USB 3.0 (or USB 3.1) device? I'm afraid those do not work with qvm-usb yet. Check sys-net kernel messages for details.

If this is the case, your option is to use single VM for both network and usb - i.e. attach USB controllers to sys-net. There are provided salt formulas for that to ease the task, but you need to remove sys-usb manually first:

qvm-remove sys-usb
sudo qubesctl state.sls qvm.sys-net-with-usb
@timove

This comment has been minimized.

Show comment
Hide comment
@timove

timove Dec 20, 2017

I found a temporary workaround for my DVD burner by using an USB hub in between, which is only USB 2.0 capable.

timove commented Dec 20, 2017

I found a temporary workaround for my DVD burner by using an USB hub in between, which is only USB 2.0 capable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment