# Troubleshooting Each entry is a symptom, what causes it, and what to do. If yours is not here, the [last section](#getting-help) says how to collect what a bug report needs. ## A modern distribution will not boot on an old kernel **Symptom.** Arch, Fedora or another current distribution crashes early, or hangs with services that never start, on a 4.x or 5.4 kernel. systemd warns at boot that the kernel `is older than systemd's required baseline kernel version`. **Cause.** systemd 258, released in September 2025, raised its minimum kernel to 5.4. systemd 260, released in March 2026, raised it to 5.10 and removed its code for older kernels. On an older kernel systemd only warns and carries on, then fails where the kernel lacks a feature it now assumes. **Fix.** Pick one: - **Keep the kernel.** Use a distribution with systemd 257 or older, such as Ubuntu 22.04 or 24.04 or Debian 12 or 13, or one with another init, such as Alpine with OpenRC or Void with runit. - **Patch the kernel.** [droidspaces-backports](https://github.com/Droidspaces/droidspaces-backports) has the patches that boot systemd 258 to 262 on 4.9, 4.14, 4.19 and 5.4 kernels, and the steps. It needs Droidspaces 7.2.0 or newer. ## "Required key not available" **Symptom.** On a phone with file-based encryption and a kernel older than 5.0, the container crashes or file operations fail with this message. **Cause.** systemd creates new session keyrings for its services, and on these kernels a process that does so loses access to Android's encryption keys. **Fix.** On kernels before 5.0, Droidspaces makes the `keyctl` system call fail inside the container, so systemd keeps the keyring it inherited. That filter needs `CONFIG_SECCOMP_FILTER` in the kernel, which `droidspaces check` reports as **Seccomp support**, and it is skipped when the container runs with `--privileged=noseccomp`. If you still see the error, check both; the container log shows `Failed to apply the keyring seccomp filter` when the kernel refused it. A sparse image rootfs avoids the problem entirely. ## Volatile mode fails on f2fs **Symptom.** Starting a directory container with volatile mode fails with an OverlayFS error. **Cause.** Most phones keep `/data` on f2fs, and OverlayFS on most Android kernels refuses f2fs as its lower layer. **Fix.** Use a sparse image rootfs. The ext4 inside it is a lower layer OverlayFS accepts. ## No network at all, "socket: permission denied" **Symptom.** Even `ping` as root fails at once with `socket: permission denied`. **Cause.** Android's paranoid networking, present in many kernels up to 4.14, lets only processes in certain groups open network sockets: `aid_inet` (3003), `aid_net_raw` (3004) and `aid_net_admin` (3005). **Fix.** Containers installed by the app already have these groups, and root is in `aid_inet` and `aid_net_raw`. For a rootfs you prepared yourself, add the groups to `/etc/group` and put your users in them. When building a kernel, `CONFIG_ANDROID_PARANOID_NETWORK=n` removes the restriction. ## Addresses work but names do not resolve **Symptom.** `ping 1.1.1.1` works, `ping google.com` does not, even though `/etc/resolv.conf` lists a nameserver. Most often on mobile data. **Cause.** Some carriers block public resolvers. **Fix.** Set the container's **DNS Servers** to the ones the carrier assigned. On the phone, a root shell prints them: ```sh dumpsys connectivity | sed 's/}}/\n/g' | grep 'InterfaceName: wlan0' | grep -o 'DnsAddresses: \[[^]]*\]' | grep -o '/[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*' | tr -d '/' ``` Swap `wlan0` for the mobile data interface, usually `rmnet_data0` or similar, when on cellular. ## Wi-Fi or mobile data drops on the phone when a container starts **Symptom.** The phone's own connection stops working when a host mode container starts or stops, and sometimes only a reboot brings it back. **Cause.** A network manager inside the container, usually systemd-networkd or NetworkManager, is configuring the phone's interfaces, because in host mode they are the container's interfaces too. **Fix.** Use NAT mode, where the container has its own interfaces and cannot touch the phone's. If the container must stay in host mode, mask the network manager inside it: from the container's **Manage** screen in the app, or with `systemctl mask systemd-networkd`. ## Binaries crash at random in a directory container **Symptom.** In a directory rootfs on Android, symlinks change size, `dpkg` warns about `libstdc++.so.6`, libraries fail to load, programs crash for no reason. **Cause.** The directory under `/data/local/Droidspaces` gets a generic SELinux label, and the kernel then interferes with some file operations inside the rootfs. The damage is permanent once it has happened. **Fix.** Install into a sparse image. The labels inside the image belong to the image's own filesystem, out of the host policy's reach. The app's **Migrate to a sparse image** does this for an existing container, but a rootfs that is already damaged needs reinstalling. Switching SELinux to permissive hides new denials and repairs nothing. ## A rootfs image fails to mount on Android **Symptom.** The container does not start and the log shows the loop mount failing. **Cause.** The image file has an SELinux label the loop driver may not read. **Fix.** Droidspaces labels images before mounting them, so an up-to-date backend does not hit this. By hand, the label is `chcon u:object_r:vold_data_file:s0 /path/to/rootfs.img`. ## A container with the same name is "already running" **Symptom.** `start` fails with `Container name '' is already in use by PID .`, but you stopped that container. **Cause.** The container's init from an earlier run is still alive. Usually its monitor, the host process that manages it, died and left the init behind. A record pointing at a process that has exited never blocks a start. **Fix.** Run `droidspaces scan`. It restores the record of every container whose monitor still runs, and for an init without one it prints `Container init PID has no monitor and is not managed. Stop it with: kill -KILL `. Run that `kill` as root, then start the container again. ## systemd hangs, or a container will not stop, on a 4.14 kernel **Symptom.** On kernel 4.14 and neighbours, systemd freezes during boot, or `stop` runs for more than fifteen seconds and fails. **Cause.** A bug in the kernel itself. Vendor kernels of this age carry their own mix of backports and missing upstream fixes, and systemd exercises more of the kernel than other init systems do, so it is usually the first thing to hit one. Different kernels hang in different places, and Droidspaces cannot work around a task that is stuck inside the kernel. **Check.** Processes that sit in `D` or `R` state and ignore `kill -9` are stuck in the kernel. As root on the host, `cat /proc//stack` for one of them shows the function it is stuck in. That stack is what to search for upstream, or to take to whoever maintains your kernel. **Fix.** Fix the kernel. Apply the upstream fix for the function in that stack, or use a kernel that already carries it. ## The sparse image does not shrink after deleting files **Symptom.** You removed gigabytes inside the container, but `rootfs.img` on the phone is as large as before. **Cause.** The host cannot know which blocks inside the image are free until the filesystem says so. **Fix.** Run `fstrim -av` as root inside the container. It tells the image which blocks are free, and the phone gets that space back. `ls -l` still shows the image at its full size; `du -h rootfs.img` on the phone shows the space it really takes. ## LuCI, or another tool, shows the host's RAM and load despite a limit **Symptom.** A container has a memory or CPU limit. `free` and fastfetch inside it show the limited figures, but OpenWrt's LuCI shows the phone's full RAM and real load. **Cause.** LuCI asks the kernel through the `sysinfo()` system call rather than reading `/proc/meminfo`, and a system call cannot be replaced with a file. **Fix.** None needed. The limit is enforced either way; only the number displayed is wrong. `droidspaces -n info` on the host shows the real usage. ## A resource limit is unavailable although the kernel option is on **Symptom.** `droidspaces check` reports memory, CPU or process limit support missing, or a start prints `memory.max is not available on this kernel`, yet `/proc/config.gz` has `CONFIG_MEMCG`, `CONFIG_CFS_BANDWIDTH` or `CONFIG_CGROUP_PIDS`. **Cause.** The controller was switched off at boot. In `/proc/cgroups`, a `0` in the last column of the controller's row means the kernel command line carries `cgroup_disable=memory`, `cgroup_disable=cpu` or `cgroup_disable=pids`. `cat /proc/cmdline` confirms it. Vendor kernels often disable the memory controller to save a little memory. **Fix.** Remove the argument. It lives in `CONFIG_CMDLINE` in the kernel config, in the boot image header, or in the bootloader. The container starts either way; only the limit is skipped. If the controller has no row at all in `/proc/cgroups`, the kernel is 6.12 or newer and was built without that controller's cgroup v1 code. It is still there on cgroup v2, and Droidspaces uses it from there. ## Getting help 1. Run `droidspaces check` and note anything marked missing. 2. Read the container's log: the log icon on its card in the app, or `Logs//` in the workspace. 3. From the CLI, start with `--foreground` to watch the boot on your terminal. 4. In the app, **Settings**, **Generate a bug report** collects logs and device details into one file. 5. Ask in the [Telegram discussion group](https://t.me/DroidspacesDiscussion) or open a [GitHub issue](https://github.com/ravindu644/Droidspaces-OSS/issues) with that file attached. --- Previous: [Recipes](Cool-things-you-can-do.md) | Next: [NixOS](Nix-NixOS.md)