# hibernate/suspend2-kernel: Device or resource busy [SOLVED]

## daemonflower

Hi,

this has bugged me for a while but only now do I get around to posting about it. Hibernation on my Dell D630 with current suspend2-sources does not work any more. In fact I don't know when it stopped working, it has worked before.

A minor issue first. hibernation aborts with the message *Quote:*   

> Some modules failed to unload: ipw3945

 I can fix this by commenting out the ipw3945 module in /etc/hibernate/blacklisted-modules, but I assume there is a reason why this is blacklisted. Any idea on why the module does not unload and how I can fix this?

Now the main issue. After I worked around the above error I get the following: *Quote:*   

> /usr/share/hibernate/scriptlets.d/suspend2: line 564: echo: write error: Device or resource busy

 Analyzing the script in question tells me this is what it tries in line 564:

```
echo > /sys/power/suspend2
```

Doing this manually gives me the error mentioned above:  *Quote:*   

> bash: echo: write error: Device or resource busy

 Err, yes. Now what am I missing here?

ThanksLast edited by daemonflower on Wed Jan 30, 2008 5:12 pm; edited 1 time in total

----------

## anz

Dear daemonflower,

yupp - I have similar problems after updating hibernate-script (to version 1.97-r2):

before updating, suspend (to disk and ram) worked, 

after updating, I get the same error message (on two laptops with ipw3945) when trying to suspend.

I could only solve this by remarking the ipw3945 entry in the file

/etc/hibernate/blacklisted-modules

some further information:

I use the "normal" 2.6.22-gentoo-r9 kernel without the suspen2 patch (or sys-kernel/suspend2-sources).

----------

## daemonflower

Thanks anz, but this does not solve my real problem. As I said, I have already commented out ipw3945 from the blacklisted-modules file, but still the "Device or resource busy" error applies.

I take it that you did not have any problems resulting from removing the blacklist entry though? That's good to hear, I'll leave it as it is then.

----------

## x22

I added ipw3945d to RestartServices. Stopping ipw3945d allows the module to unload.

A bug has been filled here:

https://bugs.gentoo.org/show_bug.cgi?id=199650

----------

## daemonflower

Good to know, I'll do that too.

But please, let me restate my real problem, because it seems to have gotten lost somewhat over this side issue concerning ipw3945:

hibernate-script tries to send the kernel into hibernation by issuing

```
echo > /sys/power/suspend2
```

 which leads to the following error: *Quote:*   

> echo: write error: Device or resource busy

 Hibernation stops at that point.

Any ideas on this one?

----------

## daemonflower

Turns out I have found a solution for this now, and it is the oldest solution in the IT problem toolbox: (no, not “reboot the system", but) upgrade to the newest version of the software in question. I upgraded suspend2-sources-2.6.22-r2 to tuxonice-sources-2.6.23-r9 and hibernation works.

Now if only I had known that the suspend2 project renamed itself to tuxonice. I had been wondering why suspend2-sources hadn’t been updated in a while…

In other news, I tried installing the same kernel on my desktop. When I tested suspending and resuming, the system froze during the resume process. So I had to reset the system and found out that my /var filesystem was gone in the process.

Hilarity ensued. Hours of good clean family entertainment restoring 250 GB from a backup disk, which turned out to be not even complete (are backups ever?). I have got my user data back, but my system appears rather fscked.

In conclusion, take those warnings from the Power Management Guide seriously that tell you to back up stuff before trying out hibernation.

The question remains, what is hibernation good for if you have to run a backup before you do it?

----------

## beatryder

 *daemonflower wrote:*   

> Turns out I have found a solution for this now, and it is the oldest solution in the IT problem toolbox: (no, not “reboot the system", but) upgrade to the newest version of the software in question. I upgraded suspend2-sources-2.6.22-r2 to tuxonice-sources-2.6.23-r9 and hibernation works.
> 
> Now if only I had known that the suspend2 project renamed itself to tuxonice. I had been wondering why suspend2-sources hadn’t been updated in a while…
> 
> In other news, I tried installing the same kernel on my desktop. When I tested suspending and resuming, the system froze during the resume process. So I had to reset the system and found out that my /var filesystem was gone in the process.
> ...

 

Backing up is good, but if you are smart and run "sync" a few times (twice usually does it) before suspending it usually keeps your data safe as well. Or at least it minimizes headaches

----------

## darkeye

I just encountered the same issue as noted above, using the latest packages (tuxonice 2.6.24-r3, hibernate 1.97)

is there a real solution to this problem?

----------

## psdasilva

Same here ...

echo: write error: Device or resource busy

----------

## weird wonko

And here. I just tried TuxOnIce on three different machines, with kernel versions 2.6.24-r4, 2.6.24-r9 and 2.6.26, and always get the Device or resource busy error.

----------

## d-fens

same here, 2.6.25-tuxonice-r4 #3 SMP PREEMPT, hibernate-script V1.99, suspend to swap

```
/usr/share/hibernate/scriptlets.d/suspend2: line 525: echo: write error: Device or resource busy 
```

echo > $TUXONICE_ROOT/do_hibernate 

fails

----------

