Swap Not available in system monitor
Solution 1
Looks like the swap partition exist but check it cat /proc/swaps
then try to activate it sudo swapon --all
Solution 2
13.10
If anyone else is having a similar issue on 13.10 I found these instructions on ArchWiki.
To check swap status:
swapon -s
or
free -m
If nothing is listed (you have no swap), you can create it on a running system like this:
first, to list available partitions use:
sudo blkid
The mkswap utility generates an UUID for the partition by default so it's best to use the -U flag to specify the swap UUID if one already exists. Replace "custom_UUID" with the corresponding UUID listed earlier. Also, replace /dev/sda5 with the partition you wish to use for swap:
Warning: All data on the specified partition will be lost.
sudo mkswap -U custom_UUID /dev/sda5
If the swap partition was not listed using blkid
you can assign a random UUID with the following instead:
sudo mkswap /dev/sda5
To enable swap on this device:
sudo swapon /dev/sda5
Now, check /etc/fstab to make sure the system will mount the partition at boot. I will use gedit but any text editor will do.
sudo gedit /etc/fstab
If no swap is listed you may need to add it to the end of the list using /dev/sda5 or the UUID.
/dev/sda5 none swap defaults 0 0
reboot
I hope this helps.
Solution 3
A solution using the gparted GUI:
Open gparted, then left click on swap partition and chose swapon in the context menu.
Related videos on Youtube
Ahmed Zain El Dein
Updated on September 18, 2022Comments
-
Ahmed Zain El Dein almost 2 years
i make a swap partition with 5 GB but i notice always that it is marked as "not available" on the system monitor plus when i do operations consume the whole RAM ubuntu starts to kill to relief the RAM with no use at all for SWAP
i typed in terminal
sudo mountall -v
and this what i getmounted event handled for /proc/sys/fs/binfmt_misc local 1/5 remote 0/0 virtual 1/12 swap 0/1 mounted event handled for /sys local 1/5 remote 0/0 virtual 2/12 swap 0/1 mounted event handled for /sys/fs/fuse/connections local 1/5 remote 0/0 virtual 3/12 swap 0/1 mounted event handled for /sys/kernel/security local 1/5 remote 0/0 virtual 4/12 swap 0/1 mounted event handled for /dev/pts local 1/5 remote 0/0 virtual 5/12 swap 0/1 mounted event handled for /run/lock local 1/5 remote 0/0 virtual 6/12 swap 0/1 mounted event handled for /run/shm local 1/5 remote 0/0 virtual 7/12 swap 0/1 mounted event handled for /home/ahmed/.gvfs local 2/5 remote 0/0 virtual 7/12 swap 0/1 mounted event handled for /media/UbuntuGeneralFiles local 3/5 remote 0/0 virtual 7/12 swap 0/1 mounted event handled for /media/ONCE\040AND\040FOR\040ALL local 4/5 remote 0/0 virtual 7/12 swap 0/1 mounting event handled for /tmp mounted event handled for /dev local 4/5 remote 0/0 virtual 8/12 swap 0/1 mounted event handled for /proc local 4/5 remote 0/0 virtual 9/12 swap 0/1 mounted event handled for /sys/kernel/debug local 4/5 remote 0/0 virtual 10/12 swap 0/1 mounted event handled for /run local 4/5 remote 0/0 virtual 11/12 swap 0/1 mounted event handled for /home/ahmed virtual finished remote finished local 4/5 remote 0/0 virtual 12/12 swap 0/1 mounted event handled for /tmp local finished All filesystems mounted local 5/5 remote 0/0 virtual 12/12 swap 0/1
this is fstab output
# /etc/fstab: static file system information. # # Use 'blkid' to print the universally unique identifier for a # device; this may be used with UUID= as a more robust way to name devices # that works even if disks are added and removed. See fstab(5). # # <file system> <mount point> <type> <options> <dump> <pass> proc /proc proc nodev,noexec,nosuid 0 0 # / was on /dev/sdf1 during installation UUID=34c3c29b-e5dd-4ed7-a49b-616afded4704 / ext4 errors=remount-ro 0 1 # swap was on /dev/sdf2 during installation #UUID=9a7f0b9c-9be9-4074-8957-afcf25072bbe none swap sw 0 0 /dev/mapper/cryptswap1 none swap sw 0 0 /dev/disk/by-label/swap /mnt/swap auto nosuid,nodev,nofail 0 0 /dev/sdb2 /mnt/sdb2 ext4 nosuid,nodev,nofail 0 0
this is the output of
sudo blkid
`/dev/sda1: UUID="AC9C59EA9C59B016" TYPE="ntfs" /dev/sda2: LABEL="System" UUID="C26CFB2E6CFB1C3B" TYPE="ntfs" /dev/sda3: LABEL="ONCE AND FOR ALL" UUID="3EF60BD0F60B86FD" TYPE="ntfs" /dev/sdb1: UUID="34c3c29b-e5dd-4ed7-a49b-616afded4704" TYPE="ext4" /dev/sdb2: LABEL="Swap" UUID="21cf04d1-6c18-4ab7-a8c3-ec435ab3f43e" TYPE="ext4" /dev/sdb5: LABEL="UbuntuGeneralFiles" UUID="E636244736241AD7" TYPE="ntfs" /dev/sr1: LABEL="Etisalat 3.5G" TYPE="iso9660"
` sudo fdisk -l:
Disk /dev/sda: 1000.2 GB, 1000203804160 bytes 255 heads, 63 sectors/track, 121601 cylinders, total 1953523055 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x0d91aeaa Device Boot Start End Blocks Id System /dev/sda1 * 2048 206847 102400 7 HPFS/NTFS/exFAT /dev/sda2 206848 209717247 104755200 7 HPFS/NTFS/exFAT /dev/sda3 209717248 1953519615 871901184 7 HPFS/NTFS/exFAT Disk /dev/sdb: 250.1 GB, 250059350016 bytes 64 heads, 32 sectors/track, 238475 cylinders, total 488397168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000001 Device Boot Start End Blocks Id System /dev/sdb1 2048 236331007 118164480 83 Linux /dev/sdb2 236333056 244148221 3907583 82 Linux swap / Solaris /dev/sdb3 244148222 488396799 122124289 5 Extended /dev/sdb5 244148224 488396799 122124288 7 HPFS/NTFS/exFAT`
i dont know what is going on actually , so any help ?
-
Ahmed Zain El Dein about 11 yearsyes that is what i am talking about the swap partition exist but the swap file no i dont know how come !
cat /proc/swaps Filename Type Size Used Priority
-
let champagne open about 11 yearsno output at all for
cat /proc/swaps
? -
Ahmed Zain El Dein about 11 yearsyes, norhing just zero
-
let champagne open about 11 yearspost your fstab
gksudo gedit /etc/fstab
-
let champagne open about 11 yearspost
sudo blkid
-
let champagne open about 11 years
sudo cp /etc/fstab /etc/fstab.bak
-
Ahmed Zain El Dein about 11 yearsdone so is that all?
-
let champagne open about 11 yearsI don't see a swap partition.
-
Ahmed Zain El Dein about 11 yearsit is exited infront of me on Disks application reserved partition 5 GB marked as swap
-
let champagne open about 11 yearspost
sudo fdisk -l
-
let champagne open about 11 years
/dev/sdb2: LABEL="Swap" UUID="21cf04d1-6c18-4ab7-a8c3-ec435ab3f43e" TYPE="ext4"
The TYPE should be "swap" -
let champagne open about 11 yearsrecreate the partition using the link help.ubuntu.com/community/SwapFaq
-
mchid about 10 years
-
emoleumassi about 8 yearsit works for me
-
XavierStuvw over 7 yearsSame issue with Ubuntu 14.04 LTS (swap partition existing, swap memory not). This solution worked perfectly and instantly for me.
-
clamentjohn over 5 yearsJust a side note: If you already have swap partitioned you can use
gparted
toswapon
using the GUI. Its super simple