Swap does not work with GPT disk

I have noticed that whenever I use GPT on my hard drive swap always fails to start.

Here is the error:

As you can see I am using Manjaro but before when running just Arch I also got the error.

Any help would be appreciated!

Does it work MBR? Take a look at fstab and see if the UIUD.

I'm swapping on GPT with Arch, so it is probably something wrong with your setup.

+1

GPT or not makes no difference at all.

Yes it does work with MBR, this is why I was thinking GPT was messing it up.

Here's my fstab, everything tooks normal.

 

hmmm I would reccommend try these things in order

1.) Unmount the swap. Reboot. Reformat (gparted) and remount. Reboot.

2.) Try reinstalling?

mkswap /dev/sdc2 # or whatever your disk is now instead of c

swapon /dev/sdc2 # (again make sure you use the right device)

Make sure you update the UUID in fstab!

You got some Lucy on your desktop? :D

Swap space isn't very useful, as long as you have enough RAM.

@2bdkid

You could try commenting your swap partition in fstab and test if swap is on after a reboot, as systemd native mount units will generally override your user fstab in most cases. edit (so in other words your fstab isn't needed anyway). This may change in later versions though.

It seems like a bug with auto-generated unit files caused by erroneous user configuration, as the gen.late shouldn't override your fstab - native or otherwise.

But then, user configs with the correct UUID/partition will help  :P

You also may want to check your bootloader config to make sure all UUID info is correct.

I should uncomment the 2 lines above PARTUUID?

Nai, I meant comment your "swap" partition in fstab.

Edited other post for clarity

I uncommented swap in fstab and I'm not getting the error now. It says it started fine. I have never seen swap actually being used in htop before though.

Sounds about right.

Swap partitions aren't usually necessary unless you don't have a lot of available RAM in use, or you need to run lots of applications, plus hibernation and or for unattended systems.

 

To make sure your swap partition is indeed available, double check the output of

blkid

or

sudo blkid | grep swap

Next, open as many programs as you can and monitor virtual memory by frequently checking the output of;

vmstat 

Monitor the output of swpd vs free.

Opening multiple instances of web browsers is the quickest way to monitor virtual memory usage as web browsers love to eat up memory.