Nov 19

Linux suspend to disk issues

Category: Uncategorized

So the other day I hit suspend to disk in one of my classes when I was getting ready to move from one to another.  I run Ubuntu 8.10 Intrepid Ibex on my laptop just for ease of administration and such, my laptop uses the crazy Broadcom bcm43xx wireless chipset.  But after trying to RESTORE the PC, it would not come back online.  So I did a hard reboot, at which point the X server would not come back up.

After investigating farther I noticed the problem was due to a single line in the fstab file under /etc/fstab.  Basically this file is a descriptive table of the layout of your filesystem (hence fstab)  The line of code in question was “errors=remount-ro”.  This was tagged onto my main root filesystem (mounted at /), and basically means that if the system detects an error, to remount the file system as read only.  X11 won’t work under read only mode apparently.

The way to fix this is to run fsck, you can boot into the recovery kernel and run it from there.  This basically replays the journal (if you’re using a journaling file system) and corrects any discrepancies.  I personally also removed the “errors=remount-ro” portion of that line.  I understand that this could lead to data corruption in the future, and you should realize this too if you use that line.  Basically my mounting it as read only, it prevent any further entries into the journal before you can get a chance to run fsck.

Now the permanent fix as I’ve come to find out, has to do with swap space.  From what I understand, in order for suspend to disk to work, you need at lead the amount of RAM you have available in the swap partition.  Most people have double the amount of swap that they do of RAM but I have 2GB of RAM so I only have 1GB of swap.

That should fix the problem.  I haven’t attempted it personally but I do believe this is the problem from the things I’ve been looking at.

No comments

No Comments

Leave a comment

Powered by WP Hashcash