FS#71830 - ch341-uart converter not working with kernel version 5.13.10-arch1-1

Attached to Project: Arch Linux
Opened by Edgar Leon (emleon) - Saturday, 14 August 2021, 01:39 GMT
Last edited by Toolybird (Toolybird) - Tuesday, 06 June 2023, 03:39 GMT
Task Type Bug Report
Category Kernel
Status Closed
Assigned To Jan Alexander Steffens (heftig)
Architecture x86_64
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

Description:
ch341-uart converter not working with kernel version 5.13.10-arch1-1

Additional info:
Downgrading kernel to 5.13.8-arch1-1 solve the problem

Steps to reproduce:
Logs with version 5.13.10-arch1-1:
Aug 13 19:03:18 nov-31f6 kernel: usb 1-4: ch341-uart converter now attached to ttyUSB0
Aug 13 19:03:18 nov-31f6 kernel: ch341 1-4:1.0: ch341-uart converter detected
Aug 13 19:03:18 nov-31f6 kernel: usb 1-4: Product: USB Serial
Aug 13 19:03:18 nov-31f6 kernel: usb 1-4: New USB device strings: Mfr=0, Product=2, SerialNumber=0
Aug 13 19:03:18 nov-31f6 kernel: usb 1-4: New USB device found, idVendor=1a86, idProduct=7523, bcdDevice= 2.64
Aug 13 19:03:17 nov-31f6 kernel: usb 1-4: Device not responding to setup address.
Aug 13 19:03:17 nov-31f6 kernel: usb 1-4: new full-speed USB device number 64 using xhci_hcd
Aug 13 19:03:17 nov-31f6 kernel: usb 1-4: device not accepting address 63, error -71
Aug 13 19:03:17 nov-31f6 kernel: usb 1-4: Device not responding to setup address.
Aug 13 19:03:16 nov-31f6 kernel: usb 1-4: Device not responding to setup address.
Aug 13 19:03:16 nov-31f6 kernel: usb 1-4: new full-speed USB device number 63 using xhci_hcd

After downgrade to 5.13.8-arch1-1 start working again with logs:

Aug 13 20:26:01 nov-31f6 kernel: usb 1-3: ch341-uart converter now attached to ttyUSB0
Aug 13 20:26:01 nov-31f6 kernel: ch341 1-3:1.0: ch341-uart converter detected
Aug 13 20:26:01 nov-31f6 kernel: usb 1-3: Product: USB Serial

This task depends upon

Closed by  Toolybird (Toolybird)
Tuesday, 06 June 2023, 03:39 GMT
Reason for closing:  Fixed
Additional comments about closing:  See comments
Comment by loqs (loqs) - Sunday, 15 August 2021, 22:10 GMT
Can you test 5.13.9-arch1-1 and see if that works. If it does then I would suggest testing with [1] reverted, which was added in 5.13.10.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit?id=9fc923d27852aebbd8af0ac988dc66bfb4aa7d5d
Comment by Edgar Leon (emleon) - Sunday, 15 August 2021, 22:25 GMT
With 5.13.9-arch1-1 It works fine

[ 58.410524] usb 1-3: new full-speed USB device number 7 using xhci_hcd
[ 58.552827] usb 1-3: New USB device found, idVendor=1a86, idProduct=7523, bcdDevice= 2.64
[ 58.552840] usb 1-3: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[ 58.552846] usb 1-3: Product: USB Serial
[ 58.554756] ch341 1-3:1.0: ch341-uart converter detected
[ 58.555457] usb 1-3: ch341-uart converter now attached to ttyUSB0

uname -a
Linux nov-31f6 5.13.9-arch1-1 #1 SMP PREEMPT Sun, 08 Aug 2021 11:25:35 +0000 x86_64 GNU/Linux
Comment by Edgar Leon (emleon) - Sunday, 15 August 2021, 22:47 GMT
I do not understand how to test with [1] reverted.
Best Regards
Comment by loqs (loqs) - Sunday, 15 August 2021, 23:22 GMT
Step by step:

pacman -S asp base-devel # install required packages
asp checkout linux # fetch the PKGBUILD
cd linux/trunk
Edit PKGBUILD in your preferred text editor, on line 42 add:
git revert -n 9fc923d27852aebbd8af0ac988dc66bfb4aa7d5d

gpg --auto-key-locate nodefault,wkd --locate-keys heftig@archlinux.org # fetch and add the key used to sign 5.13.10-arch1-1 to your users keyring [1]
At this point I suggest enabling parallel compilation see [2] to reduce build time
makepkg -rsi # build and install the kernel with that commit reverted, build can take a long time.

See also https://wiki.archlinux.org/title/Arch_Build_System
[1] https://wiki.archlinux.org/title/GnuPG#Web_Key_Directory
[2] https://wiki.archlinux.org/title/Makepkg#Parallel_compilation

Comment by Edgar Leon (emleon) - Monday, 16 August 2021, 18:01 GMT
With this steps it works fine:

Linux nov-31f6 5.13.10-arch1-1 #1 SMP PREEMPT Mon, 16 Aug 2021 14:42:02 +0000 x86_64 GNU/Linux

[ 309.727561] usb 1-3: new full-speed USB device number 8 using xhci_hcd
[ 309.869856] usb 1-3: New USB device found, idVendor=1a86, idProduct=7523, bcdDevice= 2.64
[ 309.869873] usb 1-3: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[ 309.869880] usb 1-3: Product: USB Serial
[ 309.872040] ch341 1-3:1.0: ch341-uart converter detected
[ 309.873258] usb 1-3: ch341-uart converter now attached to ttyUSB0
Comment by loqs (loqs) - Monday, 16 August 2021, 23:57 GMT
Please try linux-mainline 5.14-rc6 [1] to see if the issue has already been fixed upstream. I doubt it has been but it needs to be checked.
Then either reply to [2], link includes instructions on how to reply.
Or open a bug report on [3] Component USB Product Driver referencing the commit 9fc923d27852aebbd8af0ac988dc66bfb4aa7d5d and subscribe Johan Hovold <johan@kernel.org> to the bug report.
See [4] for more information on what information to include.

[1] https://aur.archlinux.org/packages/linux-mainline/
[2] https://lore.kernel.org/linux-usb/20210724152739.18726-1-w%401wt.eu/
[3] https://bugzilla.kernel.org/buglist.cgi
[4] https://www.kernel.org/doc/html/latest/admin-guide/reporting-issues.html
Comment by Olli Asikainen (ooaa_) - Friday, 10 September 2021, 09:50 GMT
Try now with kernel 5.14.2, as it has the commit reverted that loqs wrote about.
Comment by exsign (exsign) - Saturday, 23 October 2021, 19:14 GMT
I just run into the same issue, appears to be unresolved with 5.14.14-arch1-1

Dmesg shows no error, but no communication possible.

See also https://github.com/espressif/esptool/issues/683 for all details and another user reporting of this issue.

Should be fixed in upstream since 5.14? https://bugzilla.kernel.org/show_bug.cgi?id=214131

EDIT: Issue solved! Appears to be an hardware issue with the NodeMCU ESP8266. Solution for all my 3 ESP8266 is https://github.com/espressif/esptool/issues/441#issuecomment-728335810
Thus, I can also report that kernel 5.14.14-arch1-1 is working fine with CH340

Loading...