Jockey very slow when searching/downloading/installing printer drivers from OpenPrinting

Bug #574396 reported by Till Kamppeter
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
jockey (Ubuntu)
Fix Released
High
Martin Pitt
Lucid
Won't Fix
Undecided
Unassigned

Bug Description

If a printer is set up with system-config-printer and no locally installed driver is available, system-config-printer automatically searches for a driver on OpenPrinting via Jockey. Search, download, and installation of the driver take rather long time.

To reproduce, run the following command line in a terminal window:

system-config-printer --setup-printer='file:/tmp/printout' --devid='MFG:Ricoh;MDL:Aficio SP C820DN;'

This will fake the detection of a Ricoh Aficio SP C820DN for which there is no driver/PPD in a default installation of Ubuntu.

If a local driver is found, please run the command

sudo dpkg -P openprinting-ppds-extra linuxprinting.org-ppds-extra openprinting-ppds-postscript-ricoh

to uninstall the locally installed driver and run the command shown above again.

Tags: patch
Changed in jockey (Ubuntu):
importance: Undecided → High
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Please check: Make sure that Jockey ONLY searches for printer drivers, not for graphics card, and other drivers.

Changed in jockey (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
Martin Pitt (pitti)
Changed in jockey (Ubuntu):
status: New → In Progress
Changed in jockey (Ubuntu):
assignee: Martin Pitt (pitti) → Till Kamppeter (till-kamppeter)
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

I have fixed this problem now, letting the initialization of the backend not do hardware detection if the backend is started via a search_driver() call with a hardware ID. Then only the databases get initialized so that the driver for the hardware item specified by the ID gets searched for. This makes the driver search significantly faster. The changes are done in a way that no APIs change to make sure that everything else of Jockey works as before. The fix is attached as a patch.

tags: added: patch
Changed in jockey (Ubuntu):
milestone: none → ubuntu-10.10
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

I have packaged up Jockey with the patches for this bug and bug 604698 applied. The debdiff for this package is attached. Can someone of the core developers please upload this package? Thanks.

Changed in jockey (Ubuntu):
status: In Progress → Fix Committed
Changed in jockey (Ubuntu):
assignee: Till Kamppeter (till-kamppeter) → Martin Pitt (pitti)
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

I have updated the debdiff as the fix for the other bug (bug 604698) was not correct.

Revision history for this message
Martin Pitt (pitti) wrote :

This patch needs some more effort. It breaks search_driver() for local drivers, which is used by the Appearance applet for installing a 3D capable driver. This is also caught by the test suite:

D-BUS API: Search for a noninstalled driver ... ERROR
D-BUS API: Search for a driver which gets enabled ... FAIL

We can only take this shortcut if we search for printer drivers from OpenPrinting at this point. It's a gross hack, but as long as we don't have Jockey support for Ubuntu printer driver packages in Ubuntu, then we can live with it. I won't commit that hack into trunk, though.

Changed in jockey (Ubuntu):
status: Fix Committed → In Progress
Revision history for this message
Martin Pitt (pitti) wrote :

http://bazaar.launchpad.net/~jockey-hackers/jockey/trunk/revision/640 provides the db_init() splitout, and http://bazaar.launchpad.net/~jockey-hackers/jockey/trunk/revision/641 provides the infrastructure for the bypass for printer drivers. It's not enabled in trunk, I'll enable it for Ubuntu.

Thanks for the initial patches!

Changed in jockey (Ubuntu Lucid):
status: New → Won't Fix
Revision history for this message
Martin Pitt (pitti) wrote :

A better long-term approach would be to just generally speed up the driver detection. It's taking painfully long right now, and it really shouldn't. Some profiling and optimization is in order here.

Changed in jockey (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

The general detection process is already accelerated by replacing the Foomatic XML database with a compressed PPD archive and by a small bug fix in system-config-printer. Nevertheless we also need to have the option of Jockey only searching for a driver for a given device without scanning the whole system. So we should consider the patch as an interim solution for Ubuntu until bigger architecture changes for a general solution are done.

Revision history for this message
Martin Pitt (pitti) wrote :

jockey (0.5.10-0ubuntu3) maverick; urgency=low

  * Add support for bypassing local detection for search_driver(). (Merged
    from trunk). Thanks to Till Kamppeter for the initial patches!
  * jockey/ui.py: Ubuntu does not currently support local printer driver
    handlers, so speed up the lookup of remote ones by disabling local
    detection of hardware/handlers in search_driver() if we are looking for a
    printer driver. (Note that this is a hack, but the speedup is significant)
    (LP: #574396)
  * Add OSLib.notify_reboot_required() and call it in set_handler_enabled().
    Merged from trunk, and add Ubuntu specific implementation using
    /usr/share/update-notifier/notify-reboot-required in OSLib. (LP: #570215)
  * data/handlers/b43.py: Install firmware-b43-installer package instead of
    b43-fwcutter. (LP: #595344)

 -- Martin Pitt <email address hidden> Wed, 15 Sep 2010 13:35:48 +0200

Changed in jockey (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.