# gdm/gnome slow boot



## StaticPhilly (Jun 9, 2009)

Hello chaps,

OK i know this has been asked a million times but im about to start pulling my hair out because of it!

on freebsd i have starting
dbus
hal
gdm

now, gdm takes a good 5 to 10 seconds to start loading, and then takes another 5 to 10 seconds to load. once its loaded and i log into the gnome session again it takes about 10-15 seconds to load.

I have set the hostname in /etc/rc.conf and added an entry for 127.0.0.1 in /etc/hosts and the hostname is pingable as you would hope.

So, can anyone tell me what the other causes of this could be so i can check them out and hopfully get this resolved? iv searched google countless times but the only results i seem to find is dead posts on forums or to set the hostname.

thanks
Phil


----------



## SirDice (Jun 9, 2009)

This is usually caused by resolving issues. Can you post the relevant bits of /etc/rc.conf and /etc/hosts?


----------



## StaticPhilly (Jun 9, 2009)

sure,

rc.conf

```
hostname="DayDreamer.OS"
dbus_enable="YES"
hald_enable="YES"
gdm_enable="YES"
```

hosts

```
127.0.0.1        localhost          localhost.OS
127.0.0.1        DayDreamer         DayDreamer.OS
```


----------



## SirDice (Jun 9, 2009)

Try using a proper domain name. Something like mynetwork.home.

Change to hostname="daydreamer.mynetwork.home"

And change /etc/hosts accordingly.


----------



## StaticPhilly (Jun 9, 2009)

Thanks SirDice,

just tried that and i have the exact same problem.

I also change, dbus_enable="YES", hald_enable="YES" & gdm_enable="YES" to gnome_enable="YES" and its the same also.

Iv made an xorg.conf, fully configured and this had no effect ether (but at least i got round to making it)

heres a full copy of my /etc/rc.conf & /etc/hosts files

/etc/rc.conf

```
#--------------------------------------
# Network Configuration
#--------------------------------------
hostname="daydreamer.mynetwork.home"
ifconfig_le0="DHCP"
ifconfig_rl0="DHCP"
inetd_enable="NO"

#--------------------------------------
# Misc Configuration
#--------------------------------------
keymap="uk.iso"

#--------------------------------------
# Startup Configuration
#--------------------------------------
linux_enable="YES"
nfs_client_enable="YES"
gnome_enable="YES"
```

/etc/hosts

```
#-----------------------------------------------------
# IP		Short Hostname		Full Hostname
#-----------------------------------------------------
::1		localhost		localhost.my.domain
127.0.0.1	localhost		localhost.my.domain
127.0.0.1	DayDreamer		DayDreamer.mynetwork.home
```


----------



## SirDice (Jun 9, 2009)

Is there anything in /var/log/messages that might be a clue?


----------



## StaticPhilly (Jun 9, 2009)

ok im not sure if this is the problem but, in my logs i found some pretty warnings,

any way i done a search and found this post:
http://forums.freebsd.org/showthread.php?t=4623

now, there's a suggestion to run mergemaster but i haven't a clue what it dose (im migrating from linux)

could this be my problem?


```
Jun  9 14:59:28 DayDreamer console-kit-daemon[1076]: WARNING: kvm_getenvv failed
Jun  9 14:59:31 DayDreamer console-kit-daemon[1076]: WARNING: kvm_getenvv failed
Jun  9 14:59:42 DayDreamer gnome-session[1160]: WARNING: Application 'metacity.desktop' failed to register before timeout
Jun  9 14:59:43 DayDreamer gdm-simple-greeter[1174]: WARNING: Failed to load '/share/xml/iso-codes/iso_639.xml': Failed to open file '/share
/xml/iso-codes/iso_639.xml': No such file or directory 
Jun  9 14:59:43 DayDreamer gdm-simple-greeter[1174]: WARNING: Failed to load '/share/xml/iso-codes/iso_3166.xml': Failed to open file 
'/share/xml/iso-codes/iso_3166.xml': No such file or directory 
Jun  9 14:59:44 DayDreamer console-kit-daemon[1076]: WARNING: kvm_getenvv failed
Jun  9 14:59:44 DayDreamer gdm-simple-greeter[1174]: WARNING: Unable to find users: no seat-id found
Jun  9 15:00:00 DayDreamer console-kit-daemon[1076]: WARNING: kvm_getenvv failed
Jun  9 15:00:00 DayDreamer gnome-session[1182]: WARNING: Unable to determine session: Unable to lookup session information for process '1182'
Jun  9 15:00:11 DayDreamer gnome-session[1182]: WARNING: Application 'metacity.desktop' failed to register before timeout
Jun  9 15:00:13 DayDreamer console-kit-daemon[1076]: WARNING: kvm_getenvv failed
Jun  9 15:00:14 DayDreamer pulseaudio[1249]: main.c: Daemon startup without any loaded modules, refusing to work.
Jun  9 15:00:16 DayDreamer console-kit-daemon[1076]: WARNING: kvm_getenvv failed
Jun  9 15:00:17 DayDreamer last message repeated 3 times
```


----------



## DutchDaemon (Jun 9, 2009)

Is this a fresh (first-time) install, or an upgrade from a previous version of FreeBSD? Mergemaster is only needed in case of an upgrade.


----------



## StaticPhilly (Jun 9, 2009)

fresh install, used ftp for source rather then dvd so there all the latest packages.


----------



## SirDice (Jun 9, 2009)

Is the /proc filesystem mounted?

Add to /etc/fstab:

```
proc      /proc    procfs   rw   0   0
```

Also verify that the following sysctls are set to 0:

```
net.inet.tcp.blackhole
net.inet.udp.blackhole
```


----------



## LateNiteTV (Jun 9, 2009)

StaticPhilly said:
			
		

> Thanks SirDice,
> 
> 
> ```
> ...



is that your actual domain?

the 127.0.0.1 line should look like

```
127.0.0.1   localhost    localhost.my.domain yourHostName yourHostName.your.full.domain
```
and comment out the other 127.0.0.1 line.


----------



## StaticPhilly (Jun 9, 2009)

hello, ok i just done what SirDice surgested and its fixed some of the warnings so thats a plus

heres my log now:

```
Jun  9 19:24:17 DayDreamer gnome-session[1146]: WARNING: Application 'metacity.desktop' failed to register before timeout
Jun  9 19:24:17 DayDreamer gdm-simple-greeter[1160]: WARNING: Failed to load '/share/xml/iso-codes/iso_639.xml': Failed to open file '/share
/xml/iso-codes/iso_639.xml': No such file or directory 
Jun  9 19:24:17 DayDreamer gdm-simple-greeter[1160]: WARNING: Failed to load '/share/xml/iso-codes/iso_3166.xml': Failed to open file '/share
/xml/iso-codes/iso_3166.xml': No such file or directory 
Jun  9 19:24:45 DayDreamer gnome-session[1171]: WARNING: Application 'metacity.desktop' failed to register before timeout
Jun  9 19:24:47 DayDreamer pulseaudio[1219]: main.c: Daemon startup without any loaded modules, refusing to work.
```


----------



## SirDice (Jun 10, 2009)

LateNiteTV said:
			
		

> is that your actual domain?


The domain doesn't really have to exist. As long as it resolves via /etc/hosts.


----------



## KaBooM (Jun 18, 2009)

got same problem like StaticPhilly. Does anybody have an idea about resolving it?


----------



## SirDice (Jun 18, 2009)

KaBooM said:
			
		

> got same problem like StaticPhilly. Does anybody have an idea about resolving it?



What's your hostname set to in /etc/rc.conf?
What does your /etc/hosts look like?
Are you running hald and dbus? 
Is /proc mounted?


----------



## larrypatrickmaloney (May 31, 2010)

StaticPhilly said:
			
		

> hello, ok i just done what SirDice surgested and its fixed some of the warnings so thats a plus
> 
> heres my log now:
> 
> ...



======

This thread is a bit old, but I'm having the same problem.

On my system, the problem is with metacity, OR metacity.desktop file, OR gnome-session.

The problem is that metacity is taking too long (or isn't) registering its self with gnome-session. 

There is at least a 10 second timeout/wait for a client to register, according to the gnome-session docs.

If I remove metacity, gdm OR my user session just takes a few seconds (3-5) to come up.

So far, what I can tell, either I have some old config files from my previous install of gnome-session, and gdm OR metacity isn't putting out the correct client ID information to register....

I'm still trying to find a solution.


----------



## tegaP0PwkubtXdsK (Jul 1, 2010)

larrypatrickmaloney said:
			
		

> ======
> The problem is that metacity is taking too long (or isn't) registering its self with gnome-session.



Yes!  I am having the same symptoms.  The problem is not:
- /etc/hosts not correctly maping 127.0.0.1
- dbus not running
- hald not running
- /proc not mounted

The problem is something deeper like what larry said above.  Please help me if you know the answer.  I have reinstalled FreeBSD to try to fix this, but no help.

Thank you,

Chris


----------



## larrypatrickmaloney (Jul 1, 2010)

*Fixing GDM/Gnome startup time*



			
				chrisstankevitz said:
			
		

> Yes!  I am having the same symptoms.  The problem is not:
> - /etc/hosts not correctly maping 127.0.0.1
> - dbus not running
> - hald not running
> ...



OK, so here is how you fix it....  (Generally, I'll have to give more detailed instructions later)

The problem is that metacity doesn't register correctly with DBUS, so there is a 10-30 second timeout.

What you do is launch metacity within GDM with the /usr/local/etc/gdm/ ? scripts...

There are pre-init and other scripts that can be called when GDM starts up.  So, what you want is metacity running, and keep it running when gnome launches.

This isn't a perfect fix, cause you will have metacity running with other desktop managers, but at least you can get into gnome much faster.

(Also, make sure you have all the extra startup apps turned off in gnome)

Ping me again on this later, and I'll post exact script code.

Larry


----------

