[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Problems on Shutdown with X



On Mon, 6 Jan 2003, Richard Palfalvi wrote:

> Most of the time (I'd say 8 times out of 10) X doesn't shutdown correctly.
> When I turn off my computer with the shutdown-menu-button in gdm the screen
> first gets black and after 3 seconds the screen gets brighter and brighter
> beginning from the bottom of the screen, then brightening up the whole screen to
> the top, like if it was BURNING off  !! :-(((
>
> So I always have to turn off quickly the laptop by the
> "hardware-turn-off-button" as I fear to destroy the screen otherwise. But this is not only
> uncomfortable but also doesn't turn off the computer correctly (filesystem-checks
> necessary on reboot, etc.)

In the meantime before we solve your problem, try converting your
filesystem to ext3, reading the appropriate HOW-TO documents to find out
how. Then when your system does crash, it won't take so long too boot up.
I would do this even if you were having problems with X, simply because
laptops tend to crash a lot more frequent that quality desktops (X is
always more fragile, they tend to overheat, and tend to run out of
batteries at the most inoportune of times, and you don't get to switch off
in time).

> The strange thing is that sometimes X shuts down correctly, after the black
> screen it shows plain text (as linux always does when it turns on or off),
> and the system is going down in a normal way without brightening the whole
> screen. I couldn't find out when the correct shutdown happens, it seems to be by
> "hazard". Usually I close all my applications when I am going to shutdown the
> computer, sometimes I let one or to open (and then sometimes it shuts down
> correctly) but this doesn't really help and make sense.

I doubt there is anything wrong with your particular setup. laptops
always seem to have trouble with X - when normal monitors lose their sync
signal, this is their cue to power down into power saving mode. One would
think you could shut off sync to laptops, and the internal circutry would
turn off the LCD electronics and backlight, but this doesn't seem to
happen. There is usually some kind of proprietry interface to the
electronics - windows knows how to turn off the screen, but X doesn't.

So when X crashes, and the screen doesn't get any more sync signal, the
screen will fuzz up like yours does. Mine occasionally does this as I
switch to virtual consoles, or come out of suspend, or open the lid. My X
driver (for the ati rage128 video card) is pretty mature and stable, so I
don't understand these occasional hicups, except to think that maybe the
video card has some small firmware bugs in it.

Try pressing ctrl+alt+f1 just after selecting shutdown. This will then
hopefully switch to a console, and as long as X hasn't thourougly killed
the system, things should proceed normally. If not, put this script
somewhere in /sbin or /usr/local/sbin or /usr/sbin etc (I haven't tested
it, but I will be careful), log in as root, and use this script to
shutdown your computer instead of selecting the shutdown button in your
window-manager.

--------start script below-------
#!/bin/sh

chvt 1			#switch to the first console

sleep 5			#let things settle down

#/etc/init.d/xdm stop   #kills X in an orderly fashion

exec /sbin/shutdown
-------------end script----------

If it doesn't work, try killing X before shutting down, by uncommenting
the xdm line. The program to kill might be xdm or probably gdm, or
possibly kdm - look in that directory for these 3 files, and see what is
there. I think you mentioned gdm below.

> Can some (X-)expert tell me what I have to change?

No expert - just a random laptop user who has experience similar problems,
but who is still taking wild stabs in the dark.

My script possibily wont even work around the problem, because it could be
a fundamental problem with stopping X on your laptop. Try getting the very
latest copy of X 4.2.something from debian. Also try unstable instead of
woody (is that stable or testing, I can't remember!?)

> At the moment I am using gdm for login and KDE2.2 as it was shipped with the
> Debian-Woody-Release. The video-card is a Lynx3DM from Silicon Motion.
>
>  (Could it be that GDM and KDE does not work together properly??)


No - gdm and KDE are clients of X - they will not affect how X shuts down.


-- 
TimC -- http://astronomy.swin.edu.au/staff/tconnors/

cat /kat/ n.  A furry keyboard cover



Reply to: