The Issue
The issue I was facing was my USB Ethernet adapter becoming inactive after a short amount of time. This resulted in LXC containers becoming unreachable on my local network.
The Situation
A little over a year ago, I started using Proxmox. Recently, I upgraded the internet plan at my provider, Odido, previously T-Mobile, (in The Netherlands) from 1 Gbit/s to 2 Gbit/s. And to make sure my home server had the network capacity to handle the 2 Gbit/s speed, I bought a USB Ethernet adapter.
Cable Matters 202095-E
The Ethernet adapter I bought was the Cable Matters 202095-E. This adapter is capable of handling speeds up to 2,5Gbps and has a USB-C connector, including an adapter to USB-A. The chip providing this network power is the Realtek RTL8156B.
TRIGKEY HISTTON Green G4
As my home server, I use the TRIGKEY HISTTON Green G4. This is an Intel N100 based Mini PC. I left the amount of RAM at 16 GB, but replaced the NVMe SSD with a KINGSTON SKC3000S1024G.
Home Assistant + several LXC containers
In Proxmox 8.1.4 I’m running a Home Assistant VM for my home automation and several LXC containers running a range of applications like N8N, Plex, Sabnzbd and more.
The Solution
To solve the issue of my USB Ethernet adapter becoming inactive was to disable auto-suspension for my Cable Matters 202095-E. Let me tell you how to do this.
Find the USB Ethernet adapter ID
- Log into Proxmox
- In your node open Shell
- Enter the following command
lsusb
- A list of USB devices will come up. Find the USB device that looks like this
Bus 002 Device 053: ID 0bda:8156 Realtek Semiconductor Corp. USB 10/100/1G/2.5G LAN
- Note down the ID of the device. In my case, ‘0bda:8156’. You will need this later.
- 0bda = idVendor
- 8156 = idProduct
Make a persistent Udev rule to disable USB auto-suspension
- In the shell enter the following command
sudo nano /etc/udev/rules.d/90-usb-power-management.rules
- Now the nano-editor has been opened for the new
90-usb-power-management.rules
file, add this rule in the editor
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="0bda", ATTR{idProduct}=="8156", ATTR{power/control}="on"
- Be aware, replace the idVendor and idProduct code with the codes that can be found in the ID you noted down earlier.
- After adding the rule you need to save the file. Hit CTRL + X and CTRL + Y
- The new persistent Udev rule has been saved.
Reload Udev rules
- In the shell enter the following command
sudo udevadm control --reload-rules && sudo udevadm trigger
- After you ran the command, all Udev rules have been reloaded and triggered. The new rule we’ve added will take effect immediately.