Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

brltty silently blocks CH340 USB driver under Linux Mint 20/21 #1788

Closed
3 tasks done
s0170071 opened this issue Dec 26, 2022 · 5 comments
Closed
3 tasks done

brltty silently blocks CH340 USB driver under Linux Mint 20/21 #1788

s0170071 opened this issue Dec 26, 2022 · 5 comments
Assignees
Labels
conclusion: invalid Issue/PR not valid topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@s0170071
Copy link

s0170071 commented Dec 26, 2022

Describe the problem

There is a misleading flaw with the CH340 driver under Linux. It causes the USB based boards such as Wemos D1 mini to not show up in the ports list.

There is a lot of tips around, such as :

  1. Since Linux Mint version 20.3 the CH340 driver is not included in the kernel (version >5.3). Using a n older kernel version fixes this.
  2. Normally, the driver just needs to be downloaded, compiled and added to the system:
  3. If the system is in UEFI mode, the driver needs to be signed.

I faintly remember that I could do 1. and 2. for non UEFI versions of Linux Mint, but I did not try 3. as it is too much of a hassle for me. However, I just discovered a fourth solution.

According to this source the driver is included in the kernel after all, but apparently gets blocked by a braille display driver.

Workaround (confirmed): uninstall brltty with sudo apt-get remove brltty and you're good to go.

To reproduce

Use a out-of-the-box Linux mint and try to get a CH340 based board programmed.

Expected behavior

I would expect the IDE to to check for this brltty flaw as this has been around for quite some time noẃ and is tricky to find.

Arduino IDE version

2.0.3

Operating system

Linux

Operating system version

Linux Mint 21

Additional context

No response

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest nightly build
  • My report contains all necessary details
@s0170071 s0170071 added the type: imperfection Perceived defect in any part of project label Dec 26, 2022
@s0170071 s0170071 changed the title CH340 driver very difficult to install under UEFI Linux brltty silently blocks CH340 USB driver under Linux Mint 20/21 Dec 26, 2022
@per1234
Copy link
Contributor

per1234 commented Dec 27, 2022

Hi @s0170071. Thanks for your suggestion. There is nothing that can be done in the Arduino IDE codebase to fix or mitigate this problem.

The place for the fix is at the source of the problem: the BRLTTY project. Please report this irresponsible treatment of serial ports by BRLTTY to the maintainers of that project:

https://brltty.app/contact.html


The place where I do think Arduino can mitigate this common (the scope is actually larger than the specific combination of Linux Mint + CH340 you mention here) source of problems for users is via documentation. I think it would be a good idea to document this cause of the problem and the fix in an Arduino Help Center article. I see there is a somewhat related article:

but nothing about BRLTTY specifically. For this reason, I have transferred the issue to the repository where the Help Center content is maintained:

arduino/help-center-content#155

@per1234 per1234 self-assigned this Dec 27, 2022
@per1234 per1234 added conclusion: invalid Issue/PR not valid topic: code Related to content of the project itself labels Dec 27, 2022
@per1234 per1234 closed this as not planned Won't fix, can't repro, duplicate, stale Dec 27, 2022
@DaveMielke
Copy link

For purposes of introduction, I'm the dude who has the final word concerning the brltty project. I've received several emails drawing my attention to the fact that brltty is stealing generic USB to serial adapters, like the CH340, from those who'd like to use them for other purposes. Yes, that buck does stop at me. I've just been asked to comment on this issue here, supposedly because that'd be a way to contact most of you at once.

Some braille device manufacturers, especially recently, have opted to use generic internal USB to serial adapters without customizing them (vendor/product identifiers, manufacturer/product strings, etc). Nevertheless, brltty still needs to be able to recognize even these devices because, without an operational braille device, a braille user (who is most probably blind) effectively has no screen. It'd be just like any of you sighted users booting your computer and then finding yourself without a screen while you try to figure out why it isn't working and how to get it working.

I'm guessing that those of you who are finding this issue to still be a problem have a release of brltty earlier than 6.5 installed on your computer. In 6.5, we implemented what we hoped would be a reasonable resolution to it. We split out the rules for claiming generic USB to serial adapters out into a separate udev rules file which needs to be installed separately from the main package.

You can tell which version of brltty you have by using its -V (or --version) command line option. If it's earlier than 6.5 then I suggest upgrading it. If it's 6.5 or later then I'm guessing that that optional udev rules package is installed and should be removed.

@s0170071
Copy link
Author

@DaveMielke thanks for stopping by here.
My syslog reads BRLTTY 6.4 rev BRLTTY-6.4 . It does not provide the third digit of its version number. But I assume it is 6.4.4 because this is what I get when I re-install it.
During installation, the console says:
http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 brltty amd64 6.4-4ubuntu3 [1365 kB]
I could test 6.5 to see if the issue is gone, but I have no idea how I would get that latest version. Apparently the ubuntu repositories (and linux mint for that matter) still provide v6.4.4 as latest version.

@DaveMielke
Copy link

DaveMielke commented Dec 27, 2022 via email

@Cuvy95
Copy link

Cuvy95 commented Dec 3, 2023

You have saved my Day. It works very well ☺️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: invalid Issue/PR not valid topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

No branches or pull requests

4 participants