operating-system icon indicating copy to clipboard operation
operating-system copied to clipboard

CH341 Serial Interface Driver Not Loading — No Serial Input on ttyUSB0

Open DjMayone opened this issue 4 months ago • 4 comments

Describe the issue you are experiencing

Hello,

I’m running Home Assistant OS on an Acemagic T9 Pro MiniPC, which has onboard LEDs controlled via the motherboard’s built-in CH341 USB-serial interface.

Previously, I had a Python script set up to toggle the LEDs on and off through /dev/ttyUSB0. This worked reliably until a couple of months ago.

Now, no input from the serial interface is received at all. After some debugging, it appears that the ch341 kernel driver is no longer being loaded correctly.

Environment:

Hardware: Acemagic T9 Plus MiniPC

OS: Home Assistant OS 6.12.35

Interface: CH341 USB-Serial (ttyUSB0)

Function: LED control via Python script

Relevant background: The CH341/CH340 USB-serial driver has had kernel regressions in the past, affecting communication in certain Linux kernel versions. For example, known issues occurred in:

Kernel 5.13.10–5.13.13 (fixed in 5.13.14)

Kernel 5.10.58–5.10.61 (fixed in 5.10.62)

Kernel 5.4.140–5.4.143 (fixed in 5.4.144)

In those cases, the module either failed to load or caused unreliable serial communication until a patch was applied. It’s possible that a recent Home Assistant OS kernel update has reintroduced a similar problem or changed how ch341 is built/loaded.

Question: Is there a way to manually enable or restore ch341 driver support in the current Home Assistant OS kernel, or should I roll back to an earlier OS release where it was functional?

Thanks!

What operating system image do you use?

generic-x86-64 (Generic UEFI capable x86-64 systems)

What version of Home Assistant Operating System is installed?

6.12.35-haos

Did the problem occur after upgrading the Operating System?

Yes

Hardware details

Generic x64 MiniPc

Steps to reproduce the issue

  1. Verified that /dev/ttyUSB0 appears when the system boots
  2. Attempted manual loading of the ch341 module (unsuccessful / not available in OS image)
  3. Confirmed Python script still works on another system with CH341 present

Anything in the Supervisor logs that might be useful for us?

no specific logs

Anything in the Host logs that might be useful for us?

2025-08-11 14:20:00.217 homeassistant kernel: usbcore: registered new interface driver ch341
2025-08-11 14:20:00.219 homeassistant kernel: usbserial: USB Serial support registered for ch341-uart
2025-08-11 14:20:00.219 homeassistant kernel: ch341 1-4:1.0: ch341-uart converter detected
2025-08-11 14:20:00.240 homeassistant kernel: usb 1-4: ch341-uart converter now attached to ttyUSB0
2025-08-11 14:20:00.245 homeassistant kernel: ch341 1-7:1.0: ch341-uart converter detected
2025-08-11 14:20:00.273 homeassistant kernel: usb 1-7: ch341-uart converter now attached to ttyUSB1

System information

No response

Additional information

No response

DjMayone avatar Aug 12 '25 07:08 DjMayone

I don't see any errors in the host logs showing the driver "is not loaded correctly", and there is currently no known regression in the ch341 driver. Are you sure it's not just the ttyUSB identifier that has changed? I.e. have you tried changing path in your script to ttyUSB1? Generally it's better to rely on /dev/serial/by-id or /dev/serial/by-path.

You also state it worked "until a couple of months ago". Can you be more specific about what version still worked?

sairon avatar Aug 14 '25 09:08 sairon

I don't see any errors in the host logs showing the driver "is not loaded correctly", and there is currently no known regression in the ch341 driver. Are you sure it's not just the ttyUSB identifier that has changed? I.e. have you tried changing path in your script to ttyUSB1? Generally it's better to rely on /dev/serial/by-id or /dev/serial/by-path.

You also state it worked "until a couple of months ago". Can you be more specific about what version still worked?

I have already tried running the script using both /dev/ttyUSB1 and the persistent path /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0, but in both cases the LEDs do not change.

The script runs without errors and reports “LED status sent successfully”, but there is no visible effect on the LEDs. The device file shows as: crw-rw---- 1 root audio 188, 0 Aug 14 10:13 /dev/ttyUSB0 Since the group is audio rather than the usual dialout, I suspect this might be a permissions or group mapping issue inside Home Assistant OS that is preventing proper communication with the device, even though the driver is loaded.

I’m not sure since when this group change happened, because this is a remote Home Assistant installation and I only had the hardware physically in front of me a couple of days ago. That’s when I noticed the issue.

DjMayone avatar Aug 14 '25 15:08 DjMayone

Hi @agners, just following up — is there anything else I can provide (logs, kernel details, etc.) that would help debug this? I’d also like to ask if there are any updates or known regressions regarding ch341 support in the current kernel build. Please let me know if I should gather more info from my setup or test with a specific build.

Thanks!

DjMayone avatar Sep 01 '25 04:09 DjMayone

Hi, I'm interested... Different hardware&software but the same symptoms/problem, the same troubleshooting path... https://community.home-assistant.io/t/serial-sensor-integration/938709

jarodziu avatar Oct 25 '25 16:10 jarodziu