Ethernet Interface from docking station not working

Hello,

Current QubesOS version : 4.1 alpha
Current kernel version : 5.10.42-1.fc42
Template for sys-usb : Fedora 33
Template for sys-net : Fedora 33
Name of the computer : Thinkpad T480s
Name of the docker station : Thinkpad USB-C Dock Gen2 ( 40AS )


I have a docking station for my thinkpad T480s. On this docking station everything is working fine with QubesOS 4.1 alpha for usb port, power, hdmi.

So on the T480s, there is an ethernet port, and there is no problem when I use it.
But when I instead use the ethernet port on the docking station, it’s not working.

So the ethernet port of the docking station is recognised as a usb devices on sys-usb with the following name :

→ sys-usb:3-4.1 Realtek_USB-C_Dock_Ethernet_301000001

[user@dom0 ~]$ qvm-usb
BACKEND:DEVID DESCRIPTION USED BY
sys-usb:2-4.3.3.1 Cypress_Semiconductor_Billboard_Device_0001
sys-usb:2-4.3.3.2 Lenovo_ThinkPad_USB-C_Dock_Gen2_USB_Audio_000000000000
sys-usb:2-8 SunplusIT_Inc_Integrated_Camera
sys-usb:3-3 Generic_USB3.0-CRW_20120501030900000
sys-usb:3-4.1 Realtek_USB-C_Dock_Ethernet_301000001

On the sys-usb I can see it with :

[user@sys-usb ~]$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: ens6f0u4u1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether <Censored> brd ff:ff:ff:ff:ff:ff
    altname enp0s6f0u4u1

First way to test my interface of the docking station :

But the interface is DOWN, and when I try to bring it to UP with the following command :

[user@sys-usb ~]$ sudo ifconfig ens6f0u4u1 up

and also did try

[user@sys-usb ~]$ sudo ip link set ens6f0u4u1 up

I have no error, but the interface is still down

[

user@sys-usb ~]$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: ens6f0u4u1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
    link/ether <Censored>  brd ff:ff:ff:ff:ff:ff
    altname enp0s6f0u4u1

[user@sys-usb ~]$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: ens6f0u4u1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether <Censored> brd ff:ff:ff:ff:ff:ff
    altname enp0s6f0u4u1

Second way to test my interface on the docking station :

So then I tried to attach the interface to sys-net with :

[user@dom0 ~]$ qvm-usb attach sys-net sys-usb:3-4.1 -v

Even so on the Qubes Device Manager I Can see the interface connecter to sys-net, when I’m trying the following command again it’s not really attach :


[user@dom0 ~]$ qvm-usb
BACKEND:DEVID      DESCRIPTION                                             USED BY
sys-usb:2-4.3.3.1  Cypress_Semiconductor_Billboard_Device_0001             
sys-usb:2-4.3.3.2  Lenovo_ThinkPad_USB-C_Dock_Gen2_USB_Audio_000000000000  
sys-usb:2-8        SunplusIT_Inc_Integrated_Camera                         
sys-usb:3-3        Generic_USB3.0-CRW_20120501030900000                    
sys-usb:3-4.1      Realtek_USB-C_Dock_Ethernet_301000001

And I tried ip a on sys-net but of course it doesnt show the interface.

So two question :

→ How can I for the first step make my ethernet interface work even if it’s sys-usb ?

→ How can make it work to sys-net once I attach to it from sys-usb ?

---------------------- More information ---------------------

lsusb of the interface
bash-5.0# lsusb -s 003:002 -v

Bus 003 Device 002: ID 0bda:0316 Realtek Semiconductor Corp. Card Reader
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               3.00
  bDeviceClass            0 
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         9
  idVendor           0x0bda Realtek Semiconductor Corp.
  idProduct          0x0316 Card Reader
  bcdDevice            2.04
  iManufacturer           1 Generic
  iProduct                2 USB3.0-CRW
  iSerial                 3 20120501030900000
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x002c
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          4 CARD READER
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower              800mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk-Only
      iInterface              5 Bulk-In, Bulk-Out, Interface
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 1024 bytes
        bInterval               0
        bMaxBurst               3
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 1024 bytes
        bInterval               0
        bMaxBurst               3
Binary Object Store Descriptor:
  bLength                 5
  bDescriptorType        15
  wTotalLength       0x000f
  bNumDeviceCaps          1
  SuperSpeed USB Device Capability:
    bLength                10
    bDescriptorType        16
    bDevCapabilityType      3
    bmAttributes         0x02
      Latency Tolerance Messages (LTM) Supported
    wSpeedsSupported   0x000e
      Device can operate at Full Speed (12Mbps)
      Device can operate at High Speed (480Mbps)
      Device can operate at SuperSpeed (5Gbps)
    bFunctionalitySupport   1
      Lowest fully-functional device speed is Full Speed (12Mbps)
    bU1DevExitLat          10 micro seconds
    bU2DevExitLat        1023 micro seconds
can't get debug descriptor: Resource temporarily unavailable
Device Status:     0x001c
  (Bus Powered)
  U1 Enabled
  U2 Enabled
  Latency Tolerance Messaging (LTM) Enabled

Edit 1 : Update about the use of sudo ip link set ens6f0u4u1 up

  1. sudo ip link set ens6f0u4u1 up

  2. Try install qubes-usb-proxy on sys-net

  • Fedora: sudo dnf install qubes-usb-proxy
  • Debian/Ubuntu: sudo apt-get install qubes-usb-proxy

after that, in dom0 :

qvm-usb attach sys-net sys-usb:3-4.1

if you want attach to another vm, detach first then attach to other vm.

1 Like

Thank you :grinning:

I did tried the command sudo ip link set ens6f0u4u1 up but without effect, it’s still showing as down

I will try after to use qubes-usb-proxy

The interface is finally up on sys-usb :champagne:

It was already installed for sys-net and sys-usb :

user@sys-net:~$ sudo dnf install qubes-usb-proxy
Warning: Enforcing GPG signature check globally as per active RPM security policy (see 'gpgcheck' in dnf.conf(5) for how to squelch this message)
Last metadata expiration check: 4:54:11 ago on Fri Jun 11 15:21:44 2021.
Package qubes-usb-proxy-1.0.29-1.fc33.noarch is already installed.
Dependencies resolved.
Nothing to do.
Complete!

I tried again without error

qvm-usb attach sys-net sys-usb:3-4.1

But without success, it doesnt show when I do on sys-net

ip a

How can I provide more logs about this steps ?

you will have to think of the docling station as a “external” device. It is not native to the laptop. So my guest is look under devices in qubes settings and see if its there but more then likely not, this then maybe driver/software related then. When hooking up the docking station it over rides the internal nic and the internal NIC acts as a “pass-though”.

Look for some type of “controller” for NICs because the internal NIC is now “bridge”

Temporary fixe

As a temporary solution, which I know is not the best, is to put the usb controller from the sys-usb to the sys-net. Now it’s working as expected.

Where the problem is

It’s not a driver problem related because fedora 33 don’t have any problem to see the interface but something is wrong when I’m doing qvm-usb attach sys-net sys-usb:3-4.1 that make it not work

Just providing anecdotal comments, but attaching USB ethernet NICs with qvm-usb or the Devices widget usually doesn’t work if the driver tries to reset the device. In my experience it highly depends on the driver; some work, some do not.

You may want to see if there is any driver output in the kernel log. Determine which driver/module is being used with sudo lspci -v
and look for that in sudo dmesg | grep [module].