System Information:
- OS: CachyOS (Arch-based, x86_64_v3)
- KDE Plasma Version: 6.5+ / 6.6+
- KDE Frameworks: 6.29.0+
- Qt Version: 6.x
- Session Type: Wayland
- Spectacle Version: Latest from CachyOS repos
- kimageformats: 6.29.0-1.1
- libheif: Originally 1.23.2-1.1 (now removed for testing)
Description:
When pressing the Print Screen key, Spectacle opens normally. However, clicking “Save As” causes the save dialog to default to .avci file extension (AVC-encoded image in HEIF container). Even when manually selecting PNG or JPEG from the file type dropdown, the save fails with two consecutive errors:
QImageWriter cannot write image: Unsupported image formatCannot save screenshot. Error while writing file.
The .avci file does save successfully if selected, but Dolphin cannot open it, making the format useless for daily use.
Steps to Reproduce:
- Press
Print Screenkey - In Spectacle, click Save As
- Observe filename defaults to
Screenshot_YYYYMMDD_HHMMSS.avci - Change file type dropdown to PNG image
- Click Save
- Error dialog appears
What I Tried (did NOT fix the issue):
Set defaultSaveImageFormat=PNGin~/.config/spectaclerc
Cleared ~/.cache/spectacle*,~/.cache/mime*,~/.cache/thumbnails*
Deleted and regenerated ~/.config/spectaclercmultiple times
Cleared ~/.config/kfiledialog*and~/.local/share/kfiledialog*
Removed libheifpackage entirely from system
Renamed/moved kimg_heif.soandkimg_avif.soplugins from/usr/lib/qt6/plugins/imageformats/
Reinstalled kimageformatspackage
Rebooted system multiple times
Tested with a fresh user account — same issue persists- $ pacman -Q libheif
Package not found (removed)
$ ls /usr/lib/qt6/plugins/imageformats/kimg_heif.so
No such file (plugin disabled)
$ cat ~/.config/spectaclerc
[Save]
defaultSaveImageFormat=PNG
Config is correct but ignored by the save dialogExpected Behavior:
- Save As dialog should default to
.pngwhendefaultSaveImageFormat=PNGis set - Selecting PNG from dropdown should save successfully without QImageWriter errors
Actual Behavior:
- Dialog always defaults to
.avciextension - QImageWriter fails for all non-HEIF formats
- The bug also affects Gwenview’s “Save As” dialog, confirming this is a
kimageformats/libheifplugin integration issue, not just Spectacle
Additional Notes:
- The issue started recently after a system update on CachyOS
- Console output shows:
kf.kio.filewidgets.kfilefiltercombo: KFileFilterCombo::setCurrentFilter: Could not find file filter - The
[ImageSave]section inspectaclerccacheslastImageSaveAsLocationwith.avciextension, which seems to override the[Save]section settings

