VectorLinux
October 24, 2014, 02:03:14 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Visit our home page for VL info. To search the old message board go to http://vectorlinux.com/forum1. The first VL forum is temporarily offline until we can find a host for it. Thanks for your patience.
 
Now powered by KnowledgeDex.
   Home   Help Search Login Register  
Please support VectorLinux!
Pages: [1]
  Print  
Author Topic: HOWTO: Configure your laptop for Suspend / Hibernate with VL 6.0 STD  (Read 6984 times)
M0E-lnx
Administrator
Vectorian
*****
Posts: 3185



« on: April 06, 2009, 01:30:28 pm »

WARNING:
This howto is now deprecated. Suspend and hibernating are now handled with xfce4-power-manager and pm utils.
Just make sure these 2 packages are installed and you have lilo setup correctly (see below)


Quote
image = /boot/vmlinuz
    root = /dev/hda2
    label = linux
    append = "resume=swap:/dev/hda3"
    read-only


Assumptions
  • Your box CAN run xfce4
  • Your box CAN run hal
  • You have root access to yoru box
  • You are using LILO as a boot manager

WARNING
The following instructions WILL NOT WORK ON any other window manager other than xfce4 version 4.6.0 and newer only.
This process requires you to use HAL as the system mounter. If you run VectorLinux Light on legacy hardware, xfce4 + hal may be a burden that you box cannot handle. Proceed at your own risk.


System preparation
Before doing anything else, prepare your system for hibernation.
The kernel is already patched and prepared for it, so dont even worry about that. Instead, let's setup your boot loader
Code:
mcedit /etc/lilo.conf
Quote
image = /boot/vmlinuz
    root = /dev/hda2
    label = linux
    append = "resume=swap:/dev/hda3"
    read-only
Notice the append line. Make sure you have one like that, but replace "/dev/hda3" with whatever your swap partition is

Your user account
You will need to add your user (non-root) account to the "power" group to be able to use this.
And also, any additional user accounds created in the future will need to be members of this group.
The easiest way to do this is to edit your /etc/group file and add your user names to the end of the line that looks like this
Code:
power:x:84:
so your line should look like this
Quote
power:x:84:vluser

At this point, you need to reboot your computer.
You may choose to keep going, but you will be unable to test any of the following steps as you complete this howto.

Prepare software sources
Make sure you have the "testing" repository enabled in your software sources.
Code:
mcedt /etc/slapt-get/slapt-getrc
Find the line for whose URL ends in "testing", make it's prefix look like the other enabled repos (packages,extra,patches)

Update your slapt-get sources
Code:
slapt-get -u

install software
Code:
slapt-get-i xfce4 pm-utils xfce4-power-manager

Just to be safe, make sure you DO NOT have a xfce4-power-additions package installed.
Code:
removepkg xfce4-power-additions

That should be enough for your to be able to suspend and hibernate from the xfce4 logout window (session manager)

Extra tweaking
To enable hibernate to work when you close your laptop's lid, follow this extra step.

Create a file /etc/acpi/events/lid with the following contents
Code:
event=button/lid
action=pm-suspend
You can also choose to hibernate your box instead of suspend, by simply changing "pm-suspend" to "pm-hibernate"

If you have not yet done so, reboot and enjoy. Wink

« Last Edit: August 03, 2009, 12:47:17 pm by M0E-lnx » Logged

never_stop_learning
Vectorite
***
Posts: 263


WWW
« Reply #1 on: August 03, 2009, 11:35:33 am »

Quick question - I do not have a swap partition set up on the HP Mini. How should I set up a file to suspend to? And does it make any difference whether the file is on the 16gb SSD or the 8gb Flash Drive?
Logged

Laptop: IBM X60s (Centrino/Duo, 2gb ram, 80gb hd) VL 6.0 Std
Netbook: HP Mini (Intel Atom 1ghz, 2gb ram, 16gb SSD + 8gb flash ) VL 6.0 Std
Desktop: Dell Dimension 5150 (P4 3ghz, 2gb ram, 80gb hd) VL 6.0 Std
Wife's Desktop: Gateway (P4 2ghz, 1gb ram, 80gb hd) VL 6.0 Std
M0E-lnx
Administrator
Vectorian
*****
Posts: 3185



« Reply #2 on: August 03, 2009, 11:37:59 am »

In theory, it shouldn't make a difference...
But I have never done a suspend to swap file instead of partition.
Logged

newt
Vectorian
****
Posts: 1132



« Reply #3 on: August 03, 2009, 12:02:34 pm »

I appreciate this tutorial and have tried it out.  Unfortunately, I was unable to give it a full test because upon upgrading to XFCE 4.6.0 I received many DE issues that made the user experience unpleasant.  I spent the majority of the time trying to get the desktop back to a "normal" state - let alone a VL-themed state.  I was never able to get back to "normal" so I quickly abandoned the suspend/hibernate idea.  I've noticed in the past week or so that others have also been experiencing the same issue upon upgrading to XFCE 4.6.0 found in extra/testing repos.  Although the tutorial did seem to work - i.e. it enabled suspend and hibernate for XFCE - I wonder if a WARNING should be appended to the top post until the issues with upgrading to 4.6.0 from the repo are resolved.

I DO like this tutorial though - it was straight-forward and clear, and did exactly what the subject described. Thanks M0E!
Logged
M0E-lnx
Administrator
Vectorian
*****
Posts: 3185



« Reply #4 on: August 03, 2009, 12:05:37 pm »

I should probably tell you guys, this howto is now sorta kinda depricated.

Starting with xfce4-4.6.1, this is done natively by the session manager, so no need to be editing any config files.

You just need to make sure you install xfce4-power-manager and pm-utils.
After that, you should be able to set your power options from the xfce4 settings panel for your events and suspend/hibernate fromt he logout window.
Logged

never_stop_learning
Vectorite
***
Posts: 263


WWW
« Reply #5 on: August 03, 2009, 12:13:28 pm »

Great news.....! I can be patient and wait for xfce 4.6.1.....

Are we there yet....? are we there yet....? are we there yet....?  Wink   Grin
Logged

Laptop: IBM X60s (Centrino/Duo, 2gb ram, 80gb hd) VL 6.0 Std
Netbook: HP Mini (Intel Atom 1ghz, 2gb ram, 16gb SSD + 8gb flash ) VL 6.0 Std
Desktop: Dell Dimension 5150 (P4 3ghz, 2gb ram, 80gb hd) VL 6.0 Std
Wife's Desktop: Gateway (P4 2ghz, 1gb ram, 80gb hd) VL 6.0 Std
M0E-lnx
Administrator
Vectorian
*****
Posts: 3185



« Reply #6 on: August 03, 2009, 12:36:45 pm »

4.6.1 is already in testing
Logged

never_stop_learning
Vectorite
***
Posts: 263


WWW
« Reply #7 on: August 03, 2009, 01:10:07 pm »

Will I still need to create a file to suspend to since there is no swap?
Logged

Laptop: IBM X60s (Centrino/Duo, 2gb ram, 80gb hd) VL 6.0 Std
Netbook: HP Mini (Intel Atom 1ghz, 2gb ram, 16gb SSD + 8gb flash ) VL 6.0 Std
Desktop: Dell Dimension 5150 (P4 3ghz, 2gb ram, 80gb hd) VL 6.0 Std
Wife's Desktop: Gateway (P4 2ghz, 1gb ram, 80gb hd) VL 6.0 Std
M0E-lnx
Administrator
Vectorian
*****
Posts: 3185



« Reply #8 on: August 03, 2009, 01:32:34 pm »

Yes.. you will still need to do that,
Even the new pm-utils hibernate function still uses the swap partition where available
I have googled that swap file thing before, but never been able to figure it out.
Good luck
Logged

never_stop_learning
Vectorite
***
Posts: 263


WWW
« Reply #9 on: August 03, 2009, 02:46:47 pm »

It works without it.....

Installed 4.6.1 and the associated power packages.

Just tried to suspend from the log out menu.

And it worked.....!  Huh   Cool

With no swap or swap-file and I did not alter Lilo.

How can this be?
Logged

Laptop: IBM X60s (Centrino/Duo, 2gb ram, 80gb hd) VL 6.0 Std
Netbook: HP Mini (Intel Atom 1ghz, 2gb ram, 16gb SSD + 8gb flash ) VL 6.0 Std
Desktop: Dell Dimension 5150 (P4 3ghz, 2gb ram, 80gb hd) VL 6.0 Std
Wife's Desktop: Gateway (P4 2ghz, 1gb ram, 80gb hd) VL 6.0 Std
rbistolfi
Packager
Vectorian
****
Posts: 2288


« Reply #10 on: August 03, 2009, 04:44:26 pm »

I guess pm-utils detects no swap and creates a file automagically...
There is also a LCD brightness plug-in now with xfce4-power-manager, lets you manage the lcd brightness from the panel, you may find it useful.
Logged

"There is a concept which corrupts and upsets all others. I refer not to Evil, whose limited realm is that of ethics; I refer to the infinite."
Jorge Luis Borges, Avatars of the Tortoise.

--
Jumalauta!!
M0E-lnx
Administrator
Vectorian
*****
Posts: 3185



« Reply #11 on: August 03, 2009, 05:20:37 pm »

The suspend option works without the lilo trick.
This is because the suspend option suspends to RAM
The hibernate option does not work, because it suspends to file or swap
Logged

never_stop_learning
Vectorite
***
Posts: 263


WWW
« Reply #12 on: August 03, 2009, 08:21:53 pm »

The suspend option works without the lilo trick.
This is because the suspend option suspends to RAM
The hibernate option does not work, because it suspends to file or swap

That makes sense - I tried Hibernate and it did not work.....
Logged

Laptop: IBM X60s (Centrino/Duo, 2gb ram, 80gb hd) VL 6.0 Std
Netbook: HP Mini (Intel Atom 1ghz, 2gb ram, 16gb SSD + 8gb flash ) VL 6.0 Std
Desktop: Dell Dimension 5150 (P4 3ghz, 2gb ram, 80gb hd) VL 6.0 Std
Wife's Desktop: Gateway (P4 2ghz, 1gb ram, 80gb hd) VL 6.0 Std
LLL
Global Moderator
Vectorite
*****
Posts: 263


The sun is shining...


« Reply #13 on: August 23, 2009, 11:48:21 am »

Anyone have any luck getting the ath_pci wireless module to come back to life following suspend to disk/hibernate? Seems to work fine for suspend to RAM, but only powers up without recreating the interface/no ability to connect to anything when resuming from hibernate.

Tips?

LLL
Logged

Lost & Lovin' Linux...living on:
VectorLinux 6.0 with XFCE on Thinkpad T43p (2.13 GHz | 2GB | 60GB)
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!