Linux - Laptop and NetbookHaving a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind).
Notices
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hello,
We are using two laptops here that came with U. Mate preinstalled (16.04, supplied by the German Tuxedo), and are very happy with these configurations, with only an issue : hibernation doesn't work.
I am definitely not a geek, but I sort of understand this may be due to the fact that when preparing an hibernation, the system tries to record the RAM contents onto the swap partition (and only there?), which in our case does not succeed as the swaps are smaller than the RAM on our machines.
I considered increasing the swap partitions, but
- I want to be sure my analysis above is correct
- I don't have external disks or CD to boot from (which I understand may be needed to touch the swap?), nor do I really master the 'Grub' commanding
- I don't know the terminal swap-related commands, but I saw they were numerous and visibly powerful (capable to add a second swap for instance...)
- I am tempted to solve the issue by switching to a swap file : is it as simple as in the extremely seducing post here ? (indeed is hibernation actually compatible with swapfiles?)
So, in short, is there a safe way to proceed without creating a complete alternate boot, maybe by adding a second, larger swap then unmounting the small one, or switching to a swapfile?
(please consider I didn't even install Ubuntu myself, and am quite a newcomer!)
Nah - of all the disk/partition operations on Linux, adjusting swap is the least likely to cause problems. Swap can be easily added or removed and a reboot usually fixes any screw-ups. Last I looked you couldn't use a swapfile for hibernation - that may have changed or I may be wrong.
Go to a terminal and run these commands and post the output.
Thank you for these very fast reactions!
Indeed, I don't want to delete everything and restart : over more than one year of use, I painfully imported really many features and data, recreated ranges of email filters etc.
What I'd like is an upgrade...
Here is what I get with the three commands, in a french but quite explicit terminal :
Both disks are SSDs, the small one is faster; I use the second one for backups of the home folder (using the 'Back in Time' app which basically seems to be an rsync wrapper, à la 'Time Machine' on OSX).
of all the disk/partition operations on Linux, adjusting swap isshould be the least likely to cause problems.
Now I remember why I gave up on Ubuntu all those years ago.
So you have 32G of RAM, and only 8G of encrypted swap. Which I doubt you've ever used. As mentioned, your swap needs to be at least as big as your RAM (for safety), although hibernate only saves what is used. Whether it needs to be encrypted is probably debatable, but is likely the default these days on Ubuntu.
In a "normal" setup you'd just set up a swap partition of the appropriate size and ensure fstab and grub looked at the correct volume. Even the encryption isn't that big a deal of itself, but I don't know what Ubuntu do in the initrd. That could make the system unbootable (but shouldn't). The last post here suggests things work as expected, but I haven't tried on a Ubuntu system. Hence I'm not prepared to suggest a course of action.
It should be noted that your /home is also encrypted when you are not logged on - but your backup will be there for the all world to see.
The old rule of thumb that swap size should be double RAM dates back to the days when RAM was measured in kb. In those days, such a relationship materially affected the performance of the machine.
In these days of 4 and 8 and 16 (and more) GB RAM, not so much. I just checked the swap usage of this desktop machine, which has 16GB RAM, 4GB swap, and an uptime of four days. No swap is being used. Nada. Zilch. None.
On a contemporary machine with 4 or more GB RAM, my experience has been that the only reason for swap to exceed RAM is if "hibernate" will be used. On such a machine, I generally set swap to 1/2 RAM and have found performance to be quite acceptable.
Just for myself, I never use "hibernate," but I do sometimes use "suspend," mainly so the cats don't mess up my laptop by walking over the keyboard when I'm not there to defend it. I have found that cats do not recognize anyone else's territorial rights . . . .
Indeed the second answer seems very convincing, but I have a newbie issue I think : when I edit /etc/default/grub, even with the sudoedit command, I just cannot overwrite it (permission refused)...
Indeed the second answer seems very convincing, but I have a newbie issue I think : when I edit /etc/default/grub, even with the sudoedit command, I just cannot overwrite it (permission refused)...
show us the terminal output.
you can also use
Code:
sudo nano /etc/default/grub
if that works better for you.
also remember that afetr every (succesful) edit of that file, you should run
I have used similar to create a swap file on my system and it, kind-of, allowed me to hibernate -- in other words I could hibernate and resume but drivers and the like were as messed up as I'd expected from using hibernate on laptops.
But, yes, swap files work just as well as swap partitions and have the benefit of being easily deleatable when, for example, you have 32GB of RAM and only want to mess around with swap.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.