reconnect/disconnect on resume/suspend will not be executed cause the responsible script contains errors.. It try`s to source from $PM_FUNCTIONS or $FUNCTIONS but both arent set grep wicd /var/log/pm-suspend.log ===== Di 23. Dez 20:14:27 CET 2008: running hook: /usr/lib/pm-utils/sleep.d/55wicd ===== /usr/lib/pm-utils/sleep.d/55wicd: line 5: : Datei oder Verzeichnis nicht gefunden ===== Di 23. Dez 20:14:54 CET 2008: running hook: /usr/lib/pm-utils/sleep.d/55wicd ===== /usr/lib/pm-utils/sleep.d/55wicd: line 5: : Datei oder Verzeichnis nicht gefunden (Datei oder Verzeichnis nicht gefunden = File or Directory not found) /usr/lib/pm-utils/sleep.d/55wicd - line 5: . "${PM_FUNCTIONS}" || . "${FUNCTIONS}"
Please, paste your "emerge --info" output and your "emerge -pv wicd" output. Also, paste again the actual error, in a sane locale environment (export LC_ALL=C; export LANG=C)
emerge --info Portage 2.1.4.5 (default/linux/amd64/2008.0/desktop, gcc-4.1.2, glibc-2.6.1-r0, 2.6.27-gentoo-r4 x86_64) ================================================================= System uname: 2.6.27-gentoo-r4 x86_64 Intel(R) Core(TM)2 Duo CPU T9300 @ 2.50GHz Timestamp of tree: Tue, 23 Dec 2008 18:00:05 +0000 app-shells/bash: 3.2_p33 dev-lang/python: 2.5.2-r7 dev-util/cmake: 2.4.6-r1 sys-apps/baselayout: 1.12.11.1 sys-apps/sandbox: 1.2.18.1-r2 sys-devel/autoconf: 2.13, 2.61-r2 sys-devel/automake: 1.4_p6, 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1 sys-devel/binutils: 2.18-r3 sys-devel/gcc-config: 1.4.0-r4 sys-devel/libtool: 1.5.26 virtual/os-headers: 2.6.23-r3 ACCEPT_KEYWORDS="amd64" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=nocona -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/splash /etc/terminfo /etc/udev/rules.d" CXXFLAGS="-march=nocona -O2 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch" GENTOO_MIRRORS="ftp://ftp.tu-clausthal.de/pub/linux/gentoo/" LANG="C" LC_ALL="C" LDFLAGS="-Wl,-O1" LINGUAS="de" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_EXTRA_OPTS="--exclude-from=/etc/portage/rsync_excludes" 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/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X acl acpi alsa amd64 berkdb bluetooth branding bzip2 cairo cdr cli cracklib crypt cups dbus dell dri dvd dvdr dvdread emboss encode evo fam firefox fortran gdbm gif gpm gstreamer gtk hal iconv ipv6 isdnlog jack jpeg ldap libnotify mad midi mikmod mmx mp3 mpeg mudflap multilib ncurses nls nptl nptlonly ogg opengl openmp pam pcre pdf perl png ppds pppd pulseaudio python qt3support qt4 quicktime readline reflection sdl session spell spl sqlite sse sse2 ssl startup-notification svg sysfs tcpd tiff truetype unicode usb v4l vim-syntax vorbis xml xorg xulrunner xv xvmc zlib" ALSA_CARDS="hda-intel" 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="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de" USERLAND="GNU" VIDEO_CARDS="nvidia nv" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS emerge -pv wicd These are the packages that would be merged, in order: Calculating dependencies ... done! [ebuild R ] net-misc/wicd-1.5.7 0 kB Total: 1 package (1 reinstall), Size of downloads: 0 kB Howto reproduce: connect to a network with wicd suspend 2 ram using pm-suspend view the log: grep wicd /var/log/pm-suspend.log ===== Thu Dec 25 13:26:21 CET 2008: running hook: /usr/lib/pm-utils/sleep.d/55wicd ===== /usr/lib/pm-utils/sleep.d/55wicd: line 5: : No such file or directory ===== Thu Dec 25 13:26:49 CET 2008: running hook: /usr/lib/pm-utils/sleep.d/55wicd ===== /usr/lib/pm-utils/sleep.d/55wicd: line 5: : No such file or directory
Jeremy, I assigned the bug to you, but don't really know if it's a wicd or pm-utils failure.
What version of pm-utils are you using? Looks like you are mixing a stable system with ~arch packages given that you ACCEPT_KEYWORDS is "amd64"
I was using stable pm-utils (0.99.4). Now emerged pm-utils-1.2.3 - wicd (1.5.7) successfull reconnected after resuming from suspend.. same for stable wicd-1.5.4 then tested pm-utils-0.99.4 with stable wicd-1.5.4, but the problem persists: pm-utils stable doesnt provide $PM_FUNCTIONS and/or $FUCNTIONS So the problem isn`t only caused by mixing stable with unstable.. Moreover i found another litte "bug" in wicd(1.5.7)`s suspend script the function wicd_suspend() and wicd_resume() both return $NA. you may ask why this is a problem: After suspending (pm-utils-1.2.3): grep wicd /var/log/pm-suspend.log /usr/lib64/pm-utils/sleep.d/55wicd suspend suspend: not applicable. /usr/lib64/pm-utils/sleep.d/55wicd resume suspend: not applicable so there is a "wrong" logging information now.
(In reply to comment #5) > I was using stable pm-utils (0.99.4). > > Now emerged pm-utils-1.2.3 - wicd (1.5.7) successfull reconnected after > resuming from suspend.. same for stable wicd-1.5.4 > > then tested pm-utils-0.99.4 with stable wicd-1.5.4, but the problem persists: > pm-utils stable doesnt provide $PM_FUNCTIONS and/or $FUCNTIONS > > So the problem isn`t only caused by mixing stable with unstable.. pm-utils-0.99.4 is horrid..too old and buggy. I made an explicit depend on >=pm-utils-1.2.3 in wicd-1.5.7-r1. As for, wicd-1.5.4, I won't be fixing that, sorry. > > > Moreover i found another litte "bug" in wicd(1.5.7)`s suspend script > the function wicd_suspend() and wicd_resume() both return $NA. > you may ask why this is a problem: > > After suspending (pm-utils-1.2.3): > grep wicd /var/log/pm-suspend.log > /usr/lib64/pm-utils/sleep.d/55wicd suspend suspend: not applicable. > /usr/lib64/pm-utils/sleep.d/55wicd resume suspend: not applicable > > so there is a "wrong" logging information now. > There use to be a bug in wicd that required the suspend hooks to return $NA to prevent them from erroring out. I think this will be fixed in the next release. 11:04 < rworkman> Yeah, I put the return $NA in there to make the hook stop erroring out 11:05 < rworkman> Adam or dano (don't recall which one) fixed up the actual suspend.py and autoconnect.py files to not return errors iirc, so really, I think we can just get rid of the return lines in the hooks themselves now. Thanks for reporting!
Maybe I didint expressed it clearly, not only pm-utils-1.2.3 is working fine with wicd, I only tested that. I tried pm-utils-1.1.1 and pm-utils-1.1.2.1 now, and both worked with wicd-1.5.7 So depending on pm-utils-1.1.1 would be enough. sorry for the inconvenience (i hope reopening isnt wrong here)
(In reply to comment #7) > Maybe I didint expressed it clearly, not only pm-utils-1.2.3 is working fine > with wicd, I only tested that. > > I tried pm-utils-1.1.1 and pm-utils-1.1.2.1 now, and both worked with > wicd-1.5.7 > So depending on pm-utils-1.1.1 would be enough. > sorry for the inconvenience (i hope reopening isnt wrong here) > Oh, thanks for that. I changed the dep in 1.5.7-r1. I don't have s2ram working yet, but I plan to in the next few months. Then, wicd will be in better shape. Until then, keep filing bugs as appropriate ;)
I feel a bit lost here ;-) but can you try applying the following patch before building 1.5.7 and verify two things: 1) suspend/resume still works 2) logging is as expected http://slackware.com/~rworkman/wicd/pmhooks.diff I just want confirmation before I push this upstream (the pm-utils support in wicd is mostly my doings, and I unfortunately didn't think through the $NA exit codes thoroughly enough).
I applied the patch, suspend/resume works as expected, if wicd-daemon is started, logging says everything is ok (all scripts are working as wanted). If wicd-daemon is stopped it all "works" too, but logging is not ok. so first the logging information: grep wicd /var/log/pm-suspend.log /usr/lib64/pm-utils/sleep.d/55wicd suspend suspend: Exception caught: org.freedesktop.DBus.Error.ServiceUnknown: The name org.wicd.daemon was not provided by any .service files success. /usr/lib64/pm-utils/sleep.d/55wicd resume suspend: not applicable. suspending gets the status "success", should be "not applicable".., and there are errors which shouldn't be in the log.. so this has two problems: /usr/lib/wicd/suspend.py writes errors to stdout when handling exceptions, but the 55wicd script only redirects stderr to /dev/null and the errors are written into the log. moreover the 55wicd scripts expects an error code != 0 from suspend.py on failure (suspend.py || return $NA), but if an error occurs the exitcode is 0, should be changed. resuming seems to be ok, but that may be a bit lucky: autoconnect.py doesnt use a Exception handler, so python sends the exception message to stderr (redirected by 55wicd to /dev/null) and sets an exit code != 0 => not applicable.. maybe errors should be also handled here..
Ben, Thanks for the detailed discussion. Due to the way pm-utils works, there's going to be a bit of inconsistency with the logs and what actually happens; however, I think I've got it this time. Can you pull this and try it? https://code.launchpad.net/~rworkman/wicd/trunk-rworkman