When an upgraded Ubuntu system boots to a gray GDM screen showing only the clock — and the GNOME dock later appears without its icons — the cause is usually not GDM or GNOME Shell itself. Check the kernel log for an AppArmor message reading conflicting profile attachments against /usr/bin/bwrap: a locally added profile that claims the same binary as the distribution's own Bubblewrap policy prevents GNOME's sandboxed image loader from starting, and the login dialog and desktop icons fail as a side effect. Removing the duplicate profile and reloading the stock one restores everything while keeping AppArmor fully enabled.
Why a sandbox policy can take down the login screen
Modern GNOME decodes images — user avatars, thumbnails, shell artwork — through a helper called glycin, which runs each image inside a Bubblewrap sandbox instead of the shell process itself. GDM's login dialog depends on that pipeline to build its user list, and the desktop relies on it for icon and thumbnail rendering.
Bubblewrap needs unprivileged user namespaces, and Ubuntu mediates /usr/bin/bwrap with dedicated AppArmor profiles so those namespaces stay confined. That design works until a second profile attaches to the same executable. When two profiles claim one attachment point, the kernel cannot decide which policy applies, refuses the exec, and logs an audit entry. The glycin loader dies; GNOME Shell then reports errors such as Could not load a pixbuf and a JavaScript failure in loginDialog.js (Argument child may not be null) because a widget that should have been populated was never created. The visible result is a clock-only greeter and a dock with missing icons.
It also explains why reinstalling gdm3 or gnome-shell changes nothing: every package file is intact. The failure lives in runtime security policy, not on disk.
Confirm the conflict before touching anything
If the graphical session is unusable, switch to a text console with Ctrl+Alt+F3 and log in there. Inspect the current boot's kernel messages:
sudo journalctl -k -b | grep -i bwrap
A conflict looks like this:
apparmor="AUDIT" operation="exec" info="conflicting profile attachments"
name="/usr/bin/bwrap" comm="gly-hdl-loader"
Then list every Bubblewrap-related profile on disk:
ls /etc/apparmor.d | grep bwrap
Two entries where Ubuntu ships one — the stock profile alongside something like bwrap-userns — is the red flag. Read the extra file. A profile shaped like this, attached directly to /usr/bin/bwrap, is the duplicate:
profile bwrap-system /usr/bin/bwrap flags=(unconfined) {
userns,
include if exists <local/bwrap-system>
}
Only remove profiles you can attribute. If the file came from a tool you installed and deliberately attaches to bwrap, you have found the conflict; if in doubt, rename it temporarily rather than deleting it.
Remove the duplicate profile without disabling AppArmor
Four steps, run from the console or a root shell:
- Unload the conflicting profile from the running kernel:
sudo apparmor_parser -R /etc/apparmor.d/bwrap-userns - Keep it from loading at boot by symlinking it into the disable directory; the original file stays on disk for review:
sudo mkdir -p /etc/apparmor.d/disable sudo ln -s /etc/apparmor.d/bwrap-userns /etc/apparmor.d/disable/ - Make sure the distribution's own profile is active:
sudo apparmor_parser -r /etc/apparmor.d/bwrap-userns-restrict - Restart the AppArmor service:
sudo systemctl restart apparmor
Mind the two parser flags: capital -R removes a profile from the kernel, while lowercase -r loads or replaces one. Mixing them up is an easy way to end up with no Bubblewrap policy at all.
Verify, reboot, and what to try if the greeter is still broken
As your normal user, confirm Bubblewrap can create a minimal sandbox:
bwrap --ro-bind / / --unshare-user --unshare-pid true && echo OK
Seeing OK means the exec is no longer blocked. Reboot, and the login screen should show the user list and password field again, with dock icons intact.
If the greeter is still broken after the audit lines disappear from the log, you are dealing with a different fault — check journalctl -u gdm -b, your graphics driver, and free disk space. This fix addresses the conflicting-attachment signature specifically, not every possible GDM failure.
Stop it from happening again
- After installing tools that ship their own sandboxing — AI coding agents, container helpers, build sandboxes — check whether any new file under
/etc/apparmor.dattaches to binaries the distribution already covers,bwrapabove all. - Identify a profile's owner with
dpkg -S /etc/apparmor.d/bwrap-userns; "not owned by any package" means an installer script dropped it there. - After each release upgrade, skim
journalctl -k -bforapparmor="AUDIT"lines early — they expose policy conflicts before they cascade into desktop failures. - Security note: one custom file can hold several profiles. Disabling the file disables all of them — if it also carried, say, a sandbox profile for a coding agent, review that tool's configuration and re-create what you need as a profile that does not compete for the same attachment.
Frequently Asked Questions
Why didn't reinstalling GDM3 or GNOME Shell help?
Nothing was missing. The packages were intact; the kernel was refusing to execute /usr/bin/bwrap under a conflicting policy, so the sandboxed image loader failed at runtime no matter how many times the packages were reinstalled.
Is removing the custom profile a security risk?
Much less than disabling AppArmor entirely. The distribution's own Bubblewrap profile stays active and continues to confine sandboxed processes, whereas the duplicate was already preventing any policy from applying cleanly.
How do I find out which program installed the profile?
Run dpkg -S /etc/apparmor.d/bwrap-userns. If dpkg reports no owner, the file was written by a manual installer or script — check that tool's documentation before re-enabling anything.
Could this conflict affect Flatpak or other sandboxed apps too?
Yes. Anything launching bwrap — Flatpak, some browser sandboxes, image viewers using glycin — hits the same attachment conflict, with symptoms appearing wherever the sandbox runs first. The same diagnosis and fix apply.
The login screen is fixed but icons are still missing — now what?
Confirm no bwrap audit lines remain in the current boot's kernel log. If they are gone but icons are still absent, log out completely or clear the thumbnail and icon caches; a stale session from before the fix can mask the recovery.