Ubuntu 20 LTS. How to adjust [email protected] timeouts?

cn flag

I am running the ARM64 build of Ubuntu 20.04 under QEMU. ~50% of the time the boot process reports this:

[ TIME ] Timed out waiting for device /dev/ttyAMA0.
[DEPEND] Dependency failed for Serial Getty on ttyAMA0.

which means there is no login prompt in the QEMU terminal. SSH access is then required to start the daemon manually:

$ sudo systemctl start [email protected]

How can I fix this? And where/how do I set a longer timeout value?

Many thanks.

[Added] See for a full set of scripts to reproduce the issue

The answer suggested here for Centos does not work.

System details follow.

$ sudo systemctl show [email protected] | grep ^Tim 
TimeoutStartUSec=1min 30s
TimeoutStopUSec=1min 30s
TimeoutAbortUSec=1min 30s

$ lsb_release -a && uname -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.3 LTS
Release:        20.04
Codename:       focal
Linux miniarm64 5.4.0-96-generic #109-Ubuntu SMP Wed Jan 12 18:07:25 UTC 2022 aarch64 aarch64 aarch64 GNU/Linux

$ qemu-system-aarch64 --version
QEMU emulator version 4.2.1 (Debian 1:4.2-3ubuntu6.19)
Copyright (c) 2003-2019 Fabrice Bellard and the QEMU Project developers
dm flag

Good afternoon, I faced a similar problem myself. The fact is that systemd did not wait for the initialization of the device to finish and because of this canceled the initialization of getty on ttyAMA0. Therefore, first of all we need to configure the device itself, not getty. In general, it is solved quite trivially, First I want to refer to the official systemd documentation:

Device units are named after the /sys/ and /dev/ paths they control. Example: the device /dev/sda5 is exposed in systemd as dev-sda5.device.

As you can see, you need to create a config for a specific device (ttyAMA0); For my distribution, I created a file /usr/lib/systemd/system/dev-ttyAMA0.device with the following contents:

Description=Serial device ttyAMA0

See more about it

I hope my solution will help you.

cn flag
Hello Gregory, thank you and welcome. Very nice to have a complete answer too. Let me try it out -

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.