Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
suspend to RAM works, but not suspend to disk
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
renkinjutsu
n00b
n00b


Joined: 28 Jul 2010
Posts: 28

PostPosted: Sun Aug 07, 2011 7:54 pm    Post subject: suspend to RAM works, but not suspend to disk Reply with quote

I'm trying to get suspend to disk to work, but I can't. It's strange though, since suspend to ram works just fine.
When I try to suspend to disk, it just brings me to a blank framebuffer with a blinking cursor, and stays there forever.

Code:
$ free -m
             total       used       free     shared    buffers     cached
Mem:          5456        790       4666          0          0        413
-/+ buffers/cache:        376       5080
Swap:         7999          0       7999


Code:
$ cat /proc/swaps
Filename                                Type            Size    Used    Priority
/dev/sda5                               partition       8191996 0       -1


Code:
$ cat /sys/power/state
mem disk


I experimented with the kernel parameter acpi=off and mem disappeared from /sys/power/state (expected). Then I tried
Code:
echo disk > /sys/power/state
and instead of being stuck at the framebuffer forever, it brings me back after 20 seconds with with this outputted in dmesg/kmsg

Code:
<7>[  153.256650] PM: Marking nosave pages: 000000000009f000 - 0000000000100000
<7>[  153.256662] PM: Marking nosave pages: 00000000bfb3f000 - 00000000bfef6000
<7>[  153.256697] PM: Marking nosave pages: 00000000bff00000 - 0000000100000000
<7>[  153.260668] PM: Basic memory bitmaps created
<6>[  153.260672] PM: Syncing filesystems ... done.
<4>[  153.383741] Freezing user space processes ... (elapsed 0.01 seconds) done.
<4>[  153.397297] Freezing remaining freezable tasks ...
<3>[  173.413484] Freezing of tasks failed after 20.01 seconds (1 tasks refusing to freeze, wq_busy=0):
<6>[  173.413502] khubd           D 0000000000000000  5840   342      2 0x00800000
<4>[  173.413515]  ffff88019810db90 0000000000000046 ffff880196f753c0 ffff8801975feae0
<4>[  173.413524]  ffff880196d84898 ffff88019810c010 ffff880198101560 0000000000010880
<4>[  173.413533]  ffff88019810dfd8 ffff88019810dfd8 0000000000010880 ffff880198101560
<4>[  173.413541] Call Trace:
<4>[  173.413557]  [<ffffffff81085039>] ? prepare_to_wait+0x71/0x7c
<4>[  173.413568]  [<ffffffff813f97d0>] usb_kill_urb+0xa3/0xc3
<4>[  173.413575]  [<ffffffff81084df7>] ? wake_up_bit+0x25/0x25
<4>[  173.413583]  [<ffffffff813fa797>] usb_start_wait_urb+0x85/0xc2
<4>[  173.413591]  [<ffffffff813f9daf>] ? usb_alloc_urb+0x19/0x42
<4>[  173.413599]  [<ffffffff813fa9f1>] usb_control_msg+0xd8/0xfc
<4>[  173.413607]  [<ffffffff813f3ea2>] hub_port_init+0x26a/0x5fe
<4>[  173.413616]  [<ffffffff8139ddba>] ? pm_runtime_set_autosuspend_delay+0x3a/0x46
<4>[  173.413624]  [<ffffffff813f6149>] hub_thread+0x8f8/0xfa9
<4>[  173.413633]  [<ffffffff8105f387>] ? __dequeue_entity+0x2e/0x33
<4>[  173.413641]  [<ffffffff81064e28>] ? pick_next_task_fair+0xbe/0x10d
<4>[  173.413649]  [<ffffffff81084df7>] ? wake_up_bit+0x25/0x25
<4>[  173.413656]  [<ffffffff813f5851>] ? hub_disconnect+0xe6/0xe6
<4>[  173.413663]  [<ffffffff8108499c>] kthread+0x7d/0x85
<4>[  173.413671]  [<ffffffff8169b914>] kernel_thread_helper+0x4/0x10
<4>[  173.413679]  [<ffffffff8108491f>] ? kthread_worker_fn+0x13a/0x13a
<4>[  173.413686]  [<ffffffff8169b910>] ? gs_change+0xb/0xb
<4>[  173.413698]
<4>[  173.413701] Restarting tasks ... done.
<7>[  173.414064] PM: Basic memory bitmaps freed


Apparently it's having trouble freezing a task. How is suspend to ram working? doesn't suspending to ram also need to freeze tasks?
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9645
Location: almost Mile High in the USA

PostPosted: Mon Aug 08, 2011 5:03 pm    Post subject: Reply with quote

Are you using swsusp in kernel or something else?

Seems to be dealing with USB stuff by the log, do you have unusual USB hardware?

I've used swsusp (in-kernel) with swap partitions and swap files, seems to be working for the most part for me... I suppose it's kind of strange, my dell laptop actually works with swsusp and does not resume from suspend to RAM properly, go figure...
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
renkinjutsu
n00b
n00b


Joined: 28 Jul 2010
Posts: 28

PostPosted: Mon Aug 08, 2011 7:51 pm    Post subject: Reply with quote

I don't use swsusp.. Or at least I don't think I do.. I use the vanilla kernel and I can't find swsusp anywhere in the config. And about the weird USB hardware, my laptop has USB3.0 hardware + USB2.0 hardware.. I heard there were problems with the xhci USB3 drivers, so I recompiled my kernel to not have them built in, that way I can modprobe -r whenever I want to hibernate.. unfortunately, it doesn't work even with the xhci_hcd module unloaded
Back to top
View user's profile Send private message
renkinjutsu
n00b
n00b


Joined: 28 Jul 2010
Posts: 28

PostPosted: Tue Aug 09, 2011 11:24 am    Post subject: Reply with quote

I recompiled my kernel with all the usb controller drivers as modules so I can unload them

I tried suspending to disk with none of the drivers loaded. This worked only ONCE and failed all the other times.. When I boot the kernel with acpi=off on the other hand, suspend to disk works reliably, though I have to manually halt the system myself once the system image was written to disk..

So does this reek of buggy acpi?
Back to top
View user's profile Send private message
renkinjutsu
n00b
n00b


Joined: 28 Jul 2010
Posts: 28

PostPosted: Tue Aug 09, 2011 3:57 pm    Post subject: Reply with quote

Ahh I found my problem.. it was caused by the accelerometer in my laptop. The driver seems kinda buggy.
(hp_accel lis3lv02d)
Anyway. Need to mark this as solved
Back to top
View user's profile Send private message
renkinjutsu
n00b
n00b


Joined: 28 Jul 2010
Posts: 28

PostPosted: Tue Mar 19, 2013 12:39 am    Post subject: For those still seeking answers Reply with quote

If you have the kernel sources available, go to that directory. Go to Documentation/power and read basic-pm-debugging.txt..

After reading and understanding that doc, systematically test all modes of hiberation to see where which step it fails (freezer, devices, platform, processors, core..)

Mentioned in the Doc is that failure when testing 'devices' usually means a faulty driver that isn't suspending correctly (this was my problem). It might be helpful to save the dmesg output of each test.
Back to top
View user's profile Send private message
syn0ptik
Apprentice
Apprentice


Joined: 09 Jan 2013
Posts: 267

PostPosted: Wed Mar 20, 2013 4:25 am    Post subject: Reply with quote

my last post here about it
https://forums.gentoo.org/viewtopic-t-953300.html
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum