USB Connection lost

bbuster

Member
Apr 20, 2023
30
1
8
I have a proxmox container running Fhem (to control my thermostat valves).
U used this: https://tteck.github.io/Proxmox/ (Fhem)

The container is Privileged and the connected usb device is found (to control the thermostats)

When i type in this command, i get the following result:


Bash:
ls -l /dev/serial/by-id
total 0
lrwxrwxrwx 1 root root 13 Feb  9 09:05 usb-1a86_USB2.0-Serial-if00-port0 -> ../../ttyUSB0

The usb-1a86_USB2.0-Serial-if00-port0 is the device I need and the connection works.
But i noticed 2 times already after some time (don't know exactly how long, the device disconnects.

When i run the command i only get total 0 as a result

After rebooting the container it works again (without reconnecting the usb cable itself).
How can i fix this?
Or is there a command to restart the usb service or something?
I can make a crontab that if the connection is lost i can restart the usb service if that helps

Thank you
 
Check with journalctl if there are some messages around the time you lose the connection. It does happen that USB devices and controllers are not fully compatible and maybe on the them enters low-power sleep and does not wake up properly? A common work-around is to put a (powered) USB hub in between.
EDIT: This is not Proxmox specific, so other Linux guides or work-around found on the internet might also work.
 
I experience a similar problem with two UMTS mobile sticks. After some time, one of them gets disconnected from my Ubuntu VM. The proxmox host still shows both of them in lsusb.

@leesteken: Which workaround(s) do you refer to?

Any idea on how to solve this would be very helful.

Thank you in advance.
 
@leesteken: Which workaround(s) do you refer to?
I refer to searching the internet for Linux USB issues in general, since Proxmox is based on Debian with a Ubuntu kernel and I don't think these kinds of issues are Proxmox specific.
As I wrote before, one common work-around is putting a (powered) USB hub in between.

EDIT: Now that I read my previous post again, I feel like I wrote the same thing. Also: check the Proxmox Syslog (or journalctl) for messages about the disconnect (which I also wrote before).
 
Last edited:
You are right - did not realize your hint using a powered USB hub. I will give it a try and come back to report.

Thanks.
 
You are right - did not realize your hint using a powered USB hub. I will give it a try and come back to report.
My main suggestion is: maybe you are better off by sharing the journalctl log from around the time of disconnection, so people (and you) can search the internet for similar issues.
 
I checked with USB hub. Now, both sticks disconnect: Please find log attached.

Unfortunately, I run out of ideas. Any help is appreciated.
 

Attachments

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!