Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
XDM to boot runlevel? (Solved Twice)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Duplicate Threads
View previous topic :: View next topic  
Author Message
bobpaul
Tux's lil' helper
Tux's lil' helper


Joined: 09 Aug 2005
Posts: 148

PostPosted: Mon Nov 14, 2005 4:59 pm    Post subject: XDM to boot runlevel? (Solved Twice) Reply with quote

I heard that one could add XDM to the boot runlevel in rc-update to make x start before the system is finished booting allowing it to feel like it booted faster.

I tried doing putting XDM in the default and boot simultaneously, and XDM in boot only. Regardless it never seems to load until after everything else is already finished. Do I need some "Allow_Early_GDM" (sic) like on redhat or anything like that?


Last edited by bobpaul on Wed Nov 16, 2005 4:10 am; edited 2 times in total
Back to top
View user's profile Send private message
oracleofmist
Apprentice
Apprentice


Joined: 19 Jun 2004
Posts: 235

PostPosted: Mon Nov 14, 2005 5:12 pm    Post subject: Reply with quote

are you saying you have to manually type gdm or something to get it up? anyhow this might help:

/etc/rc.conf
Code:

DISPLAYMANAGER="gdm"
XSESSION="Fluxbox" #Gnome, kde-<version>, or Xsession


with that done now do:
Code:
rc-update add xdm default


but i don't know of a way to get it to boot earlier
_________________
Segmentation Fault
Back to top
View user's profile Send private message
niskel
Guru
Guru


Joined: 17 Nov 2004
Posts: 457
Location: Fredericton, NB, Canada

PostPosted: Mon Nov 14, 2005 10:20 pm    Post subject: Reply with quote

This may or may not help. I have my xdm start in default for a small speed boost. Starting it in boot may or may not work but the issue lies in /etc/init.d/xdm actually.

In the start() function of the init script, a few lines down it will say '/sbin/telinit a &>/dev/null'. This tells X to start on its own runlevel after the 'default' runlevel regardless of whether xdm is in boot or default. All you need to do is change that line to say only '/etc/X11/startDM.sh'. My final start() function looks like this:
Code:
start() {
        setup_dm

        if nox; then
                einfo "Skipping ${EXE}, received 'nox'"
        else
                ebegin "Setting up ${SERVICE}"
                #save the prefered DM
                save_options "service" "${EXE}"
                #tell init to run /etc/X11/startDM.sh after current
                #runlevel is finished (should *not* be in the "boot"
                #                      runlevel).
                #/sbin/telinit a &>/dev/null
                /etc/X11/startDM.sh
                eend 0
        fi

}

(The comments were already there, my changes do not reflect what is said in the comments)

Let my know if this makes any difference for you and if starting at boot is at all worth it (or even works (the comments seem to think they wont)).
Back to top
View user's profile Send private message
bobpaul
Tux's lil' helper
Tux's lil' helper


Joined: 09 Aug 2005
Posts: 148

PostPosted: Tue Nov 15, 2005 1:47 am    Post subject: Reply with quote

niskel wrote:
This tells X to start on its own runlevel after the 'default' runlevel regardless of whether xdm is in boot or default.
Code:
start() {
...
                #/sbin/telinit a &>/dev/null
                /etc/X11/startDM.sh
                eend 0
...


Let my know if this makes any difference for you and if starting at boot is at all worth it (or even works (the comments seem to think they wont)).


Well, I think it worked, but I'm not positive. Net.eth0 doesn't seem to be outputing to TTY1 AFAIK anymore, though, but I definately have an IP address by the time it finishes loading.

Since I'm doing auto login into gnome via gdm, I don't think it actually saved any time. One thing I noticed, though, is that bootgraph now shows everything in X opening as well as all the normal boot stuff, so I can see my boot scripts loading all the way up until GAIM finishes logging in.

I don't know what this "nox" stuff is so I'm testing removing that. Obviously this could cause problems ;)
Back to top
View user's profile Send private message
bobpaul
Tux's lil' helper
Tux's lil' helper


Joined: 09 Aug 2005
Posts: 148

PostPosted: Tue Nov 15, 2005 2:13 am    Post subject: Works, but not any faster Reply with quote

When I was playing before my computer took 1:21 from the moment I hit the power button until it finished autoloading into Gnome and everything was functional.

Went like this:
Code:
Seconds     Task
   5          Beep             
   15        bios done
   20        grub done (3 second pause before auto selecting option 1)
   56        X started
   81        System Fully usable


With niskel's suggestion I was able to do "rc-update del xdm default; rc-update add xdm boot" and make X start sooner, hopefully shaving off some of that 25 seconds X/Gnome takes as X could be parrallel with some other stuff. It worked and everything runs fine, but my times aren't much better (I also told the bios not to detect my CD-rom or floppy, since linux ignores the bios after it starts booting)
Code:
Seconds       Task
   5          Beep
   11         bios done (4 sec gain)
   16         Grub done
   40         X started (4+12 sec gain?)
   77         Fully usable, HD quiet


So, maybe if I didn't have auto login it would feel faster (and indeed, it kind of feels faster) but the numbers don't lie.

I saw someone with an autologin script that doesn't use xdm (had a c++ file and a gentoo init.d script) so maybe I'll try that.

Thanks for the help niskel!
Back to top
View user's profile Send private message
bobpaul
Tux's lil' helper
Tux's lil' helper


Joined: 09 Aug 2005
Posts: 148

PostPosted: Wed Nov 16, 2005 4:09 am    Post subject: Found a working solution! Reply with quote

Finally got exactly what I wanted:

Since I'm on a single user system, I don't need the login capabilities of GDM/XDM, I just want X to start.

Followed the instructions at:
https://forums.gentoo.org/viewtopic-t-268192.html

to get autologin to X without *DM managers. When I put it in my boot runlevel (along with hostname and my eth.net0 scripts) it loaded in much sooner. Total system boot from push button it usable X is 62 seconds, 15 seconds better than my last test.

Now, at 62 seconds I don't think the total system is done, since loading x in parrallel slowed down the other processes, so the HD was still cranking for a couple of seconds, but I was able to click on firefox and load it by the 62 second mark.

Obviously there's a reason X was not meant to start in the boot runlevel so YMMV and you may have problems if something in X tries to use a service that isn't loaded yet, but it worked for me.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Duplicate Threads 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