On Tue, 05 Jul 2005 21:05, Digby Tarvin wrote:
> On Mon, Jul 04, 2005 at 04:57:28PM +1200, Glenn Enright wrote:
> Thus after verifying that everything is ok after initial boot to
> runlevel 3, I can run telinit 5 to start the X server.
>
> The system I ssh'd from was a BSD/OS system at runlevel 5.
OK looks like you know all about sysinit and its toys :)

<snip>
> Agian, console wasn't working so I had done this from a root shell
> in the SSH sesion. ('/sbin/shutdown -r now' is just a wrapper for
> halt, so if halt doesn't work, no shutdown incantations are going
> to do much...)
Actually the situation seems to be a bit different from that.

from 'man halt'
**      if halt or reboot is called when the system is not in runlevel 0 or 6, 
in 
        other words when it's running normally, shutdown will be invoked instead
        (with the -h or -r flag). For more info see the shutdown(8) manpage.

from 'man shutdown'
**      shutdown  brings the system down in a secure way.  All logged-in users 
are 
        notified that the system is going down, and login(1) is blocked.  It is 
        possible to shut the system down immediately or after a specified 
delay. All 
        processes are first notified that the system is going down by the 
signal 
        SIGTERM.  This gives programs like vi(1) the time to save the file 
being  
        edited,  mail  and  news processing programs a chance to exit cleanly, 
etc.  
        shutdown does its job by signalling the init process, asking it to 
change the 
        runlevel. 

so calling shutdown to start with should be more reliable, given that the 
system is still 'running'. Hence the reason its used in the init scripts.

> > did you try
> >     "/etc/init.d/xdm stop"
> > This should stop the X session if you started it using the standard
> > bootup proccess.
>
> That is what init does when switching to runlevel 3.

Only if youve been messing with your init scripts

One big difference with the sysinit levels and gentoo init-levels is 
conceptual. Sysinit allows to to cumulatively start programs as you increase 
the level. In gentoo changing levels seems to cause all stuff in the original 
to stop and then all in the new level to start, with only the 'boot' level 
stuff running always.

So if you have a net service and samba running in 'default' and change to your 
'graphics' level (or whatever you called it) then unless those services are 
assigned to that level also they will be stopped until you change back or 
start them manually. This may be the cause of your instability?


> I am pretty sure that this is a result of a bug in the X server (another
> reason not to start it in the default runlevel) which means that the
> kernel can't shut it down - a problem that any process stuck in a driver
> call, but there should be some way to halt the rest of the system so at
> least the filesytems are unmounted cleanly etc.
>

Thats what the shutdown command is supposed to do.  

Anyway this is getting away from the real problem you seem to have with your X 
server. I agree that there does seem to be a problem there of some sort.

from 'man 7 signal' which is referenced by 'man kill' you could try
        kill SIGSTOP process_number

and make sure you check your logs when you do get a crash. should be a 
~/.xsession_errors and a /var/log/Xorg.0.log(.old) or similar at the very 
least.
-- 

Time-sharing is the junk-mail part of the computer business.
                -- H.R.J. Grosch (attributed)

Attachment: pgpM0XkppY2HN.pgp
Description: PGP signature

Reply via email to