LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 12-02-2012, 12:31 AM   #1
narke
Member
 
Registered: Apr 2010
Posts: 70

Rep: Reputation: 0
Suspend to RAM and acpi events


Hi,

What's the command to suspend to RAM in slack? And, does anyone know some good sample acpi scripts that can at least monitor my battery status and then trigger something? The default acpi event handler script is too trivial.

Thanks in advance!
woody
 
Old 12-02-2012, 01:21 AM   #2
allend
Senior Member
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 3,465

Rep: Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852
From /usr/doc/pm-utils-1.4.1/README.SLACKWARE:
Quote:
===============================================================================
PLEASE READ THIS ENTIRE FILE BEFORE REPORTING PROBLEMS OR ASKING FOR HELP!
===============================================================================
Quote:
Assuming they are supported, running "pm-suspend" as root should do a suspend
to ram, and "pm-hibernate" should suspend to disk.
Quote:
Once you confirm that a suspend and resume cycle works as expected, you might
automate the process with some acpi magic, but a better option is to use the
power manager daemon included with your choice of desktop environment (both
kde and xfce have one).
The last quote also applies to battery status.
 
1 members found this post helpful.
Old 12-02-2012, 06:40 AM   #3
narke
Member
 
Registered: Apr 2010
Posts: 70

Original Poster
Rep: Reputation: 0
Thanks, pm-suspend works. I did not try pm-hibernate because I don't setup a swap when I installed my slack, now I regret that...

For the GUI daemon, okay, I may consider one of them, you know, I am running fluxbox, before that I still want to try some pure command line via acpi.

Thank you very much!
 
Old 12-02-2012, 07:01 AM   #4
allend
Senior Member
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 3,465

Rep: Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852
I think that xfce4-power-manager should work quite happily in fluxbox.

You can always set up a swap partition (you may need to resize an existing partition and then create an additional partition first) using 'mkswap'.
You can also use a swap file - see this recent thread. http://www.linuxquestions.org/questi...en-4175439360/
 
Old 12-02-2012, 08:45 AM   #5
narke
Member
 
Registered: Apr 2010
Posts: 70

Original Poster
Rep: Reputation: 0
Hi Allend,

My largest partition sda7 is a logical partition of type ext4. What command can resize it to give me 4G free? Only after that, I think I can do a mkswap.

Thanks.
woody
 
Old 12-02-2012, 08:53 AM   #6
beder
Member
 
Registered: Apr 2011
Posts: 82

Rep: Reputation: 28
Quote:
Originally Posted by narke View Post
Hi Allend,

My largest partition sda7 is a logical partition of type ext4. What command can resize it to give me 4G free? Only after that, I think I can do a mkswap.

Thanks.
woody
resize2fs and cfdisk, both ship with Slackware

Found a nice enough resource: http://en.positon.org/post/Resize-an...ext4-partition

This is the part you're looking for:
Quote:
To shrink, it's almost as simple:
Code:
# example if you want a 10G partition
# resize filesystem with a size smaller than the desired size
resize2fs /dev/sdxY 9G
cfdisk /dev/sdx
# delete the partition and create it again with the desired size
# (a little bigger than the filesystem!!)
# then launch resize2fs again
resize2fs /dev/sdxY
After shrinking your partition, you'll use cfdisk again to create a swap partition on the now free blocks, and then use mkswap
Then you'll probably have to edit /etc/fstab to include your newly created swap partition (I'm guessing, not sure if mkswap would already write to that?)


ps.: if you google "linux resize partition" most results will want you to use "gparted" (thanks to Ubuntu for using Gnome :-), which off course don't ship with Slackware

Last edited by beder; 12-02-2012 at 10:59 AM. Reason: detailed a bit more
 
Old 12-31-2012, 09:32 AM   #7
tstamp
LQ Newbie
 
Registered: Dec 2012
Posts: 8

Rep: Reputation: Disabled
In a related question, is it possible to add the suspend functions to the KDE power management settings?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ACPI events in /etc/acpi/events alienDog Ubuntu 0 12-22-2010 06:30 PM
Plz explain Suspend to Disk and Suspend to Ram pkhera_2001 Linux - Newbie 2 02-18-2008 07:23 AM
ACPI events Lockywolf Slackware 1 10-24-2007 01:18 PM
ACPI suspend to ram ... no response cab15625 Linux - Laptop and Netbook 5 05-06-2005 06:47 PM
acpi events? raven Linux - Laptop and Netbook 2 10-12-2003 02:23 PM


All times are GMT -5. The time now is 03:46 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration