Ubuntu: Ubuntu 12.04 Faster boot, Hibernate & other questions


I've recently started exploring Ubuntu (my 1st distro).

I fresh installed precise without a swap (4GB ram).

The only issues are, slow boot (regardless of the swap) and instability after a few days of installation. The runtime performance is immaculate otherwise.

Even though not needed, I still set swappiness = 10. I've tried the quiet splash profile to GRUB; already have preload installed. But it still is pretty slow. I am not too confident on recompiling the kernel yet. But you could please advice me on that too.

I've also added the following to fstab:

#Move /tmp to RAM:  tmpfs /tmp tmpfs defaults,noexec,nosuid 0 0  

(Also if you could please tell me the exact implication/scope of this tweak on physical ram & the swap.)

But nothing has happened really. So what alternatives are there to make it boot faster?

Also, right after fresh install, though no swap partition, the system still showed /dev/zram0 of arond 2GB which was never used (probably because of the above fstab edit).

Finally, I experimented with Hibernate a little, but many claim that it doesn't work on 12.04. (Not to mention, I made a swap file of 4GB for it). What I did was:

sudo gedit /var/lib/polkit-1/localauthority/50-local.d/hibernate.pkla  

Then I added the following lines, saved the file, and closed the text editor:

[Re-enable Hibernate]  Identity=unix-user:*  Action=org.freedesktop.upower.hibernate  ResultActive=yes  

I also edited the upower policy for hibernate:

gksudo gedit /usr/share/polkit-1/actions/org.freedesktop.upower.policy  

I added these lines:

< allow_inactive >no< /allow_inactive >  < allow_active >yes< /allow_active >  

But it did not work. So is there an alternate method perhaps that can make it work on 12.04?


Regarding the instability, kernel developers recommend always using swap. Maybe you should add a small zram swap (install zram-config and edit /etc/init/zram-config.conf), or disk swap.

To address slow boot you could look at what's taking the time with bootchart. Impossible to really offer any more advice without knowing specifics.

Hibernating to a swap file is apparently not possible by default. (Not sure if that thread's still valid.) You could create a swap partition. I would make it at least 5GB just to have some room in case something is swapped and to make sure you avoid any GB vs. GiB problems. I personally haven't had problems with hibernate on 4GB RAM and 8GB swap partition.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »