Login from serial USB console /dev/ttyACM0 has gone away

Hi folks,

My serial console doesn’t work anymore, when I plug USB cable from PC to Librem.
I have /dev/ttyACM0 file as it appeared before.
dmesg and lsusb shows Purism device without errors.
But login request had gone away.
I enter chars and receive them echoed back.
I do not receive any other chars from the device.

I’d masked a few of systemd services 2-3 months ago and did no more experiments.
What happens? How to get login page back?

1 Like

Anybody please?

1 Like

@dos may be able to help you.

Start with lsusb -v -s x:y on the host computer to see what types of interfaces are being exposed by the Librem 5 (where x:y is the bus and device number). However, from the sounds of it, that part is working.

Which services?

Just guessing but …

When you do on the Librem 5 sudo ps ax | grep agetty do you see anything? If no, looks like they are started with the services serial-getty@tty*.service but such is the joy of systemd to work out (assuming that the services exist) what will cause them to start and why they are not starting. :wink: But maybe if you masked them, that would explain it.

1 Like

Masked console-getty.service, serial-getty@.service,
There are no working agetty services now as `ps aux’ shows.
Console doesn’t work still =(

1 Like

Does /dev/console exist on the Librem 5?

I note that on my Librem 5, the console-getty service is disabled (but /dev/console does exist).

1 Like


stat /dev/console shows:
crw–w----, uid (0 root), (gid 5 tty)
atime, mtime, ctime are today.

1 Like

And systemctl status console-getty

This may be a communication problem but “mask” in this context means that the service will not start and can’t be started. “unmask” reverses the effect of that.

1 Like

I’ve unmasked console-getty.

$ ps auxw | grep getty

now shows
/sbin/agetty -o -p – \u --keep-baud 115200,57600,38500,9600 ttymxc0 vt220

Still doesn’t work.

Early I’d also masked rc.service, rcS.service, but can’t unmask them back… No symbolic links to /dev/null in /etc/systemd/system/… But systemctl list-unit-files shows that I masked them. Do I really need these services?

1 Like

Also sudo.service, x11-common.service have been masked early, didn’t touch them later

1 Like
$ systemctl show console-getty
● console-getty.service - Console Getty
     Loaded: loaded (/lib/systemd/system/console-getty.service; disabled; vendor preset: disabled)
     Active: inactive (dead)
       Docs: man:agetty(8)
1 Like
$ systemctl list-unit-files
UNIT FILE                                                              STATE           VENDOR PRESET
proc-sys-fs-binfmt_misc.automount                                      static          -
-.mount                                                                generated       -
boot.mount                                                             generated       -
dev-hugepages.mount                                                    static          -
dev-mqueue.mount                                                       static          -
home-neva_blyad-\xd0\x9e\xd0\xb1\xd0\xbb\xd0\xb0\xd0\xba\xd0\xbe.mount generated       -
proc-sys-fs-binfmt_misc.mount                                          disabled        disabled
sys-fs-fuse-connections.mount                                          static          -
sys-kernel-config.mount                                                static          -
sys-kernel-debug.mount                                                 static          -
sys-kernel-tracing.mount                                               static          -
var-lib-flatpak.mount                                                  generated       -
systemd-ask-password-console.path                                      static          -
systemd-ask-password-plymouth.path                                     static          -
systemd-ask-password-wall.path                                         static          -
session-2.scope                                                        transient       -
session-c1.scope                                                       transient       -
accounts-daemon.service                                                enabled         enabled
alsa-restore.service                                                   static          -
alsa-state.service                                                     static          -
alsa-utils.service                                                     masked          enabled
apparmor.service                                                       enabled         enabled
apt-daily-upgrade.service                                              static          -
apt-daily.service                                                      static          -
autovt@.service                                                        alias           -
avahi-daemon.service                                                   enabled         enabled
blk-availability.service                                               enabled         enabled
blueman-mechanism.service                                              enabled         enabled
bluetooth-brcmfmac.service                                             enabled         enabled
bluetooth.service                                                      enabled         enabled
bolt.service                                                           static          -
colord.service                                                         static          -
configure-printer@.service                                             static          -
console-getty.service                                                  disabled        disabled
console-setup.service                                                  enabled         enabled
container-getty@.service                                               static          -
cron.service                                                           enabled         enabled
cryptdisks-early.service                                               masked          enabled
cryptdisks.service                                                     masked          enabled
dbus-fi.w1.wpa_supplicant1.service                                     alias           -
dbus-org.bluez.service                                                 alias           -
dbus-org.freedesktop.Avahi.service                                     alias           -
dbus-org.freedesktop.hostname1.service                                 alias           -
dbus-org.freedesktop.locale1.service                                   alias           -
dbus-org.freedesktop.login1.service                                    alias           -
dbus-org.freedesktop.ModemManager1.service                             alias           -
dbus-org.freedesktop.network1.service                                  alias           -
dbus-org.freedesktop.nm-dispatcher.service                             alias           -
dbus-org.freedesktop.resolve1.service                                  alias           -
dbus-org.freedesktop.timedate1.service                                 alias           -
dbus-org.freedesktop.timesync1.service                                 alias           -
dbus-org.usbguard.service                                              alias           -
dbus.service                                                           static          -
debug-shell.service                                                    enabled         disabled
display-manager.service                                                alias           -
dm-event.service                                                       static          -
e2scrub@.service                                                       static          -
e2scrub_all.service                                                    static          -
e2scrub_fail@.service                                                  static          -
e2scrub_reap.service                                                   enabled         enabled
emergency.service                                                      static          -
flatpak-system-helper.service                                          static          -
fstrim.service                                                         static          -
gdm.service                                                            static          -
gdm3.service                                                           alias           -
geoclue.service                                                        static          -
getty-static.service                                                   static          -
getty@.service                                                         enabled         enabled
gnss-share.service                                                     enabled         enabled
grub-common.service                                                    generated       -
hwclock.service                                                        masked          enabled
ifup@.service                                                          static          -
ifupdown-pre.service                                                   static          -
ifupdown-wait-online.service                                           disabled        enabled
iio-sensor-proxy.service                                               static          -
initrd-cleanup.service                                                 static          -
initrd-parse-etc.service                                               static          -
initrd-switch-root.service                                             static          -
initrd-udevadm-cleanup-db.service                                      static          -
ipp-usb.service                                                        static          -
jitterentropy-rngd.service                                             alias           -
jitterentropy.service                                                  enabled         enabled
keyboard-setup.service                                                 enabled         enabled
kmod-static-nodes.service                                              static          -
kmod.service                                                           alias           -
librem5-lockdown-support.service                                       enabled         enabled
logrotate.service                                                      static          -
lvm2-lvmpolld.service                                                  static          -
lvm2-monitor.service                                                   enabled         enabled
lvm2-pvscan@.service                                                   static          -
lvm2.service                                                           masked          enabled
lxc-net.service                                                        enabled         enabled
lxc.service                                                            enabled         enabled
lxc@.service                                                           disabled        enabled
lxcfs.service                                                          enabled         enabled
man-db.service                                                         static          -
ModemManager.service                                                   enabled         enabled
modprobe@.service                                                      static          -
networking.service                                                     enabled         enabled
NetworkManager-dispatcher.service                                      enabled         enabled
NetworkManager-wait-online.service                                     enabled         enabled
NetworkManager.service                                                 enabled         enabled
packagekit-offline-update.service                                      static          -
packagekit.service                                                     static          -
pcscd.service                                                          indirect        enabled
phosh.service                                                          enabled         enabled
plymouth-halt.service                                                  static          -
plymouth-kexec.service                                                 static          -
plymouth-log.service                                                   alias           -
plymouth-poweroff.service                                              static          -
plymouth-quit-wait.service                                             static          -
plymouth-quit.service                                                  static          -
plymouth-read-write.service                                            static          -
plymouth-reboot.service                                                static          -
plymouth-start.service                                                 static          -
plymouth-switch-root.service                                           static          -
plymouth.service                                                       alias           -
polkit.service                                                         static          -
procps.service                                                         alias           -
pulseaudio-enable-autospawn.service                                    masked          enabled
quotaon.service                                                        static          -
rc-local.service                                                       enabled-runtime enabled
rc.service                                                             masked          enabled
rcS.service                                                            masked          enabled
realmd.service                                                         static          -
rescue.service                                                         static          -
resize_rootfs.service                                                  enabled         enabled
rsync.service                                                          enabled         enabled
rsyslog.service                                                        generated       -
rtkit-daemon.service                                                   disabled        enabled
saned.service                                                          masked          enabled
saned@.service                                                         indirect        enabled
serial-getty@.service                                                  indirect        enabled
shadowsocks-libev-local@.service                                       disabled        enabled
shadowsocks-libev-redir@.service                                       disabled        enabled
shadowsocks-libev-server@.service                                      disabled        enabled
shadowsocks-libev-tunnel@.service                                      disabled        enabled
shadowsocks-libev.service                                              disabled        enabled
sudo.service                                                           masked          enabled
switcheroo-control.service                                             enabled         enabled
syslog.service                                                         alias           -
system-update-cleanup.service                                          static          -
systemd-ask-password-console.service                                   static          -
systemd-ask-password-plymouth.service                                  static          -
systemd-ask-password-wall.service                                      static          -
systemd-backlight@.service                                             static          -
systemd-binfmt.service                                                 static          -
systemd-bless-boot.service                                             static          -
systemd-boot-check-no-failures.service                                 disabled        disabled
systemd-boot-system-token.service                                      static          -
systemd-cryptsetup@crypt_root.service                                  generated       -
systemd-cryptsetup@crypt_sd.service                                    generated       -
systemd-exit.service                                                   static          -
systemd-fsck-root.service                                              enabled-runtime enabled
systemd-fsck@.service                                                  static          -
systemd-fsckd.service                                                  static          -
systemd-halt.service                                                   static          -
systemd-hibernate-resume@.service                                      static          -
systemd-hibernate.service                                              static          -
systemd-hostnamed.service                                              static          -
systemd-hwdb-update.service                                            static          -
systemd-hybrid-sleep.service                                           static          -
systemd-initctl.service                                                static          -
systemd-journal-flush.service                                          static          -
systemd-journald.service                                               static          -
systemd-journald@.service                                              static          -
systemd-kexec.service                                                  static          -
systemd-localed.service                                                static          -
systemd-logind.service                                                 static          -
systemd-machine-id-commit.service                                      static          -
systemd-modules-load.service                                           static          -
systemd-network-generator.service                                      disabled        disabled
systemd-networkd-wait-online.service                                   enabled         disabled
systemd-networkd.service                                               enabled         enabled
systemd-poweroff.service                                               static          -
systemd-pstore.service                                                 enabled         enabled
systemd-quotacheck.service                                             static          -
systemd-random-seed.service                                            static          -
systemd-reboot.service                                                 static          -
systemd-remount-fs.service                                             enabled-runtime enabled
systemd-resolved.service                                               enabled         enabled
systemd-rfkill.service                                                 static          -
systemd-suspend-then-hibernate.service                                 static          -
systemd-suspend.service                                                static          -
systemd-sysctl.service                                                 static          -
systemd-sysusers.service                                               static          -
systemd-time-wait-sync.service                                         disabled        disabled
systemd-timedated.service                                              static          -
systemd-timesyncd.service                                              enabled         enabled
systemd-tmpfiles-clean.service                                         static          -
systemd-tmpfiles-setup-dev.service                                     static          -
systemd-tmpfiles-setup.service                                         static          -
systemd-udev-settle.service                                            static          -
systemd-udev-trigger.service                                           static          -
systemd-udevd.service                                                  static          -
systemd-update-utmp-runlevel.service                                   static          -
systemd-update-utmp.service                                            static          -
systemd-user-sessions.service                                          static          -
systemd-volatile-root.service                                          static          -
systemd-zram-setup@.service                                            static          -
udev.service                                                           alias           -
udisks2.service                                                        enabled         enabled
upower.service                                                         disabled        enabled
usb_gadget.service                                                     enabled         enabled
usb_modeswitch@.service                                                static          -
usbguard-dbus.service                                                  enabled         enabled
usbguard.service                                                       enabled         enabled
usbmuxd.service                                                        static          -
user-runtime-dir@.service                                              static          -
user@.service                                                          static          -
uuidd.service                                                          indirect        enabled
wacom-inputattach@.service                                             static          -
waydroid-container.service                                             enabled         enabled
wg-quick@.service                                                      disabled        enabled
wpa_supplicant-nl80211@.service                                        disabled        enabled
wpa_supplicant-wired@.service                                          disabled        enabled
wpa_supplicant.service                                                 enabled         enabled
wpa_supplicant@.service                                                disabled        enabled
x11-common.service                                                     masked          enabled
machine.slice                                                          static          -
system-systemd\x2dcryptsetup.slice                                     static          -
user.slice                                                             static          -
avahi-daemon.socket                                                    enabled         enabled
dbus.socket                                                            static          -
dm-event.socket                                                        enabled         enabled
lvm2-lvmpolld.socket                                                   enabled         enabled
pcscd.socket                                                           enabled         enabled
saned.socket                                                           disabled        enabled
syslog.socket                                                          static          -
systemd-fsckd.socket                                                   static          -
systemd-initctl.socket                                                 static          -
systemd-journald-audit.socket                                          static          -
systemd-journald-dev-log.socket                                        static          -
systemd-journald-varlink@.socket                                       static          -
systemd-journald.socket                                                static          -
systemd-journald@.socket                                               static          -
systemd-networkd.socket                                                enabled         enabled
systemd-rfkill.socket                                                  static          -
systemd-udevd-control.socket                                           static          -
systemd-udevd-kernel.socket                                            static          -
uuidd.socket                                                           enabled         enabled
dev-zram0.swap                                                         generated       -
basic.target                                                           static          -
blockdev@.target                                                       static          -
bluetooth.target                                                       static          -
boot-complete.target                                                   static          -
cryptsetup-pre.target                                                  static          -
cryptsetup.target                                                      static          -
ctrl-alt-del.target                                                    alias           -
default.target                                                         alias           -
emergency.target                                                       static          -
exit.target                                                            disabled        disabled
final.target                                                           static          -
first-boot-complete.target                                             static          -
getty-pre.target                                                       static          -
getty.target                                                           static          -
graphical.target                                                       static          -
halt.target                                                            disabled        disabled
hibernate.target                                                       static          -
hybrid-sleep.target                                                    static          -
initrd-fs.target                                                       static          -
initrd-root-device.target                                              static          -
initrd-root-fs.target                                                  static          -
initrd-switch-root.target                                              static          -
initrd.target                                                          static          -
kexec.target                                                           disabled        disabled
local-fs-pre.target                                                    static          -
local-fs.target                                                        static          -
multi-user.target                                                      static          -
network-online.target                                                  static          -
network-pre.target                                                     static          -
network.target                                                         static          -
nss-lookup.target                                                      static          -
nss-user-lookup.target                                                 static          -
paths.target                                                           static          -
poweroff.target                                                        disabled        disabled
printer.target                                                         static          -
reboot.target                                                          disabled        enabled
remote-cryptsetup.target                                               disabled        enabled
remote-fs-pre.target                                                   static          -
remote-fs.target                                                       enabled         enabled
rescue.target                                                          static          -
rpcbind.target                                                         static          -
runlevel0.target                                                       alias           -
runlevel1.target                                                       alias           -
runlevel2.target                                                       alias           -
runlevel3.target                                                       alias           -
runlevel4.target                                                       alias           -
runlevel5.target                                                       alias           -
runlevel6.target                                                       alias           -
shutdown.target                                                        static          -
sigpwr.target                                                          static          -
sleep.target                                                           static          -
slices.target                                                          static          -
smartcard.target                                                       static          -
sockets.target                                                         static          -
sound.target                                                           static          -
suspend-then-hibernate.target                                          static          -
suspend.target                                                         static          -
swap.target                                                            static          -
sysinit.target                                                         static          -
system-update-pre.target                                               static          -
system-update.target                                                   static          -
time-set.target                                                        static          -
time-sync.target                                                       static          -
timers.target                                                          static          -
umount.target                                                          static          -
usb-gadget.target                                                      static          -
wg-quick.target                                                        static          -
apt-daily-upgrade.timer                                                enabled         enabled
apt-daily.timer                                                        enabled         enabled
e2scrub_all.timer                                                      enabled         enabled
fstrim.timer                                                           enabled         enabled
logrotate.timer                                                        enabled         enabled
man-db.timer                                                           enabled         enabled
systemd-tmpfiles-clean.timer                                           static          -

316 unit files listed.
1 Like
$ journalctl -u console-getty
-- Journal begins at Sun 2024-02-25 16:34:05 EAT, ends at Sun 2024-03-17 17:52:28 EAT. --
Wed 2024-03-06 02:40:03 EAT mobile systemd[1]: Started Console Getty.
Wed 2024-03-06 02:40:03 EAT mobile systemd[1]: console-getty.service: Succeeded.
Wed 2024-03-06 02:40:03 EAT mobile systemd[1]: console-getty.service: Scheduled restart job, restart counter is at 1.
Wed 2024-03-06 02:40:03 EAT mobile systemd[1]: Stopped Console Getty.
Wed 2024-03-06 02:40:03 EAT mobile systemd[1]: Started Console Getty.
Wed 2024-03-06 02:46:39 EAT mobile systemd[1]: Stopping Console Getty...
Wed 2024-03-06 02:46:40 EAT mobile systemd[1]: console-getty.service: Succeeded.
Wed 2024-03-06 02:46:40 EAT mobile systemd[1]: Stopped Console Getty.
e[0;1;39m-- Boot 8ad6d8d9ba4e41a6ab5d1ea48dae2863 --e[0m
Wed 2024-03-06 03:01:41 EAT mobile systemd[1]: Started Console Getty.
Wed 2024-03-06 03:36:10 EAT mobile systemd[1]: Stopping Console Getty...
Wed 2024-03-06 03:36:10 EAT mobile systemd[1]: console-getty.service: Succeeded.
Wed 2024-03-06 03:36:10 EAT mobile systemd[1]: Stopped Console Getty.
e[0;1;39m-- Boot bea86d211c5c4356ab13e2ad6640b1de --e[0m
Wed 2024-03-06 03:54:12 EAT mobile systemd[1]: Started Console Getty.
Wed 2024-03-06 06:20:43 EAT mobile systemd[1]: Stopping Console Getty...
Wed 2024-03-06 06:20:43 EAT mobile systemd[1]: console-getty.service: Succeeded.
Wed 2024-03-06 06:20:43 EAT mobile systemd[1]: Stopped Console Getty.
e[0;1;39m-- Boot 7f8e6bf7f5694f9e838e7188dcc7d76e --e[0m
Wed 2024-03-06 11:00:11 EAT mobile systemd[1]: Started Console Getty.
Fri 2024-03-08 12:55:49 EAT mobile systemd[1]: Stopping Console Getty...
Fri 2024-03-08 12:55:49 EAT mobile systemd[1]: console-getty.service: Succeeded.
Fri 2024-03-08 12:55:49 EAT mobile systemd[1]: Stopped Console Getty.

Results are old, i. e. strange.

1 Like

I think you will also need to do

systemctl enable console-getty

and then maybe even (from this situation)

systemctl start console-getty

Do journalctl -b 0 -u console-getty

so that you won’t see old stuff (and hence without enabling and starting the service, you won’t see anything at all).

1 Like

Enabled console-getty, the

$ systemctl status console-getty

shows the active status.

$ ps aux | grep getty

shows two agetty services.

Sadly, serial console doesn’t work.
I’d tried different USB cables and PCs, picocom keeps silently.


1 Like

I guess the full system reinstallation / firmware reflashing is a last remaining chance to get console working. (IMHO, it is a Windows way to fix a problem.)

1 Like

On which devices though? I have two even without anything listening on /dev/console

1 Like
$ ps auxww | grep agetty
root        1574  0.0  0.0  12104  1792 ?        Ss+  12:47   0:00 /sbin/agetty -o -p -- \u --noclear --keep-baud console 115200,38400,9600 vt220
root        1578  0.0  0.0  12104  1792 ?        Ss   12:47   0:00 /sbin/agetty -o -p -- \u --keep-baud 115200,57600,38400,9600 ttymxc0 vt220
neva_bl+    6059  0.0  0.0  13000  2432 pts/0    S+   19:55   0:00 grep --perl-regexp --color=auto --with-filename --line-number --binary-files=without-match agetty
1 Like

Is this type of terminal OK?

1 Like

Yes, should be adequate, if not ideal. However the question is academic until you can actually login on the console.

FWIW, when I plug my Librem 5 into a host computer, /dev/ttyACM1 appears on the host computer and if I do on the host computer
sudo minicom -D /dev/ttyACM1
then I get a login prompt from the Librem 5.

If I provide a correct username and password for an account on the Librem 5 then this results in a successful login from the host computer into the Librem 5. (However of course most of the time ssh would be more convenient i.e. as long as the network stack is working on the Librem 5.)

I’m running up-to-date byzantium i.e. nothing special.

Translation of the previous section starting with FWIW … this does still work!

(Don’t get distracted by the fact that my Librem 5 showed up as ttyACM1. That’s just because I already have another device connected to the host computer and that other device is ttyACM0.)

I note though that the above testing results in logging in on /dev/ttyGS0 (i.e. that specific device on the Librem 5, not /dev/console). That would affect which specific service needs to be working - and which specific device needs to exist - in either case on the Librem 5. As such, some of my previous comments may have been pointing you at the wrong device and service, even though the principle is the same.

I note from your ps ax | grep getty output that you don’t have a login process listening on ttyGS0 but that is expected behaviour once you have logged in i.e. agetty disappears for that “terminal” for the duration of your login on that “terminal”. I assume that that output is without your being logged in via that terminal, in which case you are missing the process that you need!

“GS” apparently stands for “Gadget Serial”. Explanation e.g. https://www.kernel.org/doc/Documentation/usb/gadget_serial.txt