Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 466102 - net-misc/networkmanager-0.9.6.4-r1: NetworkManager service sometimes gets stuck as "inactive" after waking from sleep/hibernate
Summary: net-misc/networkmanager-0.9.6.4-r1: NetworkManager service sometimes gets stu...
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords: NeedPatch
: 482002 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-04-16 14:04 UTC by PM
Modified: 2014-10-21 09:12 UTC (History)
5 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description PM 2013-04-16 14:04:44 UTC
Every now and then after waking my system from sleep or hibernation, the NetworkManager service gets stuck on "inactive" state, even though the connection is established successfully. This causes all services depending on it to stop and enter "scheduled" state.

The connection itself is a simple ethernet / dhcp setup, nothing special about it. 

It can be easily fixed by manually disabling and reenabling my internet connection each time it gets stuck, but it's not immediately obvious when this happens and it's very annoying.


Portage 2.2.0_alpha173 (default/linux/amd64/13.0/desktop, gcc-4.7.2, glibc-2.17, 3.8.2-pf x86_64)
=================================================================
                        System Settings
=================================================================
System uname: Linux-3.8.2-pf-x86_64-Intel-R-_Core-TM-2_Quad_CPU_Q9450_@_2.66GHz-with-gentoo-2.2
KiB Mem:     4044400 total,    477476 free
KiB Swap:    4095996 total,   4020308 free
Timestamp of tree: Tue, 16 Apr 2013 12:00:01 +0000
ld GNU ld (GNU Binutils) 2.23.1
distcc 3.1 x86_64-pc-linux-gnu [disabled]
app-shells/bash:          4.2_p45
dev-java/java-config:     2.2.0
dev-lang/python:          2.7.3-r3, 3.2.3-r2
dev-util/cmake:           2.8.11_rc2-r1::kde
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.4_p6-r1, 1.9.6-r3, 1.11.6, 1.13.1
sys-devel/binutils:       2.23.1
sys-devel/gcc:            4.6.3, 4.7.2-r1, 4.8.0
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.8 (virtual/os-headers)
sys-libs/glibc:           2.17
Repositories: gentoo multimedia sunrise steam-overlay kde roslin dupa
Installed sets: @system
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native -pipe -ggdb"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/polkit-1/actions /usr/share/themes/oxygen-gtk/gtk-2.0 /usr/share/themes/oxygen-gtk/gtk-3.0"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -march=native -pipe -ggdb"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--keep-going --quiet-build=n"
FCFLAGS="-O2 -march=native -pipe -ggdb"
FEATURES="assume-digests binpkg-logs compressdebug config-protect-if-modified distlocks ebuild-locks fixlafiles installsources merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -march=native -pipe -ggdb"
GENTOO_MIRRORS="http://ftp.spline.inf.fu-berlin.de/mirrors/gentoo/ http://ftp-stud.hs-esslingen.de/pub/Mirrors/gentoo/"
LANG="pl_PL.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/layman/multimedia /usr/local/portage/layman/sunrise /usr/local/portage/layman/steam /usr/local/portage/layman/kde /usr/local/portage/layman/roslin /usr/local/portage/moje"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X Xaw3d a52 aac aalib acl acpi alsa amd64 amr amrnb amrwb apng async audiofile automount avahi avresample bash-completion berkdb bfq bineditor bluetooth bluray branding bzip2 c++0x cairo cdda cddb cdparanoia cdr chdir clang cli consolekit cracklib crypt css cuda cups curl cxx dbus dirac disk-partition divx djvu dri dts dvd dvdr ebook editor emboss emovix enca encode exchange exif faac faad fam fat ffmpeg fftw firefox firefox3 flac fontconfig fortran g3dvl gd gdbm geoip gif glitz gmedia gnuplot gphoto2 gpm gtk hddtemp iconv id3 id3tag imagemagick inotify iostats ipod jpeg kde kde4 kdehiddenvisibility kipi kompare kpathsea kqemu ladspa lame laptop lastfm latex lcms libass libcaca libnotify libsamplerate lm_sensors lzma lzo mad matroska midi mjpeg mmap mmx mmxext mng modules moodbar mp3 mp3tunes mp4 mpeg mplayer mtp mudflap multilib musicbrainz ncurses networkmanager nls nptl nsplugin ntfs nvidia ogg okteta openal opencl opencore-amr opengl openmp optimized-qmake pam pango pch pcre pdf plasma png policykit portage ppds private-headers pulseaudio qt3 qt3support qt4 qthelp raster readline realmedia roe scanner schroedinger sdl secure-delete semantic-desktop sensord session shaders slang sndfile solver soundtouch sourceview sparse spell sse sse2 sse3 sse4 sse41 sse4_1 sse4a ssl ssse3 startup-notification suid svg swat symlink syslog tcpd theora threads tiff truetype udev udisks unicode upnp upower usb vaapi vamp vcd vdpau vorbis wifi wmf wmp wxwidgets wxwindows x264 xcb xcomposite xml xscreensaver xv xvid xvmc zlib" ABI_X86="64" 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="authn_core authz_core socache_shmcb unixd 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 cgi cgid 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" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="pl" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" QEMU_SOFTMMU_TARGETS="x86_64 i386" QEMU_USER_TARGETS="x86_64 i386" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

=================================================================
                        Package Settings
=================================================================

net-misc/networkmanager-0.9.6.4-r1 was built with the following:
USE="avahi bluetooth consolekit dhcpcd introspection nss wext -connection-sharing -dhclient -doc -gnutls -modemmanager -ppp -resolvconf -systemd -vala -wimax"
Comment 1 Pacho Ramos gentoo-dev 2013-06-16 12:10:20 UTC
Still the same with 0.9.8.2?
Comment 2 Sergey Ilinykh 2013-06-17 03:02:38 UTC
yes. after resume internet works (and even nm-applet shows correct icon) but NetworkManager service for some reason in "stopped" state.


dizzynb # /etc/init.d/spectrum start
spectrum             | * ERROR: cannot start spectrum as NetworkManager would not start
dizzynb # ejabberd             | * ERROR: cannot start ejabberd as NetworkManager would not start

dizzynb # /etc/init.d/NetworkManager start
NetworkManager       | * Starting NetworkManager ...
NetworkManager       | * start-stop-daemon: /usr/sbin/NetworkManager is already running                                                                                                                                            [ !! ]
NetworkManager       | * ERROR: NetworkManager failed to start

dizzynb # /etc/init.d/NetworkManager status
 * status: stopped


and next lines are right after resume but already after I connected to wifi:
dizzynb # /etc/init.d/NetworkManager status
 * status: stopping
Comment 3 Sergey Ilinykh 2013-06-17 03:39:07 UTC
I've added some logs to /etc/NetworkManager/dispatcher.d/10-openrc-status

come to 10-openrc-status. NM: * status: started
pre-sleep:NetworkManager stop
come to 10-openrc-status. NM: * status: stopping
down:NetworkManager stop
come to 10-openrc-status. NM: * status: stopping
up:NetworkManager start


I tried to comment out pre-sleep handler, but this didn't fix the problem.
looks like NM goes to stopping state on suspend and on resume it's still in this state. so start just doesn't work
Comment 4 Florian Manschwetus 2013-07-22 10:39:03 UTC
I found current NetworkManager seems to have som einteroperability issues with pm-utils (using kde and tp-sleep button).
I fixed it by adding an custom sleep.d hook:
cat /etc/pm/sleep.d/40nm_sleep
#!/bin/bash

case "${1}" in
        resume | thaw | connect )
                /usr/bin/nmcli nm sleep false
                ;;
        suspend | hibernate | disconnect )
                /usr/bin/nmcli nm sleep true
                ;;
        * )
                exit 0
                ;;
esac

This also speeds up the network reconnection after suspend
Comment 5 Pacho Ramos gentoo-dev 2013-10-10 19:17:38 UTC
*** Bug 482002 has been marked as a duplicate of this bug. ***
Comment 6 Pacho Ramos gentoo-dev 2013-12-09 08:54:43 UTC
(In reply to Florian Manschwetus from comment #4)
> I found current NetworkManager seems to have som einteroperability issues
> with pm-utils (using kde and tp-sleep button).
> I fixed it by adding an custom sleep.d hook:
> cat /etc/pm/sleep.d/40nm_sleep
> #!/bin/bash
> 
> case "${1}" in
>         resume | thaw | connect )
>                 /usr/bin/nmcli nm sleep false
>                 ;;
>         suspend | hibernate | disconnect )
>                 /usr/bin/nmcli nm sleep true
>                 ;;
>         * )
>                 exit 0
>                 ;;
> esac
> 
> This also speeds up the network reconnection after suspend

I would report this to upstream (bugzilla.gnome.org) as I doubt it's intended this need to fix NM status when resuming and suspending (if it's intended, we can go ahead and provide this for pm-utils then)

Once reported, please post the link here to let us track the issue

Thanks
Comment 7 Pacho Ramos gentoo-dev 2013-12-24 12:05:46 UTC
Any news?
Comment 8 Pacho Ramos gentoo-dev 2014-09-22 19:21:05 UTC
+*networkmanager-0.9.10.0 (22 Sep 2014)
+
+  22 Sep 2014; Pacho Ramos <pacho@gentoo.org> +networkmanager-0.9.10.0.ebuild,
+  -networkmanager-0.9.8.8.ebuild, metadata.xml:
+  Version bump, default to dhclient instead of dhcpcd (#493732), set proper pppd
+  plugindir (#519986 by Clemente Aguiar, Sergey Popov, Agostino Sarubbo and
+  others), remove wimax support (#522822 by Dion Moult), drop old.
+

Still valid with this and updated pm-utils?
Comment 9 Sergey Ilinykh 2014-10-04 06:03:00 UTC
just tried. seems to work.
Comment 10 Sergey Ilinykh 2014-10-20 01:33:15 UTC
hm just got inactive network manager after resume.
the internet works fine, but not network manager
Comment 11 Sergey Ilinykh 2014-10-20 03:42:52 UTC
looks like the reason was in ifnet plugin which does not exists in new networkmanager but still kept in config file.
Comment 12 Pacho Ramos gentoo-dev 2014-10-20 09:57:29 UTC
You should have been warned about this with this:
        # NM doesn't fallback to the second listed plugin, upstream bug #738611
        if [[ -e "${EROOT}etc/NetworkManager/NetworkManager.conf" ]]; then
                if grep -q plugins "${EROOT}etc/NetworkManager/NetworkManager.conf" | grep -q ifnet; then
                        ewarn
                        ewarn "You seem to use 'ifnet' plugin in ${EROOT}etc/NetworkManager/NetworkManager.conf"
                        ewarn "Since it won't be used when running under Systemd, you will need to stop setting"
                        ewarn "ifnet plugin there to allow NetworkManager to work."
                        ewarn
                fi
        fi


Please attach your NetworkManager.conf to let me retry the command works as expected (it did in the past with my conf file :/)

Thanks
Comment 13 Sergey Ilinykh 2014-10-20 18:13:45 UTC
something like this

[main]
plugins=keyfile

no-auto-default=00:90:F5:D0:04:15,

[ifnet]
managed=true
auto_refresh=false


btw, after removing ifnet plugin, it seems to work fine again =)
Comment 14 Pacho Ramos gentoo-dev 2014-10-20 20:19:03 UTC
(In reply to Rion from comment #13)
> something like this
> 
> [main]
> plugins=keyfile
> 
> no-auto-default=00:90:F5:D0:04:15,
> 
> [ifnet]
> managed=true
> auto_refresh=false
> 
> 
> btw, after removing ifnet plugin, it seems to work fine again =)

Can you confirm? Looks like that one is not setting "ifnet" in plugins (and, then, the grep doesn't catch it) but me having a file like your doesn't make NM to break :/ (even with the managed=true)
Comment 15 Sergey Ilinykh 2014-10-21 02:18:35 UTC
yes, it's already fixed config.
previously I had "plugins=ifnet,keyfile" and nm failed to start.

but as far as I remember the original source of problem was in in something else.

now nm resumes fine. it has other bugs though but not related to resume
Comment 16 Pacho Ramos gentoo-dev 2014-10-21 09:12:32 UTC
+  21 Oct 2014; Pacho Ramos <pacho@gentoo.org> networkmanager-0.9.10.0-r1.ebuild:
+  Fix the check for ifnet plugin in config
+