Skip to content

Fix freezes in the New Printer wizard - #489

Open
SinghCod3r wants to merge 3 commits into
masterfrom
fix-wizard-sync-wrappers
Open

SinghCod3r wants to merge 3 commits into
masterfrom
fix-wizard-sync-wrappers

Conversation

@SinghCod3r

@SinghCod3r SinghCod3r commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

When I click Forward or Apply in the New Printer wizard, the window sometimes freezes for a second or two. The cursor shows busy, nothing else happens, and then the next page appears. This PR fixes that.

I measured the click path and found two slow calls on the GTK thread:

  • checking a driverless PPD
  • creating the queue on Apply

What changed:

  • Both calls now run on the existing CUPS worker (authconn run_on_worker), so the window stays responsive. Nothing is cut short, so slow printers just take as long as they need.
  • One centered spinner shows right away and stays until the next page is ready.
  • The bottom-left spinner is removed.
  • The page is no longer dimmed while waiting. A clear click blocker is used instead.
  • The Choose Driver page shows only its own loader.
  • Back and Cancel keep working during a wait. A late result from a step you left is ignored.
  • Apply is disabled while it runs, so a double click can't create the queue twice.
  • Fixed a related bug: for a driverless printer whose PPD fails (the "Broken Xerox" case), the Makes list selected a "Broken" make that doesn't exist. Now it falls back to Generic with nothing recommended.

In this SMB is not touched, and I reused the existing worker and spinner code instead of adding new frameworks.

How I tested:

  • test_newprinter.py and test_PhysicalDevice.py pass.
  • Ran the GUI with Xerox alone, Broken Xerox alone, and both together (in both orders, using Back). No freeze, one spinner, and the Makes list is correct.

Run the check on the worker and show one centered spinner while waiting.
Create the queue on the worker. Apply is disabled while it runs.
Remove the failed driverless entry so the Makes list falls back to Generic.
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