View previous topic :: View next topic |
Author |
Message |
nordic bro Guru
Joined: 25 Oct 2003 Posts: 585
|
Posted: Mon Oct 08, 2007 5:08 am Post subject: seeing all login/logout [SOLVED] |
|
|
What I want when booting is to see all services up to "local" starting; when I shutdown or restart I likewise want to see all services shutting down. I use verbose fbsplash, xfce ("exec ..." in ~/.xinitrc) and slim login mgr.
AFAIK these are my options:
1. use xdm to start slim
2. bypass xdm and start slim from /etc/conf.d/local.start in daemon mode
3. bypass xdm and start slim from /etc/conf.d/local.start NOT in daemon mode;
For #1, xdm starts slim WAY too early (after only about half the services have started); I also never see a single "xyz stopping" msg when rebooting/shutting down
For #2, when I shutdown or restart from xfce I get dropped back to slim's login screen then the machine reboots/shuts down from there - not a single msg about "xyz stopping"
For #1 and #2 I think they're related to udev104 since I never had this undesirable behavior before emerge'ing it (and don't know what I can do about that since IIRC I needed to upgrade to udev104 for something else). So even if I added something to init.d/xdm to force it to wait longer before starting slim, I still have the problem of silent reboot/shutdown.
For #3, if I don't background slim local.start never exits but I do get verbose logout when shutting down/restarting from xfce which is what I want. However, because local.start never exited (it's waiting for slim to "complete") I can't open any other login consoles. I also don't know what/if anything else gentoo inits following local.start that isn't being started (maybe this is why I can't open other consoles). And finally, because local.start is waiting for slim to detach/exit before completing, local.stop doesn't get executed when shutting down. IOW shutdown/reboots begins with local.start exiting and proceeds to shutdown/reboot from there, skipping local.stop entirely.
So, anyone have any idea how I can resolve this?
Last edited by nordic bro on Tue Oct 09, 2007 7:37 pm; edited 1 time in total |
|
Back to top |
|
|
timeBandit Bodhisattva
Joined: 31 Dec 2004 Posts: 2719 Location: here, there or in transit
|
Posted: Mon Oct 08, 2007 3:03 pm Post subject: |
|
|
Try option #2 with a command to shutdown/kill Slim added to local.stop. That should close the login screen...?
FYI only (doesn't address silent shutdown), with option #1 you can edit the xdm init script's dependencies (after and/or need commands) to force xdm to run last. I once did this when designing a new silent bootsplash, to keep the splash up as long as possible, but quickly got sick of waiting. This change can be overwritten by updates to the init script so you have to watch for that. _________________ Plants are pithy, brooks tend to babble--I'm content to lie between them.
Super-short f.g.o checklist: Search first, strip comments, mark solved, help others. |
|
Back to top |
|
|
nixnut Bodhisattva
Joined: 09 Apr 2004 Posts: 10974 Location: the dutch mountains
|
Posted: Mon Oct 08, 2007 4:41 pm Post subject: |
|
|
Moved from Installing Gentoo to Other Things Gentoo.
Not about getting gentoo installed, so moved here. _________________ Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered
talk is cheap. supply exceeds demand |
|
Back to top |
|
|
nordic bro Guru
Joined: 25 Oct 2003 Posts: 585
|
Posted: Mon Oct 08, 2007 6:22 pm Post subject: |
|
|
timeBandit wrote: | Try option #2 with a command to shutdown/kill Slim added to local.stop. That should close the login screen...? |
Ok, that was a good tip I didn't think of
But what happens (I think what's always happened with #1 and #2 but I didn't realize it) is that fbsplash runs on tty1 (per grub.conf entry) and X starts on tty7. When I use xdm or slim -d and hit "restart" in xfce, I stay on tty7, slim goes away and I get that gray twm-style background until reboot occurs. While shutdown is occurring and if I switch to tty1, there's my verbose shutdown going on.
If I start slim but don't let it detach and restart from xfce the same way, for some reason I do get dropped back to tty1 where I can watch shutdown msgs.
So for #1 and #2 I don't get popped back over to tty1 to see shutdown occurring but with #3 I do. Do you know why this is and how I can get put back on tty1 for shutdown using method #1 or #2? |
|
Back to top |
|
|
timeBandit Bodhisattva
Joined: 31 Dec 2004 Posts: 2719 Location: here, there or in transit
|
Posted: Mon Oct 08, 2007 7:44 pm Post subject: |
|
|
nordic bro wrote: | If I start slim but don't let it detach and restart from xfce the same way, for some reason I do get dropped back to tty1 where I can watch shutdown msgs.
So for #1 and #2 I don't get popped back over to tty1 to see shutdown occurring but with #3 I do. Do you know why this is and how I can get put back on tty1 for shutdown using method #1 or #2? |
That happens because you started slim as a foreground task on tty1. In that circumstance the switch to tty7 is effectively part of its task environment, to be "cleaned up" when the process terminates. Resumption of the foreground shell on tty1 includes an automatic switch back to that console.
When you start slim in the background you do not tie up a console while it runs. Thus when slim exits there is no consistent, logical preference for the last active console (you could have switched VT's many times while still running X), so it stays put on vt7.
After you stop Slim in local.stop, use chvt 1 to force a switch back to vt1 (tty1). This should give you the behavior you want. _________________ Plants are pithy, brooks tend to babble--I'm content to lie between them.
Super-short f.g.o checklist: Search first, strip comments, mark solved, help others. |
|
Back to top |
|
|
nordic bro Guru
Joined: 25 Oct 2003 Posts: 585
|
Posted: Tue Oct 09, 2007 7:09 pm Post subject: |
|
|
Thanks for your help. I was all excited to try out "chvt 1" because I was sure that would finally fix things. Unfortunately it didn't.
I messed around all yesterday/last night trying to understand what's going on and after countless iterations I can't figure it out. I even reinstalled xdm to run slim through that in case there was something somewhere that needed xdm for this to work.
What happens (killing/not killing slim, with/without xdm, running/not running consolefont, and using chvt in local.stop) is that when I exit xfce I usually, but not always, stay stuck on tty7 (where X is/was running). I put "touch abc/xyz" before/after chvt in local.stop so even though it looks like something else is sporadically dropping me back to tty1, it appears chvt in local.stop is being executed. And shutdown msgs show local.stop being executed first (as it's supposed to be).
But whether chvt executes or I switch to tty1 myself during shutdown (to see if fbsplash is there even though I didn't get switched to it), fbsplash is always gone; just gentoo runscript text on full screen black background. One time I saw the msg 'fbsplash switched to state "off"' or something like that but that msg usually isn't there so aren't sure it's relevant.
Curiously, a few other times when I switched to tty1 myself during shutdown something popped me back over to tty7 right in the middle of shutting down. So I have no idea what's going on or how to control it.
This is how I'm set up:
using splash-utils 1.5.2
patched 2.6.21 (kernel.org) with 4200_fbsplash-0.9.2-r5.patch
create an init image using splash_geninitramfs and use this in grub.conf:
kernel /boot/... splash=verbose,fadein,theme:fbsplash CONSOLE=tty1 quiet
initrd /boot/.../fbsplash
run /etc/runlevels/boot/consolefont (but saw no change when I took that out)
I don't run any splash utils/services (fbcondecor whatever that is, no fbsplashd whatever that is, etc.)
/etc/conf.d/splash is mostly all commented out
start slim daemon from /etc/conf.d/local.start (or via xdm when that was installed)
When I boot up everything is perfect; and unless I have slim detach I likewise have a perfect fbsplash shutdown.
It could be suggested to "keep doing it that way then" but if I don't let slim detach I lose access to any other consoles; and also as you point out, everything subsequent to slim starting is inside slim's environment to an extent. Maybe that's not a bad thing, I don't know, but it does have affects such as emacs starting oddly if slim isn't detached - there could be other undesirable things happening that I'm not even aware of.
I've done a lot of googling; even considered putting fbsplash on all consoles so that no matter where shutdown occurred I'd have my image but IIRC that makes local.start/stop run at points in init that would require me to make a number of other changes. I haven't been getting anywhere reading fbsplash docs/web page or a gentoo page on "init" - do you know some other resources I can look at to understand how to make this work? |
|
Back to top |
|
|
nordic bro Guru
Joined: 25 Oct 2003 Posts: 585
|
Posted: Tue Oct 09, 2007 7:25 pm Post subject: |
|
|
Unfreakinbelievable It's always the simple thing that gets overlooked - NO /etc/splash link!!
Because I wasn't detaching slim originally, and therefore fbsplash shutdown was no problem (as you explained why in another reply), I didn't think the theme link in /etc/splash was being used for anything so never bothered restoring it. Now that slim runs in daemon mode the missing link is why fbsplash was always gone.
I'm still having a problem with getting back to tty1/screen corruption but technically OP is solved.
Thanks for your time/help.
Mod - I don't see how to mark this "solved"; do I just retitle it with "solved" (so I know in the future)? |
|
Back to top |
|
|
tarpman Veteran
Joined: 04 Nov 2004 Posts: 1083 Location: Victoria, BC, Canada
|
Posted: Tue Oct 09, 2007 7:28 pm Post subject: |
|
|
nordic bro wrote: | Mod - I don't see how to mark this "solved"; do I just retitle it with "solved" (so I know in the future)? |
Yes. _________________ Saving the world, one kilobyte at a time. |
|
Back to top |
|
|
timeBandit Bodhisattva
Joined: 31 Dec 2004 Posts: 2719 Location: here, there or in transit
|
Posted: Tue Oct 09, 2007 7:34 pm Post subject: |
|
|
nordic bro wrote: | I'm still having a problem with getting back to tty1/screen corruption but technically OP is solved.
Thanks for your time/help.
Mod - I don't see how to mark this "solved"; do I just retitle it with "solved" (so I know in the future)? |
In order: 1) Excellent; 2) no problem, you're welcome; 3) yes, just edit your original post and change the subject line. _________________ Plants are pithy, brooks tend to babble--I'm content to lie between them.
Super-short f.g.o checklist: Search first, strip comments, mark solved, help others. |
|
Back to top |
|
|
|
|
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
|
|