Linux-libre 3.1.1 hibernation issue

11 replies [Last post]
TralfamadorianOrator
Offline
Joined: 11/12/2011

I updated to version 3.1.1 of the Linux-libre kernel and I can no longer resume from suspend. I'm hoping someone here can help me.

I've run some tests per instructions here: http://www.kernel.org/doc/Documentation/power/basic-pm-debugging.txt

When I run the following as root...

echo devices > /sys/power/pm_test
echo disk > /sys/power/state

...my system seems to return to a usable state, but after some activity, I right-clicked on the screen, and everything froze. The mouse cursor froze, the keyboard was unresponsive, and the power button was unresponsive.

Here are some of the errors I got:

b43 ssb0:0: firmware: b43-open/ucode5.fw will not be loaded
b43-phy0 ERROR: Firmware file "/*(DEBLOBBED)*/" request failed (err=-22)
b43-phy0 ERROR: Firmware file "b43-open/ucode5.fw" request failed (err=-16)
b43-phy0 ERROR: /*(DEBLOBBED)*/

Hardware became unavailable upon resume. This could be a software issue prior to suspend or a hardware issue.

legacy_resume(): wiphy_resume+0x0/0xa0 [cfg80211] returns -2
PM: Device phy0 failed to restore: error -2

I also tried running the following...

echo platform > /sys/power/disk
echo disk > /sys/power/state

...and the system became unresponsive, and was not able to return from the black screen.

Next, I tried unloading the b43 module before testing, but still got the same results.

What's the next step I can take to figure out what's happening?

TralfamadorianOrator
Offline
Joined: 11/12/2011

Earlier, I wrote "I can no longer resume from suspend." This is incorrect. What I meant to say was I can no longer resume from HIBERNATE. Suspend to RAM works just fine.

TralfamadorianOrator
Offline
Joined: 11/12/2011

I installed the uswsusp package, and now hibernate works again.

SIDE NOTE: Before installing uswsusp, I also made a few other changes, which didn't seem to help. Here are the changes I made, just in case they had anything to do with the resolution of this issue.

  • I edited /etc/default/acpi-support and set MODULES="b43 ssb"
  • I edited /etc/default/grub and appended SUSPEND_MODULES=\"b43 ssb\" to GRUB_CMDLINE_LINUX_DEFAULT
TralfamadorianOrator
Offline
Joined: 11/12/2011

Update: Today, when my battery was low, my system went into hibernation and it seemed to go alright until the very end. s2disk displayed the progress of the blocks being copied to disk, and it reached 100%, but then it printed "S|" to a new line on the screen, and the system hanged. It did not power off by itself.

When I powered it back up later, it seemed to resume properly up to the point where my mouse cursor appeared, except that it was frozen. I couldn't move the cursor, and the system was unresponsive to the keyboard.

By the way, I updated to kernel 3.1.2-libre last night.

TralfamadorianOrator
Offline
Joined: 11/12/2011

Strange. Hibernate has stopped working again. s2disk displays the progress of the hibernation process to 100%, and then I get a newline with

S|

It hangs, so I power off the computer by pressing down the power button for a few seconds. An attempt at resuming from hibernate fails with a frozen mouse cursor on the screen. I'm able to move the cursor for about a second before it freezes.

Also, since my first post, I've noticed that suspend to ram is erratic -- sometimes works, sometimes fails.

TralfamadorianOrator
Offline
Joined: 11/12/2011

I edited /etc/default/acpi-support and changed the line

SUSPEND_METHODS="dbus-pm dbus-hal pm-utils"

to

SUSPEND_METHODS="acpi-support dbus-pm dbus-hal pm-utils"

(I added acpi-support)

Now everything is working fine again. So far, I've tried hibernating about 10 times, successfully each time. And I've tried suspending either four or five times, all successfully.

I don't remember, but I may have had this setting in the acpi-support file before, when I got it to work, but removed it because I thought installing the uswsusp package fixed everything.

TralfamadorianOrator
Offline
Joined: 11/12/2011

Just another update: Hibernate works great now, but I get sporadic failures when I resume from a suspend to RAM. The screen is frozen on the black terminal screen, with the text that was output when the computer was first booted.

I think these failures to resume from suspend to RAM existed even before I made the changes to /etc/default/acpi-support

TralfamadorianOrator
Offline
Joined: 11/12/2011

Almost immediately after my previous post in this thread, I experienced a few sporadic hibernation failures. However, I think I failed to mention that I had updated to kernel-libre version 3.1.2. I don't know if that was the cause. At one point, hibernation failed least three times in a row, and resuming from a suspend to ram occasionally failed too.

I have since built and installed kernel-libre 3.1.4, and I also reverted my change to the SUSPEND_METHODS line in the /etc/default/acpi-support file back to

SUSPEND_METHODS="dbus-pm dbus-hal pm-utils"

I've been using the new kernel since November 29, and I've hibernated at least 10 times without any issues. I've also suspended to ram three four times without issues.

I wonder what fixed it. If I really wanted to figure this out, I suppose I should test it more systematically, and maybe talk with the kernel guys. So far, all I've done is a lot of idiotic trial and error.

TralfamadorianOrator
Offline
Joined: 11/12/2011

Darn! I thought the problem went away, but the hibernate failure just happened again, twice in a row.

If anyone has some advice as to how I can go about testing this systematically to figure out the issue's root cause, I'd be glad to hear it.

jdenz
Offline
Joined: 11/18/2011

I also have problems suspending/hibernating. I've solved it by trying to avoid suspending/hibernating whenever possible. However, I realize for others that avoiding suspension and hibernation isn't always possible or desirable. I wish I could offer more help for your issue, but unfortunately I don't know enough about it to help.

I did, however, want to let you know that I appreciate the information you've shared as it may be helpful to me and others at some time in the future. Thanks.

TralfamadorianOrator
Offline
Joined: 11/12/2011

Thanks for the encouragement, jdenz! When I have some time, and if the issue persists, I'll attempt some more structured testing and share the results.

TralfamadorianOrator
Offline
Joined: 11/12/2011

Just a quick update. The whole issue of hibernation and suspend failing sporadically was actually my fault. I added a script to /etc/network/if-down.d/ when I first installed Trisquel, and then I forgot that I had done this.

The added script made a call to macchanger to change the MAC address of my wireless device every time the device was turned off. Maybe this interfered with the unloading of my (b43 and ssb) wireless driver modules? I cant't pretend to know what really happened. If anybody has the time and patience to explain this to me, I'd love to gain a better understanding of my mistakes.