Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 217209 - NetworkManager-0.6.6 does not reconnect to WLAN after restarting hald or after Suspend
Summary: NetworkManager-0.6.6 does not reconnect to WLAN after restarting hald or afte...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GNOME (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Steev Klimaszewski (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on: 253788
Blocks:
  Show dependency tree
 
Reported: 2008-04-10 18:20 UTC by gruemelmonster
Modified: 2011-03-26 22:23 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Output of NetworkManager trying to reconnect (NM-log,5.81 KB, text/plain)
2008-04-10 18:42 UTC, gruemelmonster
Details
emerge --info networkmanager (info,4.23 KB, text/plain)
2010-09-25 16:16 UTC, Alessandro Capogna
Details

Note You need to log in before you can comment on or make changes to this bug.
Description gruemelmonster 2008-04-10 18:20:06 UTC
NetworkManager-0.6.6 is not able to reconnect to Wireless Network after recovery from Suspend. Same happens when restarting hald (0.5.10 - not tried with other versions).

Only solution I found right now is restarting. Neither restarting NetworkManager   nor unloading/reloading modules did help. 

Its a WPA2 encrypted Network and I am using a Intel Wireless card with the ipw2200 modules provided by the 2.6.24-gentoo-r4 kernel.

Everything was working fine before upgrading to gnome-2.22 hald-0.5.10 and lots of other packages.

I will attach nm's output, trying to reconnect in a separate Post.

Reproducible: Always

Steps to Reproduce:
1./etc/init.d/hald restart
2./etc/init.d/NetworkManager start


Actual Results:  
NetworkManager does not reconnect

Expected Results:  
NetworkManager should reconnect to my Wireless Network
Comment 1 gruemelmonster 2008-04-10 18:42:08 UTC
Created attachment 149326 [details]
Output of NetworkManager trying to reconnect
Comment 2 gruemelmonster 2008-04-10 18:46:57 UTC
While playing around a little more I noticed that when stopping NM before stopping  hald the Problem does not exist. Only whenever hald "stops" NetworkManager

So I guess there is a Problem with the start/stop scripts somewhere with hald-0.5.10 (just my 2ct)


Comment 3 Gilles Dartiguelongue (RETIRED) gentoo-dev 2008-04-10 20:54:09 UTC
works fine here... pm-utils are supposedly telling NM to disconnect before suspending and reconnect on resume. Check /var/log/pm-suspend.log for more details maybe ?
Comment 4 gruemelmonster 2008-04-13 19:31:17 UTC
I assume that could be the case with not connecting after resume. But how does it relate to stopping hald?

Anyways nothing irritating in pm-suspend.log

It seems to me, that the eth1 Interface does not get shut down properly when stopping hald (see. NM-log):

Couldn't send DHCP 'up' message because: name 'com.redhat.dhcp.OperationInProgress', message 'interface eth1 is being released. Please try again later.'

But I dont have a clue what that could mean.

I'll attach my emerge --info in an extra comment.
Comment 5 gruemelmonster 2008-04-13 19:34:28 UTC
Portage 2.1.5_rc2 (default-linux/x86/2007.0/desktop, gcc-4.1.2, glibc-2.6.1-r0, 2.6.24-gentoo-r4 i686)
=================================================================
System uname: 2.6.24-gentoo-r4 i686 Intel(R) Pentium(R) M processor 1.50GHz
Timestamp of tree: Sat, 12 Apr 2008 12:30:02 +0000
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.1.4
dev-lang/python:     2.4.4-r7, 2.5.1-r5
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.12
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium-m -fforce-addr -momit-leaf-frame-pointer -ftracer -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib/mozilla/defaults/pref"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -march=pentium-m -fforce-addr -momit-leaf-frame-pointer -ftracer -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="de_DE@euro"
LC_ALL="de_DE.UTF-8"
LDFLAGS=""
LINGUAS="de en"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
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"
PORTDIR_OVERLAY="/usr/portage/local/layman/sunrise /usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acl acpi alsa avahi beagle berkdb bluetooth cairo cdr cli cracklib crypt cups dbus dri dvd dvdr dvdread eds emboss encode esd evo fam firefox flac font-server fortran gdbm gif gnome gpm gstreamer gtk hal howl i8x0 iconv ipv6 irda isdnlog jpeg kerberos ldap libnotify mad midi mikmod mmx mmx2 mono mp3 mpeg mudflap ncurses nls nptl nptlonly ogg opengl openmp palm pam pcmcia pcre pdf perl png pppd python qt3 qt3support qt4 quicktime readline reflection samba sdl session spell spl sse sse2 ssl svg tcpd tetex theora tiff truetype unicode vorbis win32codecs x86 xinerama xml xorg xprint xv zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 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 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="keyboard mouse joystick evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de en" USERLAND="GNU" VIDEO_CARDS="i810 vesa"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 6 gruemelmonster 2008-04-13 20:36:16 UTC
Bug seems to be known upstream... 
(http://www.mail-archive.com/networkmanager-list@gnome.org/msg06138.html
https://bugzilla.redhat.com/show_bug.cgi?id=236965 )

But I wonder where in Gentoo the equivalent to /etc/dbus-1/event.d/22dhcdbd can be found...


Comment 7 Daniel Gryniewicz (RETIRED) gentoo-dev 2008-04-15 02:30:46 UTC
Works fine for me, even without pm-utils.  I echo "ram" > /sys/power/state to suspend, and nm reconnects fine.
Comment 8 gruemelmonster 2008-04-18 18:23:36 UTC
I'm still seeing this. Mostly when changing between Networks.

I am able to recover the Network if i do /etc/init.d/dhcdbd restart.

So i guess its rather a Problem with dhcdbd, than with hald or NetworkManager-0.6.6

Doesn't anybody else have problems after stopping /etc/init.d/hald?
Comment 9 χf 2008-06-26 20:50:49 UTC
I can confirm the error (running networkmanager-0.6.6, pm-utils-1.1.2.1, hal-0.5.11-r1, dhcdbd-3.0 over here) 

for me restarting dhcdbd also resolves the issue
Comment 10 Robert Buchholz (RETIRED) gentoo-dev 2008-06-27 02:01:33 UTC
I'm sorry for everyone bugged by this issue, but you seem to be those few who run into the race condition. Since neither NetworkManager upstream nor dhcpcd upstream want to fix the bug because dhcpcd is obsoleted by NM 0.7, I cannot see this bug here going anywhere. If no one has a good idea on how to work around this without breaking everyone else, I'll close this bug as UPSTREAM/CANTFIX.
Comment 11 Alan Clements 2009-02-05 07:41:58 UTC
"rmmod ipw2200" before suspend and then "modprobe ipw2200" after thaw should fix the problem. I'm not aware of any easy way to do that in gentoo. You could install sys-power/pm-utils, I believe it has a facility to offload the module
 
Comment 12 Jeremy Murphy 2009-03-25 02:12:09 UTC
I also experience this bug occasionally when reconnecting to my university's WPA2 Enterprise network on resume, and today I probed around and noticed that there was a defunct dhclient process.  Now dhclient is from net-misc/dhcp, so I just thought I'd ask the question: is that where the bug could be?
Comment 13 Scott Stubbs 2009-07-15 03:34:14 UTC
I understand upstream, but I think if we can kill the bug all the better. NM 0.7.0 doesn't seem to play well with kde 4 for me, so I don't see moving away anytime soon.

I'm just glad I found that the work around was a simple restart of dhcdbd instead of restarting my system like I've been doing.

I didn't read comment 12 in time to check if I had a defunct process but I'll keep an eye out for it. In the mean time some more info. I'm using hal-0.5.12_rc1-r6, dhcdbd-3.0, and no pm-utils. In fact I can't remember if it ever happened while I was hibernating/resuming (but I've been using tuxonice).

The bug occured this time by switching my wireless router to a different one (basically just changed the MAC) and knetworkmanager just tried to reconnect with the same settings (which were same on the "new" router). But that isn't something I've done often so I know that other things have prompted it as well for me.
Comment 14 Scott Stubbs 2009-07-15 07:48:27 UTC
So with my luck (as I was upgrading the firmware on my router) it happened again.

And sure enough I get that defunct dhclient. I did see in my log that dhclient says "can't create /var/lib/dhclient/dhclient-eth1.leases: No such file or directory" And right before that NetworkManager says it's deactivating eth1 because it found a better connection (the same connection).

Now, I don't even have a dhclient directory, so I'm not surprised that it couldn't create a file in it. And now I just restarted dhcdbd and I have a working connection (as expected) and still no directory. If I can get a way to reliably induce the bug, I will try it with that directory in place. Or maybe I'll look through the dhclient code (eventually).
Comment 15 Pacho Ramos gentoo-dev 2010-02-22 19:16:16 UTC
Do you still suffer this problem with current stable networkmanager and a recent kernel? Works fine for me with nm-0.7.2 and kernel-2.6.31

Good luck
Comment 16 Alessandro Capogna 2010-09-25 16:16:33 UTC
Created attachment 248611 [details]
emerge --info networkmanager

Yes, I do:

kernel 2.6.34-gentoo-r6
networkmanager 0.8-r1
hal 0.5.14-r2
dhcpcd 4.0.15

After laptop Hibernate (low battery) nm can't recognize any network device.
Do you maybe know some little workaround ? Cause i must use supplicant for wireless is uncomfortable for me.
Comment 17 Jeremy Murphy 2010-09-26 01:35:36 UTC
If restarting dhcdbd or reloading the wireless driver is sufficient to fix the issue, you can use sys-power/pm-utils to hook suspend/hibernate.  I use it to automatically unmount and then mount network fileshares.  'man pm-action' for documentation.

Alternatively, have you looked at wicd as an alternative to nm?  It has fewer dependencies and it operates independently of X.
Comment 18 Alessandro Capogna 2010-09-26 11:52:24 UTC
/etc/init.d/dhcdbd does not exist (on my laptop of course) and this issue is related to both networks (wired and wireless). But i think i can follow your suggest to try wicd ... thanks
Comment 19 Alessandro Capogna 2010-09-26 22:40:41 UTC
I just re-enable the network to make it work. So it is resolved for me (not really a bug). Anyway thanks for help!
Comment 20 Steev Klimaszewski (RETIRED) gentoo-dev 2011-03-26 22:23:15 UTC
Per comments on IRC from Alessandro Capogna, this is no longer an issue so closing the bug.