First, confirm if zswap is supported (“y” means yes)

# cat /boot/config-`uname -r` | grep -i zswap

Next, check if it’s enabled (“N” means no)

# cat /sys/module/zswap/parameters/enabled

If the above result is “N” (no), then enable it

echo Y | sudo tee /sys/module/zswap/parameters/enabled

Now check again and it should be enabled

# cat /sys/module/zswap/parameters/enabled

The problem:

I’m using a 2015 MBP Pro, and I can SSH into a Ubuntu 22.04 desktop computer (with OpenSSH) in the same WiFi LAN.

After I suspend the Ubuntu machine, I want to wake it up from macOS.

The solution:

1. On Ubuntu machine, enable wake-on-wireless-lan (WoWLAN)

iw phy0 wowlan show
# if it shows "WoWLAN is disabled"
sudo iw phy0 wowlan enable magic-packet disconnect
iw phy0 wowlan show
# now it should show WoWLAN is enabled

Also, get the MAC address for later use

ip addr show $(awk 'NR==3{print $1}' /proc/net/wireless | tr -d :) | awk '/ether/{print $2}'

2. On macOS machine, use wakeonlan command to wake up

# if wakeonlan not installed
brew install wakeonlan

Please backup you data. No joking. I messed up my boot loader and lost my 16.04 Ubuntu once.
My system config is different from yours, so please understand (and may change) every steps before you execute it.

Also note: both Ubuntu 18.04 and Windows 10 use UEFI mode boot.

I have a Dell XPS 13 (9343) with Ubuntu 18.04, and I want to install Windows 10 on it.

Step 1. Allocate space for Windows installation
I used GParted to reduce the size of my existing Ubuntu partition, so I can allocate space for Windows. (Because the Ubuntu partition is for boot, I used Ubuntu’s tool Startup Disk Creator to create a LiveCD to boot from first).
After resizing /dev/sda* (the partition for my Ubuntu installation), I got 80GB unallocated space on my disk /dev/sda.
(Note: I suggest to create a FAT partition from this unallocated space first. If leave it unallocated, I got some error in Step 3 when installing Windows, so I need to get back to GParted again to create a partition).

Step 2. Create Windows USB boot media
I tried the method in this detailed article how to create Windows 10 bootable USB on Ubuntu, but my XPS 13 can’t boot from the created USB.
Finally I need to first create a Windows 10 VM in VirtualBox, and then use the official Create Installation Media Tool from Microsoft. This is a bit tedious. So I suggestion you to try the above linked method first. Only note is, if you are using a recent ISO with larger than 4GB files, you need to format the USB as NTFS.

Step 3. Install Windows 10
Use the created USB bootable to install Windows on the unallocated space (or new created partition, see Notes in Step 1).

After successfully installed Windows 10 and reboot, on my XPS 9343 I can press F12 to enter the boot menu, and select either “ubuntu” or “windows” under the UEFI boot menu.

This method is learned from

(change count=1024 for the size you need)

sudo -s
swapoff -a
dd if=/dev/zero of=/swapfile bs=1M count=1024
chmod 0600 /swapfile
mkswap /swapfile
swapon /swapfile