Bug 439699 - No shutdown msgs displayed
No shutdown msgs displayed
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: gdm (Show other bugs)
9
i386 Linux
low Severity low
: ---
: ---
Assigned To: jmccann
Fedora Extras Quality Assurance
:
: 434899 439280 (view as bug list)
Depends On:
Blocks: F10Target
  Show dependency treegraph
 
Reported: 2008-03-30 12:27 EDT by Clyde E. Kunkel
Modified: 2015-01-14 18:20 EST (History)
11 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-10-28 15:58:51 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
Force switch back to VT active when signal sent (3.52 KB, patch)
2008-10-23 09:18 EDT, Dan Nicholson
no flags Details | Diff

  None (edit)
Description Clyde E. Kunkel 2008-03-30 12:27:24 EDT
Description of problem:
No msgs displayed during shutdown.

Version-Release number of selected component (if applicable):
upstart-0.3.9-13.fc9.i386

How reproducible:
every time

Steps to Reproduce:
1. select shutdown or restart from menu
2. 
3.
  
Actual results:
logon screen displays, then nothing

Expected results:
shutdown messages displayed

Additional info:
Comment 1 Rahul Sundaram 2008-03-30 20:36:02 EDT
chvt 1; shutdown -h now makes the messsages show up. Seems to be some kind of VT
switch issue
Comment 2 Clyde E. Kunkel 2008-03-31 10:17:46 EDT
Msgs are on vt-7.  Hitting alt-F7 after selecting shutdown or restart shows
msgs.  So, Rahul is right again.
Comment 3 Casey Dahlin 2008-03-31 15:27:13 EDT
Hmm. They should be going to /dev/console, which I assume would mean they'd show
everywhere.

--CJD
Comment 4 Bill Nottingham 2008-03-31 16:20:33 EDT
So, just to get the datapoints, where are the messages:
- when shutdown is invoked from a terminal
- when shutdown is invoked from a display manager or the logout button in the menu

Also, does the use, or non-use, of rhgb change this?
Comment 5 Clyde E. Kunkel 2008-03-31 20:24:52 EDT
All test run after gnome desktop settled in.  Total of 10 tests.

		gnome	  logout
		terminal  button	tty1	tty2	tty3
		--------  -------	----	-------	------	
rhgb		no msgs	  no msgs	MSGS	no msgs	no msgs
no rhgb		no msgs	  no msgs	MSGS	no msgs	no msgs

Per above CTRL-ALT-F1 to tty1 only showed shutdown messages.
Comment 6 Bug Zapper 2008-05-14 04:26:39 EDT
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 7 udo 2008-05-17 10:41:17 EDT
I did notice this issue after upgrading from F8 to F9.
Not able to see shutdown messages like we had on F8.
Please fix.
Comment 8 Warren Togami 2008-05-18 21:31:21 EDT
Shutdown messages are being sent to whatever VT was active when shutdown began.
 But when X dies it switches to whatever VT was running when it started (usually
VT1).  A few people complained about this behaviour prior during the F9 devel
cycle but no agreement could be reached of what to do about it.

* Desktop team didn't want users to see the shutdown messages during shutdown.
* Disabling the Auto-Switching of VT back to the previous VT when X dies is
likely to cause other confusion.
Comment 9 Clyde E. Kunkel 2008-05-18 23:40:27 EDT
We need to see shutdown msgs during testing.  There should at least be a 
mechanism that facilitates this instead of ctrl-alt-f7.  Recently, the desktop 
has remained after selecting restart or shutdown from the menu without the 
ability to see the msgs.  An example:  I have a cifs mount that hangs up 
waiting for umount (now apparently fixed in F9, but not rawhide).  Without the 
ability to see this hang, I can't confirm that is the problem.
Comment 10 Need Real Name 2008-05-19 01:51:20 EDT
> * Desktop team didn't want users to see the shutdown messages during shutdown.

I don't really care what the "Desktop team" says (!)

I'm a desktop user, and I want to see the shutdown messages instead of a black
screen.
I particularly want to see the messages if there is a problem.
Comment 11 udo 2008-05-19 10:05:49 EDT
Indeed!~ Desktop == GUI.
As soon as xorg is killed the GUI is gone; the text screen should be visible
with all the shutdown message we are used to.
The desktop users should not be afraid: just as on startup (if they dare press
to see the Details) there will be green OK messages when things go well.
Right?
Comment 12 Jon Stanley 2008-05-24 16:16:23 EDT
Changing over to F10Target - this doesn't mean that the issue will go unresolved
during F9, simply that it should be resolved by the F10 release.  I love the
desktop team to death, but I have to respectfully disagree on this one :) 
Shutdown messages should either:

1) Be displayed, or
2) Have a message explaining to the user how to get to them (alt-F7)

I'd like to see one of these two things happen somewhat soon (and I don't really
care which one it is).
Comment 13 Need Real Name 2008-05-24 16:30:18 EDT
A third option, and a better option I think:

3) If the user is not using graphical boot, show them the shutdown messages.

After all, they wanted to see them at startup, let them see them at shutdown.
Comment 14 Clyde E. Kunkel 2008-05-24 17:19:07 EDT
Quickly displaying shutdown msgs essential for testing during Fedora 
development cycle.....
Comment 15 Bill Nottingham 2008-05-27 14:17:33 EDT
The simplest way to solve this is for gdm to pass '-novtswtich' to Xorg ; this
prevents X calling a vt switch when it exits.
Comment 16 Bill Nottingham 2008-07-23 14:23:00 EDT
*** Bug 434899 has been marked as a duplicate of this bug. ***
Comment 17 Bill Nottingham 2008-07-23 14:23:07 EDT
*** Bug 439280 has been marked as a duplicate of this bug. ***
Comment 18 Bill Nottingham 2008-07-23 14:36:29 EDT
The short answer for what's happening here:

- When shutdown is invoked, the messages go to the VT that shutdown was invoked on
- In the case where shutdown is invoked from a graphical display, that's the tty
that gdm/kdm/etc is running on
- Then, the display manager and X exit
- X then switches back to whatever VT it was started from (normally, tty1)

At this point, the shutdown messages are on tty7 or tty8, you're on tty1, and
there is no process that actually knows the relation therein to switch you back
to tty7 to see the messages. Nor is there a process that the display manager can
use when executing shutdown to put the messages on the VT that X will switch to
when it exits.

It is possible to solve it by having X not switch VTs in general. But that's
likely to cause other issues.
Comment 19 Ray Todd Stevens 2008-07-23 14:47:09 EDT
Actually I find that I can switch to seeing the messages by doing ctrl alt f6.

Frankly in general I would think that since we are trying to degeek Linux a bit
I would prefer to hide the detailed diagnostic messages, which is what happens.
 The problem is that there is no indication of what is going on.  My preferred
fix here, and I have played with it and not got it to work, would be to leave
the shutdown the way it is, BUT to then send a message to either all screens or
the main screen (tty1) that shutdown is in progress and to see the details do
ctrl alt f6.
Comment 20 Andre Robatino 2008-07-23 16:03:12 EDT
I think that unless there's some fundamental design issue that makes it
impossible to show the shutdown messages automatically (which I find hard to
believe), it should at least exist as an option.  It's just aggravating to have
to hit Alt-F7 every single time.
Comment 21 Bill Nottingham 2008-07-23 16:15:41 EDT
(In reply to comment #20)
> I think that unless there's some fundamental design issue that makes it
> impossible to show the shutdown messages automatically (which I find hard to
> believe), it should at least exist as an option.  It's just aggravating to have
> to hit Alt-F7 every single time.

Please see comment #18. You're on one tty without any intrinsic knowledge of the
tty that shutdown was started from.
Comment 22 Andre Robatino 2008-07-23 18:00:12 EDT
I'm not knowledgeable in this area, but when shutdown is invoked, why don't the
shutdown messages go to the VT that X was started from (since it's known that X
will immediately switch to that VT)?
Comment 23 Bill Nottingham 2008-07-23 20:40:52 EDT
shutdown messages go to the tty shutdown was invoked on. gdm invokes shutdown.
gdm does not know what tty X was started from, only the tty that X is currently on.
Comment 24 Andre Robatino 2008-07-23 21:06:38 EDT
When X is started, can't the tty it was started from be saved in a file or
otherwise passed so that gdm can access that info?
Comment 25 Ray Todd Stevens 2008-07-23 22:11:19 EDT
It seems to me a little like we are trying to make the point the hard way.

How about fixing this with the initscripts.   I am not that well versed in
these, BUT I bet someone who is could fix this in a matter of minutes.

Here is the deal as I see it.   We should be able to setup a script that
pretends to load something, but really loads nothing.  But we then set it to be
off for everything but run level 5 (x windows) and load it last in the series
for this run level.   We only do enough during the load to flag it as being
loaded.   It does really nothing else.   

Then as I understand init scripts under the fancy management system for these,
we can tell the system that if this script has been loaded then it must be
unloaded first.   All of the real fun is in the unload or "stop" case.  What it
would do is execute a could "echo /dev/tty1"s to give a a blank line to make it
stand out then "echo System shutdown or reboot in progress > /dev/tty1"  The add
another blank line.

If desired we could even add an echo line that said how to monitor the progress,
but given the degeeking that we are trying to do to Linux I would think avoiding
this added complexity and confusion to the users would be better.

Any real init script geeks out there?

Comment 26 Ray Strode [halfline] 2008-07-28 15:59:43 EDT
So this should get fixed for f10.  For f10 we're going to

1) switch to vt7 immediately
2) force X to start on vt7 even though vt7 is active
3) potentially start a graphical shutdown screen

Not sure this is a huge issue to fix for F9.

In F8 gdm actually printed "System is shutting down... Please wait." or
something like that before it shutdown.
Comment 27 Need Real Name 2008-07-28 16:24:30 EDT
For "potentially" (point 3) do you mean, show the graphical shutdown screen if
startup messages are not shown?
Comment 28 Ray Strode [halfline] 2008-07-28 17:20:44 EDT
So ideally we want shutdown to be so fast it doesn't matter.  Barring that, if
we have a graphical boot up, then it makes sense to have a graphical shutdown on
some level.
Comment 29 udo 2008-08-09 03:59:28 EDT
Graphical shutdown!?

a) we want shutdown messages as they were before all this stuff happening. the messages being gone is a BUG.
b) the best/most easy/etc way to present the emssages is in text mode
c) X gets killed as one of the first processes I assume
d) the shutdown speed doesn't matter: info is info (especially if stuff goes wrong)
e) what if we don't shutdown but halt?
f) what if we have an error during the oh so fast shutdown?

Currently we don't see anything so our systems could be shredded to bits by some error in the shutdown process. (no, very realistic it IS!)
Please stop deliberating and please restore the old behvaiour before 'improving' with other features. Please.
Comment 30 Ray Todd Stevens 2008-08-09 20:54:13 EDT
I can't imagine getting a shutdown that is fast enough that the current experience would not confuse especially novice users who kind appear to be part of the group we are aiming to have the new versions of fedora be more friendly for.    There are just to many things that really need to get done and take time.   Certainly the absolute core could be programmed to shutdown very quickly.   I assume with a great push and effort that maybe all of the applications that ship with your normal fedora could be made to shutdown in a second or two.   But first I wonder if this push would be worth it.   It would take a major programming effort, and if a proper shutdown message was used I don't see much benefit from this programming effort.   Certainly there are other issues that could use the effort.   Second in most cases what will have to be done to get this high speed shut down would be to instead of the current system of issuing necessary shutdown commands and then waiting and insuring they are complete before issuing conflicting commands is to issue them all at once and hope for the best.   Not a great way to keep the reliability that Linux has such a hard and well earned reputation for.  Third Also there will still be third party projects which will need to do a full and probably slow shut down.

So I think some form of a message about shutting down would be the best thing to plan for.   Frankly given the novice user that we are kind of targeting I would like to see a two leveled message system.   The default would be a simple "shutting down please wait" message, while the details would still in some manner be available if needed for technical support.

One the other hand it sounds like this one is being put on hold until FC10.  I believe that some kind of a text message started with the latest update, but I a not sure.   Has anyone else seen this and is it working?
Comment 31 udo 2008-08-10 00:02:44 EDT
I do think the `novice user` wants some confirmation that the shutdown is indeed progressing well, without errors.
Currently the shutdown is initiated and no further feedback about error or success is given.
VERY bad.
The old situation should be restored ASAP, in FC9.
Bigger changes could then go in FC10.
Comment 32 Need Real Name 2008-08-10 10:58:36 EDT
I don't understand why there is no much talk about this.

If I turn off graphical boot (i.e. I want to see the startup messages), then I should also see the shutdown messages too.
Comment 33 udo 2008-08-10 11:25:31 EDT
Exactly. Let it be a choice.
But it isn't. It has been taken away.
Why? For no good reason.
Why can't they see that this is BAD?
Comment 34 Ray Strode [halfline] 2008-08-11 11:03:20 EDT
So just to be clear.  The F9 behavior is a bug.  It wasn't a design decison or anything.

It's just not a bug I'm personally going to have time to fix stacked against my other fedora bugs, feature work, and rhel bugs.

For F10, I think comment 32 has it right. If there's boot messages at boot up then there should be boot messages at shutdown.
Comment 35 Dan Nicholson 2008-10-23 09:18:03 EDT
Created attachment 321281 [details]
Force switch back to VT active when signal sent

Here's a hackish, but working, solution. When a fatal signal (TERM, PIPE, etc.) is received, gdm-binary stores the current VT. This will be the VT the user is on when they Shutdown/Restart. Just before exiting gdm-binary, and after Xorg has died, switch back to the original VT. This will be where the shutdown messages are.

For upstream, something better should be done, but this should work for all common use cases. I have a scratch build on koji if anyone wants to try it:

http://koji.fedoraproject.org/koji/taskinfo?taskID=897827
Comment 36 Bill Nottingham 2008-10-23 10:36:48 EDT
Wouldn't this mean if you run 'telinit 3' from within X, you may end up on a blank tty?
Comment 37 Dan Nicholson 2008-10-28 14:41:47 EDT
Yes, it does, unfortunately. I couldn't think of any way to handle that. I guess I'm sort of assuming that the common case of a user shutting down from GNOME has higher priority than someone running telinit from X (how probably knows how to navigate the VTs anyway).

Ray and Jon probably have a better plan, but my longer term thinking here is:

1. Have GDM always manage/change VTs and always start X on the current VT. That takes the X VT switching behavior out of the problem.

2. Have gnome-session and the greeter call out to GDM for shutdown/restart and fall back to ConsoleKit if the GDM interface isn't available.

3. Have GDM kill the current X sessions and then call out to ConsoleKit for shutdown/restart.

This means that GDM can do the right thing with X and the VTs before shutdown is run by ConsoleKit.
Comment 38 Ray Todd Stevens 2008-10-28 14:55:56 EDT
I think that if there is just a message on the screen that says "fedora shutting down" or better being able to determine from the message if it is shutting down or rebooting, that would be fine and better than the old version.   Users don't need to see the details.  Us techees can find the data if we need them, but if the user just gets something that says something is going on that would fix the problem.   Then thisa could go from a bug to a feature.
Comment 39 udo 2008-10-28 15:05:12 EDT
Sorry, I am halfway between user and techie I guess, but I want to see the old style shutdown messages.
Give the graphic whatever screen to the users. I want to *see* that all goes well, that there are no problems, oopses or other issues on shutdown.
Comment 40 Bill Nottingham 2008-10-28 15:58:51 EDT
This should be solved in Fedora 10, in any case. Closing as rawhide.
Comment 41 Dan Nicholson 2008-10-28 16:13:29 EDT
What's the solution in rawhide? Just force gdm to use tty1?
Comment 42 Bill Nottingham 2008-10-28 16:40:28 EDT
That's what ends up solving the effect.

More specifically, it's 'have X/gdm running on the same tty that it's started from'
Comment 43 Need Real Name 2008-10-28 18:07:14 EDT
Sorry, am I missing something here?

If rhgb is enabled, and I shutdown, then I don't want to see any shutdown messages.

If rhgb is not enabled, and I shutdown, I want to see shutdown messages.

Note You need to log in before you can comment on or make changes to this bug.