Bug 15549 - HP printer installed by system-config-printer not recognised by HP Printer Manager (HPLIP)
Summary: HP printer installed by system-config-printer not recognised by HP Printer Ma...
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: x86_64 Linux
Priority: Normal major
Target Milestone: ---
Assignee: Mageia Bug Squad
QA Contact:
URL: https://dl.dropboxusercontent.com/u/1...
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2015-03-21 12:52 CET by Maurice Batey
Modified: 2015-04-12 18:43 CEST (History)
8 users (show)

See Also:
Source RPM: system-config-printer-1.5.5-2.mga5.src.rpm
CVE:
Status comment:


Attachments
printer-install.log, during system-config-printer 'Add printer' (9.76 KB, text/plain)
2015-04-03 17:37 CEST, Maurice Batey
Details
patch to avoid needless reinstall of libsane-hpaio package (2.10 KB, text/plain)
2015-04-04 14:43 CEST, Martin Whitaker
Details
patch to fix bugs in mga_printer_custom.py (2.86 KB, text/plain)
2015-04-04 14:47 CEST, Martin Whitaker
Details
patch to make s-c-p detect a new printer without needing a reboot (675 bytes, patch)
2015-04-04 14:54 CEST, Martin Whitaker
Details | Diff
Log of terminal sessions with patched system-config-printer (10.66 KB, text/x-log)
2015-04-05 17:44 CEST, Maurice Batey
Details

Description Maurice Batey 2015-03-21 12:52:30 CET
Description of problem:

HP Printer Manager (HPLIP) does not recognise HP printer installed by system-config-printer 'Add Printer' function

Version-Release number of selected component (if applicable):

  system-config-printer-1.5.5-2.mga5.src.rpm

How reproducible:

Steps to Reproduce:

1. Use system-config-printer to install USB HP printer (* Using option "USB")

2. Try use HP Printer Manager (HPLIP) - denies a printer is installed, have to get it to do another install of the same printer if want to use HPLIP facilities!

3. [* If try to use 'HPLIP' option, system-config-printer freezes after "searching for drivers")

N.B. This problem was first raised in Bugs 14440 & 1454, which had some common ground. See later comments in there for suggested fix, e.g.: 

  "When system-config-printer's 'Add printer' finds a USB HP printer and installs printing packages and HP utilities, could it then call HPLIP to do the actual install, thus avoiding the conflict?" 

Of course, the $64 question is: Why does HPLIP not find the printer installed by system-config-printer?
  In fact, if you look at the screenshot referenced above it can be seen that there is a 'Note' stating that it will not!"




Reproducible: 

Steps to Reproduce:
Maurice Batey 2015-03-21 12:52:39 CET

CC: (none) => maurice

Comment 1 Maurice Batey 2015-03-21 14:12:42 CET
P.S. It takes so long (e.g. 30 secs) for system-config-printer's 'Add Printer' to find a USB printer it would be helpful to put out a startup message, e.g.:

  "Looking for USB printer(s)"
Comment 2 Maurice Batey 2015-03-21 14:19:16 CET
In addition, perhaps remove the Add Printer's "HPLIP" option, which I found didn't work and finished in a freeze.
  (Also, it is a puzzling alternative to "USB".)
Comment 3 Maurice Batey 2015-03-21 17:52:19 CET
P.S. Same problem with 32-bit Mageia-5RC, as well as 64-bit.
Comment 4 Maurice Batey 2015-03-24 17:07:10 CET
Just re-tried with an install of yesterday's new classic ISO for 64-bit Mageia-5RC.

Having first switched on the USb HP5520, system-config-printer could not find it.
  Had to switch printer off, then re-start system-config-printer and switch printer on again.

After 15-20 seconds the "HP5520" info line popped up, and I selected the 'HP Linux Imaging & Printing (HPLIP)' option.   (But why is there also a 'USB' option? This is confusing for newcomers to Mageia.)

   I then saw "Searching for packages" (which dragged on for a while), then up came a window:
    "System-logind(?) wants to install a package (libsane-fipaio)", which I OK'd.

The install then completed **and** HPLIP accepted the installed printer.

So - it sort of worked, but it's really a messy business, compared with the speedy and smooth way HPLIP installs a printer.
Comment 5 Maurice Batey 2015-03-26 19:17:49 CET
Have just done a KDE install of 32-bit 'classic' Mageia-5RC (23/3/15 version) on my laptop (real h/w). Then did full s/w update.

With USB HP5520 printer 'off', I started system-config-printer, which installed a bunch of printing packages and HP utilities.
  I then switched the printer on. 
RESULT: After over a minute, no signs of the printer in Add Printer.

So left printer 'on', exited system-config-printer, and then started it again.
RESULT: Add Printer popped up the printer info within 5 seconds, and after the rigamarole described earlier the selection of the 'HP Scanning & printer... (HPLIP)' option eventually completed the installation, which HPLIP accepted.

So - no need to reboot, just a lot of patience.
Comment 6 Maurice Batey 2015-03-31 17:29:05 CEST
> no need to reboot, just a lot of patience.

Yesterday (with the 29/3 64-bit Mageia-5RC (KDE, on live h/w)) SCP 
excelled itself.
  What happened was that - no matter how many times SCP was restarted - 
it would not pop up the HP5520 ID line, so I tried a reboot.

And - believe it or not - it then promptly installed, with no questions, 
the HP1050 USB printer connected to another PC on our LAN!!! No sign of 
mine.
  (I didn't know whether to laugh or cry...)

However, when I hit 'Add Printer' again it did then pop up the HP5520 
line and the now familiar but laborious and lengthy install rigmarole eventually installed my own USB printer (accepted by HPLIP).

N.B. Out of curiosity I then fired up the 2012 PCLinuxOS I still have 
lying around, and asked it to install the HP5520, which it went on to find in 
a flash and install in under a minute (though HPLIP would not then 
acknowledge it).
Comment 7 Martin Whitaker 2015-04-03 11:49:39 CEST
I have been trying to reproduce this with my HP C4180 MFP.

The issue with the printer not being detected by s-c-p is intermittent for me. I've tried quite a few times, some with a clean install, some by removing the task-printing-* and task-scanning meta-packages and then running s-c-p again. Sometimes the printer will be detected without restarting s-c-p. If it isn't, restarting s-c-p or unplugging/replugging the USB lead doesn't help - it needs either a reboot or a restart of the systemd-udevd service.

If it's going to be detected at all, it always appears within a couple of seconds of clicking on the 'Add' button in s-c-p.

Once installed, selecting the HPLIP option in s-c-p, I've never had a problem with using HPLIP.

I've once seen the problem you describe in comment 4 ("Searching for packages"), but that was on an old install of cauldron that I've done a lot of work in, and I've not been able to reproduce it in a fresh install.

This is all on real hardware, using classic 64-bit installer and Cinnamon desktop.

P.S. As far as I'm aware, s-c-p only scans for printers when you click on the 'Add' button, so if you plug in the printer after doing this, it won't then be detected and appear in the list of available printers.

CC: (none) => mageia

Comment 8 Maurice Batey 2015-04-03 14:44:50 CEST
> As far as I'm aware, s-c-p only scans for printers when you click on the 'Add' > button, 

I had thought that was so, too, but with recent installs of Mageia-5RC (ISO's dated 29/3 & 1/4), after SCP has installed the various printer packages it has consistently failed to detect any USB printer until a reboot, when - much to my astonishment (I had never seen this before)- as soon as I started SCP (and BEFORE hitting 'Add printer') it showed a 'printer installed' icon for a USB HP1050 printer attached to a LAN PC in another room!! 

(If I then hit 'Add Printer' it quickly finds my own printer and offers the "HPLIP Scanning & Printing...(HPLIP)" option as well as "USB".)

(What is the point of the confusing "USB" option? Does it simply mean "non-HPLIP"?)

As for the 'HPLIP' option, it is often appears to freeze several times, for 1-2 minutes, between several info messages that "Systemd wants to install <some 'libsane' package>". Puzzlingly, the msg shows only 'Cancel' and 'Close' options the first time or two, then eventually an 'Install' option, after which the install eventually completes.
  
All the above occur both with both 64-bit (on real h/w PC) and 32-bit (real h/w on laptop).

For newcomers to Mageia it will be a great puzzle and frustration, and for Mageia an embarrassment - especially in reviews.

WHAT TO DO ABOUT THIS?
  
 If - instead of returning to SCP after it has installed the first lot of printer packages - one starts HPLIP instead, it does the install smoothly and quickly.  For myself, I shall use that workaround for routine installs.

But I wouldn't like to be a newcomer to Mageia trying to get a USB HP printer installed. How is he going to understand the HPLIP v. USB options of Add Printer, and the apparent need to reboot after first using SCP?
  And what will he make of the interminable delays during Add Printer's 'HPLIP' option? Probably that it has 'bombed out'...
Comment 9 Martin Whitaker 2015-04-03 15:17:04 CEST
(In reply to Maurice Batey from comment #8)
> I had thought that was so, too, but with recent installs of Mageia-5RC
> (ISO's dated 29/3 & 1/4), after SCP has installed the various printer
> packages it has consistently failed to detect any USB printer until a
> reboot, when - much to my astonishment (I had never seen this before)- as
> soon as I started SCP (and BEFORE hitting 'Add printer') it showed a
> 'printer installed' icon for a USB HP1050 printer attached to a LAN PC in
> another room!! 
> 
CUPS has an network auto-discovery option - maybe someone has enabled it.

> (What is the point of the confusing "USB" option? Does it simply mean
> "non-HPLIP"?)
> 
I've no idea - I'm just another user like you!

> As for the 'HPLIP' option, it is often appears to freeze several times, for
> 1-2 minutes, between several info messages that "Systemd wants to install
> <some 'libsane' package>". Puzzlingly, the msg shows only 'Cancel' and
> 'Close' options the first time or two, then eventually an 'Install' option,
> after which the install eventually completes.
>   
Well, this is what I was trying to help debug - but I've not been able to get it to happen again. As it seems to be repeatable on your system, try typing the following command (as the root user) in a terminal window:

  journalctl -f | tee printer-install.log

before you run s-c-p, which will both display system log messages and store them in the printer-install.log file. Press Ctrl-C in the terminal window after s-c-p has done its stuff to finish capturing the messages, then attach the log file to this ticket.
Comment 10 Maurice Batey 2015-04-03 15:49:20 CEST
> attach the log file to this ticket.

Will give that a try later today.

Here is the terminal output of the last time I chose the 'HPLIP' option of Add Printer (when it found the printer):

#system-config-printer
task-printing-server-2011-8.mga5
task-printing-hp-2011-8.mga5
rmmod: ERROR: Module lp is not currently loaded
task-printing-hp-2011-8.mga5
task-printing-hp-2011-8.mga5
task-printing-hp-2011-8.mga5
task-printing-hp-2011-8.mga5
Comment 11 Maurice Batey 2015-04-03 17:37:39 CEST
Created attachment 6179 [details]
printer-install.log, during system-config-printer 'Add printer'

Herewith attached as requested the result if doing 'journalctl -f tee | printer-install.log' before calling system-control-printer 'Add Printer'.

N.B. I had already deleted the existing installed printer prior to Add Printer.

     Add Printer then quickly found the printer.
Comment 12 Martin Whitaker 2015-04-03 21:36:36 CEST
That has helped me reproduce the problem. There seem to be three bugs at play here (not counting the need to reboot after installing task-printing-server):

1) s-c-p is incorrectly thinking that libsane-hpaio is not installed, despite it having been installed as part of the task-printing-hp meta-package. This may be because in Mageia the package is called libsane-hpaio1 or lib64sane-hpaio1, or possibly because the files it is looking for are stored in different locations in Mageia. I will dig deeper into this one.

2) When the dialogue box pops up to say that it wants to install the libsane-hpaio package, a random process name is used in the title - e.g. for my most recent attempt it says "Xorg wants to install a package". I suspect this message in the journal:

  org.freedesktop.PackageKit[2925]: Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.

might have some bearing on this.

3) The urpmi backend to packagekitd is broken, leading to the messages in the journal:

  PackageKit-Urpmi-ERROR **: Backend needs to be ported to 0.8.x -- see backends/PORTING.txt for details

The packagekit package version on the mirrors is 1.0.0-2, dating back to last October. In Subversion there is version 1.0.5-1. I've tried building and installing that, which gets a bit further, then fails. Running packagekitd with the --verbose option, I get the following error:

STDERR: Can't locate object method "is_package_installed" via package "URPM::DB" at /usr/share/PackageKit/helpers/urpmi/urpmi_backend/tools.pm line 90.

There's already an open bug for packagekit (bug 14479), so I will comment there.
Martin Whitaker 2015-04-03 21:45:16 CEST

Depends on: (none) => 14479

Comment 13 Maurice Batey 2015-04-03 23:12:29 CEST
> "..a random process name is used in the title - e.g. for my most recent 
> attempt it says "Xorg wants to install a package"

  "Systemd wants to install a package" in my case!
Comment 14 Martin Whitaker 2015-04-04 14:43:20 CEST
Created attachment 6183 [details]
patch to avoid needless reinstall of libsane-hpaio package

As noted in comment 12, s-c-p tries and fails to install the libsane-hpaio package for a number of reasons:

  - it looks for a file named hpaio or hplip in the directory
    /etc/sane.d/dll.d, but the Mageia package adds the dll
    name to the /etc/sane.d/dll.conf file, so it always thinks
    the package is not installed

  - it tries to install the package libsane-hpaio, but the
    correct name for Mageia is either libsane-hpaio1 or
    lib64sane-hpaio1

  - it tries to use packagekitd to install the package, but
    this is currently broken in Mageia

However, s-c-p has been customised by Mageia to automatically install the libsane-hpaio1 package when it detects a HP printer/scanner device (although this is in fact redundant, as the hplip package is also automatically installed, and it includes a dependency on libsane-hpaio1). So we can just remove the standard s-c-p mechanism for doing this.
Comment 15 Martin Whitaker 2015-04-04 14:47:19 CEST
Created attachment 6184 [details]
patch to fix bugs in mga_printer_custom.py

The mga_printer_custom.py in s-c-p has a number of bugs which prevent it correctly reading the HP database to determine whether a printer has scanner or fax functionality. Most of these bugs look to be fallout from the change to python3.
Comment 16 Martin Whitaker 2015-04-04 14:54:52 CEST
Created attachment 6185 [details]
patch to make s-c-p detect a new printer without needing a reboot

When s-c-p is first used, it automatically installs the task-printing-server meta package. One of the dependencies it pulls in adds a new udev rule, which needs to be applied to allow s-c-p to detect printer devices. Although systemd-udevd is supposed to automatically notice when new rules are added, this doesn't always seem to happen, and even if it does, the new rules won't be applied to devices that are already connected. This patch causes s-c-p to trigger the application of the new rules to existing devices.
Comment 17 Martin Whitaker 2015-04-04 14:56:30 CEST
Removing the dependency on bug 14479, as the patch in comment 14 eliminates the need to use packagekit.

Depends on: 14479 => (none)

Comment 18 Martin Whitaker 2015-04-04 15:03:35 CEST
Maurice, if you would like to test my patches, you can do this by saving the patches to some location, then in a terminal window as root:

  cd /usr/share/system-config-printer
  patch -b < <some location>/apply-new-udev-rules.patch
  patch -b < <some location>/avoid-reinstall-of-libsane-hpaio.patch
  patch -b < <some location>/fix-reading-hp-database.patch

(replacing <some location> with the full path to where you saved the patches).

This should be done before you run s-c-p for the first time.

For me, the only minor niggle left is that s-c-p automatically installs the simple-scan package when it detects a multi-function printer/scanner, but the Scan button in HPLIP is by default configured to call xsane, not simple-scan. But that should be a new bug.
Comment 19 Maurice Batey 2015-04-04 18:36:21 CEST
> Created attachment 6184 [details]
> patch to fix bugs in mga_printer_custom.py

  Did you want me to make that patch? (If so, how?!)
Comment 20 Maurice Batey 2015-04-04 18:40:52 CEST
> to test my patches, you can do this by saving the patches* to some location,
> then in a terminal window as root:

>  cd /usr/share/system-config-printer
>  patch -b < <some location>/apply-new-udev-rules.patch
>  patch -b < <some location>/avoid-reinstall-of-libsane-hpaio.patch
>  patch -b < <some location>/fix-reading-hp-database.patch

   * Not clear if the 6184 patch is included in "patches to some location".
     My guess is not...
Comment 21 Martin Whitaker 2015-04-04 18:56:32 CEST
It's a little confusing - Bugzilla shows the patch description, not the file name. But for example, if you right click on "patch to fix bugs in mga_printer_custom.py" and select "save link target as", it will default to saving it as a file named "fix-reading-hp-database.patch". Hope this makes it clear!
Comment 22 Maurice Batey 2015-04-04 19:09:18 CEST
> if you right click on "patch to fix bugs in mga_printer_custom.py" and select > "save link target as", it will default to saving it as a file named > "fix-reading-hp-database.patch

What is confusing me is that are *two* patch files (6184 & 6185).
  Now, when you say:

"saving the patches to some location, then in a terminal window as root:

  cd /usr/share/system-config-printer
  patch -b < <some location>/apply-new-udev-rules.patch
  patch -b < <some location>/avoid-reinstall-of-libsane-hpaio.patch
  patch -b < <some location>/fix-reading-hp-database.patch"

I have to assume that apply to just 6185? What about 6184?

  I ask because 6184 and 6185 imply TWO locations. whereas the above mantra talks only about one ( <some location> )...
  So what is the corresponding sequence for 6184?!

(Apologies for Q's, but I'm still a nephyte w.r.t. applying patches...)
Comment 23 Martin Whitaker 2015-04-04 19:28:18 CEST
Ah, I understand your confusion. No, there's three patch files:

  6183 : avoid-reinstall-of-libsane-hpaio.patch
  6184 : fix-reading-hp-database.patch
  6185 : apply-new-udev-rules.patch

By "some location" I mean any directory you care to select on your hard drive - whatever your web browser chooses by default is as good as anything. For me it defaults to my home directory, so if I save the patches to the default location, I would end up with the three files in /home/martin, and then the commands to execute would be:

  cd /usr/share/system-config-printer
  patch -b < /home/martin/apply-new-udev-rules.patch
  patch -b < /home/martin/avoid-reinstall-of-libsane-hpaio.patch
  patch -b < /home/martin/fix-reading-hp-database.patch"

The "-b" option means that a backup copy will be made of each file before the patch is applied - identified by the suffix ".orig" in the file name.

It doesn't really matter what order you apply the patches.

You shouldn't see any messages when applying the patches - if any warnings or errors are displayed, stop and ask!
Comment 24 Maurice Batey 2015-04-04 22:59:43 CEST
OK - thanks - will do tomorrow; I'm out of time here today...
Comment 25 Maurice Batey 2015-04-05 17:44:26 CEST
Created attachment 6189 [details]
Log of terminal sessions with patched system-config-printer

The patches worked beautifully, and the result showed a completely-reformed system-config-printer - smooth and successful, though I'm not sure if the result was 100% what was expected. 
   Well done!

I have attached a file above comprising the printer-install.log and the system-config-printer session.

Please let me know of anything else I can help with.
Comment 26 Maurice Batey 2015-04-05 17:51:40 CEST
P.S. The remaining oddity is having to choose between "USB" and "HP Scanning and Printing (HPLIP)" in Add Printer after the printer has been found.

Why would anyone choose "USB" unless (as I did when I first saw the 2 options) one just sees "USB" and thinks "Yes, the USB printer", without bothering to read the other, wordy, option?

What is the point of having two options, apart from confusing the hell out of newcomers to Mageia?!

Why not just go ahead and install, without showing either option?

I recommend that!
Comment 27 Maurice Batey 2015-04-05 18:02:16 CEST
P.s
Comment 28 Maurice Batey 2015-04-05 18:03:31 CEST
(Ignore Comment 27 - finger trouble...

P.S. I confirm the installed printer was then acepted by HPLIP.
Comment 29 Martin Whitaker 2015-04-05 19:49:41 CEST
Good to know it works for you too. The next challenge is to attract the attention of a Mageia developer, to get the patches incorporated in Mageia 5.

I agree with your comment about having to choose between USB and HPLIP. I could maybe find a way to eliminate this, but we would need to get wider agreement that this is the right thing to do. You could try raising the subject on one of the mailing lists.
Comment 30 Manuel Hiebel 2015-04-06 00:00:10 CEST
Thanks guys, adding philippe and david which worked a bit on SCP recently

CC: (none) => luigiwalser, makowski.mageia

Florian Hubold 2015-04-06 16:21:21 CEST

CC: (none) => doktor5000

claire robinson 2015-04-07 12:54:56 CEST

CC: (none) => eeeemail, ennael1

claire robinson 2015-04-07 14:36:39 CEST

Keywords: (none) => PATCH

Comment 31 Philippe Makowski 2015-04-07 21:19:10 CEST
(In reply to Martin Whitaker from comment #18)
> For me, the only minor niggle left is that s-c-p automatically installs the
> simple-scan package when it detects a multi-function printer/scanner, but
> the Scan button in HPLIP is by default configured to call xsane, not
> simple-scan. But that should be a new bug.

certainly yes
we should apply Debian patch, feel free to submit the bug

#! /bin/sh /usr/share/dpatch/dpatch-run
## simple-scan-as-default.dpatch by  <till.kamppeter@gmail.com>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: No description.

@DPATCH@
--- a/base/utils.py
+++ b/base/utils.py
@@ -556,18 +556,21 @@
 
         # Scan
         self.cmd_scan = ''
-        path = which('xsane')
-
+        path = which('simple-scan')
         if len(path) > 0:
-            self.cmd_scan = 'xsane -V %SANE_URI%'
+            self.cmd_scan = 'simple-scan %SANE_URI%'
         else:
-            path = which('kooka')
+            path = which('xsane')
             if len(path) > 0:
-                self.cmd_scan = 'kooka'
+                self.cmd_scan = 'xsane -V %SANE_URI%'
             else:
-                path = which('xscanimage')
+                path = which('kooka')
                 if len(path) > 0:
-                    self.cmd_scan = 'xscanimage'
+                    self.cmd_scan = 'kooka'
+                else:
+                    path = which('xscanimage')
+                    if len(path) > 0:
+                        self.cmd_scan = 'xscanimage'
 
         # Photo Card
         path = which('hp-unload')
--- a/ui4/ui_utils.py
+++ b/ui4/ui_utils.py
@@ -141,7 +141,7 @@
 
 
     def loadDefaults(self):
-        self.cmd_scan = self.__setup(['xsane -V %SANE_URI%', 'kooka', 'xscanimage'])
+        self.cmd_scan = self.__setup(['simple-scan %SANE_URI%', 'xsane -V %SANE_URI%', 'kooka', 'xscanimage'])
         self.cmd_fab = self.__setup(['hp-fab'])
Comment 32 Maurice Batey 2015-04-09 19:46:53 CEST
Have just done an installtion of yesterday's classical 32-bit ISO on a laptop (real h/w), booting from a USB flash drive, I found system-config-printer unchanged from eartlier reports, and had to reboot after it had installed various printer package before it could find my USB HP printer.

 From Comment #8:
> as soon as I started SCP (and BEFORE hitting 'Add printer') it showed a 
> 'printer installed' icon for a USB HP1050 printer attached to a LAN PC in 
> another room!! 

  It's just done it again! Appeared in Add Printer immediately after reboot, and the printer was not even switched on...

There is a danger in this. Whereas in my case there is no confusion (as the attached printer is a different model), if all on the LAN had the same  model it would be quite easy to assume it was MY printer that had been installed, and total confusion would ensue! 
  It follows that a LAN printer should not be installed without an appropriate question being asked first...

Does this call for a separate Bug report?
Comment 33 David Walser 2015-04-09 19:52:25 CEST
With CUPS, you should automatically see other printers on the LAN.
Comment 34 Thomas Backlund 2015-04-09 20:31:35 CEST
Patches in comment 14, 15 and 16 applied in:

 system-config-printer-1.5.5-3.mga5

CC: (none) => tmb

Comment 35 Martin Whitaker 2015-04-09 20:34:27 CEST
(In reply to David Walser from comment #33)
> With CUPS, you should automatically see other printers on the LAN.

That always used to be the case though, for me at least, it was broken in Mageia 4.

Maurice, you can disable automatic sharing in s-c-p, either for individual printers, or for all printers connected to that machine. But I suggest that for most users, the default of automatically sharing printers is the preferred behaviour. Best thing is to give your printers individual names, rather than accepting the default name, then no confusion can arise.
Comment 36 Maurice Batey 2015-04-09 23:06:46 CEST
W.r.t. LAN printers. the really bizarre case I mentioned was where system-config-printer installed the LAN printer WITHOUT apparently finding the one plugged into the immediate computer.
  That's why I suggest it is utterly misleading to do that at a time when you primarily want one's OWN printer installed.
Comment 37 David Walser 2015-04-09 23:09:24 CEST
Automatic availability of CUPS LAN printers in printing dialogs has nothing to do with system-config-printer.  As far as adding printers in system-config-printer, it will only add whatever printers you explicitly ask it to.
Comment 38 Thomas Andrews 2015-04-10 03:54:17 CEST
Detection issue appears to have disappeared in the April 9, 2015 build of the Mageia 5 RC i586 Classical DVD. Printers now detected as expected, immediately after installing task-printing-server and task-printing-hp. 

Configured a Deskjet 5650 first, then powered up and configured an Officejet 6110. System-config-printer announced it wanted to install task-printing-hp along with the scanning software during the Officejet configuration, even though it was already installed. However, when told to go ahead it did not try to install packages that were already installed, so I believe that's a relatively minor issue.

CC: (none) => andrewsfarm

Comment 39 Thierry Vignaud 2015-04-10 06:36:14 CEST
Closing

Status: NEW => RESOLVED
Resolution: (none) => FIXED

Comment 40 Maurice Batey 2015-04-10 13:26:15 CEST
> Automatic availability of CUPS LAN printers in printing dialogs has nothing 
> to do with system-config-printer.  As far as adding printers in system-config-
> printer, it will only add whatever printers you explicitly ask it to.

  That is contrary to what I reported yesterday in Comment 36 above!

However, I now see that Thomas yesterday announced another ISO with a system-conf-printer update, so will hold off raising bug report for above until I've tried that ISO.
Comment 41 Maurice Batey 2015-04-10 14:09:00 CEST
P.S. I have a suspicion that the installation of the LAN printer occurs only in the case where a reboot is needed because system-config-printer cannot find the attached printer, in which case is there a possibility that - during the reboot and before s-c-p is restarted - CUPS gets in, finds the LAN printer and adds it to the 'printers' list, so that when s-c-p then starts it immediately finds the LAN printer entry and shows the icon, alongside the Add Printer button?
Comment 42 Maurice Batey 2015-04-10 19:22:01 CEST
Just installed the 9/4 32-bit Mageia-5RC classical ISO ((on real h/w (Legacy BIOS), from USB flash drive).

 Happy to say system-config-printer found the HP5520 in 5 seconds (already switched on), and speedily installed it. Furthermore, the printer was then accepted by HPLIP.

Still some tidying up is needed, though:

(1) It still installed 3 packages just for this printer, when earlier comments in here suggested they were redundant (as printer is geared to xsane).
    But presuambly no harm done, other than slowing the install down.

(2) It still presents the confusing and surely redundant option "USB" when it only makes sense to take the given 'HPLIP' alternative.
  So why not simply do the HPLIP thing without presenting any option at all?
That would make the install even slicker.
Comment 43 David Walser 2015-04-10 19:24:04 CEST
(In reply to Maurice Batey from comment #42)
> (2) It still presents the confusing and surely redundant option "USB" when
> it only makes sense to take the given 'HPLIP' alternative.
>   So why not simply do the HPLIP thing without presenting any option at all?
> That would make the install even slicker.

Because the USB option is needed for some printers?  Not every USB printer is an HP.
Comment 44 Maurice Batey 2015-04-10 19:49:54 CEST
> Not every USB printer is an HP.

  If it's not an HP USB printer, presumably the 'HPLIP' option is redundant, so there would be only one option, so no need to present ANY option?!
Comment 45 Thomas Backlund 2015-04-10 20:09:51 CEST
(In reply to Maurice Batey from comment #44)
> > Not every USB printer is an HP.
> 
>   If it's not an HP USB printer, presumably the 'HPLIP' option is redundant,
> so there would be only one option, so no need to present ANY option?!


It's about choice...

Not all hp printers actually need hplip to work...
Comment 46 Martin Whitaker 2015-04-10 21:25:25 CEST
(In reply to Thomas Backlund from comment #45)
> (In reply to Maurice Batey from comment #44)
> > > Not every USB printer is an HP.
> > 
> >   If it's not an HP USB printer, presumably the 'HPLIP' option is redundant,
> > so there would be only one option, so no need to present ANY option?!
> 
> 
> It's about choice...
> 
> Not all hp printers actually need hplip to work...

But Mageia insists on installing it anyway (even if you are not using a HP printer!). Would be nice to fix that, but that belongs in a separate bug report.
Comment 47 Maurice Batey 2015-04-10 21:39:03 CEST
> Mageia insists on installing it anyway (even if you are not using a HP 
> printer!).

  So if any make of printer can use it (but doesn't have to), then HPLIP can continue to be installed regardless, and there is STILL no need for the "USB" option - so why not get rid of it and just get on with the installation (instead of showing confusing options)?!
Comment 48 Thomas Backlund 2015-04-10 21:45:24 CEST
(In reply to Maurice Batey from comment #47)
> > Mageia insists on installing it anyway (even if you are not using a HP 
> > printer!).
> 
>   So if any make of printer can use it (but doesn't have to), then HPLIP can
> continue to be installed regardless, and there is STILL no need for the
> "USB" option - so why not get rid of it and just get on with the
> installation (instead of showing confusing options)?!

You miss the point... 

the installer cant read your mind if you want to configure it with hplip or not...

So it _has_ to ask ...

Pretty much like we ask if people want to use nonfree/proprietary drivers or not...
Comment 49 David Walser 2015-04-10 22:02:07 CEST
Also, there's a chicken and egg situation.  It can't know which types of printers you have *before* it detects them.
Comment 50 Maurice Batey 2015-04-10 22:09:08 CEST
> You miss the point... 

>the installer cant read your mind if you want to configure it with hplip or 
> not...   So it _has_ to ask ...

But there is no point, as it doesn't matter one iota if the HPLIP path is always followed, as there is no NEED for HPLIP to be used, but it ensures that HPLIP will accept the install. (Remember that choosing "USB" means it will not.)

How is a newcomer to Mageia to know how to choose between 'USB' and 'HPLIP'?
  He's liable to choose 'USB' if it is a USB printer, totally ignoring the HPLIP option and if then trying to use HPLIP will find it will not accept the installed printer.

I can just imagine e.g. a Linux Format review making the same point...

Personally I don't care what happens here, because I know how to get what I want, but why unnecessarily impose the status quo on those who may not?
Comment 51 David Walser 2015-04-10 22:12:04 CEST
Again, you can't just remove the USB option, as it is needed.  It can't magically know before it detects printers whether it's going to need that option.  It cannot just be removed.
Comment 52 David Walser 2015-04-10 22:12:58 CEST
Furthermore, your review comment is irrelevant, because this software is not specific to Mageia.  Pretty much every distro uses system-config-printer.
Comment 53 Maurice Batey 2015-04-10 22:59:38 CEST
> You can't just remove the USB option, as it is needed.  It can't magically 
> know before it detects printers whether it's going to need that option.  It 
> cannot just be removed.

What good is it to anyone?  Why would anyone choose it?

Perhaps we can tease this thing out by looking at it from a different perspective.

Let us imagine that we are taking an examination in which there is the following question in this particular context:

"There are 2 options from which to select when your printer had been detected:

    (1) 'USB'
    (2) 'Linux imaging and printing (HPLIP)'

  For each option, write an explanation of when and why it should be chosen.

Bear in mind that if (1) is selected, the 'HPLIP' (Print Manager) will ignore the installed printer, though that is of no importance if you were not planning to use HPLIP. 
  If you select (2), there is no requirement that you use HPLIP, though it will be available."

Any volunteers?
Comment 54 David Walser 2015-04-10 23:04:26 CEST
Stop with the circular arguments already.  Please reread Comment 43.

You're making no sense, please stop this discussion on a closed bug.
Thomas Andrews 2015-04-11 01:03:41 CEST

CC: andrewsfarm => (none)

Comment 55 Maurice Batey 2015-04-11 12:11:25 CEST
Comment 43:

> Because the USB option is needed for some printers?  
> Not every USB printer is an HP.

Please explain why the USB option is needed for 'some printers'!
=============================================================

This Bug was raised because (quote):

"HP Printer Manager (HPLIP) does not recognise HP printer installed by system-config-printer 'Add Printer' function"

and that problem can still arise because of the "USB" option, which - if selected - causes it.

I can only speak from experience with USB HP printers, as HP is the only make we have.

After s-c-p has installed a slew of printer packages (inluding HPLIP), its 'Add' function (now) soon pops up the info on my USB HP printer, and shows the 2 options "USB" and "<HPLIP>".

Now as at this point it has identified the attached printer as USB and HP, what is the point of the "USB" option?
  I know now that I need the HPLIP option (although earlier I had ignored it and assumed it wanted me to confirm 'Yes, the USB printer' and so hit the HPLIP 'no printer' buffer).

So as long as the confusing 'USB' option (in this situation) is still there, someone else (e.g.  newcomer to Mageia or even Linux) is going to repeat my earlier choice and start raising flak again. Do we really want that?

Given that s-c-p has identified an attached printer as USB & HP, the "USB" option is redundant and confusing, and as 'HPLIP' is the only sensible option the optimum thing to do is just go the HPLIP route without asking a confusing question.
  (It would be helpful to see - with other makes of printer - what kinds of options Add printer shows after finding an attached printer. )

In view of the above I do not feel the 'status quo' warrants a 'Resolved/Fixed' bug status, even though - happily - several other glitches have been removed in the process, for which I am sure we are all most grateful.
Comment 56 claire robinson 2015-04-11 14:35:35 CEST
The package is working as intended though Maurice. You'll need to discuss it's inner workings with the upstream developers. That goes beyond what Mageia can currently accomplish.

You can find upstream details for any package with "urpmq -i". In this case..

URL         : http://cyberelk.net/tim/software/system-config-printer/
Comment 57 Florian Hubold 2015-04-12 18:43:14 CEST
(In reply to Philippe Makowski from comment #31)
> we should apply Debian patch, feel free to submit the bug

> ## simple-scan-as-default.dpatch by  <till.kamppeter@gmail.com>

I had added this previously and prepared it to be enabled, has been removed from hplip in between:
http://svnweb.mageia.org/packages?view=revision&revision=638283

Should be easy to revert that, I'm also for simple-scan as the default, but that's not everyone's choice ...

Note You need to log in before you can comment on or make changes to this bug.