Text mode shown briefly with various "cryptic" texts when logging out or shutting down

Bug #967229 reported by Timo Jyrinki
62
This bug affects 12 people
Affects Status Importance Assigned to Milestone
OEM Priority Project
Fix Released
High
James M. Leddy
Precise
Won't Fix
High
James M. Leddy
lightdm (Ubuntu)
Fix Released
High
Dimitri John Ledkov
Precise
Won't Fix
Medium
Dimitri John Ledkov
plymouth (Ubuntu)
Fix Released
High
Dimitri John Ledkov
Precise
Won't Fix
Medium
Dimitri John Ledkov
upstart (Ubuntu)
Fix Released
High
Dimitri John Ledkov
Precise
Won't Fix
Medium
Dimitri John Ledkov

Bug Description

Text mode hits in for about a half a second every time one logs out or shuts down the computer. UPDATE: log out part fixed in lightdm in Ubuntu 13.04 ->, shut down problem still there.

The attached video "Text-mode in logout and shutdown.webm" is a combination of two clips showing this on one of my computers. This one has slightly more text output than my other machines, but on every machine it catches attention by being ugly and I'd guess "cryptic" or suspicious for ordinary people in the otherwise smooth experience starting from the bootup ubuntu logo.

Tested on up-to-date Ubuntu 12.04 on an Intel IGD graphics netbook, Intel Sandy Bridge laptop and Radeon HD 4670 (open drivers) desktop machine. The video is from the sandy bridge one.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: xorg 1:7.6+12ubuntu1
ProcVersionSignature: Ubuntu 3.2.0-20.33-generic 3.2.12
Uname: Linux 3.2.0-20-generic x86_64
.tmp.unity.support.test.0:

ApportVersion: 1.95-0ubuntu1
Architecture: amd64
CompizPlugins: [core,composite,opengl,compiztoolbox,decor,vpswitch,snap,mousepoll,resize,place,move,wall,grid,regex,imgpng,session,gnomecompat,animation,fade,unitymtgrabhandles,workarounds,scale,expo,ezoom,unityshell]
CompositorRunning: compiz
Date: Wed Mar 28 18:25:44 2012
DistUpgraded: Fresh install
DistroCodename: precise
DistroVariant: ubuntu
EcryptfsInUse: Yes
ExtraDebuggingInterest: Yes, whatever it takes to get this fixed in Ubuntu
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Alpha amd64 (20120316)
MachineType: ASUSTeK Computer Inc. UX31E
ProcEnviron:
 TERM=xterm
 PATH=(custom, user)
 LANG=fi_FI.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.2.0-20-generic root=UUID=3a913d68-5aad-4ac9-9436-4798da5b8fc2 ro crashkernel=384M-2G:64M,2G-:128M quiet splash drm.vblankoffdelay=1 i915.i915_enable_fbc=1 i915.lvds_downclock=1 i915.semaphores=1 pcie_aspm=force vt.handoff=7
SourcePackage: xorg
Symptom: display
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 01/20/2012
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: UX31E.211
dmi.board.asset.tag: ATN12345678901234567
dmi.board.name: UX31E
dmi.board.vendor: ASUSTeK Computer Inc.
dmi.board.version: 1.0
dmi.chassis.asset.tag: No Asset Tag
dmi.chassis.type: 10
dmi.chassis.vendor: ASUSTeK Computer Inc.
dmi.chassis.version: 1.0
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvrUX31E.211:bd01/20/2012:svnASUSTeKComputerInc.:pnUX31E:pvr1.0:rvnASUSTeKComputerInc.:rnUX31E:rvr1.0:cvnASUSTeKComputerInc.:ct10:cvr1.0:
dmi.product.name: UX31E
dmi.product.version: 1.0
dmi.sys.vendor: ASUSTeK Computer Inc.
version.compiz: compiz 1:0.9.7.2-0ubuntu4
version.ia32-libs: ia32-libs N/A
version.libdrm2: libdrm2 2.4.32-1ubuntu1
version.libgl1-mesa-dri: libgl1-mesa-dri 8.0.2-0ubuntu2
version.libgl1-mesa-dri-experimental: libgl1-mesa-dri-experimental N/A
version.libgl1-mesa-glx: libgl1-mesa-glx 8.0.2-0ubuntu2
version.xserver-xorg-core: xserver-xorg-core 2:1.11.4-0ubuntu7
version.xserver-xorg-input-evdev: xserver-xorg-input-evdev 1:2.7.0-0ubuntu1
version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:6.14.99~git20111219.aacbd629-0ubuntu2
version.xserver-xorg-video-intel: xserver-xorg-video-intel 2:2.17.0-1ubuntu4
version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:0.0.16+git20111201+b5534a1-1build2

Related branches

Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :
description: updated
bugbot (bugbot)
affects: xorg (Ubuntu) → xserver-xorg-video-intel (Ubuntu)
bugbot (bugbot)
tags: added: resolution
Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :

A bot changed to intel driver, but that's at least not correct. Changing to plymouth, since I guess lightdm at least isn't running at the time of logging out or shutting down (it's then started if it was logout in question). Plymouth should have the splash screen available right away when shutting down, and possibly also for the split second before lightdm starts (a design detail). A console screen should never be shown.

affects: xserver-xorg-video-intel (Ubuntu) → plymouth (Ubuntu)
Revision history for this message
Steve Langasek (vorlon) wrote :

Yes, there seem to still be some races we haven't figured out yet where plymouth will start up before lightdm has torn down the display, resulting in the console being shown instead of the splash screen. (I think there may be another bug already open about this, but I haven't looked to see where it is.)

Changed in plymouth (Ubuntu):
status: New → Triaged
importance: Undecided → High
Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :

The other bug being bug #540816

Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :

And unduplicating. So this bug is specifically about there being text shown - if the screen would be just empty (possibly with unavoidable short cursor blink), it probably wouldn't make people worry.

Changed in oem-priority:
assignee: nobody → James M. Leddy (jm-leddy)
importance: Undecided → High
status: New → Confirmed
Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

This approach doesn't really work. Not only is clearing the text likely to be visible, but other daemons which are in the process of shutting down will still be printing stuff to the screen before plymouth comes up.

Revision history for this message
Yuan-Chen Cheng (ycheng-twn) wrote :

1. As logout, the X Server exit and lightdm respawn another instance of X Server. So content of text console appear for that short interval. If we don't clean the text in console, then we need to re-design the behavior as logout (which I have no idea how)

2. The text that is left on the Text console comes from other process that upstart bring up. In my observation, upstart starts program in parallel in possible. As it run lightdm, it switch to tty7 and other process that start up after output their message to tty7.

I try to delay lightdm startup time (add sleep 5 before exec lightdm), then the tty7 is clean. So as logout / reboot / shutdown, no such text message is displayed. Only black screen is displayed.

I think the correct solution is: make upstart output program startup message to tty1, only span '/sbin/getty -8 38400 tty1' only after all other program starts on boot.

Changed in oem-priority:
status: Confirmed → Triaged
Changed in plymouth (Ubuntu):
assignee: nobody → Brian Murray (brian-murray)
Revision history for this message
James M. Leddy (jm-leddy) wrote :

I messed around with this a little today, inspired by the news of the new kernel vt-switchless resume support. You can definitely work around this by doing:

printf "\033[0;30m" > /dev/tty7
clear > /dev/tty7

However, the real bug here is with upstart. It seems that upstart chooses to execute a few of the old init.d scripts before running the upstart formatted /etc/init/plymouth.conf. plymouth should be the first thing to run after the X server is destroyed, not some K20 scripts in /etc/rc.d

Revision history for this message
Steve Langasek (vorlon) wrote :

So there is a bug here with upstart, but I think it's more subtle than what you describe. There's really no strict ordering of any of the jobs at shutdown time, *except* that the plymouth splash screen is started immediately after lightdm exits. Delaying the shutdown of all other services (including /etc/init/rc.conf) until after lightdm has exited would be cumbersome and potentially fragile.

Instead, I think there are two things that need to be done here:
 - the screen needs to be cleared behind lightdm when it *starts*; this way, any start-time noise (which accounts for at least most of what's on the screen in the video attached to the original report) is gone. This impacts not only shutdown, but also any X server restarts/crashes; we shouldn't show garbage then either. This should probably be done in the lightdm job.
 - if possible, plymouth should start *before* lightdm stops on shutdown, putting its redirection of console output in place before any scripts have a chance to output to the console. This way the shutdown scripts are able to keep on running, and are just prevented from messing up the screen.

Revision history for this message
James M. Leddy (jm-leddy) wrote :

Hi Steve,

I've linked a branch that clears the vt before lightdm starts up, so any cruft that was echoed out to the terminal will not survive when lightdm stops . This fixes the first bullet you mentioned, and also fixes this problem when you do S3. I've taken the additional step of coloring the text black, but I can take that out if you wish.

As for the second bullet, basically the way to fix this is to make sure that upstart schedules in the plymouth job immediately after lightdm stops and before any other shutdown jobs are scheduled. Or as you mentioned, we could start plymouth before lightdm stops, but I'm not sure how to achieve that.

Revision history for this message
James M. Leddy (jm-leddy) wrote :
Revision history for this message
Steve Langasek (vorlon) wrote :

James, the vt definitely needs to be cleared after plymouth exits (i.e., after lightdm starts up), not before, in order to avoid races. Brian Murray has been looking into this; Brian, any further progress?

> As for the second bullet, basically the way to fix this is to make sure that upstart
> schedules in the plymouth job immediately after lightdm stops and before any
> other shutdown jobs are scheduled.

First, there's no such facility in upstart.

Second, it doesn't change the fact that any other jobs that are /already stopping/ at the time lightdm stops may generate output.

Revision history for this message
Brian Murray (brian-murray) wrote :

I made some changes to the ordering of the plymouth jobs and still see messages on the console they include the following:

acpid: exiting
 * Running nssldap-update-ingoreusers(?)

* Stopping PostgreSQL 9.1 database server

See the attached screenshot

Changed in lightdm (Ubuntu):
assignee: nobody → Brian Murray (brian-murray)
importance: Undecided → High
status: New → Triaged
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lightdm - 1.5.1-0ubuntu2

---------------
lightdm (1.5.1-0ubuntu2) raring; urgency=low

  * debian/lightdm.upstart: Clear the virtual terminal after starting lightdm
    so startup messages are not displayed when switching users or when
    suspending (LP: #967229)
 -- Brian Murray <email address hidden> Thu, 21 Mar 2013 14:33:46 -0700

Changed in lightdm (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :

Confirming that the lightdm update fixes the case of logging out into the login screen (but not shutdown or reboot).

Revision history for this message
Sebastien Bacher (seb128) wrote :

seems like the change got sponsored and there is nothing left to upload, unsubscribing sponsors

Revision history for this message
James M. Leddy (jm-leddy) wrote :

Steve, should we open a new bug for the seccond bullet of #9, or use another component on this bug?

Revision history for this message
Steve Langasek (vorlon) wrote :

I think the plymouth task on this bug largely covers the remaining issues.

Changed in plymouth (Ubuntu):
assignee: Brian Murray (brian-murray) → nobody
Changed in plymouth (Ubuntu):
assignee: nobody → Brian M Murray (brian-brimurray)
assignee: Brian M Murray (brian-brimurray) → nobody
Steve Langasek (vorlon)
Changed in plymouth (Ubuntu):
assignee: nobody → Steve Langasek (vorlon)
Revision history for this message
Steve Langasek (vorlon) wrote :

So I've had a look at trying to start plymouth before lightdm has shutdown, in order to start capturing console messages sooner. Unfortunately this doesn't work right, lightdm shutting down puts the VT into a state that lightdm isn't expecting so the splash doesn't update the screen correctly.

I don't see a way to fix this reliably with the current architecture. We could fix individual messages that are being output, but unless there's some way to get the output redirected to plymouth before lightdm stops, there's no way to ensure a completely text-free shutdown without causing very problematic knock-on effects.

description: updated
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Ordering of the splash ahead of emitting rc runlevel level has been done before in Fedora, to properly show shutdown splash to avoid "scary messages".

I have also noticed that there are additional messages generated on the VT through the lifecycle of the machine - that is after lightdm cleared it and shutdown initiated. Therefore I add clearing VT messages before lightdm shutdowns.

Instead of introducing a dummy intermediate job to negotiate "whether or not there is a DM to stop", I use the wait-for-state facility and therefore make the following dependency chain:

starting rc RUNLEVEL=[016] -> waits to start shutdown-plymouth (if any) -> (stopping plymouth) -> waits to stop lightdm (if any)

This also splits plymouth into two jobs, instead of having duplicate / ORed start on, exec & post-start scripts. Semantically it also makes sense, it's two different instances.

This also makes "desktop-shutdown" event redundant.

To try this out:
cd /etc/init; sudo patch -p0 < path/to/patch

I have tested it on trusty and have a message-less shutdown. The patch can equally be applied on precise, please test it on the affected precise machines / OEM devices.

Revision history for this message
Dimitri John Ledkov (xnox) wrote :
Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :

Confirming clean shutdown on trusty after applying the patch in /etc/init.

Also confirming clean shutdown on precise after applying the patch in /etc/init. Although the patch applies with a small fuzz so not applicable to the precise package exactly as is.

Revision history for this message
Ara Pulido (ara) wrote :

Can we get the patch applied to Trusty and Precise, please?

Changed in plymouth (Ubuntu):
assignee: Steve Langasek (vorlon) → Dimitri John Ledkov (xnox)
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

lightdm should also clear console on pre-stopping.

Changed in lightdm (Ubuntu):
status: Fix Released → Triaged
assignee: Brian Murray (brian-murray) → Dimitri John Ledkov (xnox)
Changed in upstart (Ubuntu):
status: New → Triaged
importance: Undecided → High
assignee: nobody → Dimitri John Ledkov (xnox)
Changed in lightdm (Ubuntu Precise):
status: New → Triaged
importance: Undecided → Medium
Changed in plymouth (Ubuntu Precise):
status: New → Triaged
importance: Undecided → Medium
Changed in upstart (Ubuntu Precise):
status: New → Triaged
importance: Undecided → Medium
Changed in plymouth (Ubuntu Precise):
assignee: nobody → Dimitri John Ledkov (xnox)
Changed in lightdm (Ubuntu Precise):
assignee: nobody → Dimitri John Ledkov (xnox)
Changed in upstart (Ubuntu Precise):
assignee: nobody → Dimitri John Ledkov (xnox)
Changed in lightdm (Ubuntu):
status: Triaged → Fix Committed
Changed in upstart (Ubuntu):
status: Triaged → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lightdm - 1.9.6-0ubuntu2

---------------
lightdm (1.9.6-0ubuntu2) trusty; urgency=medium

  * Clear default tty on lightdm shutdown, to avoid brief display of text
    messages on shutdown. (LP: #967229)
 -- Dimitri John Ledkov <email address hidden> Tue, 04 Feb 2014 10:12:05 +0000

Changed in lightdm (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package upstart - 1.11-0ubuntu3

---------------
upstart (1.11-0ubuntu3) trusty; urgency=medium

  * If present, wait for plymouth to come up in shut-down mode before
    changing runlevel at shutdown. (LP: #967229)
 -- Dimitri John Ledkov <email address hidden> Tue, 04 Feb 2014 15:01:47 +0000

Changed in upstart (Ubuntu):
status: In Progress → Fix Released
Changed in plymouth (Ubuntu):
status: Triaged → In Progress
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

After extensive testing, i believe there is benefit in clearing tty in plymouth pre-stop instead. And in some configurations post-stop can be completely dropped if tty is cleared in pre-stop and no artificial 1s delay which is very noticeable on SSDs. I'll test this a bit more, and maybe upload lightdm with clearing tty7 in pre-stop.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package plymouth - 0.8.8-0ubuntu14

---------------
plymouth (0.8.8-0ubuntu14) trusty; urgency=medium

  * Implement message-less shutdown (LP: #967229):
    * Refactor plymouth job into plymouth (boot mode) and plymouth-shutdown
      (shutdown-mode), as the two are two different jobs.
    * If present, make plymouth-shutdown stop and wait for lightdm to stop.
    * Add versioned dependency on upstart, which has rc.conf start
      plymouth-shutdown on shutdown.
 -- Dimitri John Ledkov <email address hidden> Tue, 04 Feb 2014 17:07:35 +0000

Changed in plymouth (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Bofu Chen (bafu) wrote :

I tried trusty-desktop-amd64.iso (2014-02-24 daily build) on 2 Dell platforms and can not reproduce this issue on them. One is a HSW machine, and another is an AMD machine. Because both of them are not RTSed yet, I can not leak too much information of them.

Revision history for this message
Ara Pulido (ara) wrote :

Comment from Shengyao Xue (xueshengyao):

I downloaded Trusty daily-live (20140224) and installed on ThinkPad T440s.

And I found the "Text seen during shutdown" issue still can reproduce sometimes.

the issue is same to video attached here:
https://bugs.launchpad.net/dell/+bug/1013355/comments/1

Ara Pulido (ara)
Changed in oem-priority:
status: Triaged → Incomplete
Revision history for this message
Ara Pulido (ara) wrote :

Marked as Fix Released. For the other messages, we have open separate bugs.

Changed in lightdm (Ubuntu Precise):
status: Triaged → Won't Fix
Changed in upstart (Ubuntu Precise):
status: Triaged → Won't Fix
Changed in plymouth (Ubuntu Precise):
status: Triaged → Won't Fix
Changed in oem-priority:
status: Incomplete → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.