Bug 725913

Summary: systemd-init boot puts messages on tty1 after agetty starts
Product: [openSUSE] openSUSE 12.3 Reporter: Lars Müller <lmuelle>
Component: BasesystemAssignee: systemd maintainers <systemd-maintainers>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Major    
Priority: P5 - None CC: carlos.e.r, jslaby, mrmazda, werner
Version: Factory   
Target Milestone: ---   
Hardware: x86-64   
OS: SUSE Other   
Whiteboard:
Found By: Development Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: output of "systemd-analyse plot > boot.svg" on host gx62b

Description Lars Müller 2011-10-21 22:08:52 UTC
This is an upgraded system from 11.4 and booting with systemd destroys the messages while booting.

Some messages from started daemons are even printed after the first login was very short visible.

Switching back to sysvinit by removing the systemd-sysvinit package made all work as expected.
Comment 1 Stephan Kulow 2011-10-22 19:05:03 UTC
You're free to use sysvinit for 12.1 and it will continue to delay getty till everything is started. but I don't see this as an improvement. systemd is just different.
Comment 2 Lars Müller 2011-10-23 19:44:19 UTC
Not being able to read the login prompt doesn't sound good from the usability point of view.

Neither the completely cleared screen in between.
Comment 3 Frederic Crozat 2011-10-24 08:24:44 UTC
Unfortunately, there is no easy way to delay startup of getty1 until everything is "started".
Comment 4 Lars Müller 2011-10-26 12:00:47 UTC
After installing sysvinit-init and switching back to systemd-sysvinit I'm no longer able to reproduce the issue.
Comment 5 Frederic Crozat 2012-06-21 10:53:25 UTC
reopening, upstream systemd has now a concept of "idle" service, which is used for agetty so they are only started once other services are running.

However, it is only available with systemd >= 184 and I don't plan to push it for 12.2. Keeping this bug opened until we have systemd >= 184 in Factory.
Comment 6 Frederic Crozat 2012-06-21 10:53:54 UTC
*** Bug 768054 has been marked as a duplicate of this bug. ***
Comment 7 Felix Miata 2012-06-21 13:15:44 UTC
Changing subject to make discoverable via Bugzilla search.
Comment 8 Felix Miata 2013-02-01 10:23:16 UTC
This needs to be fixed before 12.3 release.
Comment 9 Felix Miata 2013-02-01 10:33:36 UTC
This is happening with (default) systemd-init boot too.
Comment 10 Lars Müller 2013-02-01 10:53:54 UTC
@Felix: Why are you tweaking with the 'Found in Version' field and reassign the bug to a different bug owner (might be the side effect of modifying the version) without further arguments?

Please revert the former state.

If you consider this as a blocking issue for the openSUSE 12.3 release please modify the Severity accordingly.
Comment 11 Felix Miata 2013-02-01 14:00:28 UTC
I didn't see that the assignee got changed by Bugzilla, so I've reverted that. History isn't showing a QA change.

I don't see any way to change the "found in". I changed the product (that it can be fixed in).

I only change "priority" if I'm assigned the bug. Whether "importance" which is currently "major" should be something else isn't clear to me. Since it doesn't prevent use, I wouldn't call it a blocker or even critical. Since you filed it, maybe you want to change "severity".

The problem for me is I set tty1 to noclear, so messages following the login prompt obfuscate its existence so that I often can't even tell init is finished except by tapping <ENTER> to force a prompt redraw. Plus, if I switch to another tty as soon as it's possible, which is what I do on most boots so as to leave init messages on tty1 for the duration of uptime, the extra messages litter it instead. To me it's cosmetically repulsive, not a true blocker.
Comment 12 Felix Miata 2013-02-20 07:08:34 UTC
On a slow laptop, simply booting "init 3" in RC1+ puts over half a 48 row screen of messages following the tty1 login prompt, first "Started LSB...", ending "Reached target Multi-user."
Comment 13 Felix Miata 2013-03-01 20:19:03 UTC
Using 12.3RC2 on a P4 family 15 model 2 stepping 9 2.6GHz booting with 3 on cmdline puts 13 rows of messages (re: network, scheduler, LSB*) on tty1 following login prompt.
Comment 14 Felix Miata 2013-03-02 03:25:53 UTC
Using 12.3RC2 on host gx62b P4 family 15 model 4 stepping 3 3.0GHz booting with 3 on
cmdline puts 24 rows of messages (re: network, scheduler, samba, cups, sound card, LSB*) on tty1
following login prompt.
Comment 15 Frederic Crozat 2013-03-11 15:32:19 UTC
please attach output of "systemd-analyse plot > boot.svg" on one affected system.

But I doubt we will be able to do more than what is done upstream now.
Comment 16 Felix Miata 2013-03-12 13:11:01 UTC
Created attachment 529312 [details]
output of "systemd-analyse plot > boot.svg" on host gx62b
Comment 17 Felix Miata 2013-03-12 13:11:29 UTC
oops
Comment 18 Frederic Crozat 2013-03-12 14:08:49 UTC
if you are relying on network login, a dependency is missing (tracked on bnc#803471 )

if you aren't, because you don't have plymouth installed, there is no other dependency to start getty@tty1.service other than waiting for 5s max after all services needed for basic.target are started. 

Plymouth is adding another dependency (waiting for rc-local.service to be done, which is waiting for network.target) but there is no pro to enforce this when plymouth is not installed.

We can't improve this behaviour anymore. Sorry. Closing as FIXED.
Comment 19 Felix Miata 2013-03-13 01:27:13 UTC
Bug 803471 is NA here.

Can't some artificial depends be placed in rc-local.service or elsewhere to ensure long enough wait before getty@tty1.service starts, maybe agetty itself, or getty, or numlock? 

As a sort of workaround, what about a user configurable fixed length wait for tty1, but allowing tty[2-6] availability as soon as everything agetty requires has finished? I rarely log in on tty1 anyway, reserving it for the boot messages until such time as may come that I need more than 5 ttys doing something at once?

You may not want to or be able to fix it any time soon, but that doesn't make it resolved or fixed, much less unfixable. NAICT, Plymouth is not an essential element of the 12.3 init process[1], and so shouldn't be depended upon to provide function or user experience no worse than that of the init system it supplanted. If if won't be fixed while 12.3 remains supported, then leave it open for future attention. Don't indicate to potentially interested parties who might do what you can't or won't by closing as fixed.

http://lists.fedoraproject.org/pipermail/devel/2013-March/179848.html
Comment 20 Frederic Crozat 2013-03-13 09:23:17 UTC
(In reply to comment #19)
> Bug 803471 is NA here.
> 
> Can't some artificial depends be placed in rc-local.service or elsewhere to
> ensure long enough wait before getty@tty1.service starts, maybe agetty itself,
> or getty, or numlock? 

No, because it is artifical.

> As a sort of workaround, what about a user configurable fixed length wait for
> tty1, but allowing tty[2-6] availability as soon as everything agetty requires
> has finished? I rarely log in on tty1 anyway, reserving it for the boot
> messages until such time as may come that I need more than 5 ttys doing
> something at once?

No, there won't be a configuration for this.

Sorry again, but I'm closing it.

Feel free to open a bug upstream.
Comment 21 Felix Miata 2013-03-13 09:40:52 UTC
This is not fixed. Messages appear as described without installing any unneeded, unwanted non-mandatory packages.

I don't know enough about systemd workings to know if this is or is not exclusive to openSUSE, so won't be touching upstream unless somehow I stumble onto such knowledge. The other distros I've tested clear by default, and have some kind of difference to prevent noclear of tty1 from working reliably.
Comment 22 Frederic Crozat 2013-03-13 09:57:18 UTC
I don't plan to work on this anymore.
Comment 23 Frederic Crozat 2013-03-27 09:25:19 UTC
*** Bug 787610 has been marked as a duplicate of this bug. ***
Comment 24 Carlos Robinson 2013-06-15 04:04:03 UTC
I have this local job: /etc/systemd/system/helloworld.service

[Unit]
Name=Plays a welcome sound when target multi-user is reached
After=multi-user.target
# graphical.target - multi-user.target

[Service]
Type=oneshot
RemainAfterExit=true
ExecStart=-/usr/local/bin/helloworld

[Install]
WantedBy=multi-user.target


helloworld is a script that plays a sound. Till I hear that sound, I wait, booting has not finished and it is pointless to login. If you place a similar condition on the getty service, it will wait.
Comment 25 Dr. Werner Fink 2013-12-04 20:20:43 UTC
IMHO this bug is fixed. I'm booting a 12.3 as well as a 13.1 and both do show a normal agetty on tty1 *after* the boot is complete ... or should I say that the messaghes are not on tty1 but on an other tty ;)