Bug 498854

Summary: Print dialog is slow to appear
Product: [Plasma] xdg-desktop-portal-kde Reporter: Ilya Bizyaev <bizyaev>
Component: generalAssignee: Plasma Bugs List <plasma-bugs-null>
Status: CONFIRMED ---    
Severity: normal CC: aleixpol, nate
Priority: NOR    
Version First Reported In: 6.2.5   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Ilya Bizyaev 2025-01-18 16:53:27 UTC
SUMMARY
The print dialog used by the portal takes an unrealistic amount of time to appear on the screen after invoking it from a printing-capable application. I can reproduce this both on a powerful workstation with openSUSE Tumbleweed and on a virtual machine with Fedora KDE 41. In both cases, it takes a similar amount of time to load.

I don't know if it loads faster on machines with physical printers connected.

STEPS TO REPRODUCE
1. Start a VM or a PC without connected printers.
2. Open a PDF file with https://flathub.org/apps/org.gnome.Evince
3. Print it using Evince

OBSERVED RESULT
After clicking the "Print" button or pressing Ctrl+P, around 12 seconds passes before the print dialog appears. During this time, there is no indication that something is still happening.

EXPECTED RESULT
The print dialog appears almost instantly, and if it really has to do some work, it happens when the dialog is already visible.

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20250116
KDE Plasma Version: 6.2.5
KDE Frameworks Version: 6.10.0
Qt Version: 6.8.1
Kernel Version: 6.12.9-1-default (64-bit)
Graphics Platform: Wayland

ADDITIONAL INFORMATION
This problem is not specific to the portal, and I can reproduce it with a non-sandboxed version of Okular (note that Okular's Flatpak also does not use the portal for printing). However, I could not find a Bugzilla component for the dialog itself. Even if it is provided by Qt, something tells me that only KDE developers will get to fixing it there. But this issue is especially important within the context of xdg-desktop-portal-kde because even non-Qt apps will have to rely on this implementation in the Flatpak world.
Comment 1 Nate Graham 2025-01-21 22:36:36 UTC
Hmm on my laptop which is probably weaker than your workstation, it takes about 2.5 seconds for the print dialog to open. Still rather slow, but not the "uhh is this broken" 12 seconds that you're seeing.

I do have a printer configured though — but not actually plugged in right now.