Creates too small swap for hibernate

Bug #60511 reported by era
4
Affects Status Importance Assigned to Milestone
partman-auto (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

I have two different installations from the Ubuntu 6.06 i386 Live CD. Both of them suffered from the same problem: the swap space was too small for the hibernate function to work properly.

Case #1: IBM ThinkPad 600E with 6.5Gb drive, with all old partitions removed before (re-) starting the Live CD. RAM is on the order of 256Mb; selected "use entire disk /dev/hda" and let the partitioner do its magic. It created a swap partition which is around 450Mb which is apparently insufficient. On a freshly booted system, I can hibernate, but once I start up Firefox, I can't. (It also fails to start programs -- I can't even run two instances of terminal, apparently because of too little swap.)

Case #2: Dell Latitude C640, dual-boot with Windows XP. This is more vague because it's a few months since I installed it; I can check specifics at home. Guesstimate 256MB RAM, 4GB disk for Ubuntu, in the end? There was a spare unused partition which I initially installed on, but it was definitely too small. (The installer didn't say anything about that but I got error messages from swsusp when I tried to hibernate.) Then I took the D: drive from Windows and reran the Live CD installer from scratch, specifying 400Mb swap manually. This too proved insufficient for suspending while running Firefox and a couple of terminals, so I had to resize partitions once more.

Can you please flag this as "Need info" so I'll remember to fill in the missing details when I have access to these machines again? Thanks.

Revision history for this message
Colin Watson (cjwatson) wrote :

"Needs Info", as requested.

Changed in ubiquity:
status: Unconfirmed → Needs Info
Revision history for this message
era (era) wrote :

Here's the current dmesg from the Thinkpad (case #1). I have resized partitions and installed linux-686 and a few user packages (sawfish, emacs, subversion, dlocate, ssh, apt-file, cvs; some of them obviously from universe) but other than that, this is still by and large freshly installed.

Revision history for this message
era (era) wrote :

Here's the log from the original partitioning. I have since resized the swap to around 1 Gb (just to be on the safe side ...) and hibernating now works, at least roughtly. (Just tested for the first time. The fan kept on running until I gave up on waiting and rebooted -- but I digress.)

Revision history for this message
era (era) wrote :

And here is the installation-time syslog. There is also a file /var/log/installer/version but it only contains "ubiquity 1.0.12" so I won't bother to upload that separately.

Revision history for this message
era (era) wrote :

Small correction to the original report: As is obvious from the log, the created swap was even smaller than I remembered; just roughly equal to the amount of RAM in the system (223MB RAM [sic], about 290MB swap)

Revision history for this message
era (era) wrote :

I believe I have posted all the information I have available. Do you still need more from me, or could you please remove the "Needs info" tag now?

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

the swap size comes from the rule "no less than 96MB but max 3xRAM" plus a weighting comparison with other partitions. So, while one user might expect the installer to use a swap space large enough for hibernation et al, the other might expect it to have more space for user files.

Revision history for this message
era (era) wrote :

Could we at least have a fix for https://launchpad.net/ubuntu/+source/ubiquity/+bug/61054 then?

Or maybe (/me goes haywire) an animated high-resolution full-color graphical 3D wizard with 19 steps to select whether you want one or the other, with no way to cancel and no way to operate it from the keyboard? And nag screens? Pretty please?

Revision history for this message
era (era) wrote :

Sorry about the sarcasm in the previous comment. I'd still like to have the "Needs Info" tag removed, if possible. Thanks.

If you clearly perceive two different usage scenarios, shouldn't the installer ask whether the user would prefer swsusp to work or rather use the required space for user files? Barring that, shouldn't the default on swsusp:able machines need to be working swsusp, allowing advanced users to resize the swap if they really are that starved for space?

era (era)
Changed in partman-auto:
status: Needs Info → Unconfirmed
Revision history for this message
Robert Persson (ireneshusband) wrote :

I have just encountered the same problem installing kubuntu-kde4 beta on a Thinkpad R61 with 3G memory. The installer only created a swap partition of around 605M. I should say that I had only allocated around 30G of disk space to Linux when resizing the windows partition. Nevertheless I think there is a serious problem here. Although I personally can put up (albeit grudgingly) with hibernate not working on a desktop, but on a laptop it is absolutely not optional. All those people who comment on forums that they installed linux on xyz laptop and that it works brilliantly and that they don't care that power management is broken are completely mad. A laptop without functional sleep and hibernate is as broken as a laptop with a dead battery.

Suggested solutions:
1. Get hibernate-to-file working like it does on Windows and Mac OS.
2. Ask during installation whether the user wants to be able to hibernate (I know I was the one who filed a bug once saying that the installer asked too many questions (and thank you very much for fixing it btw) so feel free to shoot me).
3. Just make a big swap without asking and then create some kind of utility that makes resizing the swap a no-brainer.

Eric Kuzmenko (gralco)
Changed in partman-auto:
assignee: nobody → gralco
assignee: gralco → ubuntu-kernel-team
status: New → Confirmed
Changed in partman-auto:
assignee: ubuntu-kernel-team → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.