# Network Manager problems

## mm2577

I am fairly new to gentoo. I have it installed and working mostly. When I installed network manager some things went wrong. When network manager enables networking and connects nothing seems to work. Terminal looks like its going to load and nothing happens. Same goes for any thing in the application lists. To get things to work I have to disable networking and then terminal will pop up and work same goes for any application. Anyone have this problem maybe a solution. 

Thanks for any help

----------

## d2_racing

Hi, can you post this :

```

# emerge --info

# lspci -n

# ifconfig -a

# iwconfig

```

----------

## mm2577

Thanks for the help. Here is the info you asked for.

```

emerge --info

Portage 2.1.6.13 (default/linux/amd64/10.0/desktop, gcc-4.3.4, glibc-2.9_p20081201-r2, 2.6.30-gentoo-r5 x86_64)

=================================================================

System uname: Linux-2.6.30-gentoo-r5-x86_64-AMD_Turion-tm-_64_X2_Mobile_Technology_TL-50-with-gentoo-1.12.13

Timestamp of tree: Thu, 26 Nov 2009 19:30:23 +0000

app-shells/bash:     4.0_p28

dev-lang/python:     2.6.2-r1

dev-util/cmake:      2.6.4-r3

sys-apps/baselayout: 1.12.13

sys-apps/sandbox:    1.6-r2

sys-devel/autoconf:  2.13, 2.63-r1

sys-devel/automake:  1.9.6-r2, 1.10.2

sys-devel/binutils:  2.18-r3

sys-devel/gcc-config: 1.4.1

sys-devel/libtool:   2.2.6a

virtual/os-headers:  2.6.27-r2

ACCEPT_KEYWORDS="amd64"

CBUILD="x86_64-pc-linux-gnu"

CFLAGS="-O2 -pipe"

CHOST="x86_64-pc-linux-gnu"

CONFIG_PROTECT="/etc"

CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"

CXXFLAGS="-O2 -pipe"

DISTDIR="/usr/portage/distfiles"

FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"

GENTOO_MIRRORS="ftp://ftp.ucsb.edu/pub/mirrors/linux/gentoo/ "

LANG="C"

LDFLAGS="-Wl,-O1"

MAKEOPTS="-j3"

PKGDIR="/usr/portage/packages"

PORTAGE_CONFIGROOT="/"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

SYNC="rsync://rsync.gentoo.org/gentoo-portage"

USE="X Xdbus a52 aac acl acpi alsa amd64 autoipd avahi berkdb bluetooth branding bzip2 cairo cdr cli consolekit cracklib crypt cups dbus dri dts dvd dvdr eds emboss encode evo fam firefox flac fortran gdbm gif gnome gpm gstreamer gtk hal iconv ipv6 jpeg ldap libnotify mad mikmod mmx modules mp3 mp4 mpeg mudflap multilib ncurses nls nptl nptlonly ogg opengl openmp pam pcre pdf perl png ppds pppd python qt3support quicktime readline reflection sdl session spell spl sse sse2 ssl startup-notification svg sysfs tcpd thunar tiff truetype unicode usb vorbis x264 xml xorg xulrunner xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="nvidia"

Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY

lspci -n

00:00.0 0500: 10de:02f0 (rev a2)

00:00.1 0500: 10de:02fa (rev a2)

00:00.2 0500: 10de:02fe (rev a2)

00:00.3 0500: 10de:02f8 (rev a2)

00:00.4 0500: 10de:02f9 (rev a2)

00:00.5 0500: 10de:02ff (rev a2)

00:00.6 0500: 10de:027f (rev a2)

00:00.7 0500: 10de:027e (rev a2)

00:02.0 0604: 10de:02fc (rev a1)

00:03.0 0604: 10de:02fd (rev a1)

00:05.0 0300: 10de:0244 (rev a2)

00:09.0 0500: 10de:0270 (rev a2)

00:0a.0 0601: 10de:0260 (rev a3)

00:0a.1 0c05: 10de:0264 (rev a3)

00:0a.3 0b40: 10de:0271 (rev a3)

00:0b.0 0c03: 10de:026d (rev a3)

00:0b.1 0c03: 10de:026e (rev a3)

00:0d.0 0101: 10de:0265 (rev f1)

00:0e.0 0101: 10de:0266 (rev f1)

00:10.0 0604: 10de:026f (rev a2)

00:10.1 0403: 10de:026c (rev a2)

00:14.0 0680: 10de:0269 (rev a3)

00:18.0 0600: 1022:1100

00:18.1 0600: 1022:1101

00:18.2 0600: 1022:1102

00:18.3 0600: 1022:1103

07:05.0 0c00: 1180:0832

07:05.1 0805: 1180:0822 (rev 19)

07:05.2 0880: 1180:0843 (rev 01)

07:05.3 0880: 1180:0592 (rev 0a)

07:05.4 0880: 1180:0852 (rev 05)

```

```

ifconfig -a 

eth0      Link encap:Ethernet  HWaddr  

          inet addr:                Bcast:  Mask:255.255.254.0

          inet6 addr:  Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:54420 errors:0 dropped:0 overruns:0 frame:0

          TX packets:1952 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:4655929 (4.4 MiB)  TX bytes:320466 (312.9 KiB)

          Interrupt:20 Base address:0x6000 

[code]

lo        Link encap:Local Loopback  

          inet addr:127.0.0.1  Mask:255.0.0.0

          inet6 addr: ::1/128 Scope:Host

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:96 errors:0 dropped:0 overruns:0 frame:0

          TX packets:96 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0 

          RX bytes:8320 (8.1 KiB)  TX bytes:8320 (8.1 KiB)

wlan0     Link encap:Ethernet  HWaddr [/code] 

          UP BROADCAST MULTICAST  MTU:1500  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wmaster0  Link encap:UNSPEC  HWaddr 00-C0-CA-27-56-98-00-00-00-00-00-00-00-00-00-00  

          UP RUNNING  MTU:0  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

```

```

iwconfig

lo        no wireless extensions.

eth0      no wireless extensions.

wmaster0  no wireless extensions.

wlan0     IEEE 802.11bg  ESSID:""  

          Mode:Managed  Frequency:2.412 GHz  Access Point: Not-Associated   

          Tx-Power=20 dBm   

          Retry min limit:7   RTS thr:off   Fragment thr:off

          Encryption key:off

          Power Management:off

          Link Quality:0  Signal level:0  Noise level:0

          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0

          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

```

----------

## d2_racing

Ok, can you post this :

```

# iwlist scan

```

----------

## d2_racing

I don't see your wireless card from the output of lspci.

Are you using a pcmcia card ?

----------

## mm2577

Thanks again for the help.

```

iwlist scan

lo        Interface doesn't support scanning.

eth0      Interface doesn't support scanning.

wmaster0  Interface doesn't support scanning.

wlan0     Scan completed :

          Cell 01 - Address: 00:14:6C:1A:02:82

                    Channel:6

                    Frequency:2.437 GHz (Channel 6)

                    Quality=49/70  Signal level=-61 dBm  

                    Encryption key:on

                    ESSID:"Wilson"

                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s

                              12 Mb/s; 24 Mb/s; 36 Mb/s

                    Bit Rates:9 Mb/s; 18 Mb/s; 48 Mb/s; 54 Mb/s

                    Mode:Master

                    Extra:tsf=0000002cdfd144da

                    Extra: Last beacon: 1430ms ago

                    IE: Unknown: 000657696C736F6E

                    IE: Unknown: 010882848B960C183048

                    IE: Unknown: 030106

                    IE: Unknown: 2A0100

                    IE: Unknown: 32041224606C

                    IE: Unknown: DD0900037F0101001F0000

                    IE: Unknown: DD1A00037F030100000000146C1A028202146C1A028264002C011F08

          Cell 02 - Address: 00:13:10:94:86:87

                    Channel:6

                    Frequency:2.437 GHz (Channel 6)

                    Quality=39/70  Signal level=-71 dBm  

                    Encryption key:on

                    ESSID:"linksys"

                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 18 Mb/s

                              24 Mb/s; 36 Mb/s; 54 Mb/s

                    Bit Rates:6 Mb/s; 9 Mb/s; 12 Mb/s; 48 Mb/s

                    Mode:Master

                    Extra:tsf=00000035e6489332

                    Extra: Last beacon: 1420ms ago

                    IE: Unknown: 00076C696E6B737973

                    IE: Unknown: 010882848B9624B0486C

                    IE: Unknown: 030106

                    IE: Unknown: 2A0100

                    IE: Unknown: 2F0100

                    IE: Unknown: 32048C129860

                    IE: Unknown: DD06001018010100

          Cell 03 - Address: 00:13:46:10:78:7A

                    Channel:6

                    Frequency:2.437 GHz (Channel 6)

                    Quality=36/70  Signal level=-74 dBm  

                    Encryption key:on

                    ESSID:"JB"

                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s

                              12 Mb/s; 24 Mb/s; 36 Mb/s

                    Bit Rates:9 Mb/s; 18 Mb/s; 48 Mb/s; 54 Mb/s

                    Mode:Master

                    Extra:tsf=000001e1facc62b6

                    Extra: Last beacon: 1700ms ago

                    IE: Unknown: 00024A42

                    IE: Unknown: 010882848B960C183048

                    IE: Unknown: 030106

                    IE: Unknown: DD0600032F010001

                    IE: Unknown: 2A0100

                    IE: Unknown: 32041224606C

          Cell 04 - Address: 00:18:4D:52:66:C2

                    Channel:11

                    Frequency:2.462 GHz (Channel 11)

                    Quality=35/70  Signal level=-75 dBm  

                    Encryption key:on

                    ESSID:"mattrent"

                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s

                              12 Mb/s; 24 Mb/s; 36 Mb/s

                    Bit Rates:9 Mb/s; 18 Mb/s; 48 Mb/s; 54 Mb/s

                    Mode:Master

                    Extra:tsf=000000149c6c99fd

                    Extra: Last beacon: 1010ms ago

                    IE: Unknown: 00086D61747472656E74

                    IE: Unknown: 010882848B960C183048

                    IE: Unknown: 03010B

                    IE: Unknown: 2A0100

                    IE: Unknown: 32041224606C

                    IE: Unknown: DD0900037F0101000E0000

                    IE: Unknown: DD1A00037F030100000000184D5266C202184D5266C264002C010E08

                    IE: Unknown: DD180050F2020101000003A4000027A4000042435E0062322F00

          Cell 05 - Address: 00:1E:2A:69:3A:26

                    Channel:11

                    Frequency:2.462 GHz (Channel 11)

                    Quality=44/70  Signal level=-66 dBm  

                    Encryption key:on

                    ESSID:"jackswireless"

                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s

                              12 Mb/s; 24 Mb/s; 36 Mb/s

                    Bit Rates:9 Mb/s; 18 Mb/s; 48 Mb/s; 54 Mb/s

                    Mode:Master

                    Extra:tsf=000015b5b574b181

                    Extra: Last beacon: 710ms ago

                    IE: Unknown: 000D6A61636B73776972656C657373

                    IE: Unknown: 010882848B960C183048

                    IE: Unknown: 03010B

                    IE: Unknown: 2A0102

                    IE: Unknown: 32041224606C

My wireless card on my laptop is broke I think. It's a broadcom and I have read its a known issue the card fails.  It cuts in and out sometimes it sees it and sometimes not. I use an external wireless card made by alfa network  model: awus036h  As for pcmcia I believe it uses an
```

 express card. I installed gentoo on an hp dv6000.

----------

## d2_racing

Ok, can you post this :

```

# cat /etc/conf.d/net

# cd /etc/init.d && ls -la

# rc-update show

```

Right now, what network manager are you using ? WICD or networkmanager and which WM are you using ?

----------

## mm2577

Here goes the info 

```

cat /etc/conf.d/net

# This blank configuration will automatically use DHCP for any net.*

# scripts in /etc/init.d.  To create a more complete configuration,

# please review /etc/conf.d/net.example and save your configuration

# in /etc/conf.d/net (this file :]!).

config_eth0=( "dhcp" )

modules=( "wpa_supplicant" )

wpa_supplicant_wlan0="-rtl8187"

modules=( "iwconfig" )

wpa_timeout_wlan0=15

cd /etc/init.d/ && ls -la

total 276

drwxr-xr-x  2 root root  4096 Dec 13 18:38 .

drwxr-xr-x 69 root root  4096 Dec 14 15:34 ..

-rwxr-xr-x  1 root root   583 Dec 13 18:37 NetworkManager

-rwxr-xr-x  1 root root  1072 Nov 30 17:02 NetworkManagerDispatcher

-rwxr-xr-x  1 root root   818 Nov 25 15:06 acpid

-rwxr-xr-x  1 root root   451 Nov 30 15:31 avahi-daemon

-rwxr-xr-x  1 root root   445 Nov 30 15:31 avahi-dnsconfd

-rwxr-xr-x  1 root root  1171 Nov 25 19:43 bluetooth

-rwxr-xr-x  1 root root  3614 Nov 19 08:25 bootmisc

-rwxr-xr-x  1 root root  1232 Nov 19 08:25 checkfs

-rwxr-xr-x  1 root root  3226 Nov 19 08:25 checkroot

-rwxr-xr-x  1 root root  3054 Nov 19 08:25 clock

-rwxr-xr-x  1 root root  1419 Nov 19 08:25 consolefont

-rwxr-xr-x  1 root root   586 Nov 25 15:14 consolekit

-rwxr-xr-x  1 root root  1729 Nov 19 11:19 crypto-loop

-rwxr-xr-x  1 root root   286 Nov 25 15:31 cupsd

-rwxr-xr-x  1 root root  1152 Nov 25 15:01 dbus

lrwxrwxrwx  1 root root    21 Nov 23 11:23 depscan.sh -> ../../sbin/depscan.sh

-rwxr-xr-x  1 root root   628 Nov 25 14:58 device-mapper

-rwxr-xr-x  1 root root   458 Nov 30 15:52 dhcdbd

-rwxr-xr-x  1 root root  2421 Nov 30 15:51 dhcpd

-rwxr-xr-x  1 root root   736 Nov 30 15:51 dhcrelay

-rwxr-xr-x  1 root root   660 Nov 25 15:08 dmcrypt

-rwxr-xr-x  1 root root   547 Nov 25 14:58 dmeventd

-rwxr-xr-x  1 root root   993 Nov 25 18:55 esound

lrwxrwxrwx  1 root root    23 Nov 23 11:23 functions.sh -> ../../sbin/functions.sh

-rwxr-xr-x  1 root root   951 Nov 19 10:04 gpm

-rwxr-xr-x  1 root root  1187 Nov 25 15:24 hald

-rwxr-xr-x  1 root root  5606 Nov 19 08:25 halt.sh

-rwxr-xr-x  1 root root   433 Nov 19 08:25 hostname

-rwxr-xr-x  1 root root  2570 Nov 26 19:29 ip6tables

-rwxr-xr-x  1 root root  2570 Nov 26 19:29 iptables

-rwxr-xr-x  1 root root  1855 Nov 19 08:25 keymaps

-rwxr-xr-x  1 root root   742 Nov 27 16:36 kismet

-rwxr-xr-x  1 root root   620 Nov 19 08:25 local

-rwxr-xr-x  1 root root  2088 Nov 19 08:25 localmount

-rwxr-xr-x  1 root root  2947 Nov 19 08:25 modules

lrwxrwxrwx  1 root root     6 Nov 23 11:22 net.eth0 -> net.lo

-rwxr-xr-x  1 root root 30689 Nov 19 08:25 net.lo

-rwxr-xr-x  1 root root  3307 Nov 19 08:25 netmount

-rwxr-xr-x  1 root root  1566 Nov 19 08:58 nscd

-rwxr-xr-x  1 root root   833 Nov 30 17:39 ntp-client

-rwxr-xr-x  1 root root   827 Nov 30 17:39 ntpd

-rwxr-xr-x  1 root root   670 Nov 19 08:25 numlock

-rwxr-xr-x  1 root root  1871 Nov 25 15:03 pciparm

-rwxr-xr-x  1 root root   538 Nov 25 18:11 pwcheck

-rwxr-xr-x  1 root root   666 Nov 19 09:23 pydoc-2.6

-rwxr-xr-x  1 root root   304 Nov 19 07:59 reboot.sh

-rwxr-xr-x  1 root root   276 Nov 19 08:25 rmnologin

-rwxr-xr-x  1 root root   558 Nov 19 09:44 rsyncd

lrwxrwxrwx  1 root root    23 Nov 23 11:23 runscript.sh -> ../../sbin/runscript.sh

-rwxr-xr-x  1 root root   525 Nov 25 18:11 saslauthd

-rwxr-xr-x  1 root root   385 Nov 19 07:59 shutdown.sh

-rwxr-xr-x  1 root root  2159 Nov 26 08:21 sshd

-rwxr-xr-x  1 root root  1882 Nov 23 12:29 syslog-ng

-rwxr-xr-x  1 root root  5803 Nov 19 08:26 udev

-rwxr-xr-x  1 root root  2585 Nov 19 08:26 udev-dev-tarball

-rwxr-xr-x  1 root root  2686 Nov 19 08:26 udev-mount

-rwxr-xr-x  1 root root   685 Nov 19 08:26 udev-postmount

-rwxr-xr-x  1 root root   942 Nov 19 08:25 urandom

-rwxr-xr-x  1 root root   530 Nov 23 20:12 vixie-cron

-rwxr-xr-x  1 root root  5311 Nov 25 15:21 xdm

-rwxr-xr-x  1 root root   340 Nov 25 15:21 xdm-setup

rc-update show

      NetworkManager |      default                                   

 NetworkManagerDispa |      default                                   

      avahi-dnsconfd |      default                                   

            bootmisc | boot                                           

             checkfs | boot                                           

           checkroot | boot                                           

               clock | boot                                           

         consolefont | boot                                           

                dbus |      default                                   

              dhcdbd |      default                                   

                hald |      default                                   

            hostname | boot                                           

             keymaps | boot                                           

               local |      default                  nonetwork        

          localmount | boot                                           

             modules | boot                                           

              net.lo | boot                                           

            netmount |      default                                   

          ntp-client |              network_services                  

           rmnologin | boot                                           

           syslog-ng |      default                                   

             urandom | boot                                           

          vixie-cron |      default                                   

                 xdm |      default          
```

----------

## d2_racing

Ok first, since you use try to use wpa_supplicant, we will try this:

Change this file :

```

# cat /etc/conf.d/net 

config_eth0=( "dhcp" ) 

modules=( "wpa_supplicant" ) 

wpa_supplicant_wlan0="-rtl8187" 

modules=( "iwconfig" ) 

wpa_timeout_wlan0=15 

```

To this : 

```

config_eth0=( "dhcp" ) 

modules=( "wpa_supplicant" ) 

wpa_supplicant_wlan0="-Dwext"

modules=( "iwconfig" ) 

wpa_timeout_wlan0=15 

```

Also, run this :

```

# rc-update del NetworkManager 

# rc-update del NetworkManagerDispa 

```

Now can you run this :

```

# cd /etc/init.d

# ln -sfn net.lo net.wlan0

```

After that, post this :

```

# cat /etc/wpa_supplicant/wpa_supplicant.conf

```

----------

## d2_racing

Also, can you tell me which AP you want to connect ?

----------

## patrikh

As a matter of fact this is the same problem that I have. See https://forums.gentoo.org/viewtopic-p-6111682.html#6111682 . And as I know a bit more I dug a bit deeper and tried a few things. This is it:

 *Quote:*   

> As soon as NetworkManager is up, it works, BUT: It changes my hostname to "dhcppc3" and this messes up Xorg so that NO Xorg/Gnome applications start anymore! (nothing happens e.g. if I open a gnome-terminal - if I start something from an open console I get hostname error / no display at 0:0 found etc.). When I shutdown NM or do $hostname gentoo it works again. It does not change /etc/conf.d/hostname (still the right "gentoo" hostname there), but $hostname shows the wrong one (dhcppc3).
> 
> I have the same behaviour with both dhcpcd and dhcp (dhclient). I did not found an answer on google. Any ideas?

 

 *Quote:*   

> When network manager enables networking and connects nothing seems to work. Terminal looks like its going to load and nothing happens. Same goes for any thing in the application lists. To get things to work I have to disable networking and then terminal will pop up and work same goes for any application.

 

This is exactly what I also have, and also why. So maybe someone knows a solution?

----------

## patrikh

Some more info about this:

http://www.mail-archive.com/networkmanager-list@gnome.org/msg11329.html , https://bugs.gentoo.org/287498

I already have 

```
[ -x /usr/bin/xhost ] && [ -x /usr/bin/id ] &&

    xhost +si:localuser:`id -un` >& /dev/null

```

 in /etc/X11/xinit/xinitrc.d/00-xhost.

I also tried the following:

In /etc/dhcp/dhclient.conf:

```
send host-name "gentoo";

supersede host-name "gentoo";
```

Now, the following:

A) If I have NetworkManager in default runlevel starting, it does still not work and no X app windows open. But $hostname echoes the correct one, "gentoo".

B) If I don't have NetworkManager in default runlevel, start without it, and then in the running and working gnome-session manually do: $sudo /etc/init.d/NetworkManager start, then everything is working. ($ hostname also echoes "gentoo")

Sucks starting NM by hand on every startup...  :Sad:  Any ideas?

----------

## patrikh

Ok after 3 restarts A) suddenly works too. So the main thing that did the trick was

```
send host-name "gentoo";

supersede host-name "gentoo";
```

.

This was some really strange behaviour of NM and X I had which everything should theoretically already be fixed according to bugs.gentoo.org/patches. But well... no gentoo without hours of solving problems with trivial applications.

I wonder how this option is with dhcpcd, or how to send dhclient to background and not wait for a lease on startup because this really slows down the boot process  :Smile:  But I will find this out tomorrow, too tired now.

----------

## patrikh

No it does not work. If NM is autostarted on default runlevel, it changes the hostname or something to "localhost.localdomain" and gnome/X-Apps do not start.

# NetworkManager --no-daemon

NetworkManager: <info>  starting...

 * status: started

NetworkManager: <info>  Found radio killswitch /org/freedesktop/Hal/devices/pci_8086_4237_rfkill_phy0_wlan

NetworkManager: nm_device_ethernet_new: assertion `driver != NULL' failed

NetworkManager: <info>  (eth0): new Ethernet device (driver: 'e1000e')

NetworkManager: <info>  (eth0): exported as /org/freedesktop/Hal/devices/net_00_1f_16_14_83_6a

NetworkManager: <info>  (wlan0): driver supports SSID scans (scan_capa 0x01).

NetworkManager: <info>  (wlan0): new 802.11 WiFi device (driver: 'iwlagn')

NetworkManager: <info>  (wlan0): exported as /org/freedesktop/Hal/devices/net_00_21_6b_13_69_12

NetworkManager: <info>  (ttyS0): ignoring due to lack of mobile broadband capabilties

NetworkManager: <info>  Trying to start the supplicant...

NetworkManager: <info>  Trying to start the system settings daemon...

NetworkManager: <info>  (eth0): device state change: 1 -> 2 (reason 2)

NetworkManager: <info>  (eth0): bringing up device.

NetworkManager: <info>  (eth0): preparing device.

NetworkManager: <info>  (eth0): deactivating device (reason: 2).

NetworkManager: <info>  Setting system hostname to 'localhost.localdomain' (no default device)

NetworkManager: <info>  (wlan0): device state change: 1 -> 2 (reason 2)

NetworkManager: <info>  (wlan0): bringing up device.

NetworkManager: <info>  (wlan0): preparing device.

NetworkManager: <info>  (wlan0): deactivating device (reason: 2).

NetworkManager: supplicant_interface_acquire: assertion `mgr_state == NM_SUPPLICANT_MANAGER_STATE_IDLE' failed

NetworkManager: <info>  (eth0): carrier now ON (device state 2)

NetworkManager: <info>  (eth0): device state change: 2 -> 3 (reason 40)

NetworkManager: <info>  Activation (eth0) starting connection 'Auto Ethernet'

NetworkManager: <info>  (eth0): device state change: 3 -> 4 (reason 0)

NetworkManager: <info>  Activation (eth0) Stage 1 of 5 (Device Prepare) scheduled...

NetworkManager: <info>  Activation (eth0) Stage 1 of 5 (Device Prepare) started...

NetworkManager: <info>  Activation (eth0) Stage 2 of 5 (Device Configure) scheduled...

NetworkManager: <info>  Activation (eth0) Stage 1 of 5 (Device Prepare) complete.

NetworkManager: <info>  Activation (eth0) Stage 2 of 5 (Device Configure) starting...

NetworkManager: <info>  (eth0): device state change: 4 -> 5 (reason 0)

NetworkManager: <info>  Activation (eth0) Stage 2 of 5 (Device Configure) successful.

NetworkManager: <info>  Activation (eth0) Stage 3 of 5 (IP Configure Start) scheduled.

NetworkManager: <info>  Activation (eth0) Stage 2 of 5 (Device Configure) complete.

NetworkManager: <info>  Activation (eth0) Stage 3 of 5 (IP Configure Start) started...

NetworkManager: <info>  (eth0): device state change: 5 -> 7 (reason 0)

NetworkManager: <info>  Activation (eth0) Beginning DHCP transaction.

NetworkManager: <info>  dhcpcd started with pid 5601

NetworkManager: <info>  Activation (eth0) Stage 3 of 5 (IP Configure Start) complete.

dhcpcd: version 5.1.3 starting

dhcpcd: eth0: rebinding lease of 192.168.1.36

NetworkManager: <info>  DHCP: device eth0 state changed (null) -> preinit

dhcpcd: eth0: acknowledged 192.168.1.36 from 192.168.1.1

dhcpcd: eth0: checking for 192.168.1.36

dhcpcd: eth0: leased 192.168.1.36 for 259200 seconds

NetworkManager: <info>  DHCP: device eth0 state changed preinit -> bound

NetworkManager: <info>  Activation (eth0) Stage 4 of 5 (IP Configure Get) scheduled...

NetworkManager: <info>  Activation (eth0) Stage 4 of 5 (IP Configure Get) started...

NetworkManager: <info>    address 192.168.1.36

NetworkManager: <info>    prefix 24 (255.255.255.0)

NetworkManager: <info>    gateway 192.168.1.1

NetworkManager: <info>    hostname 'dhcppc3'

NetworkManager: <info>    nameserver '192.168.1.1'

NetworkManager: <info>  Activation (eth0) Stage 5 of 5 (IP Configure Commit) scheduled...

NetworkManager: <info>  Activation (eth0) Stage 4 of 5 (IP Configure Get) complete.

NetworkManager: <info>  Activation (eth0) Stage 5 of 5 (IP Configure Commit) started...

NetworkManager: <info>  (eth0): device state change: 7 -> 8 (reason 0)

NetworkManager: <info>  Policy set 'Auto Ethernet' (eth0) as default for routing and DNS.

NetworkManager: <info>  Setting system hostname to 'dhcppc3' (from DHCP)

NetworkManager: <info>  Activation (eth0) successful, device activated.

NetworkManager: <info>  Activation (eth0) Stage 5 of 5 (IP Configure Commit) complete.

NetworkManager: <info>  Trying to start the supplicant...

NetworkManager: <info>  Trying to start the system settings daemon...

Why?  :Sad: 

----------

## eccerr0r

I think I had this problem on my machine a while ago (trying to compare with your observations), and somehow, some way, it was fixed by simply choosing a default name for your machine (of your choice) and adding it to /etc/conf.d/hostname as HOSTNAME="yourhost" ...

I did not have to hack my dhcp config.

I did not have to hack my net config.

I don't have an entry in /etc/hosts for this hostname but it seems to work.

----------

## patrikh

 *eccerr0r wrote:*   

> I think I had this problem on my machine a while ago (trying to compare with your observations), and somehow, some way, it was fixed by simply choosing a default name for your machine (of your choice) and adding it to /etc/conf.d/hostname as HOSTNAME="yourhost" ...
> 
> .

 

How can I chose a default name for your machine? If you only mean /etc/conf.d/hostname as HOSTNAME="yourhost", I set when I installed gentoo, so this has been there all the time.

----------

## eccerr0r

That was all I had to do...odd.  Might have been the fact that the hostname must not be resolvable?

The other suspect is that the entry for localhost in /etc/hosts is the way it is...  Don't know about that one though.

----------

## teedubb

i had a bunch of troubles with networkmanager, i'm now using wicd with great success.  i suggest using wicd instead.

http://wicd.sourceforge.net/development.php

http://www.gentoo-wiki.info/Wireless/Managers

http://en.gentoo-wiki.com/wiki/Speed_Up_Boot_With_Wicd

----------

## knifeyspoony

A fix is suggested in the Ubuntu bug report:

 *Quote:*   

> add
> 
> [keyfile]
> 
> hostname=YOURHOSTNAME
> ...

 

I don't know what the keyfile plugin is, and I don't know if this file exists under Gentoo. Nonetheless: Does it work for you?

----------

## eccerr0r

Strange, my nm-system-settings.conf is default...  All I had to do is have a hostname that cannot be resolved in /etc/conf.d/hostname...  Which I suspect will break sendmail, but ...

----------

