Skip to content

libserialport incompatibility with glibc version 2.42 #33

@dekay

Description

@dekay

(jsm174 is aware of this issue but I'll still put in lots of detail for others that might be hit by this)

The libserialport library breaks on Linux systems running glibc version 2.42 for some devices. For VPX, it affects devices like the Wemos D1 Mini with an onboard USB to Serial converter when run at odd baud rates like the 2MHz value used on it by default. Teensy controllers are not effected as their micro handles USB natively. The bug affects Arch users currently and I think Fedora 43 as well, and it will affect more as other distros update their glibc.

Error messages like these will show in the logs. The killer is that it says the baud rate is initialized but in reality it silently fails.

[INFO]  Initializing ComPort /dev/ttyUSB0 with these settings :
        BaudRate 2000000, Parity 0, DataBits 8, StopBits 1, R/W Timeouts 300ms
        Handshake Timings : Open 300ms, Loop Start/End 100/100ms, DTR enable true
[ERROR] Could not put the controller on com-port '/dev/ttyUSB0' into the commandmode. Will not send data to the controller.

You can verify this by checking the baud rate after vpx runs and seeing that it is still stuck at the default rate of 9600 instead of 2 MHz

[dk@ryzen libdof]$ stty -F /dev/ttyUSB0
speed 9600 baud; line = 0;
-brkint -imaxbel

A pull request to fix this has been rotting in Github since September 2025. Unfortunately, the last commit to this repo was in September of 2024 so libserial appears to be currently unmaintained.

Workaround

  • Before running vpinball, set the baud rate manually with stty -F /dev/ttyUSB0 2000000 (or whatever your device shows up as)

Potential fixes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions