Child pages
  • Enable LTE WWAN on ThinkPad in Qubes OS

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Make an internal LTE-Card work in Qubes OS so that it can be managed through network manager (which is running in the sys-net VM).

Easy Solution: delegate an USB controller to sys-net

As the LTE card is connected to the internal USB Bus, a simple approach is to pass the USB-Controller (the PCI-Device) to the sys-net VM. This is feasible if you have enough USB ports left after delegating the one which is providing the LTE device, see below.

First, we need to find out where the internal LTE card is connected to.
As it presented as an internal USB device, we use "lsusb" to list all USB-devices:

[user@dom0 ~]$ lsusb
Bus 002 Device 002: ID 8087:8000 Intel Corp. 
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:8008 Intel Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 002: ID 17ef:1010 Lenovo 
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 008: ID 046d:c526 Logitech, Inc. Nano Receiver
Bus 003 Device 006: ID 17ef:100f Lenovo 
Bus 003 Device 004: ID 17ef:1010 Lenovo 
Bus 003 Device 003: ID 138a:0017 Validity Sensors, Inc. Fingerprint Reader
Bus 003 Device 002: ID 058f:9540 Alcor Micro Corp. AU9540 Smartcard Reader
Bus 003 Device 009: ID 5986:026a Acer, Inc 
Bus 003 Device 007: ID 8087:07da Intel Corp. 
Bus 003 Device 005: ID 1199:a001 Sierra Wireless, Inc. 
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

The LTE card is the 2nd one from below (Sierra Wireless) and is located at USB Bus 003Everything seems to be on this bus. Bus 004 seems to be the USB3 hub, I don't know where bus 001 and bus 002 are connected.

To find out which USB bus belongs to which USB Controller:

[user@dom0 ~]$ readlink /sys/bus/usb/devices/usb?
../../../devices/pci0000:00/0000:00:1a.0/usb1
../../../devices/pci0000:00/0000:00:1d.0/usb2
../../../devices/pci0000:00/0000:00:14.0/usb3
../../../devices/pci0000:00/0000:00:14.0/usb4

As the LTE card is attached to USB bus 003 (usb3) the controller we're looking for is 00:14.0.

Show the full name of this PCI-device:

[user@dom0 ~]$ lspci | grep USB

00:14.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB xHCI (rev 04)
00:1a.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #2 (rev 04)
00:1d.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #1 (rev 04)

Add this PCI-device to the sys-net VM (Qubes VM Manager, right Click VM Settings, Tab: Devices).
You need to shutdown and user VMs, sys-firewall and afterwards sys-net to add the PCI-devices to sys-net.

After adding the PCI-device and booting it up, some USB-devices will disappear from dom0 ...

[user@dom0 ~]$ lsusb
Bus 001 Device 005: ID 04f2:b39a Chicony Electronics Co., Ltd 
Bus 001 Device 004: ID 8087:07dc Intel Corp. 
Bus 001 Device 003: ID 093a:2510 Pixart Imaging, Inc. Optical Mouse
Bus 001 Device 002: ID 8087:8008 Intel Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

... and appear in sys-net:

[user@sys-net ~]$ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 004: ID 0765:5010 X-Rite, Inc.
Bus 002 Device 003: ID 1199:a001 Sierra Wireless, Inc.
Bus 002 Device 002: ID 8087:8000 Intel Corp.
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Info

You may get the error: "qubes sys-net modem VM: internal error: unable to reset PCI device: no FLR, PM reset or bus reset available" when starting sys-net VM.

In this case, issue:

[user@dom0 ~]qvm-prefs usbVM -s pci_strictreset false


Info
Unfortunately, on a ThinkPad T540p, this disables all USB ports for use with mice ot USB hard disks, making the rest of the notebook quite unusable - in particular since bluetooth is also not supported and the T540p trackpad / trackpoint is that unusable bad.

Better solution: create a USB qube

For some reason, at install time of Qubes, I decided against an USB-VM (sys-usb), or I has not been recommended by the installer.

But for the LTE device usage on Thinkpad, it turned out to be the best solution.

Instructions are here: https://www.qubes-os.org/doc/usb/#creating-and-using-a-usb-qube

First, create the USB Qube:

[root@dom0 ~]# qubesctl state.sls qvm.sys-usb

Any USB mouse stops working, but is automatically reassigned after a few seconds.

All USB devices have vanished from dom:

[root@dom0 ~]# lsusb
[root@dom0 ~]#

Second, assign the LTE device to sys-net:

[user@dom0 ~]$ qvm-usb
sys-usb:4-5 058f:9540 Generic_EMV_Smartcard_Reader
sys-usb:4-7 138a:0017 138a_0017_bbed576024fa
sys-usb:4-9.4.1 046d:c526 Logitech_USB_Receiver
sys-usb:4-10 1199:a001 Sierra_Wireless_Inc._Sierra_Wireless_EM7345_4G_LTE_013937009971498
sys-usb:4-11 8087:07da 8087_07da
sys-usb:4-12 5986:026a SunplusIT_INC._Integrated_Camera
[user@dom0 ~]$ qvm-usb -a sys-net sys-usb:4-10

Now, the LTE card is visible for Network Manager in sys-net again.



See also: https://groups.google.com/forum/#!topic/qubes-users/lGAx_KGzF2o and https://www.qubes-os.org/doc/assigning-devices/