OPINIONATED OMARCHY
TROUBLESHOOTING CORPUS
790
RECORDS
790
AUDITED
0
UNCHECKED
2388
SOURCES
LIVE
pacman-aur medium rare DISPUTE

Fix 'landlock is not supported by the kernel' from pacman's download sandbox

archomarchyendeavouroscachyosmanjaroliminegrubsystemd-bootapparmordesktoplaptop
CORRECTED An auditor found the fix wrong or incomplete and rewrote it. · checked against Omarchy omarchy 4.0.4-1 on 2026-10-05
AUDIT NOTE

The mechanism and fix hold. Confirmed locally on 4.0.4-1: /sys/kernel/security/lsm reads exactly lockdown,capability,landlock,yama,bpf, /proc/cmdline has no lsm=, the running linux-omarchy kernel has CONFIG_SECURITY_LANDLOCK=y and CONFIG_LSM="landlock,lockdown,yama,integrity,bpf", and /etc/limine-entry-tool.d/omarchy-defaults.conf and omarchy-uki.conf are owned by omarchy-settings 4.0.4-1 and set no lsm=. /usr/lib/limine/limine-common-functions loads /etc/limine-entry-tool.d/*.conf and then /etc/default/limine last, so the grep over both paths is the right check. limine-mkinitcpio exists. man pacman.conf for pacman 7.1.0 documents DisableSandboxFilesystem for Landlock failures. The Arch wiki AppArmor page gives lsm=landlock,lockdown,yama,integrity,apparmor,bpf. The CachyOS thread shows the error with CONFIG_SECURITY_LANDLOCK=y and landlock missing from lsm=. The EndeavourOS thread was not re-read. One wording defect: the symptom quotes pacman 7.0's lowercase string. The installed libalpm (pacman 7.1.0) prints 'because Landlock is not supported by the kernel!', so a reader grepping case-sensitively for the quoted text misses it. The symptom is corrected. Nothing touching the boot configuration was run.

The cause above was not rewritten and may still contain the error described. The fix below is the corrected version.
RISK

A malformed kernel command line can stop the machine booting. On Omarchy 4 a broken UKI can be bypassed from the Limine menu's Snapshots entries. Disabling the sandbox removes a protection for the download process, so prefer fixing lsm=.

Symptom

After pacman 7 arrived, syncing or downloading prints:


error: restricting filesystem access failed because Landlock is not supported by the kernel!

(pacman 7.0 spelled it landlock in lower case, pacman 7.1 capitalises it.) The kernel is a stock one built with CONFIG_SECURITY_LANDLOCK=y, so the message looks wrong. It typically starts after setting up AppArmor or another security module, on a custom or ARM board kernel, or inside a container.

Cause

pacman 7 downloads as the unprivileged alpm user inside a sandbox that uses Landlock to restrict which paths it may write. Landlock has to be enabled at boot. A kernel compiled with Landlock support still leaves it off if the lsm= kernel parameter lists security modules and omits landlock, which older AppArmor guides did, or if the kernel's built-in CONFIG_LSM list omits it. Containers and some board kernels lack it entirely. The current Arch wiki AppArmor line is lsm=landlock,lockdown,yama,integrity,apparmor,bpf. Omarchy 4 does not set lsm= and its kernel enables Landlock by default (/sys/kernel/security/lsm reads lockdown,capability,landlock,yama,bpf on 4.0.4), so on Omarchy this only follows a user-added lsm=.

Fix

Check what is active and whether you set lsm=:


cat /sys/kernel/security/lsm
tr ' ' '\n' < /proc/cmdline | grep '^lsm='

If landlock is missing from the first, add it to the front of your lsm= value.

**Omarchy 4 (Limine UKI).** The command line lives in the UKI and comes from /etc/limine-entry-tool.d/*.conf. Find the file that sets lsm= (do not edit the omarchy-*.conf files, which omarchy-settings owns) and change it, or create your own drop-in:


grep -rn 'lsm=' /etc/limine-entry-tool.d/ /etc/default/limine 2>/dev/null
echo 'KERNEL_CMDLINE[default]+=" lsm=landlock,lockdown,yama,integrity,apparmor,bpf"' | sudo tee /etc/limine-entry-tool.d/90-lsm.conf
sudo limine-mkinitcpio

Remove the old lsm= wherever grep found it, so only one remains.

**Plain Arch with GRUB.** Edit GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub the same way, then sudo grub-mkconfig -o /boot/grub/grub.cfg. **systemd-boot.** Edit the options line in /boot/loader/entries/*.conf.

Reboot and re-check /sys/kernel/security/lsm.

**Kernel that cannot do Landlock (container, board kernel).** Disable only the filesystem part of the sandbox in /etc/pacman.conf (pacman 7.1):


[options]
DisableSandboxFilesystem

Verify

cat /sys/kernel/security/lsm includes landlock, and omarchy update (Omarchy) or sudo pacman -Syu (Arch) syncs with no landlock error.

Sources

pacman-landlock-not-supported-sandbox