The problem is that a swapfile in btrfs cannot have CoW activated on the file, and cannot be compressed. Also, you should not leave the file in the root filesystem (even if it would work with the above settings) because it will make snapshots of /@ messy.
If you manually do this, it will work: - create a separate subvolume just for swap - mount it somewhere like /swap (also add to fstab) - create an empty file (/swap/swapfile) - set non-compress and no-CoW on the file - grow the file to the desired size - mkswap on the file - add swap file to fstab now you can swapon -a and it will work. The installer does not do that, it just creates a /swapfile as it would do on any other filesystem and then on reboot it will not start. Amano instructions above will work, but I would advise to also create the subvolume. -- You received this bug notification because you are a member of Kernel Packages, which is subscribed to linux in Ubuntu. https://bugs.launchpad.net/bugs/1818811 Title: The swapfile on the Btrfs file system is not activated Status in linux package in Ubuntu: Invalid Status in partman-swapfile package in Ubuntu: Confirmed Status in ubiquity package in Ubuntu: Invalid Bug description: From 5.0 kernel is implemented support for the swapfile on Btrfs (https://patchwork.kernel.org/cover/10584515/), today arrived on the repositories of Ubuntu 19.04 proposed kernel 5.0, but the swapfile is not activated. Log: mar 06 11:17:55 notebook-Lenovo-V110 kernel: BTRFS warning (device sda1): swapfile must not be copy-on-write mar 06 11:17:55 notebook-Lenovo-V110 swapon[517]: swapon: /swapfile: swapon failed: Argomento non valido mar 06 11:17:57 notebook-Lenovo-V110 systemd[1]: Activating swap /swapfile... mar 06 11:17:57 notebook-Lenovo-V110 swapon[916]: swapon: /swapfile: swapon failed: Argomento non valido mar 06 11:17:57 notebook-Lenovo-V110 kernel: BTRFS warning (device sda1): swapfile must not be copy-on-write mar 06 11:17:57 notebook-Lenovo-V110 systemd[1]: swapfile.swap: Swap process exited, code=exited, status=255/EXCEPTION mar 06 11:17:57 notebook-Lenovo-V110 systemd[1]: swapfile.swap: Failed with result 'exit-code'. mar 06 11:17:57 notebook-Lenovo-V110 systemd[1]: Failed to activate swap /swapfile. mar 06 11:17:57 notebook-Lenovo-V110 systemd[1]: Activating swap /swapfile... mar 06 11:17:57 notebook-Lenovo-V110 kernel: BTRFS warning (device sda1): swapfile must not be copy-on-write mar 06 11:17:57 notebook-Lenovo-V110 swapon[1006]: swapon: /swapfile: swapon failed: Argomento non valido mar 06 11:17:57 notebook-Lenovo-V110 systemd[1]: swapfile.swap: Swap process exited, code=exited, status=255/EXCEPTION mar 06 11:17:57 notebook-Lenovo-V110 systemd[1]: swapfile.swap: Failed with result 'exit-code'. mar 06 11:17:57 notebook-Lenovo-V110 systemd[1]: Failed to activate swap /swapfile. ProblemType: Bug DistroRelease: Ubuntu 19.04 Package: linux-image-generic 5.0.0.7.8 ProcVersionSignature: Ubuntu 5.0.0-7.8-generic 5.0.0 Uname: Linux 5.0.0-7-generic x86_64 ApportVersion: 2.20.10-0ubuntu23 Architecture: amd64 AudioDevicesInUse: USER PID ACCESS COMMAND /dev/snd/controlC0: emanu 1744 F.... pulseaudio CurrentDesktop: ubuntu:GNOME Date: Wed Mar 6 11:19:52 2019 InstallationDate: Installed on 2019-01-30 (34 days ago) InstallationMedia: Kubuntu 19.04 "Disco Dingo" - Alpha amd64 (20190130) Lsusb: Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 005: ID 0bda:0129 Realtek Semiconductor Corp. RTS5129 Card Reader Controller Bus 001 Device 003: ID 13d3:5745 IMC Networks Bus 001 Device 002: ID 10c4:8105 Cygnal Integrated Products, Inc. Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub MachineType: LENOVO 80TL ProcEnviron: TERM=screen-256color PATH=(custom, no user) XDG_RUNTIME_DIR=<set> LANG=it_IT.UTF-8 SHELL=/bin/bash ProcFB: 0 inteldrmfb ProcKernelCmdLine: BOOT_IMAGE=/@/boot/vmlinuz-5.0.0-7-generic root=UUID=91fdf6c0-1b5d-4bb5-9aa4-aeb946236b8a ro rootflags=subvol=@ quiet splash vt.handoff=1 RelatedPackageVersions: linux-restricted-modules-5.0.0-7-generic N/A linux-backports-modules-5.0.0-7-generic N/A linux-firmware 1.177 SourcePackage: linux UpgradeStatus: No upgrade log present (probably fresh install) dmi.bios.date: 10/29/2018 dmi.bios.vendor: LENOVO dmi.bios.version: 1KCN46WW dmi.board.asset.tag: No Asset Tag dmi.board.name: LNVNB161216 dmi.board.vendor: LENOVO dmi.board.version: SDK0J40700 WIN dmi.chassis.asset.tag: No Asset Tag dmi.chassis.type: 10 dmi.chassis.vendor: LENOVO dmi.chassis.version: Lenovo V110-15ISK dmi.modalias: dmi:bvnLENOVO:bvr1KCN46WW:bd10/29/2018:svnLENOVO:pn80TL:pvrLenovoV110-15ISK:rvnLENOVO:rnLNVNB161216:rvrSDK0J40700WIN:cvnLENOVO:ct10:cvrLenovoV110-15ISK: dmi.product.family: V110-15ISK dmi.product.name: 80TL dmi.product.sku: LENOVO_MT_80TL_BU_idea_FM_V110-15ISK dmi.product.version: Lenovo V110-15ISK dmi.sys.vendor: LENOVO To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1818811/+subscriptions -- Mailing list: https://launchpad.net/~kernel-packages Post to : kernel-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~kernel-packages More help : https://help.launchpad.net/ListHelp