Linux - DesktopThis forum is for the discussion of all Linux Software used in a desktop context.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
So my laptop has a funny "feature" that is quite annoying. It likes to wake itself up whenever the battery gets low, the time it really needs to stay asleep. I checked the BIOS for some setting, but it seems that ASUS made this a hardwired feature. Present in windows as well.
Anyway, under normal conditions, I don't want to waste disk space for swap that never gets used, but it seems the only way to stop my computer from running itself to the ground is to hibernate it. So my question is this: how can I make swap space on demand? I saw some code in someone's signature here, but I could not find it again. I was thinking about adding something like this to my sleep scripts:
Distribution: K/Ubuntu 10.04/12.04, Scientific Linux 6.3, Android-x86, Maemo
Actually, his question is pertinent to SSDs as well, as having a persistent swap space is counter-productive on SSD drives (dedicating a place to wear out as opposed to allowing it to be more dynamic, to take better advantage of wear-leveling), as is frequent logging, ... I'm actually looking into this for an older-ish EEE PC I have (1st gen., 8GB SSD). It's a low priority issue for me,... But, if I come up with a practical solution before anyone else does, I'll let you know,...
Oh,... and to safeguard against frequent swapping, set your swappiness to something low, like 5, or even 1... Default is typically 60 (which translates roughly as 60% likely to push something to swap).
I know there are some inefficiencies, but overall the script works, I just have one last problem.
When pm-hibernate is called, everything is good, but the system is unable to find a swap device, despite there being swap space present, and recorded in /etc/fstab. PM complains "cannot find swap device, try swapon -a"
However, if I boot up with resume=/dev/sda4 resume_offset=12345, then the first suspend works fine, since my script replaces the offset with the real one. But any hibernates after that fail. Any ideas?