USB printers: Blacklist for CUPS "usb" backend when supported by hplip "hp" backend
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
HPLIP |
New
|
Undecided
|
Unassigned |
Bug Description
If HPLIP which its "hp" backend is installed, each USB printer supported by "hp" gets detected twice by CUPS, once via "hp" and once via CUPS' original "usb" backend. See also the output of the "lpinfo -v" command. This can confuse users as printer setup tools show each printer twice and users do not know which instance to select. Note that most users simply use the system's printer setup tool and not hp-setup.
From CUPS 1.7.1 on the CUPS "usb" backend can apply special treatment to printers specified in external files. This is mainly intended for printers which are in some way not compatible to the "usb" backend but as one special treatment is total blacklisting, one can make the original backend ignore printers when a better backend for these printers is present.
Implementing this is very easy: The better backend, in our case "hp" of the HPLIP package gets shipped with a blacklist file, so that whenever "hp" is installed also the blacklist file is installed and so the printers supported by "hp" get only detected by "hp" and not by the original backend as there they are blacklisted. If one uninstalls HPLIP, both the backend and the blacklist file get uninstalled and the printers are all detected by the original backend again.
The blacklist file has to be placed in the /usr/share/
0x04a9 0x304a blacklist
with the first hex number being the USB vendor ID and the second being the USB product ID. The file can also contain blank lines and everything after a "#" is considered a comment and ignored. 0x0000 as product ID makes all printers of the manufacturer given by the vendor ID being blacklisted, but be careful, there can be HP printers not being supported by the "hp" backend.
The "usb" backend silently ignores all printers blacklisted this way, in your case ending up that your printers are only detected via the "hp" backend.
Can you add such a file to HPLIP, to make setting up HP's USB printers easier for the user?
You do not need to worry about the installed CUPS version when installing the file, if CUPS is too old, it simply ignores the file and all behaves as before.