# suspend resume crash

## ccube

Hey,

i got a weird problem. everytime i resume my notebook from suspend to ram, it crashes.

i just get a black screen and nothing is working. i cannot do anything.

how to begin solving this problem?

regards

----------

## lordcris

try adding hpet=disable to your kernel parameters in grub or lilo

I assume you are using kernel 3.1.5 or 3.1.6

----------

## Hu

OP: as always, start with posting the output of emerge --info so that we can see what kind of system you are using.

----------

## ccube

```

le@le1558 /lu $ emerge --info

Portage 2.2.0_alpha84_p3 (default/linux/amd64/10.0/desktop/gnome, gcc-4.5.3, glibc-2.14.1-r2, 3.1.6-gentoo x86_64)

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

System uname: Linux-3.1.6-gentoo-x86_64-Intel-R-_Core-TM-_i7_CPU_Q_820_@_1.73GHz-with-gentoo-2.1

Timestamp of tree: Tue, 03 Jan 2012 15:45:01 +0000

distcc 3.1 x86_64-pc-linux-gnu [disabled]

ccache version 3.1.6 [disabled]

app-shells/bash:          4.2_p20

dev-java/java-config:     2.1.11-r3

dev-lang/python:          2.7.2-r3, 3.2.2

dev-util/ccache:          3.1.6

dev-util/cmake:           2.8.6-r4

dev-util/pkgconfig:       0.26

sys-apps/baselayout:      2.1

sys-apps/openrc:          0.9.7

sys-apps/sandbox:         2.5

sys-devel/autoconf:       2.13, 2.68

sys-devel/automake:       1.10.3, 1.11.2

sys-devel/binutils:       2.22-r1

sys-devel/gcc:            4.5.3-r2

sys-devel/gcc-config:     1.5-r2

sys-devel/libtool:        2.4.2

sys-devel/make:           3.82-r3

sys-kernel/linux-headers: 3.1 (virtual/os-headers)

sys-libs/glibc:           2.14.1-r2

Repositories: gentoo local luman mozilla vmware

Installed sets: 

ACCEPT_KEYWORDS="amd64 ~amd64"

ACCEPT_LICENSE="*"

CBUILD="x86_64-pc-linux-gnu"

CFLAGS="-march=native -O2 -pipe"

CHOST="x86_64-pc-linux-gnu"

CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.0/conf /usr/share/openvpn/easy-rsa /var/lib/hsqldb"

CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/apache2-php5.4/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cli-php5.3/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="-march=native -O2 -pipe"

DISTDIR="/usr/portage/distfiles"

EMERGE_DEFAULT_OPTS="--jobs=4 --load-average=1.5"

FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"

FFLAGS=""

GENTOO_MIRRORS="ftp://ftp.uni-erlangen.de/pub/mirrors/gentoo ftp://ftp.tu-clausthal.de/pub/linux/gentoo/ http://ftp.spline.inf.fu-berlin.de/mirrors/gentoo/ ftp://de-mirror.org/distro/gentoo/"

LANG="en_US.utf8"

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

MAKEOPTS="-j8"

PKGDIR="/usr/portage/packages"

PORTAGE_CONFIGROOT="/"

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 /var/lib/layman/luman /var/lib/layman/mozilla /var/lib/layman/vmware"

SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"

USE="X a52 aac acl acpi alsa amd64 avahi bash-completion berkdb bluetooth bonjour branding bzip2 cairo cdda cdr cli colord consolekit cracklib crypt cups cxx dbus dell dri dts dvd dvdr eds emboss encode evo exif fam fbcondecor firefox flac fortran gdbm gdu gif gnome gnome-keyring gnome-online-accounts gpm gstreamer gtk gtk3 gtkstyle iconv introspection ipv6 java jpeg laptop latex lcms ldap libnotify mad mmx mng modules mp3 mp4 mpeg mudflap multilib nautilus ncurses networkmanager nls nptl nptlonly nsplugin ogg opengl openmp pam pango pcre pdf perl png policykit ppds pppd pulseaudio python qt3support qt4 readline samba sdl session socialweb spell sse sse2 ssl startup-notification svg sysfs tcpd threads tiff truetype udev unicode usb vaapi vim-syntax vorbis x264 xcb xml xorg xulrunner xv xvid zeroconf zlib" 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="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 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="keyboard mouse evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fglrx radeon" 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, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

```

----------

## ccube

wow, hpet=disable seemed to solve it.  :Smile: 

is this a known bug for this kernel version?

thank you very much!  :Smile: 

----------

## devsk

 *ccube wrote:*   

> wow, hpet=disable seemed to solve it. 
> 
> is this a known bug for this kernel version?
> 
> thank you very much! 

 https://bugzilla.redhat.com/show_bug.cgi?id=767248

----------

## ccube

Actually i think this did not solve the problem. it is not reproducable at all. sometimes resume is workin, sometimes not.

now i installed 3.1.7 kernel and it seems to be better. ill see if it is working stable now.

----------

## ccube

Well, mostly it is working. but sometimes i get an black screen after resume!  :Sad: 

----------

## Hu

Black screen on resume is one of the most common resume failure patterns.  Many people fail to differentiate between a screen which appears black because it is in power saving mode due to no video signal versus a screen which is actively displaying an image consisting entirely of black pixels.  Which is yours?  Is the system otherwise responsive?

----------

## toralf

If you are under X11, try switching to a console (eg VT12) and switch back to vt7 (tusually where X is running). This helps in cases where the back light is off after wakeup.

----------

## kolcon

 *ccube wrote:*   

> Hey,
> 
> i got a weird problem. everytime i resume my notebook from suspend to ram, it crashes.
> 
> i just get a black screen and nothing is working. i cannot do anything.
> ...

 

I started to have this problem with kernel 3.2 (even -r1), with previous kernels it worked OK  :Sad: 

suspends to RAM, but there is blank screen when it comes back - nothing in the logs, switching

to console and back does not help either  :Sad: 

----------

## toralf

Well, adding to the grub a line like "no_console_suspend" probably shows the kernel crash code.

----------

## kolcon

 *toralf wrote:*   

> Well, adding to the grub a line like "no_console_suspend" probably shows the kernel crash code.

 

Seems I'm hitting

[drm:intel_dp_complete_link_train] *ERROR* failed to train DP, aborting

----------

## ccube

the system is completely unresponsive.

also magic sysrq is not working.

will try with 3.2 kernel in a few hours

edit: no problems so far  :Smile: 

----------

## ccube

After some days of testing with gentoo-sources 3.2 it seems that hpet is the faulty thing.

disabling it, will let me wake up my notebook properly.

with no commandline option in grub, the first try to wake up the system will result in a crashed system.

(no error messages so far, and dmesg | grep "hash matches" is empty with pm_trace activated)

living without hpet now!

is it possible to disable hpet in kernel config? do i have disadvantages without it?

regards

----------

## Hu

You can disable HPET support in the kernel by building with CONFIG_HPET=n.  Yes, removing it deprives you of use of the high precision timer.  This may or may not substantially impact your usage of the system.

----------

## robsta23

Thanks guys you saved my day.

Disabling just HPET MMAP kernel option resolved the issue on a quite old Centrino laptop. So I didn't need to disable HPET after all on a Gentoo patchset kernel 3.0.22 (tuxonice flavour).

cheers,

rob

```

emerge --info

Portage 2.1.10.49 (default/linux/x86/10.0/desktop/kde, gcc-4.5.3, glibc-2.14.1-r2, 3.0.22-tuxonice i686)

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

System uname: Linux-3.0.22-tuxonice-i686-Intel-R-_Pentium-R-_M_processor_1.86GHz-with-gentoo-2.1

Timestamp of tree: Wed, 07 Mar 2012 09:30:01 +0000

distcc 3.1 i686-pc-linux-gnu [disabled]

app-shells/bash:          4.2_p20

dev-java/java-config:     2.1.11-r3

dev-lang/python:          2.4.6, 2.6.7-r2, 2.7.2-r3, 3.2.2

dev-util/cmake:           2.8.7-r3

dev-util/pkgconfig:       0.26

sys-apps/baselayout:      2.1

sys-apps/openrc:          0.9.9.2

sys-apps/sandbox:         2.5

sys-devel/autoconf:       2.13, 2.68

sys-devel/automake:       1.9.6-r3, 1.11.3

sys-devel/binutils:       2.22-r1

sys-devel/gcc:            4.5.3-r2

sys-devel/gcc-config:     1.5.1

sys-devel/libtool:        2.4.2

sys-devel/make:           3.82-r3

sys-kernel/linux-headers: 3.1 (virtual/os-headers)

sys-libs/glibc:           2.14.1-r2

Repositories: gentoo x-portage

ACCEPT_KEYWORDS="x86 ~x86"

ACCEPT_LICENSE="* -@EULA dlj-1.1 PUEL"

CBUILD="i686-pc-linux-gnu"

CFLAGS="-march=pentium-m -O2 -pipe"

CHOST="i686-pc-linux-gnu"

CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0 /var/lib/hsqldb"

CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"

CXXFLAGS="-O2 -march=i686 -pipe"

DISTDIR="/mnt/media/portage/distfiles/"

FEATURES="assume-digests binpkg-logs ccache collision-protect distlocks ebuild-locks fixlafiles news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"

FFLAGS=""

```

----------

## robsta23

Forget my last post which was a little to early. In fact the rate of system crashes just decreased by disabling hpet_mmap. 

Finally I found time to investigate a little further and guessed that the well known intel i915 bug after suspend could be the issue. I updated to the next LTS-Kernel 3.2 (gentoo-sources). 

That didn't solve any issues for me but instead the full system freezes (only hard reset worked) started occuring not only after resume from suspend but "randomly".

So I started playing around with some kernel options that I got to know from other posts, causing similar issues.

To cut it short: (IO-)APIC / Local APIC was the root of the crashes. The system is now running (suspends/hibernate cycles included) for almost two days since I deactivated both on kernels boot command line (adding noapic and nolapic).

Of course this might not hold true for newer systems (compare my ancient hardware below) but anyways I thought I'd share my findings. Hope that helps.

HP NC4200, Intel Centrino 1.87 GHz (unicore), 2 GB RAM, undervolting thanks to linux phc.

----------

