Resized swap space and now its not recognized

Thanks ahead - I’m fairly new to manjaro and know just enough to be dangerous.

I decided to reduce my swap to 2Gb. I used KDE partition manager. Now at boot an error message “…systemd[1]: Failed to activate swap…” and in KDE manager I can’t ‘activate swap’ [under Partition].

Any ideas?

Welcome here, @fretless9 :wave:

Please, post output of

inxi -Fazy
sudo parted -l
sudo blkid
cat /etc/fstab

Hi Wollie,
Thanks so much!
I can’t locate the tutorial I found that guided me…yet.
Never the less here is the output:

inxi -Fazy
sudo parted -l
sudo blkid
cat /etc/fstab
**Kernel:** 5.9.16-1-MANJARO x86_64 **bits:** 64 **compiler:** gcc **v:** 10.2.1
**parameters:** BOOT_IMAGE=/boot/vmlinuz-5.9-x86_64
root=UUID=f0eb473d-09e4-495d-bb0a-f0742f4e9490 rw quiet apparmor=1
security=apparmor udev.log_priority=3
**Desktop:** KDE Plasma 5.20.5 **tk:** Qt 5.15.2 **wm:** kwin_x11 **dm:** SDDM
**Distro:** Manjaro Linux
**Type:** Laptop **System:** LENOVO **product:** 81N8 **v:** Lenovo IdeaPad S340-15IWL
**serial:** <filter> **Chassis:** **type:** 10 **v:** Lenovo IdeaPad S340-15IWL
**serial:** <filter>
**Mobo:** LENOVO **model:** LNVNB161216 **v:** SDK0J40700 WIN **serial:** <filter>
**UEFI:** LENOVO **v:** ALCN27WW(V2.04) **date:** 07/02/2019
**ID-1:** BAT1 **charge:** 35.9 Wh **condition:** 36.0/36.0 Wh (100%) **volts:** 12.8/11.2
**model:** Celxpert L18C3PF6 **type:** Li-ion **serial:** <filter> **status:** Unknown
**cycles:** 7
**Device-1:** hidpp_battery_0 **model:** Logitech Wireless Mouse MX Master 3
**serial:** <filter> **charge:** 100% (should be ignored) **rechargeable:** yes
**status:** Discharging
**Device-2:** hidpp_battery_1 **model:** Logitech MX Keys Wireless Keyboard
**serial:** <filter> **charge:** 100% (should be ignored) **rechargeable:** yes
**status:** Discharging
**Info:** Quad Core **model:** Intel Core i5-8265U **bits:** 64 **type:** MT MCP
**arch:** Kaby Lake **note:** check **family:** 6 **model-id:** 8E (142) **stepping:** C (12)
**microcode:** DE **L2 cache:** 6 MiB
**flags:** avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
**bogomips:** 28808
**Speed:** 1100 MHz **min/max:** 400/3900 MHz **Core speeds (MHz):** **1:** 1100 **2:** 1100
**3:** 1101 **4:** 1100 **5:** 1100 **6:** 1100 **7:** 1100 **8:** 1100
**Vulnerabilities:** **Type:** itlb_multihit **status:** KVM: VMX disabled
**Type:** l1tf **status:** Not affected
**Type:** mds **status:** Not affected
**Type:** meltdown **status:** Not affected
**Type:** spec_store_bypass
**mitigation:** Speculative Store Bypass disabled via prctl and seccomp
**Type:** spectre_v1
**mitigation:** usercopy/swapgs barriers and __user pointer sanitization
**Type:** spectre_v2 **mitigation:** Enhanced IBRS, IBPB: conditional, RSB filling
**Type:** srbds **mitigation:** TSX disabled
**Type:** tsx_async_abort **status:** Not affected
**Device-1:** Intel UHD Graphics 620 **vendor:** Lenovo **driver:** i915 **v:** kernel
**bus ID:** 00:02.0 **chip ID:** 8086:3ea0
**Device-2:** IMC Networks Integrated Camera **type:** USB **driver:** uvcvideo
**bus ID:** 1-6:3 **chip ID:** 13d3:56b2
**Display:** x11 **server:** X_dot_Org 1.20.10 **compositor:** kwin_x11 **driver:**
**loaded:** modesetting **unloaded:** intel **alternate:** fbdev,vesa **display ID:** :0
**screens:** 1
**Screen-1:** 0 **s-res:** 1366x768 **s-dpi:** 96 **s-size:** 361x203mm (14.2x8.0")
**s-diag:** 414mm (16.3")
**Monitor-1:** eDP-1 **res:** 1366x768 **hz:** 60 **dpi:** 101 **size:** 344x194mm (13.5x7.6")
**diag:** 395mm (15.5")
**OpenGL:** **renderer:** Mesa Intel UHD Graphics 620 (WHL GT2) **v:** 4.6 Mesa 20.3.3
**direct render:** Yes
**Device-1:** Intel Cannon Point-LP High Definition Audio **vendor:** Lenovo
**driver:** snd_hda_intel **v:** kernel **alternate:** snd_soc_skl,snd_sof_pci
**bus ID:** 00:1f.3 **chip ID:** 8086:9dc8
**Sound Server:** ALSA **v:** k5.9.16-1-MANJARO
**Device-1:** Qualcomm Atheros QCA9377 802.11ac Wireless Network Adapter
**vendor:** Lenovo **driver:** ath10k_pci **v:** kernel **port:** 3040 **bus ID:** 02:00.0
**chip ID:** 168c:0042
**IF:** wlp2s0 **state:** up **mac:** <filter>
**Device-2:** Qualcomm Atheros **type:** USB **driver:** btusb **bus ID:** 1-10:4
**chip ID:** 0cf3:e500
**Local Storage:** **total:** 119.24 GiB **used:** 21.85 GiB (18.3%)
**SMART Message:** Unable to run smartctl. Root privileges required.
**ID-1:** /dev/nvme0n1 **maj-min:** 259:0 **vendor:** Lenovo O.E.M.
**model:** RPFTJ128PDD2EWX **size:** 119.24 GiB **block size:** **physical:** 512 B
**logical:** 512 B **speed:** 15.8 Gb/s **lanes:** 2 **serial:** <filter> **rev:** 11.9
**temp:** 31.9 C
**ID-1:** / **raw size:** 110.15 GiB **size:** 107.92 GiB (97.98%)
**used:** 21.85 GiB (20.3%) **fs:** ext4 **dev:** /dev/nvme0n1p2 **maj-min:** 259:2
**ID-2:** /boot/efi **raw size:** 300 MiB **size:** 299.4 MiB (99.80%)
**used:** 312 KiB (0.1%) **fs:** vfat **dev:** /dev/nvme0n1p1 **maj-min:** 259:1
**Alert:** No Swap data was found.
**System Temperatures:** **cpu:** 35.0 C **mobo:** N/A
**Fan Speeds (RPM):** N/A
**Processes:** 216 **Uptime:** 15m **wakeups:** 5 **Memory:** 7.5 GiB **used:** 1.41 GiB (18.8%)
**Init:** systemd **v:** 247 **Compilers:** **gcc:** 10.2.0 **clang:** 11.0.1 **Packages:** 1403
**pacman:** 1399 **lib:** 416 **flatpak:** 4 **Shell:** Bash **v:** 5.1.0 **running in:** yakuake
**inxi:** 3.2.02
[sudo] password for kjj:
Model: RPFTJ128PDD2EWX (nvme)
Disk /dev/nvme0n1: 128GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number Start End Size File system Name Flags
1 2097kB 317MB 315MB fat32 boot, esp
2 317MB 119GB 118GB ext4
3 119GB 121GB 2097MB linux-swap(v1) swap
4 121GB 128GB 7352MB ext4
/dev/nvme0n1p1: UUID="E399-98E1" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="99848e09-7871-4045-863d-cb63eee8f1d9"
/dev/nvme0n1p2: UUID="f0eb473d-09e4-495d-bb0a-f0742f4e9490" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="69833693-1e59-4540-a7ca-8b2aab2e0ec2"
/dev/nvme0n1p3: UUID="4e432a03-e43d-4614-bcd7-cf7663df34fa" TYPE="swap" PARTUUID="00244254-3376-5647-8e41-fc1d068b0126"
/dev/nvme0n1p4: LABEL="KJJXTRA" UUID="7feaa65d-0e6b-4c17-9992-e0bd6eac6655" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="bfa5b3b6-2c1d-144e-b296-dbef6bccbfe6"
# /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>
UUID=E399-98E1 /boot/efi vfat umask=0077 0 2
UUID=f0eb473d-09e4-495d-bb0a-f0742f4e9490 / ext4 defaults,noatime 0 1
UUID=4e432a03-e43d-4614-bcd7-cf7663df34fa swap swap defaults,noatime 0 0

I would change this into

UUID=4e432a03-e43d-4614-bcd7-cf7663df34fa none swap defaults,noatime 0 0

To do you could use the nano editor, so

sudo nano /etc/fstab

Make your changes, safe the file and reboot.

I had this issue, though, I didn’t try to resize my swap partition. On mine it just was not recognized.
What fixed it for me was:

In terminal run as SuperUser:
mkswap /dev/sdXX where xx is your swap partition.

I’m not sure if I edited anything to my fstab, it might have already been there.
This guide seems okay:

Hi everyone - thanks for help. Although it’s not going to well at the moment.
I read both responses and tried the second solution initially [mkswap]. Nothing happened. So I tried Wollie’s idea. Nope. In fact, now when I boot it takes a long time to start up and complains about a time out looking for a dev.
This sucks! But I will persist. My goal is/was to remove the swap space partition[s] to conserve my sdd. I’d also like to rejoin the [former] swap space back into the main partition. But just getting this machine to boot at a decent speed again is priority.

Oh also - I ran a timeshift taking me back about 1 week. No help.
I would post the errors if I knew how.

I read both responses and tried the second solution initially [mkswap]. Nothing happened.

This can’t be true.
Either you get “Permission denied” when you try to run it without sudo
or you get the response what has been done, including the UUID
You will get some response - not just nothing.

If you, like you said, ran:
mkswap /dev/nvme0n1p3
which apparently is your swap partition,
then the UUID will have changed!

The UUID changes every time you run that command.
When you run it, it tells you the current UUID - similar to this:

Setting up swapspace version 1, size = 512 MiB (536866816 bytes)
no label, UUID=34c6d7b3-744f-4587-a458-5f3ed7b8dc6c

sudo blkid
will tell you the current UUID as well

This UUID must then be updated in /etc/fstab

The line in /etc/fstab should look like @Wollie said:
UUID=34c6d7b3-744f-4587-a458-5f3ed7b8dc6c none swap defaults 0 0

not like this:
UUID=34c6d7b3-744f-4587-a458-5f3ed7b8dc6c swap swap defaults 0 0

You could just use the device name - not the UUID - like this:

/dev/nvme0n1p3 none swap defaults 0 0

If /dev/nvme0n1p3 is your swap partition

be careful to choose the correct device when creating the swap space!

Hi Everyone,
Thanks for help! I decided to reinstall and eliminate swap space from the installer.
Solved. Won’t do that again.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.