Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
what happens during "shutdown"?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
nordic bro
Guru
Guru


Joined: 25 Oct 2003
Posts: 585

PostPosted: Fri Oct 19, 2007 5:10 pm    Post subject: what happens during "shutdown"? Reply with quote

My problem is unreliably being dropped back to tty1 for shutdown; sometimes I stay stuck on tty7 and sometimes it switches me back to tty1. Makes no difference if I'm using fbsplash or not.

The screen always flickers 2-4 times first (I guess it's switching between ttys for some reason?) and oddly it *seems* that once my machine is on > 10-20 mins I'm far more likely to get stuck on tty7 for shutdown/restart. And most curiously, at times I hit "shutdown" in xfce GUI, it drops me back to login mgr GUI but then nothing happens until I hit ctl-alt-F1; I could sit there for 5 minutes looking at the login GUI but the instant I hit ctl-alt-F1 shutdown begins.

So can someone tell exactly what is going on during shutdown? What is going on when (in my case, using xfce4) /usr/libexec/xfsm-shut* is executed? What is gentoo doing then? What scripts is it calling before executing /etc/conf.d/local.stop? I'd love it if somebody could tell me why I get stuck on tty7 but mainly I'm looking for what else to stick print stmts in to see what's going on.

I have a P965 mb, 2.6.21, use xfce4.4, slim login mgr, followed the instructions for allowing non-root to shutdown (i.e., all the correct /etc/sudoers entries and the 2 *.sh scripts), currently using nvidia-drivers-100* (but tried with the 0.9755 beta), xinit-104 and 102, udev104 and 114, baselayout 1.12.9 and 1.12.9-r2; I don't know what else to mention that would matter.

This exact situation has occurred using xdm alone, slim alone, xdm + slim and xdm + gdm. In my current iteration inittab "x:a:once*" is commented out and instead I start slim from local.start and "chvt 1" from local.stop (doesn't improve my chances of getting dropped back to tty1 if I do "kill `pidof slim`" before "chvt 1" in local.stop or not); 90% of my troubleshooting tests have been using x:a:once*, startDM.sh and init.d/xdm but I get the exact same result I mentioned above.

"chvt 1" is the last thing in local.stop and like I said above, the oddest is when I hit "shutdown" in xfce GUI but local.stop doesn't begin to execute until the instant I hit ctl-alt-F1. There is nothing started from either local.start or local.stop that doesn't instantaneously exit so nothing in those is hanging anything up (I even had both files completely commented in one series of reboot tests).
Back to top
View user's profile Send private message
nordic bro
Guru
Guru


Joined: 25 Oct 2003
Posts: 585

PostPosted: Mon Oct 22, 2007 5:32 pm    Post subject: Reply with quote

I know OP was real long (trying to put in plenty of details/description) but basically I was hoping a gentoo person/some expert could tell me what happens the instant I hit xfce's "shutdown/restart" thing.

AFAIK it points to /usr/libexec/xfsm* but once that executes I don't know what's going on afterward; I'd like to find some way to debug this but have no idea what the procedure is or where to put in some print stmts or maybe redirect some bin output. Somewhere there's a glitch routinely hanging this up but I don't know where to look.

The main problem is for "restart" I often get dropped back to tty1 (> 75% of the time); for "shutdown" about 50/50 I instead see xfce destkop exit, then slim login screen re-appears, but then nothing happens until I press ctl-alt-F1 (if I kill slim from local.stop I instead see the twm-like gray background and "x" pointer until hitting ctl-alt-F1). I can even hit "shutdown", get dropped back to slim GUI, re-login, xfce starts and if I press ctl-alt-F1 at any time afterward the machine immediately starts to shut down.
Back to top
View user's profile Send private message
nordic bro
Guru
Guru


Joined: 25 Oct 2003
Posts: 585

PostPosted: Mon Oct 22, 2007 5:55 pm    Post subject: Reply with quote

Sorry, wanted to add that actually I have no idea at all where the problem is so I'm not trying to make it sound like it has something to do with xfce; I'm just trying to find out exactly what gentoo/xfce are doing precisely when shutdown is initiated.

I've also started /etc/runlevels/default with almost nothing in there so unless the problem is hal/dbus or net I don't think it has anything to do with services I'm running (but that's a guess too).
Back to top
View user's profile Send private message
MasterX
Veteran
Veteran


Joined: 26 Jun 2003
Posts: 1165

PostPosted: Mon Oct 22, 2007 7:32 pm    Post subject: Reply with quote

Just plain curiosity.
What will happen if you try to shutdown without having started the X server? Will it shutdown?
Back to top
View user's profile Send private message
nordic bro
Guru
Guru


Joined: 25 Oct 2003
Posts: 585

PostPosted: Mon Oct 22, 2007 10:05 pm    Post subject: Reply with quote

Without X I can shutdown/restart - but I can shutdown/restart from X/xfce as well with no hiccups.

The problem is I can't be 100% this situation exists in both places without actually running without X for a couple days. Right now I see no pattern so can't predict/re-create this problem to test there - I'd just have to wait and see if it pops up.

I can say that over the past 10 days I've been messing with this stupid problem, any time I've logged into single-user I've never had trouble or seen anything unusual doing restart or shutdown from there (but that could be because I'm already on tty1 when not using X and I'm guessing the "sometimes stuck on tty7" and "sometimes have to use ctl-alt-F1 to actually shutdown" problems have something to do with each other, if they aren't 2 sides of the same problem).
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum