[BUG] Spectacle "Save As" dialog defaults to AVCI format and fails to save PNG/JPEG on CachyOS/Arch with Plasma 6.7.4

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:

  1. QImageWriter cannot write image: Unsupported image format
  2. Cannot 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:

  1. Press Print Screen key
  2. In Spectacle, click Save As
  3. Observe filename defaults to Screenshot_YYYYMMDD_HHMMSS.avci
  4. Change file type dropdown to PNG image
  5. Click Save
  6. Error dialog appears

What I Tried (did NOT fix the issue):

  • :white_check_mark: Set defaultSaveImageFormat=PNG in ~/.config/spectaclerc
  • :white_check_mark: Cleared ~/.cache/spectacle*, ~/.cache/mime*, ~/.cache/thumbnails*
  • :white_check_mark: Deleted and regenerated ~/.config/spectaclerc multiple times
  • :white_check_mark: Cleared ~/.config/kfiledialog* and ~/.local/share/kfiledialog*
  • :white_check_mark: Removed libheif package entirely from system
  • :white_check_mark: Renamed/moved kimg_heif.so and kimg_avif.so plugins from /usr/lib/qt6/plugins/imageformats/
  • :white_check_mark: Reinstalled kimageformats package
  • :white_check_mark: Rebooted system multiple times
  • :white_check_mark: 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 .png when defaultSaveImageFormat=PNG is set
  • Selecting PNG from dropdown should save successfully without QImageWriter errors

Actual Behavior:

  • Dialog always defaults to .avci extension
  • QImageWriter fails for all non-HEIF formats
  • The bug also affects Gwenview’s “Save As” dialog, confirming this is a kimageformats / libheif plugin 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 in spectaclerc caches lastImageSaveAsLocation with .avci extension, which seems to override the [Save] section settings

Steps followed. This is the result:

I only can think that is a Cachy error. My specs:

Operating System: openSUSE Tumbleweed 20260821
KDE Plasma Version: 6.7.4
KDE Frameworks Version: 6.29.0
Qt Version: 6.11.2
Kernel Version: 7.1.8-1-default (64-bit)
Graphics Platform: Wayland
Processors: 14 × Intel® Core™ Ultra 5 245K
Memory: 32 GiB of RAM (30.9 GiB usable)
Graphics Processor: NVIDIA GeForce RTX 5070

You have this, right?

Regards

Spectacle saves png images just fine using Save as…

I did Print Screen and Save As…

How are you updating CachyOS?

Operating System: CachyOS Linux
KDE Plasma Version: 6.7.4
KDE Frameworks Version: 6.29.0
Qt Version: 6.11.2
Kernel Version: 7.2.2-1-cachyos (64-bit)
Graphics Platform: Wayland
Processors: 32 × AMD Ryzen 9 5950X 16-Core Processor
Memory: 64 GiB of RAM (62.7 GiB

@Yankee Thank you for testing! I am updating via sudo pacman -Syu in terminal.

Can you please check and share the output of:

  • pacman -Q kimageformats libheif spectacle
  • ls /usr/lib/qt6/plugins/imageformats/ | grep -E "heif|avif"
  • cat ~/.config/spectaclerc | grep -A2 "\[Save\]"

Also, did you do a fresh CachyOS install recently, or have you been updating the same install for months? I have been updating the same install since June 2026.

This will help me find what’s different between our systems. Thank you!

$ pacman -Q kimageformats libheif spectacle
kimageformats 6.29.0-1.1
libheif 1.23.2-1.1
spectacle 1:6.7.4-1.1

$ ls /usr/lib/qt6/plugins/imageformats/ | grep -E "heif|avif"
kimg_avif.so
kimg_heif.so


$ cat ~/.config/spectaclerc | grep -A2 "\[Save\]"
NOTHING!

CachyOS installed on 2026-07-03 08:31:49