Skip to content

Fix blocking operations in printer setup - #487

Closed
SinghCod3r wants to merge 3 commits into
masterfrom
fix/gtk-blocking-operations
Closed

SinghCod3r wants to merge 3 commits into
masterfrom
fix/gtk-blocking-operations

Conversation

@SinghCod3r

@SinghCod3r SinghCod3r commented Oct 24, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

This change removes the remaining confirmed blocking operations from the printer setup flow and moves SMB Browse/Verify work off the GTK main thread.

The goal is to keep the printer setup UI responsive while network, package, driver, PPD, and SMB operations are running.

What changed

  • Move LPD/LPR probing off the GTK thread.
  • Move PackageKit printer-driver/backend installation work to worker operations.
  • Move OpenPrinting PPD download, parsing, and validation off GTK.
  • Move local cupstestppd validation off GTK.
  • Move GPG fingerprint retrieval off GTK.
  • Move remote CUPS/HTTP queue retrieval off GTK.
  • Move downloadable driver installation subprocess handling off GTK.
  • Move SMB Browse, Verify, and row expansion network operations to worker paths.
  • Add a GTK-safe authentication bridge for interactive SMB authentication while keeping SMB network I/O in the worker.
  • Add cancellation and stale-result protection for asynchronous operations.
  • Preserve driverless PPD selection while adding on-demand validation when CUPS does not advertise the required driverless PPD.
  • Isolate cached driverless PPDs per device/URI to prevent cross-device leakage.
  • Preserve same-device driverless cache reuse.
  • Add loading feedback for driverless validation when PPDs are already loaded, avoiding a period of no visible progress.

Regression coverage

The tests cover:

  • asynchronous LPD, PackageKit, PPD, GPG, remote CUPS, driver installation, and SMB paths
  • SMB authentication and cancellation behavior
  • driverless PPD validation and cache reuse
  • multi-device driverless isolation
  • identical-model printers on different network hosts
  • Normal Xerox / Broken Xerox driverless selection
  • PPD-mode device reconstruction
  • duplicate spinner prevention

Verification

All PR checks are passing.

The final change is intentionally limited to the printer setup implementation and its regression tests.

@SinghCod3r SinghCod3r changed the title Fix GTK freeze during LPD printer probing Fix blocking operations in printer setup Oct 24, 2026
@SinghCod3r
SinghCod3r force-pushed the fix/gtk-blocking-operations branch 2 times, most recently from 26279d4 to 8ae603f Compare October 26, 2026 09:17
@SinghCod3r
SinghCod3r force-pushed the fix/gtk-blocking-operations branch from 8ae603f to a1d63e0 Compare October 26, 2026 09:32
@SinghCod3r SinghCod3r closed this Oct 28, 2026
@SinghCod3r

Copy link
Copy Markdown
Collaborator Author

Closing in favor of smaller, measured fixes. SMB is out of scope for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant