nautilus not generating thumbnails anymore

Bug #2054183 reported by Ralf Hildebrandt
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
nautilus (Ubuntu)
Confirmed
High
Unassigned

Bug Description

After the upgrade to 24.04, nautilus is not generating thumbnails for new files.
Old thumbnails are displayed ok.

I cleaned out $HOME/.cache/thumbnails/ and found that only a subdirectory "fail" is being generated.
It contains a subdirectory "gnome-thumbnail-factory" which in turn contains lots of PNG files:

ece577c54f5ca98e1f7aaa5b4e932aa4.png: PNG image data, 1 x 1, 8-bit/color RGBA, non-interlaced
ee638c64b1c285684412717bf120e295.png: PNG image data, 1 x 1, 8-bit/color RGBA, non-interlaced
ef811735cfb8e69447b5d3a53f361c63.png: PNG image data, 1 x 1, 8-bit/color RGBA, non-interlaced
f0b3ab2f77c342daa3579bfcf9c72481.png: PNG image data, 1 x 1, 8-bit/color RGBA, non-interlaced
f0ddb101b8342e4b298b4c7121881422.png: PNG image data, 1 x 1, 8-bit/color RGBA, non-interlaced

ProblemType: Bug
DistroRelease: Ubuntu 24.04
Package: nautilus 1:45.2.1-4ubuntu1
ProcVersionSignature: Ubuntu 6.6.0-14.14-generic 6.6.3
Uname: Linux 6.6.0-14-generic x86_64
NonfreeKernelModules: zfs
ApportVersion: 2.27.0-0ubuntu6
Architecture: amd64
CasperMD5CheckResult: unknown
CurrentDesktop: ubuntu:GNOME
Date: Sat Feb 17 08:49:55 2024
EcryptfsInUse: Yes
InstallationDate: Installed on 2019-04-16 (1767 days ago)
InstallationMedia: Ubuntu 18.04.2 LTS "Bionic Beaver" - Release amd64 (20190210)
SourcePackage: nautilus
UpgradeStatus: Upgraded to noble on 2024-02-14 (3 days ago)
usr_lib_nautilus:
 file-roller 43.1-1
 nautilus-extension-gnome-terminal 3.49.92-2ubuntu1

Revision history for this message
Ralf Hildebrandt (ralf-hildebrandt) wrote :
Revision history for this message
Ralf Hildebrandt (ralf-hildebrandt) wrote :

I id some tests, and while root was able to create thumbnails in nautilus, I checked the logs and found:

Feb 17 09:20:51 comet kernel: audit: type=1400 audit(1708158051.561:1699): apparmor="DENIED" operation="userns_create" class="namespace" info="User namespace creation restricted" error=-13 profile="unconfined" pid=142479 comm="bwrap" requested="userns_create" denied="userns_create"
Feb 17 09:20:51 comet kernel: audit: type=1400 audit(1708158051.565:1700): apparmor="DENIED" operation="userns_create" class="namespace" info="User namespace creation restricted" error=-13 profile="unconfined" pid=142480 comm="bwrap" requested="userns_create" denied="userns_create"
Feb 17 09:20:51 comet kernel: audit: type=1400 audit(1708158051.569:1701): apparmor="DENIED" operation="userns_create" class="namespace" info="User namespace creation restricted" error=-13 profile="unconfined" pid=142481 comm="bwrap" requested="userns_create" denied="userns_create"

This coincides with me deleting the bogus 1x1 thumbnails an re-entering the folder...

Revision history for this message
Ralf Hildebrandt (ralf-hildebrandt) wrote :

After some digging I found
https://github.com/flatpak/flatpak/issues/5462
and alas:
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
makes thumbnail generation work again.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in nautilus (Ubuntu):
status: New → Confirmed
Revision history for this message
corrado venturini (corradoventu) wrote :

Suggested command seems ok but thumbnail generation still does not work (also after reboot)
corrado@corrado-n4-nn-0215:~$ sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
[sudo] password for corrado:
kernel.apparmor_restrict_unprivileged_userns = 0
corrado@corrado-n4-nn-0215:~$

Revision history for this message
corrado venturini (corradoventu) wrote :

In my system not upgraded but installed from ISO Ubuntu 24.04 LTS "Noble Numbat" - Daily amd64 (20240215) I have the same problem but my .cache/thumbnails is as follows
corrado@corrado-n4-nn-0215:~/.cache/thumbnails$ tree -d
.
├── fail
│   └── gnome-thumbnail-factory
├── large
└── normal

gnome-thumbnail-factory contains more than 200 .png files 1 × 1 pixel
large and normal contains few .png files

Revision history for this message
Ralf Hildebrandt (ralf-hildebrandt) wrote : Re: [ext] [Bug 2054183] Re: nautilus not generating thumbnails anymore

* corrado venturini <email address hidden>:
> Suggested command seems ok but thumbnail generation still does not work (also after reboot)

A reboot resets the "kernel.apparmor_restrict_unprivileged_userns" back
to its default value, so you must not reboot :)

Revision history for this message
corrado venturini (corradoventu) wrote :

THANKS, I hadn't emptied the folder ~/.cache/thumbnails/fail/gnome-thumbnail-factory

Revision history for this message
olive (chenet07) wrote :

the solution to not lose the configuration after the reboot :

sudo nano /etc/rc.local

The bash:
#!/bin/bash
# Votre commande ici
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0

sudo chmod +x /etc/rc.local

Revision history for this message
Ralf Hildebrandt (ralf-hildebrandt) wrote :

* olive <email address hidden>:

> the solution to not lose the configuration after the reboot :

by creating a file in /etc/sysctl.d, e.g.
/etc/sysctl.d/10-fix_nautilus
containing
kernel.apparmor_restrict_unprivileged_userns=0

Revision history for this message
Sebastien Bacher (seb128) wrote :

it seems another fallout from the new apparmor restriction described in bug #2046844 and probably a conflict with the sandboxing in https://gitlab.gnome.org/GNOME/gnome-desktop/-/blob/master/libgnome-desktop/gnome-desktop-thumbnail-script.c

Changed in nautilus (Ubuntu):
importance: Undecided → High
tags: added: rls-nn-incoming
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.