Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 514480 - sys-power/pm-utils-1.4.1-r6 don't suspend and hibernate ThinkPad Z61m with 1.4.1-inhibit-on-right-status.patch
Summary: sys-power/pm-utils-1.4.1-r6 don't suspend and hibernate ThinkPad Z61m with 1....
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: Normal normal (vote)
Assignee: Freedesktop bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-22 19:19 UTC by Ognian Tenchev
Modified: 2014-08-17 05:06 UTC (History)
1 user (show)

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


Attachments
pm-suspend not working (pm-suspend.not-working.log,4.55 KB, patch)
2014-06-23 04:47 UTC, Ognian Tenchev
Details | Diff
pm-suspend working (pm-suspend.wokring.log,4.55 KB, patch)
2014-06-23 04:47 UTC, Ognian Tenchev
Details | Diff
pm-suspend.log not working from /var/log/pm-suspend.log (pm-suspend.not-working.var.log,50.64 KB, patch)
2014-06-23 04:59 UTC, Ognian Tenchev
Details | Diff
pm-suspend.log working from /var/log/pm-suspend.log (pm-suspend.wokring.var.log,114.84 KB, patch)
2014-06-23 04:59 UTC, Ognian Tenchev
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ognian Tenchev 2014-06-22 19:19:17 UTC
Since upgrade from sys-power/pm-utils-1.4.1-r2 to sys-power/pm-utils-1.4.1-r5 my ThinkPad Z61m don't suspend and hibernate any more. 

pm-suspend and pm-hibernate do nothing but to return to prompt.

After downgrade to r2 pm-suspend and pm-hibernate work again.

Nothing in configuration is changed

Reproducible: Always

Steps to Reproduce:
1. upgrade from -r2 to -r5
2. pm-suspend
3. nothing happened


Expected Results:  
Laptop suspend

Portage 2.2.10 (default/linux/x86/13.0, gcc-4.8.3, glibc-2.19-r1, 3.15.1-gentoo-dr i686)
=================================================================
System uname: Linux-3.15.1-gentoo-dr-i686-Intel-R-_Core-TM-2_CPU_T7200_@_2.00GHz-with-gentoo-2.2
KiB Mem:     3104856 total,    337076 free
KiB Swap:    8388604 total,   8314812 free
Timestamp of tree: Sun, 22 Jun 2014 18:15:01 +0000
ld GNU ld (GNU Binutils) 2.24
distcc 3.1 i686-pc-linux-gnu [enabled]
ccache version 3.1.9 [enabled]
app-shells/bash:          4.2_p47
dev-java/java-config:     2.2.0
dev-lang/python:          2.7.6-r1
dev-util/ccache:          3.1.9-r3
dev-util/cmake:           2.8.12.2-r1
dev-util/pkgconfig:       0.28-r1
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.10.3, 1.11.6, 1.12.6, 1.13.4, 1.14.1
sys-devel/binutils:       2.24-r3
sys-devel/gcc:            4.6.3, 4.7.4, 4.8.3
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2-r1
sys-devel/make:           4.0-r1
sys-kernel/linux-headers: 3.15 (virtual/os-headers)
sys-libs/glibc:           2.19-r1
Repositories: gentoo xfce-dev dr
ACCEPT_KEYWORDS="x86 ~x86"
ACCEPT_LICENSE="* -@EULA"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-Os -march=core2 -mtune=generic -fomit-frame-pointer -pipe -mmmx -msse2 -msse3"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/qmail/alias /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.4/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cli-php5.4/ext-active/ /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="-Os -march=core2 -mtune=generic -fomit-frame-pointer -pipe -mmmx -msse2 -msse3"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--quiet-build=n"
FCFLAGS="-O2 -march=i686 -pipe"
FEATURES="assume-digests binpkg-logs ccache config-protect-if-modified distcc distlocks ebuild-locks fixlafiles merge-sync metadata-transfer news parallel-fetch preserve-libs protect-owned sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersync xattr"
FFLAGS="-O2 -march=i686 -pipe"
GENTOO_MIRRORS="http://mirrors.telepoint.bg/gentoo/"
LANG="en_US"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j9"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/mnt/storage/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/xfce-dev /etc/portage/overlays/dr"
SYNC="rsync://rsync.gentoo.info-top.com/gentoo-portage"
USE="7zip X a52 aac acl acpi additions alsa amr amrnb automount bash-completion bcmath berkdb bluetooth bogofilter bonjour bzip2 cairo calendar cdda cddb cdio cdr cgi chardet cli cluster compositor concurrentmodphp corba cracklib crypt curl curlwrappers cursors cxx daab dbase dbus dc1394 devhelp dga dhcp dirac disk-partition diskio dri dts dv dvb dvd dvdr elf encode epiphany exif extraengine extrafilters fam fastbuild fastcgi fat fcgi ffmpeg fftw filter flac flatfile fontconfig force-cgi-redirect fortran freetds ftp fuse gaim galago gd gdbm gdl gdm gdu ggi gif glib glitz gmp gnome-keyring gnomecd gnutls gpm graphviz groupwise gstreamer gtk gtk2 gtkhtml gudev guile hash hdaps hddtemp httpd icons iconv id3tag ieee1394 imap imlib inherit-graph inifile iproute2 ipv6 javascript jpeg json keyring lame laptop libgcrypt libnotify live lm_sensors lzo mad matroska meanwhile mmx mmxext mng mod modplug modules mp2 mp3 mp3rtp mp4 mpeg musepack musicbrainz mysql mysqli nas ncurses network networking nls nntp nptl nptl-only nsplugin ntfs objc objc++ objc-gc ogg openct opengl openmp optimisememory pam pango pch pcmcia pcntl pcre pdf pdo perlsuid php pidgin png portaudio posix ppds prediction qmail qq readline real regex reiser4 reiserfs rrdcgi rtsp samba sasl scrobbler sdl sdl-image session sharedext shout silc simplexml slang slp smbclient smbsharemodes smp smux sndfile soap sockets soundex sourceview speex sqlite sqlite3 sse sse2 ssl ssse3 startup-notification stream subversion svg swat sysvipc t1lib taglib tcpd theora threads tidy tiff tokenizer totem truetype tta twolame type1 udev unicode usb vala valgrind vcd vcdx vhook vlm vorbis vorbis-psy wavpack wddx webdav wideband win32codecs winbind wma wmf wxwindows x264 x86 xattr xcb xforms xml xmlreader xmlrpc xmlwriter xmp xosd xpm xprint xscreensaver xsl xv xvid zip zlib" ABI_X86="32" 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" 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 author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" FOO2ZJS_DEVICES="hp1018" 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 ublox ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en_US bg en" LIRC_DEVICES="all" NGINX_MODULES_HTTP="mp4 flv access auth_basic autoindex browser charset empty_gif fastcgi geo gzip limit_req limit_zone map memcached proxy referer rewrite scgi split_clients ssi upstream_ip_hash userid uwsgi geoip gzip_static headers_more image_filter perl push realip secure_link stub_status sub upload upload_progress xslt addition cache_purge dav degradation random_index slowfs_cache spdy" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-4" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7" QEMU_SOFTMMU_TARGETS="arm i386 ppc ppc64 ppcemb x86_64" QEMU_USER_TARGETS="arm armeb i386 ppc ppc64 ppc64abi32 unicore32 x86_64" RUBY_TARGETS="ruby19" USERLAND="GNU" VIDEO_CARDS="intel i915" 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
Comment 1 Samuli Suominen (RETIRED) gentoo-dev 2014-06-22 19:48:28 UTC
Reduce the patches one by one in the ebuild to pinpoint the exact problematic patch.
It might be correctly refusing to suspend/hibernate, some of the patches applied, would do that.

Added patches between -r2 and -r5:

+		"${FILESDIR}"/${PV}-fix-alpm-typo.patch \
+		"${FILESDIR}"/${PV}-inhibit-on-right-status.patch \
+		"${FILESDIR}"/${PV}-ignore-led-failure.patch \
+		"${FILESDIR}"/${PV}-run-hook-logging.patch \
+		"${FILESDIR}"/${PV}-suspend-hybrid.patch \
+		"${FILESDIR}"/${PV}-uswsusp-hibernate-mode.patch \
+		"${FILESDIR}"/${PV}-xfs_buffer_arguments.patch

Also new files are installed you can try to drop one by one

/usr/lib/pm-utils/power.d/pci_devices
/usr/lib/pm-utils/power.d/usb_bluetooth

Newly removed (outdated) file between -r2 and -r5 you can try to restore by removing the removal line from the ebuild:

/usr/lib/pm-utils/sleep.d/49bluetooth

Because saying "It doesn't work." really doesn't help anything
Comment 2 Ognian Tenchev 2014-06-22 20:44:27 UTC
removing 
/usr/lib/pm-utils/power.d/pci_devices
and/or
/usr/lib/pm-utils/power.d/usb_bluetooth
don't make suspend to work with -r5

adding back 
/usr/lib/pm-utils/sleep.d/49bluetooth
also don't make suspend to work with -r5

removing
"${FILESDIR}"/${PV}-fix-alpm-typo.patch
don't fix issue

if I remove
"${FILESDIR}"/${PV}-fix-alpm-typo.patch
ebuild become broken with error that run-hook-logging.patch can't be applied so I also remove
epatch "${FILESDIR}"/${PV}-run-hook-logging.patch
this make suspend to work ... 

I don't make tests with other patches.
Comment 3 Samuli Suominen (RETIRED) gentoo-dev 2014-06-22 22:01:21 UTC
(In reply to Ognian Tenchev from comment #2)
> if I remove
> "${FILESDIR}"/${PV}-fix-alpm-typo.patch
> ebuild become broken with error that run-hook-logging.patch can't be applied
> so I also remove
> epatch "${FILESDIR}"/${PV}-run-hook-logging.patch
> this make suspend to work ... 

That doesn't make any sense, both of these are only related to printing out messages or logging, they don't affect real functionality at all
Comment 4 Samuli Suominen (RETIRED) gentoo-dev 2014-06-22 22:17:48 UTC
There is also PM_DEBUG="true" environment variable you can set, same as USE="debug" in pm-utils, that might help you track the real reason down, since I suspect it's something else that just happened to happen at the same time you removed the 2 patches

Also, notice that the patches are from Debian, they've been using them for years without issues, so you can understand why I'm suspicious :)
Comment 5 Samuli Suominen (RETIRED) gentoo-dev 2014-06-23 03:58:43 UTC
It must have been accident that it started working for you at the same time you removed the 2 patches that only effect printed out messages and logs. There is nothing to go on with in the bug. Please continue digging up and reopen the bug (that means setting the bug back to UNCONFIRMED from RESOLVED, NEEDINFO) once you have something tangible to work with. Thanks!
Comment 6 Ognian Tenchev 2014-06-23 04:46:48 UTC
I'm sorry. There is mistake by me in comment 2. Actually I remove these two patches:
"${FILESDIR}"/${PV}-inhibit-on-right-status.patch (not "${FILESDIR}"/${PV}-fix-alpm-typo.patch)
and
"${FILESDIR}"/${PV}-run-hook-logging.patch

I'm attaching logs with PM_DEBUG="true" (working and not working), but there is no difference in them.
Comment 7 Ognian Tenchev 2014-06-23 04:47:38 UTC
Created attachment 379444 [details, diff]
pm-suspend not working
Comment 8 Ognian Tenchev 2014-06-23 04:47:55 UTC
Created attachment 379446 [details, diff]
pm-suspend working
Comment 9 Ognian Tenchev 2014-06-23 04:59:02 UTC
Next are logs from /var/log/pm-suspend.log which are different between working and not working
Comment 10 Ognian Tenchev 2014-06-23 04:59:25 UTC
Created attachment 379448 [details, diff]
pm-suspend.log not working from /var/log/pm-suspend.log
Comment 11 Ognian Tenchev 2014-06-23 04:59:45 UTC
Created attachment 379450 [details, diff]
pm-suspend.log working from /var/log/pm-suspend.log
Comment 12 Samuli Suominen (RETIRED) gentoo-dev 2014-06-23 13:19:47 UTC
1.4.1-inhibit-on-right-status.patch that was applied as pm-utils-1.4.1-r3 is propably the culprit.

https://bugs.gentoo.org/show_bug.cgi?id=360673#c6

Can you verify -r3 fails for you too?
Comment 13 Ognian Tenchev 2014-06-23 13:26:18 UTC
-r3 fails too
Comment 14 Samuli Suominen (RETIRED) gentoo-dev 2014-06-23 14:08:25 UTC
Wow. I found bunch of bugs in -r5, and removed it from tree, please try 1.4.1-r6 too.
Comment 15 Samuli Suominen (RETIRED) gentoo-dev 2014-06-23 14:10:09 UTC
As in, propably will remove the problematic patch or something if -r6 is still broken for you, and create -r7 with a dropped patch.
However I really would like to figure better solution than removing the patch, since like said, Debian has used it succesfully for quite a bit.

However there are of course similar bugs in Debian's bugs, like:

https://bugs.debian.org/cgi-bin/pkgreport.cgi?dist=unstable;package=pm-utils

Does any of those resemble the problem you are having?
Comment 16 Ognian Tenchev 2014-06-23 14:26:23 UTC
I'm sorry but -r6 still don't suspend my poor laptop :)

I will have to take my night to read all bugs on Debian ... 

I'm not sure and really don't read logs until now ... may be it is better do dig in logs first and play around before remove this patch ... may be it is just my old hardware which cause problems. 

Can you just leave this bug as it is for day and give me some time to look around. If it is just me I will fork ebuild in my local overlay and ... let it be :)
Comment 17 Samuli Suominen (RETIRED) gentoo-dev 2014-06-23 14:57:33 UTC
Sure, I will investigate myself too, lets put the bug in hold for a few days
Comment 18 Ognian Tenchev 2014-06-23 15:41:19 UTC
After looking at logs I found that
/var/run/pm-utils/pm-suspend/storage/inhibit
is always created and which prevent suspend

Founding cause was just game of trying but I remove all hooks from /usr/lib/pm-utils/sleep.d which don't resolve issue.

Then I just start to look at scripts of which pm-utils is composed and this lead me to one forgotten file from years ago which I crated in /etc/pm/sleep.d called resume.sh which have wrong case close tag ... so ... I feed ashamed and guilty but now -r6 works ... and I learn something about pm-utils :)

Sorry for your time and thanks for support.
Comment 19 Nikoli 2014-08-16 16:42:21 UTC
So this bug should be closed as INVALID?
Comment 20 Ognian Tenchev 2014-08-16 16:51:57 UTC
yes
Comment 21 Samuli Suominen (RETIRED) gentoo-dev 2014-08-17 05:06:00 UTC
ah, good.   now I can move forward with stabilizing the new version, this bug was the only reason I haven't done it yet.