Bug 721660 - systemd/agetty: cursor falsely reset/screen not cleared
Summary: systemd/agetty: cursor falsely reset/screen not cleared
Status: VERIFIED FIXED
: 725252 (view as bug list)
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Basesystem (show other bugs)
Version: 13.1 Milestone 1
Hardware: All Linux
: P3 - Medium : Normal (vote)
Target Milestone: ---
Assignee: Frederic Crozat
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-01 21:33 UTC by Jan Engelhardt
Modified: 2013-03-28 00:06 UTC (History)
6 users (show)

See Also:
Found By: Beta-Customer
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Engelhardt 2011-10-01 21:33:11 UTC
Observed: When exiting a tty[1-6] shell, systemd-34-9.1 does set the cursor to the top-left corner, no screen cleared, and then starts the new agetty, thus interspersing the new session with output from the old.

Expected: either
1. do not set the cursor to the top-level, like it was traditionally done with sysvinit and SUSE's configuration (mingetty --noclear),
or,
2. clear the screen when resetting the cursor
Comment 2 Dr. Werner Fink 2011-10-17 12:30:33 UTC
The new agetty also has the option --noclear .. check the manual page
IMHO the generator for the tty's should use this option for tty1
Comment 3 Frederic Crozat 2011-10-17 13:13:37 UTC
there is no generator for tty (only for serial one), we just use basic symlink (and I'd prefer we stay that way).

I'm not a tty specialist, so I'm not sure what we should send or not send to tty, when deallocating it.

Werner, could you have a look at http://cgit.freedesktop.org/systemd/tree/src/util.c ?

Thanks.
Comment 4 Jan Engelhardt 2011-10-17 13:39:54 UTC
This is fixed in systemd-37. From the observed effect, the \033[2J code must have been absent in v34.
Comment 5 Dr. Werner Fink 2011-10-17 15:11:41 UTC
IMHO the generator should not use a symlink on tty1 but a service unit
... or the service unit template should have a boolean on tty1 to
add the option --noclear to the agetty
Comment 6 Felix Miata 2011-10-25 14:09:42 UTC
*** Bug 725252 has been marked as a duplicate of this bug. ***
Comment 7 Cristian Rodríguez 2011-12-17 15:01:34 UTC
(In reply to comment #4)
> This is fixed in systemd-37. From the observed effect, the \033[2J code must
> have been absent in v34.

Ok, so this bug is no longer present in 12.1/factory.. ? if it is reopen.
Comment 8 Jan Engelhardt 2011-12-17 17:04:05 UTC
The underlying systemd bugs are fixed, but {clearing the screen + reset of cursor pointer} on tty1 is undesired.
Comment 9 Frederic Crozat 2011-12-19 11:01:35 UTC
could you test the solution from bug 725252 ?
Comment 10 Felix Miata 2012-02-11 20:05:17 UTC
Problem continues in 12.2M1.
Comment 11 Frederic Crozat 2012-02-13 15:17:22 UTC
sorry, I was linking to the wrong bug number. Could you test :

1. copy /lib/systemd/system/getty@.service to /etc/systemd/system/getty.target.wants (this will override the existing symlink there)
2. edit copied file by adding --noclear on the agetty command-line
3. reboot
Comment 12 Felix Miata 2012-02-13 21:36:27 UTC
Looking in /etc/systemd/system/getty.target.wants/ I see only a symlink named getty@tty1.service, a symlink to /lib/systemd/system/getty@.service. Is the 'ExecStart=-/sbin/agetty...' line the line you mean to change? It's not clear to me exactly what to do.
Comment 13 Jan Engelhardt 2012-02-14 00:17:59 UTC
Remove the getty@tty1 symlink and recreate the getty@tty1 object as a regular file with the contents of the previous symlink, and adding --noclear.
Comment 14 Felix Miata 2012-02-14 01:35:06 UTC
/etc/systemd/system/getty.target.wants/getty@tty1.service -rw-r--r-- 1295 now contains:

ExecStart=-/sbin/agetty %I 38400 --noclear

but there was no apparent impact on tty1 during boot, still a mess. Does that char 11 "-" actually belong there?
Comment 15 Frederic Crozat 2012-02-15 10:51:52 UTC
I'm working on a solution, based on Werner suggestion to use a generator, but this requires a fix at another level in systemd, which is under review.
Comment 16 Felix Miata 2012-11-09 03:52:09 UTC
The above instructions do not have the desired effect in 12.3M1.
Comment 17 Jan Engelhardt 2012-11-09 08:07:21 UTC
Yeah, in 12.2 and 12.3M1, systemd always clears the screen, so --noclear has no effect. >:-(
Comment 18 Felix Miata 2012-11-09 09:17:18 UTC
What is working for me, even though noclear is applied to all ttys, is to set TTYVTDisallocate=no in /usr/lib/systemd/system/getty@.service. Better to not clear any ttys than to clear my boot messages off of tty1.
Comment 19 Jan Engelhardt 2013-02-18 09:59:30 UTC
TTYVTDisallocate it is.

*** This bug has been marked as a duplicate of bug 804158 ***
Comment 20 Felix Miata 2013-02-18 12:41:56 UTC
duplication reversed. long history here, and 6 CCs.
Comment 21 Felix Miata 2013-02-18 12:42:35 UTC
*** Bug 804158 has been marked as a duplicate of this bug. ***
Comment 22 Jan Engelhardt 2013-03-01 11:34:21 UTC
Resolved for me. Any counter-voices?