[Bug 1910566] [NEW] Problem with the CH341 driver in Ubuntu 20.04

2021-01-08 Thread Launchpad Bug Tracker
You have been subscribed to a public bug:

I run into this problem trying to program an ESP8266 board, which uses
the CH341 chip in the programming interface as a USB-to-Serial
interface. The problem appeared after an upgrade from Ubuntu 19.10 to
20.04 (that I carried out one week ago).

This is the kernel I am using:

===
$ uname -r
5.4.0-58-generic
===

When I connect the ESP8266 board (a Wemos D1 mini) to the USB there is
no activity on the syslog (or dmesg), and the kernel module is not
loaded. In fact I do not see the /dev/ttyACM0 device in the /dev
directory and no useful device appears in the Arduino GUI.

I have found the module in the kernel tree but, even forcing the
installation, nothing happens:

===
augusto@Legion:~$ ls
/usr/lib/modules/5.4.0-58-generic/kernel/drivers/usb/serial/ch*
/usr/lib/modules/5.4.0-58-generic/kernel/drivers/usb/serial/ch341.ko
augusto@Legion:~$ sudo modprobe ch341
[sudo] password di augusto:
augusto@Legion:~$ lsusb
Bus 002 Device 002: ID 05e3:0626 Genesys Logic, Inc. USB3.1 Hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 13d3:56a6 IMC Networks Integrated Camera
Bus 001 Device 005: ID 0cf3:e500 Qualcomm Atheros Communications
Bus 001 Device 006: ID 046d:c517 Logitech, Inc. LX710 Cordless Desktop Laser
Bus 001 Device 004: ID 093a:2510 Pixart Imaging, Inc. Optical Mouse
Bus 001 Device 002: ID 05e3:0610 Genesys Logic, Inc. 4-port hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
augusto@Legion:~$ lsmod | grep ch34
ch341  20480  0
usbserial  53248  1 ch341
===

Without this module it is impossible to work with a relevant number of
SBC devices, besides the named Wemos D1 Mini.

Trying to solve the problem I also downloaded and installed the module
source from https://github.com/juliagoda/CH341SER and compiled on my
PC, after removing the "secure boot" feature.

I recovered the module installation trace from the syslog files in the
previous installation Ubuntu 19.10. The kernel version was probably
5.3.0-64-generic. As said above, at that time the module was operating
properly: you notice that the module is loaded and later used to update
a sketch:

==
Dec 30 12:22:43 Legion kernel: [2354065.515635] usb 1-3: new
full-speed USB device number 30 using xhci_hcd
Dec 30 12:22:43 Legion kernel: [2354065.664692] usb 1-3: New USB
device found, idVendor=1a86, idProduct=7523, bcdDevice= 2.64
Dec 30 12:22:43 Legion kernel: [2354065.664697] usb 1-3: New USB
device strings: Mfr=0, Product=2, SerialNumber=0
Dec 30 12:22:43 Legion kernel: [2354065.664701] usb 1-3: Product: USB Serial
Dec 30 12:22:43 Legion kernel: [2354065.666768] ch341 1-3:1.0:
ch341-uart converter detected
Dec 30 12:22:43 Legion kernel: [2354065.667695] usb 1-3: ch341-uart
converter now attached to ttyUSB1
Dec 30 12:22:43 Legion mtp-probe: checking bus 1, device 30:
"/sys/devices/pci:00/:00:14.0/usb1/1-3"
Dec 30 12:22:43 Legion mtp-probe: bus: 1, device: 30 was not an MTP device
Dec 30 12:22:43 Legion snapd[15280]: hotplug.go:199: hotplug device
add event ignored, enable experimental.hotplug
Dec 30 12:22:43 Legion mtp-probe: checking bus 1, device 30:
"/sys/devices/pci:00/:00:14.0/usb1/1-3"
Dec 30 12:22:43 Legion mtp-probe: bus: 1, device: 30 was not an MTP device
Dec 30 12:22:45 Legion ModemManager[1198]:   Couldn't check
support for device '/sys/devices/pci:00/:00:14.0/usb1/1-3':
not supported by any plugin
Dec 30 12:22:46 Legion systemd[6301]: tracker-extract.service: Succeeded.
Dec 30 12:22:46 Legion dbus-daemon[1183]: [system] Activating via
systemd: service name='net.reactivated.Fprint' unit='fprintd.service'
requested by ':1.52054' (uid=1000 pid=18287 comm="/usr/bin/gnome-shell
" label="unconfined")
Dec 30 12:22:46 Legion systemd[1]: Starting Fingerprint Authentication Daemon...
Dec 30 12:22:46 Legion dbus-daemon[1183]: [system] Successfully
activated service 'net.reactivated.Fprint'
Dec 30 12:22:46 Legion systemd[1]: Started Fingerprint Authentication Daemon.
Dec 30 12:22:50 Legion NetworkManager[1193]:   [1609327370.5477]
agent-manager: req[0x5574cc0e7540,
:1.52054/org.gnome.Shell.NetworkAgent/1000]: agent registered
Dec 30 12:22:50 Legion gnome-shell[18287]: [AppIndicatorSupport-DEBUG]
Registering StatusNotifierItem
:1.87/org/ayatana/NotificationItem/software_update_available
Dec 30 12:22:50 Legion gnome-shell[18287]: [AppIndicatorSupport-DEBUG]
Registering StatusNotifierItem
:1.82/org/ayatana/NotificationItem/dropbox_client_18678
Dec 30 12:22:50 Legion gnome-shell[18287]: [AppIndicatorSupport-DEBUG]
Registering StatusNotifierItem
:1.110/org/ayatana/NotificationItem/whatsdesk1
Dec 30 12:22:50 Legion gnome-shell[18287]: [AppIndicatorSupport-FATAL]
unable to update overlay icon
Dec 30 12:22:50 Legion gnome-shell[18287]: message repeated 5 times: [
[AppIndicatorSupport-FATAL] unable to update overlay icon]
Dec 30 12:22:50 Legion gnome-shell[18287]: Couldn’t parse
user-home.desktop as a desktop file, 

[Bug 1910566] [NEW] Problem with the CH341 driver in Ubuntu 20.04

2021-01-07 Thread AugustoCiuffoletti
Public bug reported:

I run into this problem trying to program an ESP8266 board, which uses
the CH341 chip in the programming interface as a USB-to-Serial
interface. The problem appeared after an upgrade from Ubuntu 19.10 to
20.04 (that I carried out one week ago).

This is the kernel I am using:

===
$ uname -r
5.4.0-58-generic
===

When I connect the ESP8266 board (a Wemos D1 mini) to the USB there is
no activity on the syslog (or dmesg), and the kernel module is not
loaded. In fact I do not see the /dev/ttyACM0 device in the /dev
directory and no useful device appears in the Arduino GUI.

I have found the module in the kernel tree but, even forcing the
installation, nothing happens:

===
augusto@Legion:~$ ls
/usr/lib/modules/5.4.0-58-generic/kernel/drivers/usb/serial/ch*
/usr/lib/modules/5.4.0-58-generic/kernel/drivers/usb/serial/ch341.ko
augusto@Legion:~$ sudo modprobe ch341
[sudo] password di augusto:
augusto@Legion:~$ lsusb
Bus 002 Device 002: ID 05e3:0626 Genesys Logic, Inc. USB3.1 Hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 13d3:56a6 IMC Networks Integrated Camera
Bus 001 Device 005: ID 0cf3:e500 Qualcomm Atheros Communications
Bus 001 Device 006: ID 046d:c517 Logitech, Inc. LX710 Cordless Desktop Laser
Bus 001 Device 004: ID 093a:2510 Pixart Imaging, Inc. Optical Mouse
Bus 001 Device 002: ID 05e3:0610 Genesys Logic, Inc. 4-port hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
augusto@Legion:~$ lsmod | grep ch34
ch341  20480  0
usbserial  53248  1 ch341
===

Without this module it is impossible to work with a relevant number of
SBC devices, besides the named Wemos D1 Mini.

Trying to solve the problem I also downloaded and installed the module
source from https://github.com/juliagoda/CH341SER and compiled on my
PC, after removing the "secure boot" feature.

I recovered the module installation trace from the syslog files in the
previous installation Ubuntu 19.10. The kernel version was probably
5.3.0-64-generic. As said above, at that time the module was operating
properly: you notice that the module is loaded and later used to update
a sketch:

==
Dec 30 12:22:43 Legion kernel: [2354065.515635] usb 1-3: new
full-speed USB device number 30 using xhci_hcd
Dec 30 12:22:43 Legion kernel: [2354065.664692] usb 1-3: New USB
device found, idVendor=1a86, idProduct=7523, bcdDevice= 2.64
Dec 30 12:22:43 Legion kernel: [2354065.664697] usb 1-3: New USB
device strings: Mfr=0, Product=2, SerialNumber=0
Dec 30 12:22:43 Legion kernel: [2354065.664701] usb 1-3: Product: USB Serial
Dec 30 12:22:43 Legion kernel: [2354065.666768] ch341 1-3:1.0:
ch341-uart converter detected
Dec 30 12:22:43 Legion kernel: [2354065.667695] usb 1-3: ch341-uart
converter now attached to ttyUSB1
Dec 30 12:22:43 Legion mtp-probe: checking bus 1, device 30:
"/sys/devices/pci:00/:00:14.0/usb1/1-3"
Dec 30 12:22:43 Legion mtp-probe: bus: 1, device: 30 was not an MTP device
Dec 30 12:22:43 Legion snapd[15280]: hotplug.go:199: hotplug device
add event ignored, enable experimental.hotplug
Dec 30 12:22:43 Legion mtp-probe: checking bus 1, device 30:
"/sys/devices/pci:00/:00:14.0/usb1/1-3"
Dec 30 12:22:43 Legion mtp-probe: bus: 1, device: 30 was not an MTP device
Dec 30 12:22:45 Legion ModemManager[1198]:   Couldn't check
support for device '/sys/devices/pci:00/:00:14.0/usb1/1-3':
not supported by any plugin
Dec 30 12:22:46 Legion systemd[6301]: tracker-extract.service: Succeeded.
Dec 30 12:22:46 Legion dbus-daemon[1183]: [system] Activating via
systemd: service name='net.reactivated.Fprint' unit='fprintd.service'
requested by ':1.52054' (uid=1000 pid=18287 comm="/usr/bin/gnome-shell
" label="unconfined")
Dec 30 12:22:46 Legion systemd[1]: Starting Fingerprint Authentication Daemon...
Dec 30 12:22:46 Legion dbus-daemon[1183]: [system] Successfully
activated service 'net.reactivated.Fprint'
Dec 30 12:22:46 Legion systemd[1]: Started Fingerprint Authentication Daemon.
Dec 30 12:22:50 Legion NetworkManager[1193]:   [1609327370.5477]
agent-manager: req[0x5574cc0e7540,
:1.52054/org.gnome.Shell.NetworkAgent/1000]: agent registered
Dec 30 12:22:50 Legion gnome-shell[18287]: [AppIndicatorSupport-DEBUG]
Registering StatusNotifierItem
:1.87/org/ayatana/NotificationItem/software_update_available
Dec 30 12:22:50 Legion gnome-shell[18287]: [AppIndicatorSupport-DEBUG]
Registering StatusNotifierItem
:1.82/org/ayatana/NotificationItem/dropbox_client_18678
Dec 30 12:22:50 Legion gnome-shell[18287]: [AppIndicatorSupport-DEBUG]
Registering StatusNotifierItem
:1.110/org/ayatana/NotificationItem/whatsdesk1
Dec 30 12:22:50 Legion gnome-shell[18287]: [AppIndicatorSupport-FATAL]
unable to update overlay icon
Dec 30 12:22:50 Legion gnome-shell[18287]: message repeated 5 times: [
[AppIndicatorSupport-FATAL] unable to update overlay icon]
Dec 30 12:22:50 Legion gnome-shell[18287]: Couldn’t parse
user-home.desktop as a desktop file, will treat it as a