# [solved] freeze on going to suspend to RAM since linux 3.10

## olek

Hi y'all,

for quite some time I'm dealing with a problem I'm stuck with solving.

With using versions of linux above 3.10 my machine freezes appr. 9/10 times going to suspect to RAM.

I tried using pm-suspend as well as "echo mem > /sys/power/state".

Disks, ethernet and other devices  (USB- and PS1-devices's power turned off) are being stopped, while the power-LED and fans are still running.

In that state, the machine can't be brought back and has to be hard resetted.

The 1/10 times the machine is being put to suspend to RAM cleanly, it manages to wake up all fine.

But the time it takes to be put to suspend is much longer than with <linux-3.11.

Going to suspend is as fast as an eye-blink on 3.10.

I'm sure I didn't just screw up the config, as I didn't do much different configuring 3.11 when I did for 3.10, also tried using the config for 3.10 with oldconfig, I tried pappy's seeds, vanilla linux, with no change in behavior at all.

For completeness, there's my current config (3.13.3), though: http://dl.cosmofox.net/Gen2/3.13

And the last working one (linux-3.10.17-gentoo): http://dl.cosmofox.net/Gen2/3.10

I really don't know how to debug this, as all storage-media are being shut down before any problem appears.

I have some logs of those rare succesful suspends, showing the long time they took ("PM: suspend of devices complete after 14610.261 msecs"), though: 

http://dl.cosmofox.net/Gen2/suspend-ok.dmesg

http://dl.cosmofox.net/Gen2/suspend-ok2.dmesg

http://dl.cosmofox.net/Gen2/suspend-ok3.dmesg

Greetings, olek.

----------

## eccerr0r

suspend/resume has always been a PITA, please also post your hardware config, and also check firmware updates for your hardware.

Suspend to RAM should be very fast if it's working properly (1 sec or less).  Resume is slightly longer but should also be fast.

Did you get Linux software suspend-to-disk working?  I hear that this is less hardware dependent and tends to work more frequently...

----------

## olek

thanks for answering...

hardware

CPU: AMD Phenom(tm) II X4 965 Processor

Mainboard: MSI 970A-G43

GPU: Radeon HD 5770

lspci:

```
00:00.0 Host bridge: Advanced Micro Devices, Inc. [AMD/ATI] RD890 PCI to PCI bridge (external gfx0 port B) (rev 02)

00:00.2 IOMMU: Advanced Micro Devices, Inc. [AMD/ATI] RD990 I/O Memory Management Unit (IOMMU)

00:02.0 PCI bridge: Advanced Micro Devices, Inc. [AMD/ATI] RD890 PCI to PCI bridge (PCI express gpp port B)

00:09.0 PCI bridge: Advanced Micro Devices, Inc. [AMD/ATI] RD890 PCI to PCI bridge (PCI express gpp port H)

00:0a.0 PCI bridge: Advanced Micro Devices, Inc. [AMD/ATI] RD890 PCI to PCI bridge (external gfx1 port A)

00:11.0 SATA controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 SATA Controller [AHCI mode] (rev 40)

00:12.0 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB OHCI0 Controller

00:12.2 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB EHCI Controller

00:13.0 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB OHCI0 Controller

00:13.2 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB EHCI Controller

00:14.0 SMBus: Advanced Micro Devices, Inc. [AMD/ATI] SBx00 SMBus Controller (rev 42)

00:14.3 ISA bridge: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 LPC host controller (rev 40)

00:14.4 PCI bridge: Advanced Micro Devices, Inc. [AMD/ATI] SBx00 PCI to PCI Bridge (rev 40)

00:14.5 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB OHCI2 Controller

00:15.0 PCI bridge: Advanced Micro Devices, Inc. [AMD/ATI] SB700/SB800/SB900 PCI to PCI bridge (PCIE port 0)

00:16.0 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB OHCI0 Controller

00:16.2 USB controller: Advanced Micro Devices, Inc. [AMD/ATI] SB7x0/SB8x0/SB9x0 USB EHCI Controller

00:18.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 10h Processor HyperTransport Configuration

00:18.1 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 10h Processor Address Map

00:18.2 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 10h Processor DRAM Controller

00:18.3 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 10h Processor Miscellaneous Control

00:18.4 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 10h Processor Link Control

01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Juniper XT [Radeon HD 5770]

01:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Juniper HDMI Audio [Radeon HD 5700 Series]

02:00.0 USB controller: Renesas Technology Corp. uPD720202 USB 3.0 Host Controller (rev 02)

03:00.0 USB controller: Renesas Technology Corp. uPD720202 USB 3.0 Host Controller (rev 02)

04:06.0 Multimedia audio controller: C-Media Electronics Inc CMI8738/CMI8768 PCI Audio (rev 10)

05:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 06)
```

Everything is ok with <=3.10. As I stated before, it's also very fast with that versions and was 100% reliable.

Suspend-to-disk worked kind of last time I checked. That was with git-sources-3.11_rc7. Going to suspend-to-disk was reliable, but resuming always caused an unstable system (I documented my procedure here: https://cosmofox.net/gen2/hibernation.)

I don't think it's related, cause resuming from suspend-to-RAM never caused unstable systems.

Edit: BIOS was up to date.

----------

## Xonak

 *Quote:*   

> Everything is ok with <=3.10. As I stated before, it's also very fast with that versions and was 100% reliable. 

 for me trouble started from 3.12.13!

----------

## olek

I did a lot of debugging [0] with 3.13 some time ago, unfortunately without sane results. The same kernel is working flawlessly on my amd-laptop.

I was going to try through the commits that happened between 3.10 and 3.11, but I'm not sure if I'll find the time. Maybe it's not worth it, when it's only a bug on my specific mainboard.

Do you have exactly the same symptoms? Unfortunately, 3.11.* and 3.12.[0-12] aren't around in the tree anymore. Did you run any of this versions with success?  Which is your mainboard? Maybe we can debug this together.

[0] https://www.kernel.org/doc/Documentation/power/basic-pm-debugging.txt

----------

## olek

It turns out, that changing the graphics card solved the problem. So it seems to be very related to the new powersaving modes for radeon cards since 3.11.

The affected card was a 5770 by ASUS (DirectCU), a 6870 by XFX replaced it.

----------

