Fix rootless Podman failing with missing subuid/subgid ranges
The main fix is right: usermod --add-subuids/--add-subgids, checking /etc/subuid//etc/subgid for overlap, 65536 as the practical range size, and podman system migrate to make Podman pick up the new mapping. bubblewrap-suid does exist in extra, so that note is fine. The secondary step is misleading on Arch: kernel.unprivileged_userns_clone is a hardened-kernel patch knob. It exists on linux-hardened but NOT on the stock linux kernel, where sysctl kernel.unprivileged_userns_clone errors out and the /etc/sysctl.d/99-userns.conf file the record tells you to write is inert. A reader on the stock kernel will chase a non-problem and end up with a dead sysctl drop-in.
Enabling kernel.unprivileged_userns_clone=1 has real security implications, and it is set to 0 on linux-hardened on purpose. Also, overlapping subuid ranges between users breaks isolation, so always check /etc/subuid before picking a block.
Symptom
podman run as a normal user fails with something like:
ERRO[0000] cannot find UID/GID for user myuser: no subuid ranges found for user "myuser" in /etc/subuid
or newuidmap: write to uid_map failed. Running as root works.
Cause
Rootless containers need a range of subordinate UIDs/GIDs allocated to your user. Accounts created before shadow 4.11.1-3 (i.e. most long-lived Arch installs) have no entries in /etc/subuid//etc/subgid, and systemd-homed users never get them.
Fix
Allocate the range and migrate exactly as written:
cat /etc/subuid /etc/subgid # check the block is free first
sudo usermod --add-subuids 100000-165535 --add-subgids 100000-165535 $USER
podman system migrate
(or write myuser:524288:65536 into both files by hand if 100000 is taken).
On the user-namespace check, be kernel-specific: kernel.unprivileged_userns_clone only exists on linux-hardened (and other patched kernels). On the stock linux/linux-lts/linux-zen kernels the sysctl does not exist and unprivileged user namespaces are already enabled. sysctl kernel.unprivileged_userns_clone returning 'cannot stat' there is normal, not a fault, and you should not create /etc/sysctl.d/99-userns.conf. Only on linux-hardened does the knob apply, and there the safer fix for Flatpak specifically is sudo pacman -S bubblewrap-suid rather than relaxing the sysctl globally. Verify with podman unshare cat /proc/self/uid_map and podman run --rm docker.io/library/alpine echo ok.
Verify
podman unshare cat /proc/self/uid_map shows your mapped range, and podman run --rm docker.io/library/alpine echo ok prints ok as a normal user.