Occationally my serial console messes up severely like this:


Typing doesn't work there are all anymore. Though the machine still functions fine. So if I reboot it (as shown in the screenshot. PC Engines apu2 is where the reboot has begun) it is all fine again.

It only ever seems to happen after I reconnect the serial cable. Though I can't say for sure.

Any idea what could be causing this and how I can fix it or even better prevent it alltogether?

This is a Debian 10 machine with a customized 5.4 kernel.


This is probably a baud rate error.

You don't say whether this happens while you're logged in, or if the console is waiting in the login prompt. By default agetty is started with option 115200,38400,9600 (see /lib/systemd/system/serial-getty@.service). When agetty receives a break on the serial line, it will switch to the next baudrate circularly.

When you connect a cable, it's very likely that you can inadvertently send such a break, causing agetty to switch to the next baudrate which is not what your terminal is expecting. In that case, just send another break. You seem to be using putty, so that would either be ctrl-Break, or from the putty menu: special command -> Break. Hit enter after that; if you don't get a login prompt repeat the break.

  • That seems to be the case. Would it be possible to change it just 115200? And I also found that same setting in /usr/lib/systemd/system/console-getty.service and ` /usr/lib/systemd/system/container-getty@.service`. Should I change those values there too? – BrainStone Jan 16 at 15:07
  • 2
    Don't edit any files in [/usr]/lib/systemd; your changes will be overwritten the next time systemd or the service in question receives an update. Instead, either use systemctl edit console-getty.service to edit the service definition (this will create an appropriate override file in /etc/systemd/system/..., or copy the .service file you wish to modify into /etc/systemd/system and modify the copy in there: any file in /etc/systemd/ directory tree will override the identically-named file in [/usr]/lib/systemd/ tree. – telcoM Jan 16 at 17:20
  • Note that after copying to /etc and modifying the unit file there, you need to run systemctl daemon-reload so that the modified file is picked up by systemd. And probably a reload or restart of the service. – wurtel Jan 17 at 8:16
  • @telcoM you are right. Sometimes I forget the most basic things. – BrainStone Jan 17 at 8:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.