LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-06-2012, 09:39 AM   #1
helio
LQ Newbie
 
Registered: Apr 2012
Posts: 3

Rep: Reputation: Disabled
how can I increase my swap , I can hibernate my computer and thats kinda lame


I just want to know if theres a way for me to increase my swap without having to reinstall Ubuntu .
 
Old 04-06-2012, 10:05 AM   #2
Antares.Liu
LQ Newbie
 
Registered: Mar 2012
Distribution: Fedora 16 XFCE
Posts: 19

Rep: Reputation: 3
Quote:
Originally Posted by helio View Post
I just want to know if theres a way for me to increase my swap without having to reinstall Ubuntu .
Yes! First you can use command free to find yhe size of swap using.
then just do the following commands
mkdir swap
cd swap
sudo dd if=/dev/zero of=swapfile bs=1024 count=100000

to create swap file with a size 1024000Byte ( count)
after swap file was created,use sudo mkswap swapfile to convert the file to a swap file.
use sudo swapon swapfile to active the swap file.
 
Old 04-06-2012, 10:17 AM   #3
TroN-0074
Senior Member
 
Registered: Dec 2011
Location: Michigan USA
Distribution: OpenSUSE 13.2 64bit-Gnome on ASUS U52F
Posts: 1,444

Rep: Reputation: 340Reputation: 340Reputation: 340Reputation: 340
Some laptops don't support suspend/hibernating under Linux, this depends on their hardware I guess. But you can You try this.
Quote:
Stop the computer from suspending when the lid is closed
If you don't want the computer to suspend when you close the lid, you can change the settings for that behavior. To set the computer to blank the screen, rather than suspend, when the lid is closed:
Be very careful if you change this setting. Some laptops can overheat if they are left running with the lid closed, especially if they are in a confined place like a backpack.
Open the Terminal application from the Dash.

To change the setting used when running on battery power, type this command and press Enter:
Code:
gsettings set org.gnome.settings-daemon.plugin.power lid-close-battery-action blank
To change the setting used when running on AC power, type this command and press Enter:
Code:
gsettings set org.gnome.settings-daemon.plugin.power lid-close-ac-action blank
There are other settings available besides "blank," such as "nothing," which causes the computer to do nothing.
I copied that from this link https://help.ubuntu.com/11.10/ubuntu...-closelid.html
Good luck to you!

Last edited by TroN-0074; 04-06-2012 at 10:21 AM.
 
Old 04-06-2012, 10:43 AM   #4
helio
LQ Newbie
 
Registered: Apr 2012
Posts: 3

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Antares.Liu View Post
Yes! First you can use command free to find yhe size of swap using.
then just do the following commands
mkdir swap
cd swap
sudo dd if=/dev/zero of=swapfile bs=1024 count=100000

to create swap file with a size 1024000Byte ( count)
after swap file was created,use sudo mkswap swapfile to convert the file to a swap file.
use sudo swapon swapfile to active the swap file.
it was helpfull but I tryed to make a 4 gb swap a make a 400 Mb one the thing is the parametres are in bytes I thought it was int Mb , theres no problem if I repeat the same procedure ??
 
Old 04-06-2012, 10:58 AM   #5
TroN-0074
Senior Member
 
Registered: Dec 2011
Location: Michigan USA
Distribution: OpenSUSE 13.2 64bit-Gnome on ASUS U52F
Posts: 1,444

Rep: Reputation: 340Reputation: 340Reputation: 340Reputation: 340
Increasing your Swap might be a good idea if you dont have sufficient RAM installed in your computer.
But even if you do have a large swap partition or ton of RAM doesn't not ensures your laptop hardware supports hibernation / suspend under Linux due to hardware incompatibilities.

However you can select a different behavior for your PC when you close the lid.

Good luck to you.
 
Old 04-06-2012, 11:00 AM   #6
helio
LQ Newbie
 
Registered: Apr 2012
Posts: 3

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by TroN-0074 View Post
Increasing your Swap might be a good idea if you dont have sufficient RAM installed in your computer.
But even if you do have a large swap partition or ton of RAM doesn't not ensures your laptop hardware supports hibernation / suspend under Linux due to hardware incompatibilities.

However you can select a different behavior for your PC when you close the lid.

Good luck to you.
this isn't the problem here , it says that I have not enough swap , and the friend above really help , but I screw doing it cuz I created a file litle and now I don now the comand to undo that
 
Old 04-06-2012, 09:01 PM   #7
Antares.Liu
LQ Newbie
 
Registered: Mar 2012
Distribution: Fedora 16 XFCE
Posts: 19

Rep: Reputation: 3
Quote:
Originally Posted by helio View Post
it was helpfull but I tryed to make a 4 gb swap a make a 400 Mb one the thing is the parametres are in bytes I thought it was int Mb , theres no problem if I repeat the same procedure ??
If you "man dd" command, you will find that the number followed count can have a suffix of K,M and G. In you case, you can use "count=4G" or "count=4000M".

Following is what the manual of dd says
BLOCKS and BYTES may be followed by the following multiplicative suffixes: c =1, w =2, b =512, kB
=1000, K =1024, MB =1000*1000, M =1024*1024, xM =M GB =1000*1000*1000, G =1024*1024*1024, and so on
for T, P, E, Z, Y.

Last edited by Antares.Liu; 04-06-2012 at 09:05 PM.
 
Old 04-07-2012, 12:37 AM   #8
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,832

Rep: Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820
That is an awful highlight colour - almost unreadable. Leave it as black, and use [quote] tags instead would be more useful.

To delete the small file, simply
Code:
rm swapfile
Then create it bigger again - it can be any name BTW.
 
  


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
Hibernate problem using 2 swap partitions mfan Linux - Desktop 2 11-11-2011 01:38 AM
F7: Hibernate using new swap partition Mleahy Linux - Software 2 07-26-2008 03:16 PM
Expanded Swap for Hibernate, now what? sixsidepentagon Linux - Newbie 12 10-06-2007 01:58 PM
Some questions about swap and hibernate Ryzol Linux - Desktop 1 08-29-2007 08:34 AM
Installed LAME, command 'lame' works but lame's not in any program directories! ayteebee Linux - Software 8 05-24-2006 06:48 PM


All times are GMT -5. The time now is 02:13 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration