I have a microcontroller system to be connected via USB, which sets up a /dev/ttyUSB0. I recently noticed that the Braille driver (brltty) tries to grab the device and fails, since it is not a braille device. This did not happen earlier (can’t tell when).
502.380633] usbcore: registered new interface driver usbserial_generic
502.380641] usbserial: USB Serial support registered for generic
502.382066] usbcore: registered new interface driver cp210x
502.382072] usbserial: USB Serial support registered for cp210x
502.382084] cp210x 1-11:1.0: cp210x converter detected
502.383648] usb 1-11: cp210x converter now attached to ttyUSB0
502.422511] usb 1-11: usbfs: interface 0 claimed by cp210x while 'brltty' sets config #1
502.422924] cp210x ttyUSB0: cp210x converter now disconnected from ttyUSB0
502.422935] cp210x 1-11:1.0: device disconnected
When I uninstall the brltty packages, it works, but they are reinstalled on every zypper dup. It seems more reasonable to disable the service, but I could not get systemctl to do that.
# systemctl stop brltty@-dev-bus-usb-001-004.service
Failed to stop brltty@-dev-bus-usb-001-004.service: Operation refused, unit brltty@-dev-bus-usb-001-004.service may be requested by dependency only (it is configured to refuse manual start/stop).
See system logs and 'systemctl status brltty@-dev-bus-usb-001-004.service' for details.
I know that I can prevent reinstallations by blocking, but I’d prefer not to keep records of stuff that I blocked over time. My understanding is that I should be able to turn off services that I don’t need.
Typically, I’d disable services with systemctl, but in this case I can’t find which is the component that originally requests it. The brltty is “static” in systemctl is-enabled.
Googling reveals that brltty has been interfering with ttyUSB for more than 10 years…
There is a file with the same name in /usr/lib/udev/rules.d/. This seems to launch the brltty. I wonder why this issue appeared again (seemed to be going back for 10 years); maybe the rules have a bug. I noticed a comment in /etc/brltty.conf that says that a braille display behind a serial-to-USB adapter will not work via the “usb:” path but the actual virtual interface (ttyUSB0) must be specified. Maybe some brltty dev felt really smart and lets it grab the first ttyUSBx that shows up.