After using my laptop reaches more than about 20 hours of uptime (and I have a couple of suspend/resume cycles in between by closing the lid) the next suspend fails like this:
The system never sleeps, instead the kernel dmesg stops at:
> PM: Syncing filesystems ... done.
> PM: Preparing system for mem sleep
and never makes it to
> Freezing user space processes ... (elapsed 0.01 seconds) done.
> Freezing remaining freezable tasks ... (elapsed 0.01 seconds) done.
> PM: Entering mem sleep
Furthermore, if I open the lid I find that X has crashed, my whole session is lost and I am back at the display manager to login. I can then login normally and continue working as if nothing has happened BUT if I choose to shutdown or reboot, sometime before the end the kernel 'wakes up' and actually suspends my laptop. On resume, the reboot/shutdown continues.
The only fix we have found to this problem is
1. Never suspend by closing the lid.
2. Always kill the X server after about 10-12 hours have passed from the previous suspend.
I am using a Lenovo T420 with HD3000 onboard and no nvidia present. There is an active thread here https://bbs.archlinux.org/viewtopic.php?id=144381, ignore the title saying about linux 3.4, it happens with kernels back to 3.0.
It happens with
-> xorg-server-18.104.22.1681 as well as
after the failed suspend, the end of /var/log/Xorg.0.log is this
[ 7078.130] (II) AIGLX: Suspending AIGLX clients for VT switch
[ 7081.997] (II) AIGLX: Resuming AIGLX clients after VT switch
[ 7082.050] (II) intel(0): EDID vendor "LGD", prod id 738
[ 7082.050] (II) intel(0): Printing DDC gathered Modelines:
[ 7082.050] (II) intel(0): Modeline "1600x900"x0.0 96.00 1600 1648 1680 1728 900 903 908 926 -hsync -vsync (55.6 kHz eP)
[ 7085.063] (--) synaptics: SynPS/2 Synaptics TouchPad: touchpad found
[ 8611.400] Backtrace:
[ 8611.404] 0: /usr/bin/X (xorg_backtrace+0x36) [0x560306]
[ 8611.404] 1: /usr/bin/X (0x400000+0x164039) [0x564039]
[ 8611.404] 2: /usr/lib/libpthread.so.0 (0x7fe2ecf1c000+0xf170) [0x7fe2ecf2b170]
[ 8611.404] 3: /usr/bin/X (XIChangeDeviceProperty+0x1b8) [0x502d58]
[ 8611.404] 4: /usr/bin/X (DisableDevice+0x20f) [0x42d8ff]
[ 8611.404] 5: /usr/bin/X (xf86Wakeup+0x494) [0x46fa44]
[ 8611.404] 6: /usr/bin/X (WakeupHandler+0x6b) [0x43848b]
[ 8611.404] 7: /usr/bin/X (WaitForSomething+0x1a4) [0x55d744]
[ 8611.404] 8: /usr/bin/X (0x400000+0x34281) [0x434281]
[ 8611.404] 9: /usr/bin/X (0x400000+0x23615) [0x423615]
[ 8611.404] 10: /usr/lib/libc.so.6 (__libc_start_main+0xf5) [0x7fe2ebdcb725]
[ 8611.404] 11: /usr/bin/X (0x400000+0x238ed) [0x4238ed]
[ 8611.405] Segmentation fault at address 0x11
Fatal server error:
[ 8611.405] Caught signal 11 (Segmentation fault). Server aborting
Please consult the The X.Org Foundation support
[ 8611.405] Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[ 8611.720] (II) evdev: ThinkPad Extra Buttons: Close
[ 8611.720] (II) UnloadModule: "evdev"
[ 8612.040] (II) evdev: TPPS/2 IBM TrackPoint: Close
[ 8612.040] (II) UnloadModule: "evdev"