Bug 1454 - Printer setup does not find HP printer
Summary: Printer setup does not find HP printer
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: i586 Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Florian Hubold
QA Contact:
URL:
Whiteboard:
Keywords: NEEDINFO
Depends on:
Blocks: 18367
  Show dependency treegraph
 
Reported: 2011-05-27 16:00 CEST by Wolfgang Bornath
Modified: 2016-05-06 13:34 CEST (History)
13 users (show)

See Also:
Source RPM: system-config-printer-1.3.14.mga1
CVE:
Status comment:


Attachments
hp-check log mga4 beta2 (13.21 KB, text/plain)
2014-01-05 11:47 CET, Bernd Deinzer
Details
new hp-check-log MGA4 beta 2 amd64 install dvd, no further updates (13.56 KB, text/plain)
2014-01-05 18:25 CET, Bernd Deinzer
Details
diagnostic output (8.04 KB, text/plain)
2015-03-04 23:44 CET, Thomas Spuhler
Details

Description Wolfgang Bornath 2011-05-27 16:00:53 CEST
Description of problem:

Fresh installation of Mageia Final (preview)

1. Printer is attached (USB) and running.
2. Clicked on MCC->Hardware->Printer configuration.
3. CUPs and dependencies (including hplip and gutenprint) were installed
4. Printer was not found automatically.
5. When searching for a printer the system was connected to the localhost but did not find any printer.

Checking hardware components in MCC I found the printer listed under "USB Mass Storage".

Printer: Photosmart C5100 series
Comment 1 Magnus Rasche 2011-05-27 19:22:51 CEST
try with no local firewall!?

CC: (none) => magnus.mud

Comment 2 Wolfgang Bornath 2011-05-28 10:41:45 CEST
No firewall in place here, thx for the idea.

But I tried something else: I disconnected the printer from the machine and re-connected it - a windows popped up, telling me that I may want to install task-printer, xsane and some other packages (all of them were already installed when I tried to set up the printer yesterday!).

By clicking on OK the system worked for some seconds (no packages were downloaded or installed). After that I started system-config-printer and let it search for a printer - now my printer was found and configured as usual. Test page printed, a page from Firefox printed. Even the scanner part is configured and working.

I will try to reproduce this with the next test installation.

CC: (none) => molch.b

Comment 3 Magnus Rasche 2011-05-28 12:23:59 CEST
off topc: is the translation (german) ok in syszem-config-printer?
Comment 4 Wolfgang Bornath 2011-05-28 13:00:37 CEST
Arf! You caught me here. I'll check again later today!
Christiaan Welvaart 2011-06-14 18:24:56 CEST

CC: (none) => cjw

Comment 5 Marek Laane 2011-06-14 18:40:07 CEST
Same for my old hpdeskjet 5550 - it was not detected at first, just after I disconnected and reconnected USB cable.
Comment 6 Ahmad Samir 2011-06-14 18:50:21 CEST
Looks like a udev issue.

Does the same problem happen after rebooting with the printer connected?
Comment 7 Wolfgang Bornath 2011-06-14 19:17:21 CEST
Your question is a bit unclear to me :(

Once the printer is configured it is available, no matter how often I reboot, this status does not change.

If you mean the unconfigured status:
My printer is connected all the time, even during installation. So, no, reboot after installation and/or updates did not change anything, for the printer to be recognized in inital printer setup I have to disconnect and reconnect.

BTW: Reproduced with official Mageia 1 (x86_64).
Comment 8 Ahmad Samir 2011-06-14 20:09:57 CEST
Yes, sorry, I meant after the printer is configured correctly, does rebooting break the setup again or does it continue to work?
Comment 9 Christiaan Welvaart 2011-06-14 20:47:37 CEST
IMO either coldplug doesn't work in which case it's a problem with udev, or the tool that pops up the window (harddrake?) only works when someone is logged in.
Comment 10 Wolfgang Bornath 2011-06-15 00:21:32 CEST
(In reply to comment #8)
> Yes, sorry, I meant after the printer is configured correctly, does rebooting
> break the setup again or does it continue to work?

It continues to work. 

Let me repeat the whole procedure:

The printer is switched on and connected all the time. 
After first reboot after the system installation I set the online media, do a first update of the system. 
Reboot again.
In MCC -> Haedware I select printer setup. The system tells me it is installing task-printing. Then some packages are installed, including hplips, gutenprint, cups, etc.

That's all.

Then I call CUPS in my browser, no printer configured. I click on "Add printer" but the system does not find a printer. I close CUPS.

Then I disconnect the printer and connect it again. Now a window pops up and tells me it is installing some packages (but it closes a few seconds later without showing that it really installs something)

Now I open CUPS again and add a printer: now the system recognizes the correct printer and starts downloading and installing some more packages, including sane packages, as my printer is a All-in-One.

After that printing is ok with all kinds of apps, the printer is also recognized as network printer by my other Mageia system.
  
Printer settings and availability is not lost at reboot.
Comment 11 Christiaan Welvaart 2011-06-15 01:54:40 CEST
It looks like udev may be configured by system-config-printer to run 
 /lib/udev/udev-configure-printer add <device path>

Can you find anything about udev-configure-printer in the syslog from a first boot, before unplugging the printer?
Comment 12 Wolfgang Bornath 2011-06-15 03:23:23 CEST
Did a vanilla KDE installation from DVD (x86_64).

First reboot after installation:
syslog only states that it's starting

 - setting up media
 - starting system-config-printer in MCC
 - - installs 32 packages

After this a window of MCC opens to add a printer - printer is not found.

syslog says:
--------------------------------------------------
kernel: lp: driver loaded but no devices found
kernel: ppdev: user-space parallel printer port driver
udev-configure-printer: add /module/lp
udev-configure-printer: Failed to get parent
hp[5465]: io/hpmud/musb.c 2035: invalid usb_open: Permission denied
pathon: io/hpmud/musb.c 2035: invalid usb_open: Permission denied
-----------------------------------------------------

Disconnecting printer, reconnecting.

At disconnecting, syslog says:
----------------------------------------------
udev-configure-printer: remove /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1.1.3
-----------------------------------------------

Then follows the usual messages about new usb device with correct data, mtp-probe is successful, udev-configure-printer shows the same data as it showed when disconnecting, now it shows the correct parent devpath, etc.. Then the usual additional messages with printer model and all the rest follows.

Hope this helps :)
Comment 13 Marja Van Waes 2011-10-14 21:11:42 CEST
@ Wobo,

Sorry for taking so long to reply.

Is the issue still there in current cauldron or mageia 1 ?

Keywords: (none) => NEEDINFO
CC: (none) => marja11

Florian Hubold 2011-11-01 12:52:25 CET

Status: NEW => ASSIGNED
CC: (none) => doktor5000
Assignee: bugsquad => doktor5000

Helge Hielscher 2011-12-15 12:21:57 CET

CC: (none) => hhielscher

Comment 14 D Morgan 2011-12-18 14:23:57 CET
is system-config-printer-applet started ?

CC: (none) => dmorganec

Comment 15 Marja Van Waes 2012-05-26 13:04:08 CEST
Hi,

This bug was filed against cauldron, but we do not have cauldron at the moment.

Please report whether this bug is still valid for Mageia 2.

Thanks :)

Cheers,
marja
Comment 16 Florian Hubold 2012-08-12 16:27:53 CEST
Closing as OLD due to no more replies. FWIW, many problem with system-config-printer and hplip have been fixed in between.

Status: ASSIGNED => RESOLVED
Resolution: (none) => OLD

Comment 17 Robert Fox 2013-10-28 07:37:46 CET
Problem has returned in latest Cauldron as of yesterday:

Oct 28 07:33:16 foxmain hp[3835]: io/hpmud/musb.c 2073: Invalid usb_open: Permission denied
Oct 28 07:33:16 foxmain python[3841]: io/hpmud/musb.c 2073: Invalid usb_open: Permission denied
Oct 28 07:33:16 foxmain udev-configure-printer[3818]: no corresponding CUPS device found

Seems to be the same issue -

Cheers,
R.Fox

Status: RESOLVED => REOPENED
CC: (none) => rfox
Resolution: OLD => (none)

Comment 18 Florian Hubold 2013-11-05 21:18:44 CET
Which groups does your user belong to?

Anyway, this seems like a rare issue, the only other report I see about this is from wobo, and that was fixed after Mageia 2 was released.
Comment 19 Robert Fox 2013-11-06 14:26:35 CET
My user (rfox) is in the following groups:

[rfox@foxmain ~]$ groups
rfox vboxusers

Am I missing a group?
Comment 20 Manuel Hiebel 2013-11-06 16:41:15 CET
lpadmin ? (I don't know this issue)
Comment 21 Bernd Deinzer 2013-11-17 21:01:33 CET
This is not a rare problem. Had this since Mandriva 2009 with a HP 3520. Only disconnecting and reconnecting worked. Now with M4b1 even that won't work

User is in groups lp, usb, lpadmin, vboxusers ... nope ..
Copied etc/cups from a working Mageia3 to the Mageia4 Beta 1 .... nope ...

Printing works via a Mageia2 as Virtualbox Guest ... so this seems not to be a general usb problem (?)

Next Printer will be a network printer ...

CC: (none) => bernd.deinzer

Comment 22 Florian Hubold 2014-01-05 11:10:45 CET
Can you check the hp-check output for issues on that M4 install?
Comment 23 Bernd Deinzer 2014-01-05 11:47:01 CET
Created attachment 4716 [details]
hp-check log mga4 beta2

hp check log MGA4beta2 Jan 6
Comment 24 Bernd Deinzer 2014-01-05 11:50:44 CET
After a CUPS update at the end of November, the printer works when copying an old /etc/cups back. Recognizing the printer didn't work then (as usual :-) ).

Next  week I will get a new pc (hopefully) so I can try again with a fresh MGA4 B2 Installation from DVD.
Comment 25 Florian Hubold 2014-01-05 14:58:17 CET
(In reply to Bernd Deinzer from comment #23)
> Created attachment 4716 [details]
> hp-check log mga4 beta2
> 
> hp check log MGA4beta2 Jan 6

Are you sure you installed hplip via the Mageia packages? cups and dbus seems not running, and many of the required packages are not installed. There are basic issues with your installation unrelated with hplip, please first fix those.
Comment 26 Bernd Deinzer 2014-01-05 18:22:32 CET
(In reply to Florian Hubold from comment #25)

> Are you sure you installed hplip ...

Yes. It was a normal amd64 install dvd. Cups and dbus were up & running, but hp-check didn't think so .... 

But nevertheless, I did a system-backup and installed a fresh MGA4B2 from the amd64 install dvd.

Installed a minimal system with LXDE, didn't do any updates. Tried to install the printer via harddrake. The necessary additional packages (task-printing, etc..) were loaded from the dvd. Then tried to add the printer ... nope ... not recnognised. Tried the old disconnect-connect game, and now, with Beta2, this worked. Could install the printer, which worked without problems. 

Did a hp-check again - and as you will see, nearly the same cups errors as with Beta1. I will  atach the new hp-check-log in a few minutes.

cheers,
Bernd
Comment 27 Bernd Deinzer 2014-01-05 18:25:27 CET
Created attachment 4719 [details]
new hp-check-log MGA4 beta 2 amd64 install dvd, no further updates
Comment 28 Florian Hubold 2014-01-05 18:59:23 CET
Did you run that as root? That would explain the missing dbus session.
Comment 29 Bernd Deinzer 2014-01-05 19:27:18 CET
(In reply to Florian Hubold from comment #28)
> Did you run that as root? That would explain the missing dbus session.

No, I did run it as user (bernd).
Comment 30 Maurice Batey 2015-01-09 18:44:16 CET
I have been having the same problem here with Mageia-5-Beta1 & 2.

Source RPM = system-config-printer-1.5.4-1.mga5.src.rpm

MCC/Hardware/Config printers knows there is an HP printer there (installs HPLIP) but fails to 'find' HP5150 printer.

However, if I use HPLIP (HP Device Manager), thzt does install the printer properly, and MCC/Hardware/Printers does then show it, and it works...

CC: (none) => maurice

Comment 31 Maurice Batey 2015-01-24 16:02:30 CET
> MCC/Hardware/Config printers knows there is an HP printer there (installs 
> HPLIP) but fails to 'find' HP5150 printer.

Same with my new HP5520 printer now. HPLIP does the job nicely.

Could MCC not simply call HPLIP, perhaps, if it is struggling otherwise?
Comment 32 Maurice Batey 2015-01-24 16:04:38 CET
P.S. That was Mageia-4!  Will check Mageia-5B2...
Comment 33 Maurice Batey 2015-01-24 16:21:19 CET
Same problem with Mageia-5B2. 
  Finds no USB printer. No problem with HPLIP.
Comment 34 Maurice Batey 2015-02-01 20:46:19 CET
Mageia-5-Beta3:
Still problems installing USB HP printer in MCC/Hardware/Printers: 
  This time, although MCC/Hardware/Printers did (about a minute after switching printer on) find the HP5220 and appearedy to install it,  but then HPLIP (HP Print Manager) insisted "No printer found"!  
  Solution was to delete the printer that MCC/Hardware/Printer had installed, and allow HPLIP to re-install it, after which it all worked...
Comment 35 Maurice Batey 2015-02-13 17:04:51 CET
> but then HPLIP (HP Print Manager) insisted "No printer found"!  

  See:  https://dl.dropboxusercontent.com/u/10969499/hplip-screenshot.png

system-config-printer is slow to find the printer, some 30 seconds after switching the printer on.

One way to clean the whole siuation up might be for simply for system-config-printer to call HPLIP, abd let that do the install...
Comment 36 Thomas Spuhler 2015-03-04 23:43:28 CET
Let my hijack this. I just installed mga5B3 and did all updates. I then wanted to install my wireless network printer using HPLIP. It didn't find any printer until I added the printer's IP address manually. It's a Photosmart_C4380. after installation, the printer works fine. (I remember an earlier version of Mageia di find it, but I cannot remember which one)
I then did a diagnostic just for the fun of it and got this output (attachment HP-diagnostic.txt). I think this package certainly needs some love.

CC: (none) => thomas

Comment 37 Thomas Spuhler 2015-03-04 23:44:55 CET
Created attachment 5991 [details]
diagnostic output
Comment 38 Maurice Batey 2015-03-05 10:18:54 CET
> I then wanted to install my wireless network printer using HPLIP. It didn't 
> find any printer until I added the printer's IP address manually.

Mmm. My experience is that although HPLIP says 'No printer found' even after system-config-printer has just been persuaded to install it, it then has no problem (re-)installing it - i.e. no need to provide IP address - and then it appears in MCC/Hardware/Printers alongside the one s.c.p. installed.

In the light of this experience, I find it simpler to just use HPLIP in the first place, but then how is the newcomer to Mageia to know that?!
Comment 39 Maurice Batey 2015-03-19 14:43:19 CET
Perhaps the simplest/neatest fix would be for system-config-printer - after 
installing various print packages and HP utilities (having identified the 
printer as HP) - to then call e.g. hp-setup to do the actual printer install?
Comment 40 Thomas Andrews 2015-03-24 19:42:01 CET
I have found this bug in the Mageia 5 Beta 3 and RC i586 installs, as well as Mageia 4 Official. Wouldn't doubt if I saw it in Mageia 3 too - don't remember. It affects my HP Deskjet 5650 and Officejet 6110, both connected via usb.

The procedure is the same as described in the opening comment. However, I have discovered that if a full reboot is done and then one returns to system-config-printer with the printer turned on, HP usb printers are then detected and can be configured. From then on, they work as they should.

CC: (none) => andrewsfarm

Comment 41 Thomas Andrews 2015-03-24 20:53:15 CET
One other thing... A 64-bit install from one of the Mageia 5 RC DualDVDs did NOT require a reboot before the printers were detected.

I have a thought - will try to install a Classical i586 Mageia 5 RC KDE install from USB rather than from DVD, and see if that makes a difference.
Comment 42 Thomas Andrews 2015-03-25 13:12:31 CET
No difference. I didn't expect one, but it seemed like something to try, anyway.
Comment 43 Maurice Batey 2015-03-26 19:15:12 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 44 Thomas Andrews 2015-03-27 21:21:14 CET
Hmmm. Sounds to me like maybe system-config-printer needed to be restarted AFTER the task-printing-server and task-printing-hp metapackages were installed before it would work.

With that in mind, I'll try installing Classical Mageia 5RC yet again, and this time install those two task-printing metapackages with urpmi before trying to configure the printer, and see what happens. Might take a while, though.
Comment 45 Thomas Andrews 2015-03-27 23:31:34 CET
OK, no reboot needed, but I did have to start system-config-printer more than once before printers were detected.

I installed task-printing-hp with urpmi, which also installed task-printing-server, made sure my Deskjet 5650 was turned on, then went to system-config-printer, where I found the "Add" button grayed out and non-functional. Left and came back, same thing. Left again, turned on my Officejet 6110 while leaving the 5650 on, went back, and the "Add" button functioned. The Officejet that I had just turned on was detected, but not the 5650. Left again, turned the 5650 off and back on, then went back and this time all printers were detected.

Hope this helps.
Comment 46 Maurice Batey 2015-03-31 17:30:45 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 47 Thomas Andrews 2015-04-03 02:23:07 CEST
With the latest Classical i586 RC, acting same as before. Seems to need to install the task-printing-software, then run the scan to add a printer. No usb printers detected. Then needs to close system-config-printer, turn on the HP usb printer, start system-config-printer again, click on Add, and printer is detected.

So it works, eventually, but it isn't intuitive.
Comment 48 Maurice Batey 2015-04-03 14:48:32 CEST
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 49 Florian Hubold 2015-04-06 15:19:10 CEST
Guys, feel free to discuss this forever and post more testing results, but unless somebody with a HP printer and some python/udev knowledge analyses this issue and proposes some workarounds/solutions or posts some patches, this is going nowhere.
Comment 50 Maurice Batey 2015-04-06 15:28:35 CEST
See https://bugs.mageia.org/show_bug.cgi?id=15549
Comment 51 Thomas Andrews 2015-04-06 15:43:48 CEST
Point taken, Florian. You'll see nothing more from me on the subject, as I lack the necessary skills. Same thing for other bugs. I will report bugs I think I see, but that's as far as it'll go unless more information is requested.
Thomas Andrews 2015-04-07 00:42:23 CEST

CC: andrewsfarm => (none)

Comment 52 Thomas Andrews 2015-04-10 03:41:23 CEST
Detection problem appears to have disappeared in the April 9, 2015 Mageia 5 RC i586 Classical DVD build.

CC: (none) => andrewsfarm

Comment 53 Florian Hubold 2015-04-12 18:59:10 CEST
Derek's patches from bug 15549 have been applied at that time:
https://bugs.mageia.org/show_bug.cgi?id=15549#c34

If somebody else can confirm I'd propose to close this one, too.

@Claire: Anybody in QA team with an HP printer who could test autodetection after printer plugin, either in live mode or in installed system?

CC: (none) => eeeemail

Comment 54 Marja Van Waes 2016-05-05 14:50:57 CEST
(In reply to Florian Hubold from comment #53)
> Derek's patches from bug 15549 have been applied at that time:
> https://bugs.mageia.org/show_bug.cgi?id=15549#c34
> 
> If somebody else can confirm I'd propose to close this one, too.
> 
> @Claire: Anybody in QA team with an HP printer who could test autodetection
> after printer plugin, either in live mode or in installed system?

Assuming this did indeed get fixed, closing

Status: REOPENED => RESOLVED
Blocks: (none) => 18367
Resolution: (none) => FIXED

Comment 55 Maurice Batey 2016-05-06 12:51:04 CEST
Here on fully-updated 64-bit Mageia-5, the HP Device Manager still fails to find the installed  printer, although if I select its 'CUPS Web Interface' option that does find and handle the HP5520...

    Source RPM  : hplip-3.15.11-1.mga5.src.rpm

Later today I will check printer installation on my recent Mageia-6-sta1 install.
Comment 56 Maurice Batey 2016-05-06 13:34:40 CEST
> Later today I will check printer installation on my recent Mageia-6-sta1 
> install.

  Installed HP5520 via MCC/Hardware, selecting the 'HPLIP' option (not 'USB').
It found the printer, installed it - along with various HP & CUPS packages - and it prints.

BUT, although the HP Device Manager finds the HP5520, it cannot show e.g. supply levels, because of "Communication error". Tried switching printer off/on.

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