Enabling Hibernate/Sleep on Hardy

26 02 2009
sleep with laptop

sleep with laptop -_-

I‘ve an Ubuntu 8.04 Hardy installed on my Acer Aspire 4520. It comes with some issues, sometimes can sleep/hibernate sometimes no. But somedays ago (I think it’s to late to write this :p), sleep and hibernate works perfectly!!!


Some causes that make the system couldn’t sleep/hibernate: (my experience)

  • Madwifi, the driver is couldn’t unloaded during sleep process. There are some solution to fix it, such as create the sleep script to make it unloaded before sleep. But it comes a null (in my system). Dunno why . . .

So, replacing madwifi with ndiswrapper may fix it.

  • Swap device, some configuration files may not synchronized. The swap device’s UUID in /etc/initramfs-tools/conf.d/resume and /etc/fstab is must be synchronized.

To find out the swap’s UUID :

$ sudo blkid -c /dev/null

my output (for example):

/dev/sda5: TYPE=”swap” UUID=”987a5827-3993-45f2-b584-a65aaf894bdb”

We’ve to use the UUID for the device with swap type (TYPE=”swap”), so the current active swap’s UUID is 987a5827-3993-45f2-b584-a65aaf894bdb.

Just copy it to /etc/fstab

$ sudo nano /etc/fstab

my swap line in fstab (for example):

# /dev/sda5

UUID=987a5827-3993-45f2-b584-a65aaf894bdb none swap sw 0 0

Just change the UUID to yours (printed by previous step)

Now go to edit /etc/initramfs-tools/conf.d/resume file

$ sudo nano /etc/initramfs-tools/conf.d/resume

Do the same action ;) copy the UUID, so the file contents will look like this:

RESUME=UUID=987a5827-3993-45f2-b584-a65aaf894bdb

remember!! use your UUID, don’t use my UUID :p (he he he)

Last, just reboot and try to sleep/hibernate, it should works!! amieeen ;)

Owh yeah, i’m forgot. Recently, when I’m tried to apply this methode to my friend’s notebook, it fails.

But when install the uswusp, the sleep/hibernate works 98% ;)

download uswusp here, install it, reconfiguring it:

$ wget -c http://sourceforge.net/project/showfiles.php?group_id=45483&package_id=38163&release_id=565128

$ cd suspend-0.8

$ ./configure

$ make

$ sudo make install

Some question will appearred, just answar it safely, reboot . . And it should works

~Thanks, I hope it works for you too~





Splitting .rar archives

26 02 2009

rar icon

rar icon

To compress a rar archive in multiple parts, just do a command below:

$ rar a -vSIZE ARCHIVE.rar FILES/FOLDER

nb:

- SIZE in K is kilobyte, M in megabyte, etc

- ARCHIVE.rar is the archive name, it will be ARCHIVE.part1.rar ARCHIVE.part2.rar etc as the results.

- FILES/FOLDER is the file or folder that we want to add to archive

~Thanks~





Install gnome2-globalmenu on Ubuntu

25 02 2009

After waiting so longgggggg :p
Now my Ubuntu 8.04 Hardy have the gnome2-globalmenu. Recently my compilation of gnome2-globalmenu is always come with null.

Here is my way to install gnome2-globalmenu:


1. Install gnome2-globalmenu dep packages:
$ sudo apt-get install build-essential flex bison gnome-common libglib2.0-dev gtk-doc-tools autoconf2.13 automake1.9 libgtk2.0-dev libdbus-glib-1-dev libwnck-dev libpanel-applet2-dev libgnome-menu-dev libnotify-dev


2. Add the PPA lines for gnome2-globalmenu
deb http://ppa.launchpad.net/globalmenu-team/ppa/ubuntu hardy main
deb-src http://ppa.launchpad.net/globalmenu-team/ppa/ubuntu hardy main

it works with Intrepid, even Jaunty

3 .Update and Install the gnome2-globalmenu
$ sudo apt-get update && sudo apt-get upgrade
$ sudo aptitude install gnome-globalmenu


4. Add the gnome2-globalmenu applet to the panel
right-click panel > add to panel > global menu panel applet


5. Don’t forget check the “Enable Global Menu for GTK applications” and the other options in right-click > preferences.

here is my gnome2-globalmenu preview :

gnome2-globalmenu

but i’ve some “issues” :

- i’m forgot that i’ve vala 0.5.6 installed or not

- my globalmenu not works even restart X or reboot, but when i added

export GTK_MODULES=globalmenu-gnome

into ~/.gnomerc

It’s works!!! it’s odd, cause the original wiki tell that it’s not required

Ha ha ha, i don’t care :P

now my Paris Van Java OS (my dreamed OS) have a GM!!

thx to ayoli ;)