# suspend issue since kernel upgrade

## Carlino

Hello,

I use to suspend my box with alt + shutdown icon, (Gnome UI), turning the shutdown icon into pause icon ; that worked fine, the box would go to sleep.

I've upgraded from linux-4.4.6-gentoo to linux-4.4.26-gentoo, and now, when I put the box to suspend, I get a black screen like it's actually going to suspend, but it doesn't, displaying these messages :

```
Freezing user space process...

Freezing remaining freezables tasks...

Suspending console(s) (use no_console_suspend to debug)

```

Booting from linux-4.4.6-gentoo, suspend works fine.

I've checked https://wiki.gentoo.org/wiki/Suspend_and_hibernate : 

I do have  *Quote:*   

> Power management and ACPI options --->
> 
>     [*] Suspend to RAM and standby
> 
>     [*] Hibernation (aka 'suspend to disk')

 

Though, I can't emerge unmerge sys-power/upower and emerge sys-power/upower-pm-utils : when I do, it conflicts with other packages :

```
# emerge --unmerge sys-power/upower

WARNING: One or more repositories have missing repo_name entries:

   /usr/portage/packages/profiles/repo_name

NOTE: Each repo_name entry should be a plain text file containing a

unique name for the repository on the first line.

 * This action can remove important packages! In order to be safer, use

 * `emerge -pv --depclean <atom>` to check for reverse dependencies before

 * removing packages.

 sys-power/upower

    selected: 0.99.4 

   protected: none 

     omitted: none 

All selected packages: =sys-power/upower-0.99.4

>>> 'Selected' packages are slated for removal.

>>> 'Protected' and 'omitted' packages will not be removed.

>>> Waiting 5 seconds before starting...

>>> (Control-C to abort)...

>>> Unmerging in: 5 4 3 2 1

>>> Unmerging (1 of 1) sys-power/upower-0.99.4...

>>> needed   sym /usr/lib64/libupower-glib.so.3

>>> needed   obj /usr/lib64/libupower-glib.so.3.0.1

 * GNU info directory index is up-to-date.

!!! existing preserved libs:

>>> package: sys-power/upower-0.99.4

 *  - /usr/lib64/libupower-glib.so.3

 *  - /usr/lib64/libupower-glib.so.3.0.1

 *      used by /usr/bin/gnome-control-center (gnome-base/gnome-control-center-3.20.1-r1)

 *      used by /usr/bin/gnome-power-statistics (gnome-extra/gnome-power-manager-3.20.0)

 *      used by /usr/lib64/gnome-settings-daemon-3.0/libmedia-keys.so (gnome-base/gnome-settings-daemon-3.20.1)

 *      used by 6 other files

Use emerge @preserved-rebuild to rebuild packages using these libraries
```

So I get back again with sys-power/upower, when emerge @preserved-rebuild.

In some way, it should be working with sys-power/upower since it did with previous kernel.

What am I missing here ? Any suggestions welcome.

Regards

----------

## Carlino

by the way...

```
# emerge --info

WARNING: One or more repositories have missing repo_name entries:

   /usr/portage/packages/profiles/repo_name

NOTE: Each repo_name entry should be a plain text file containing a

unique name for the repository on the first line.

Portage 2.3.0 (python 3.4.5-final-0, default/linux/amd64/13.0/desktop/gnome/systemd, gcc-4.9.4, glibc-2.22-r4, 4.4.26-gentoo x86_64)

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

System uname: Linux-4.4.26-gentoo-x86_64-Intel-R-_Core-TM-2_Quad_CPU_Q9400_@_2.66GHz-with-gentoo-2.3

KiB Mem:     8183948 total,   5805604 free

KiB Swap:          0 total,         0 free

Timestamp of repository gentoo: Fri, 23 Dec 2016 13:00:01 +0000

sh bash 4.3_p48-r1

ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1

distcc 3.2rc1 x86_64-pc-linux-gnu [enabled]

app-shells/bash:          4.3_p48-r1::gentoo

dev-java/java-config:     2.2.0-r3::gentoo

dev-lang/perl:            5.22.3_rc4::gentoo

dev-lang/python:          2.7.12::gentoo, 3.4.5::gentoo

dev-util/cmake:           3.6.3::gentoo

dev-util/pkgconfig:       0.28-r2::gentoo

sys-apps/baselayout:      2.3::gentoo

sys-apps/openrc:          0.22.4::gentoo

sys-apps/sandbox:         2.10-r1::gentoo

sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo

sys-devel/automake:       1.10.3-r1::gentoo, 1.11.6-r1::gentoo, 1.14.1::gentoo, 1.15::gentoo

sys-devel/binutils:       2.25.1-r1::gentoo

sys-devel/gcc:            4.9.4::gentoo

sys-devel/gcc-config:     1.7.3::gentoo

sys-devel/libtool:        2.4.6-r2::gentoo

sys-devel/make:           4.1-r1::gentoo

sys-kernel/linux-headers: 4.4::gentoo (virtual/os-headers)

sys-libs/glibc:           2.22-r4::gentoo

Repositories:

gentoo

    location: /usr/portage

    sync-type: rsync

    sync-uri: rsync://rsync.gentoo.org/gentoo-portage

    priority: -1000

x-packages

    location: /usr/portage/packages

    masters: gentoo

ACCEPT_KEYWORDS="amd64"

ACCEPT_LICENSE="* -@EULA Q3AEULA dlj-1.1 sun-bcla-java-vm skype-eula AdobeFlash-10.3 Oracle-BCLA-JavaSE"

CBUILD="x86_64-pc-linux-gnu"

CFLAGS="-O2 -march=nocona -pipe"

CHOST="x86_64-pc-linux-gnu"

CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.3/conf"

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.6/ext-active/ /etc/php/cgi-php5.6/ext-active/ /etc/php/cli-php5.6/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"

CXXFLAGS="-O2 -pipe"

DISTDIR="/usr/portage/distfiles"

FCFLAGS="-O2 -pipe"

FEATURES="assume-digests binpkg-logs config-protect-if-modified distcc distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"

FFLAGS="-O2 -pipe"

GENTOO_MIRRORS="ftp://ftp.free.fr/mirrors/ftp.gentoo.org/ http://213.186.33.37/gentoo-distfiles/ ftp://213.186.33.38/gentoo-distfiles/ ftp://213.186.33.37/gentoo-distfiles/ http://mirror.qubenet.net/mirror/gentoo/"

LANG="fr_FR@euro"

LDFLAGS="-Wl,-O1 -Wl,--as-needed"

MAKEOPTS="-j5"

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 --exclude=/.git"

PORTAGE_TMPDIR="/var/tmp"

USE="3dnow 3dnowext 64bit X a52 aac abiword accessibility acpi adplug ads aio airdrop-ng airgraph-ng alisp alsa amazon amd64 antlr apache2 apng applet arts asf ass asyncns avcodec avformat bcel berkdb bitmap-fonts blksha1 bluetooth bogofilter bookmarks branding bsf bzip2 cacert cairo caps caps-ng cdda cddb cdio cdr classic cli client clucene colord commonslogging commonsnet community compat corefonts cpufreq cracklib cramfs crashreporter crypt css ctype cups cxx dbus deprecated development devfs-compat device-mapper dirac dlloader dri dso dts dv dvbpsi dvd dvdnav dvdr dvdread eds egl emboss enca encode esd espeak evo exceptions exif extensions external-fuse extras faac faad fam fbcondecor ffmpeg filecaps fileinfo filter firefox firmware-loader fishbmc flac fltk fontconfig fortran fts3 gallium games gcrypt gd gdbm gdu gecko geoloc gif glamor gles glib gnome gnome-keyring gnome-online-accounts gnome-shell gnutls gpm graphite gstreamer gtk gtk3 gudev handbook hardcoded-tables hash hpcups hpn http httpd hwdb i18n iconv icu introspection ipc ipv6 isdnlog jack java javamail jce jdepend jit joystick jpeg jsbsim jsch json kde kdrive kerberos keymap kmod lcms ldap libburn libclamav libffi libg++ libkms libnotify libsamplerate libsecret lirc live llvm log4j lua lvm1 lz4 lzma mad magic mdev mdnsresponder-compat midi mikmod miner-fs minimal minizip mmx mmxext mng mod modplug modules mp3 mp4 mpeg mudflap multilib multislot musepack mysql mysqli nautilus ncurses netapi netifrc nettle network networkmanager nls nptl nptlonly nsplugin nss-pem ntfsprogs oav ogg opengl openmp openrc orc oro osdmenu oss pam pango pch pcre pdf pdo perl pg-intdatetime phar pkinit png policykit poppler-data posix postgres postproc ppds ppp pppd projectm pulseaudio python qt3 qt3support qt4 qt5 quicktime quvi raptor rar readline real redland reflection regexp resolver rsxs rtc rtsp rule_generator samba sasl scanner schroedinger sdl seccomp semantic-desktop session setup sftp sha512 shared-glapi shm shotwell shout simplexml smbclient sndfile socialweb source speex spell spl sqlite sse sse2 sse2check sse3 ssl startup-notification stl stream suid svg swat systemd tcpd telepathy texturepacker theora threads threadsafe tiff tls-heartbeat toolame tools tracker tremor truetype truetype-fonts twolame udev udisks unicode upower urandom usb utils v4l vala vapigen vba video virtuoso vorbis wallpapers wav wavpack weather webdav webdav-neon webgl webm webmin-minimal webrtc-aec wext wide-unicode wifi win32codecs wxwidgets x264 xattr xcb xiph xml xmlsec xorg xpdf-headers xrandr xscreensaver xulrunner xv xvid yasim youtube zeroconf zlib" ABI_X86="32 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" 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" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2 canon sony_dscf1 sony_dscf55" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 sse3 sse4_1 ssse3" CURL_SSL="openssl" ELIBC="glibc" FFTOOLS="aviocat cws2fws ffeval graph2dot ismindex pktdumper qt-faststart trasher" 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" GRUB_PLATFORMS="pc" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="fr fr_FR" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="jython2_5 pypy1_8 pypy1_9 python2_7 python3_4" SANE_BACKENDS="agfafocus apple canon canon630u canon_dr canon_pp cardscan coolscan coolscan2 coolscan3 dc210 dc240 dc25 dell1600n_net epson epson2 fujitsu hp hp3500 hp3900 hp4200 hp5400 hp5590 hpljm1005 hpsj5s hs2p ibm kodak kvs1025 kvs20xx%* lexmark ma1509 magicolor%* mustek mustek_pp mustek_usb nec net niash p5 pie pixma plustek plustek_pp qcam ricoh rts8891 s9036 sharp sm3600 sm3840 snapscan sp15c st400 stv680 tamarack test u12 umax umax1220u umax_pp xerox_mfp" 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:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

```

----------

## Ant P.

Let's start by trying the simplest possible thing.

```
su -c 'printf mem >| /sys/power/state'
```

Does that suspend the system correctly? If it does then the problem is somewhere in the suspend scripts you have installed.

----------

## Carlino

Thanx Ant P. for your suggestion ; 

```
su -c 'printf mem >| /sys/power/state'
```

 just leads to the same result : OS seems to go sleeping, black screen, (with the 3 lines mentioned) , but fans, processor, all hardware stays up

----------

## Carlino

This is what journalctl shows, when suspend is thrown

```
déc. 25 19:11:38 bigpopa systemd-sleep[3107]: Suspending system...

déc. 25 19:11:38 bigpopa systemd[1]: Starting Suspend...

déc. 25 19:11:38 bigpopa systemd[1]: Reached target Sleep.

déc. 25 19:11:37 bigpopa systemd[1]: dhcpcd.service: Failed with result 'signal'.

déc. 25 19:11:37 bigpopa systemd[1]: dhcpcd.service: Unit entered failed state.

déc. 25 19:11:37 bigpopa systemd[1]: dhcpcd.service: Main process exited, code=killed, status=11/SEGV

déc. 25 19:11:37 bigpopa kernel: dhcpcd[2226]: segfault at b0 ip 0000000000413d03 sp 00007ffd460a9bd0 error 4 in dhcpcd[400000+3f000]

déc. 25 19:11:37 bigpopa dhcpcd[2226]: eth1: deleting route to 2a01:cb19:17b:df00::/64

déc. 25 19:11:37 bigpopa dhcpcd[2226]: eth1: deleting default route via fe80::9272:82ff:fe71:53ce

déc. 25 19:11:37 bigpopa dhcpcd[2226]: eth1: adding default route via fe80::9272:82ff:fe71:53ce

déc. 25 19:11:37 bigpopa dhcpcd[2226]: eth1: adding route to 2a01:cb19:17b:df00::/64

déc. 25 19:11:37 bigpopa dhcpcd[2226]: eth1: carrier lost

déc. 25 19:11:37 bigpopa NetworkManager[2215]: <info>  [1482689497.4453] device (eth1): state change: disconnected -> unmanaged (reason 'sleeping') [30 10 37]

déc. 25 19:11:37 bigpopa nm-dispatcher[3031]: req:2 'down' [eth1]: start running ordered scripts...

déc. 25 19:11:37 bigpopa nm-dispatcher[3031]: req:2 'down' [eth1]: new request (1 scripts)

déc. 25 19:11:37 bigpopa dhcpcd[2226]: eth1: deleted default route via fe80::9272:82ff:fe71:53ce

déc. 25 19:11:37 bigpopa dhcpcd[2226]: eth1: deleted route to 2a01:cb19:17b:df00::/64

déc. 25 19:11:37 bigpopa dhcpcd[2226]: eth1: deleted route to 169.254.0.0/16

déc. 25 19:11:37 bigpopa NetworkManager[2215]: <info>  [1482689497.4381] dhcp6 (eth1): canceled DHCP transaction

déc. 25 19:11:37 bigpopa NetworkManager[2215]: <info>  [1482689497.4377] dhcp4 (eth1): state changed bound -> done

déc. 25 19:11:37 bigpopa NetworkManager[2215]: <info>  [1482689497.4377] dhcp4 (eth1): canceled DHCP transaction, DHCP client pid 2283

déc. 25 19:11:37 bigpopa nm-dispatcher[3031]: req:1 'connectivity-change': start running ordered scripts...

déc. 25 19:11:37 bigpopa nm-dispatcher[3031]: req:1 'connectivity-change': new request (1 scripts)

déc. 25 19:11:37 bigpopa systemd[1]: Started Network Manager Script Dispatcher Service.

déc. 25 19:11:37 bigpopa dbus[2191]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'

déc. 25 19:11:37 bigpopa dhcpcd[2226]: eth1: deleted address 2a01:cb19:17b:df00:e94f:c634:9dcd:1039/64

déc. 25 19:11:37 bigpopa dhcpcd[2226]: eth1: adding default route via fe80::9272:82ff:fe71:53ce

déc. 25 19:11:37 bigpopa dhcpcd[2226]: eth1: adding route to 2a01:cb19:17b:df00::/64

déc. 25 19:11:37 bigpopa dhcpcd[2226]: eth1: fe80::9272:82ff:fe71:53ce is unreachable, expiring it

déc. 25 19:11:37 bigpopa systemd[1]: Starting Network Manager Script Dispatcher Service...

déc. 25 19:11:37 bigpopa dhcpcd[2226]: eth1: deleted route to 2a01:cb19:17b:df00::/64

déc. 25 19:11:37 bigpopa NetworkManager[2215]: <info>  [1482689497.3193] device (eth1): state change: deactivating -> disconnected (reason 'sleeping') [110 30 37]

déc. 25 19:11:37 bigpopa dbus[2191]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service'

déc. 25 19:11:37 bigpopa NetworkManager[2215]: <info>  [1482689497.3008] device (eth1): state change: activated -> deactivating (reason 'sleeping') [100 110 37]

déc. 25 19:11:37 bigpopa NetworkManager[2215]: <info>  [1482689497.3003] manager: NetworkManager state is now ASLEEP

déc. 25 19:11:37 bigpopa NetworkManager[2215]: <info>  [1482689497.2990] device (eth0): state change: unavailable -> unmanaged (reason 'sleeping') [20 10 37]

déc. 25 19:11:37 bigpopa NetworkManager[2215]: <info>  [1482689497.2989] manager: sleeping...

déc. 25 19:11:37 bigpopa NetworkManager[2215]: <info>  [1482689497.2989] manager: sleep requested (sleeping: no  enabled: yes)

```

----------

