apport information

** Tags added: apport-collected noble wayland-session

** Description changed:

  Summary
  
  Nautilus cannot generate file thumbnails on a fresh Ubuntu 24.04
  installation.
  
  The issue is caused by AppArmor restricting unprivileged user
  namespaces, which prevents bubblewrap (bwrap) from creating the sandbox
  environment required by the thumbnail generation process.
  
  Disabling the AppArmor user namespace restriction fixes the issue
  immediately.
  
  Environment
  
  - OS: Ubuntu 24.04 LTS (Noble Numbat)
  - Desktop: GNOME
  - Nautilus version: 46.4
  - Architecture: amd64
  - Kernel:
  
  Linux 7.0.0-28-generic #28~24.04.1-Ubuntu SMP PREEMPT_DYNAMIC
  
  - bubblewrap:
  
  bubblewrap 0.9.0-1ubuntu0.1
  
  - AppArmor:
  
  4.0.1really4.0.1-0ubuntu0.24.04.7
  
  
  Steps to reproduce
  
  1. Install a fresh Ubuntu 24.04 system.
  2. Open Nautilus.
  3. Navigate to a directory containing images/videos.
  4. Enable thumbnail display.
  5. Thumbnails are not generated.
  
  
  Expected behavior
  
  Nautilus should generate thumbnails normally on a default Ubuntu desktop
  installation.
  
  
  Actual behavior
  
  Nautilus fails to generate thumbnails.
  
  The kernel log shows bubblewrap failing due to AppArmor restrictions:
  
  
  apparmor="DENIED"
  profile="unprivileged_userns"
  comm="bwrap"
  capname="setpcap"
  
  apparmor="DENIED"
  profile="unprivileged_userns"
  name="proc/<pid>/uid_map"
  requested_mask="wr"
  
  
  Running bubblewrap manually reproduces the problem:
  
  
  $ bwrap --ro-bind / / true
  
  bwrap: setting up uid map: Permission denied
  
  
  Additional investigation
  
  The following checks were performed:
  
  User namespaces are enabled:
  
  
  $ cat /proc/sys/kernel/unprivileged_userns_clone
  1
  
  
  User namespace limit is sufficient:
  
  
  $ sysctl user.max_user_namespaces
  user.max_user_namespaces = 115486
  
  
  Subuid/subgid configuration exists:
  
  
  $ cat /etc/subuid
  nfl-jiancx:100000:65536
  
  $ cat /etc/subgid
  nfl-jiancx:100000:65536
  
  
  Disabling AppArmor user namespace restriction fixes the issue:
  
  
  $ sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
  
  
  After this change:
  
  
  $ unshare --user --map-root-user id
  uid=0(root) gid=0(root)
  
  $ bwrap --unshare-user --uid 0 --gid 0 true
  
  
  works correctly.
  
  Nautilus thumbnails immediately start working again.
  
  
  Possible cause
  
  Ubuntu 24.04 enables:
  
  
  kernel.apparmor_restrict_unprivileged_userns=1
  
  
  by default.
  
  This appears to prevent bubblewrap from creating the user namespace
  required by GNOME thumbnail generation.
  
  Suggested fix
  
  Possible solutions:
  
  1. Allow bubblewrap thumbnail sandbox usage under the AppArmor policy.
  
  or
  
  2. Adjust the Ubuntu default AppArmor/user namespace policy so GNOME
  desktop components depending on bubblewrap continue to work.
  
- A fresh Ubuntu desktop installation should not require users to manually
- disable AppArmor restrictions or set SUID on /usr/bin/bwrap to get
- Nautilus thumbnails working.
+ A fresh Ubuntu desktop installation should not require users to manually 
disable AppArmor restrictions or set SUID on /usr/bin/bwrap to get Nautilus 
thumbnails working.
+ --- 
+ ProblemType: Bug
+ ApportVersion: 2.28.2-0ubuntu0.1
+ Architecture: amd64
+ CasperMD5CheckResult: unknown
+ CurrentDesktop: ubuntu:GNOME
+ DistroRelease: Ubuntu 24.04
+ GsettingsChanges:
+  b'org.gnome.nautilus.icon-view' b'default-zoom-level' b"'medium'"
+  b'org.gnome.nautilus.list-view' b'default-column-order' b"['name', 'size', 
'type', 'owner', 'group', 'permissions', 'date_modified', 'date_accessed', 
'date_created', 'recency', 'detailed_type']"
+  b'org.gnome.nautilus.preferences' b'default-folder-viewer' b"'list-view'"
+  b'org.gnome.nautilus.preferences' b'migrated-gtk-settings' b'true'
+  b'org.gnome.nautilus.window-state' b'initial-size' b'(873, 533)'
+ InstallationDate: Installed on 2026-06-20 (40 days ago)
+ InstallationMedia: Ubuntu 24.04.4 LTS "Noble Numbat" - Release amd64 
(20260210)
+ Package: nautilus 1:46.4-0ubuntu0.2
+ PackageArchitecture: amd64
+ ProcEnviron:
+  LANG=zh_CN.UTF-8
+  PATH=(custom, no user)
+  SHELL=/bin/bash
+  TERM=xterm-256color
+  XDG_RUNTIME_DIR=<set>
+ ProcVersionSignature: Ubuntu 7.0.0-28.28~24.04.1-generic 7.0.12
+ Tags: noble wayland-session
+ Uname: Linux 7.0.0-28-generic x86_64
+ UpgradeStatus: No upgrade log present (probably fresh install)
+ UserGroups: adm cdrom dip lpadmin plugdev sudo users
+ _MarkForUpload: True
+ usr_lib_nautilus:
+  file-roller                       44.3-0ubuntu2
+  nautilus-extension-gnome-terminal 3.52.0-1ubuntu2

** Attachment added: "Dependencies.txt"
   
https://bugs.launchpad.net/bugs/2162114/+attachment/5987904/+files/Dependencies.txt

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2162114

Title:
  Nautilus thumbnails fail to generate on Ubuntu 24.04 due to AppArmor
  restricting bubblewrap user namespaces

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/2162114/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to