|
Bugzilla – Full Text Bug Listing |
| Summary: | cups: "lpinfo -m" may fail with "lpinfo: Unknown" or "lpinfo: Success" (but some time later it works) | ||
|---|---|---|---|
| Product: | [openSUSE] openSUSE 12.1 | Reporter: | Jean-Daniel Dodin <jdd> |
| Component: | Printing | Assignee: | Johannes Meixner <jsmeix> |
| Status: | VERIFIED UPSTREAM | QA Contact: | Johannes Meixner <jsmeix> |
| Severity: | Normal | ||
| Priority: | P3 - Medium | CC: | auxsvr, axel.braun, bg, forgotten_1m0ETF1Sqf, forgotten_gp-dpinp5x, forgotten_JtaKqlU8J9, hugo.costelha, jdd, joerg, jsmeix, novell.admin, pier_andreit, s.mroczek, stakanov, terjejhanssen |
| Version: | Factory | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | openSUSE 12.1 | ||
| Whiteboard: | |||
| Found By: | Community User | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
| Attachments: | yast2 logs | ||
|
Description
Jean-Daniel Dodin
2011-11-02 21:52:50 UTC
looks like I can't upload attachements - will try tomorrow (yast2 logs) yast2-printer works in "Strict Compliance With CUPS", see http://en.opensuse.org/Archive:YaST_Printer_redesign YaST shows the printer devices that "lpinfo -l -v" autodetects via /usr/lib/YaST2/bin/autodetect_printers and YST shows the PPDs that "lpinfo -l -m" finds via /usr/lib/YaST2/bin/create_printer_ppd_database You can run both scripts as root to verify what YaST gets. Created attachment 460183 [details]
yast2 logs
yast2 logs
well... no. first your modification of the subject is wrong. I could run Yast several times (and did) without it finding any ppd file. YaST could find the drivrs only after using cups, and cups found them at the first time. and, of course, now yast find all the drivers... this have nothing to do neither with the printer (yast, initially found no driver at all) I attach yast2logs, in hope you can find what happened at first :-( Your y2log contains two times: -------------------------------------------------------------------- 2011-11-02 16:43:52 <1> linux-zz28(9375) [YCP] Printerlib.ycp:66 Executing bash commandline: /usr/lib/YaST2/bin/create_printer_ppd_database >/var/lib/YaST2/printer_ppd_database.ycp 2011-11-02 16:44:22 <3> linux-zz28(9375) [bash] ShellCommand.cc(shellcommand):78 lpinfo: Unknown ... 2011-11-02 18:42:59 <1> linux-zz28(6238) [YCP] Printerlib.ycp:66 Executing bash commandline: /usr/lib/YaST2/bin/create_printer_ppd_database >/var/lib/YaST2/printer_ppd_database.ycp 2011-11-02 18:43:29 <3> linux-zz28(6238) [bash] ShellCommand.cc(shellcommand):78 lpinfo: Unknown -------------------------------------------------------------------- I have no idea what ShellCommand.cc(shellcommand):78 lpinfo: Unknown means. It looks like a crippled error message. For some reason YaST cannot run /usr/lib/YaST2/bin/create_printer_ppd_database correctly but later it can run it and then yast2-printer gets its PPDs. In the YaST sources there exists core/agent-system/src/ShellCommand.cc which contains "Author: Michal Svec <msvec@suse.cz>" I set needinfo from the ShellCommand.cc Author so that he could provide some information what ShellCommand.cc(shellcommand):78 lpinfo: Unknown actually means. Hi! I can commit this issue. I posted my effecte here: http://forums.opensuse.org/english/get-technical-help-here/hardware/468538-opensuse-12-1-yast-doesnt-show-any-printer-driver-bug.html It seems that Yast does not find ppd infos/files the first time when it was called. After setting up a printer via cups, the yast printer setup works as known from former opensuse distros! Regards Nukem36 I get it now on a new from scratch installed openSUSE 12.1
when I switch directly after the installation finished
to a system text console and there run as root:
# rccups status
redirecting to systemctl
cups.service - LSB: CUPS printer daemon
Loaded: loaded (/etc/init.d/cups)
Active: active (exited) since Fri, 25 Nov 2011 12:51:41 +0100; 15min ago
Process: 10493 ExecStart=/etc/init.d/cups start (code=exited, status=0/SUCCESS)
CGroup: name=systemd:/system/cups.service
# lpinfo -m
lpinfo: Unknown
#echo $?
1
Therefore this is not an issue in YaST because it is "lpinfo" itself
which returns with "lpinfo: Unknown" and non-zero exit code.
After a few minutes waiting "lpinfo -m" works.
In the CUPS 1.5.0 sources in systemv/lpinfo.c there is a few times
---------------------------------------------------------------------
_cupsLangPrintf(stderr, "lpinfo: %s", cupsLastErrorString());
...
return (1);
---------------------------------------------------------------------
Currently I don't know the root cause that lets lpinfo
initially fail with "lpinfo: Unknown".
*** Bug 734129 has been marked as a duplicate of this bug. *** *** Bug 736963 has been marked as a duplicate of this bug. *** I am using a laptop, thus just printing to remote printers. Although I can find the printer (samba), I am unable to add it because it cannot find any drivers. Any suggestion on what can I do in order to be able to print anything? After removing the package "manufacturer-PPDs" I was able to use YaST to configure the printer. *** Bug 748835 has been marked as a duplicate of this bug. *** I believe I have been experiencing this since 11.2. The first time I configure a printer, YaST2 can't find any printer drivers, even when attempting to list them all. Then, after manually supplying a PPD file from /usr/share/cups/model/ , it finds lots of printer drivers. The problem is fixed from now on. I have reproduced it under 12.1 x86-64, on one system using USB printing, and on another using IP printing. Both with the same printer, a Lexmark T522. PS please include a driver for the T522. I use the one for Lexmark Optra T610 and it seems to work okay. It would be more reassuring if the T522 were listed explicitly. I am afraid, I cannot debug it. I guess it is somewhere a timeout (perhaps related to cups-driverd) that lets "lpinfo -m" initially fail with "lpinfo: Unknown". I geuss that once after /var/cache/cups/ppds.dat exists (initially it does not exist and it needs time to build it) it is sufficiently fast so that the timeout does no longer happen. I guess it does not matter whatever one does (launch another printer setup tool, provide a PPD file manualle, whatever else...), I guess all what meatters is to wait some time. I cannot reproduce it neither with # rm /var/cache/cups/ppds.dat ; time lpinfo -m | grep -v ppd nor with # rccups stop ; rm /var/cache/cups/ppds.dat ; \ rccups start ; sleep 1 ; time lpinfo -m | grep -v ppd On my 3GHz 500MB i586 workstation the needed time is always about 7 seconds. On my 2GHz 4GB x86_64 workstation the needed time is always about 3 seconds. If I could reproduce the issue or if the error message was a tiny bit more informative than "Unknown"... After invalidating the file caches in memory it needs much more time but it still works for me: # sync ; sleep 10 ; sync ; echo 3 >/proc/sys/vm/drop_caches ; \ rm /var/cache/cups/ppds.dat ; \ time lpinfo -m 1>/dev/null && echo OK || echo FAIL On my 3GHz 500MB i586 workstation the needed time is now about 50 seconds. On my 2GHz 4GB x86_64 workstation the needed time is now about 40 seconds. I am running a 4 GHz quad core Phenom II with 8 GB of RAM.. and if this really is the explanation, then it's slow enough that the user needs some feedback to stop them from giving up and/or snapping their SUSE install disc and binning it. It could be as simple as the Microsoft flashlight scanning from side to side - anything to indicate that it's still busy. Simply reporting that there are no drivers is cause for aggravation. You can't save a partial config with no driver and come back to it, so after all this effort to configure the printer you don't want to give up, but it seems like you have to. I usually run the package manager at this point (without closing the printer configurator) and try to figure out what I'm missing, and then I see that I have all of the relevant packages. I check where the files are installed, because I will need one for the manual PPD entry. This still isn't enough time for the problem to be fixed all by itself, so I don't know whether to believe your explanation. It would be worth installing a minimal install into a virtual machine to prove that it fixes itself after a long enough time.. I don't believe that it does. I think the user has to trigger an event. *** Bug 755693 has been marked as a duplicate of this bug. *** Only a guess: See http://www.cups.org/newsgroups.php?s1+gcups.general+v2+T0+Q%22A+complex+problem%22 ----------------------------------------------------------------------------- ... cups 1.5.0 ... After that entered to web-interface and tried to add printer, but have got error "Unable to add printer: Unknown". Besides didn't work list of printers, list of groups (in web-interface) with the same error "Unknown". ... Updating to 1.5.2 helps ----------------------------------------------------------------------------- Perhaps this is http://www.cups.org/str.php?L3902 Perhaps the "Unknown" there is the same as the "Unknown" here and then upgrading to CUPS 1.5.2 from the openSUSE development project "Printing" might help. Carefully read https://build.opensuse.org/project/show?project=Printing Warning: I you use a non-English locale CUPS 1.5.2 has another issue, see bnc#755627 Users which use a English locale might upgrade to CUPS 1.5.2 from the openSUSE development project "Printing" to test whether or not the issue is gone in CUPS 1.5.2. no time to work on this Right now with CUPS 1.5.3 on my SLED-11-SP1 workstation a first run of yast2-printer got no PPDs/drivers listed and in /var/log/YaST2/y2log there is: ----------------------------------------------------------------------------- 2012-08-01 09:43:14 ... [YCP] Printerlib.ycp:66 Executing bash commandline: /usr/lib/YaST2/bin/create_printer_ppd_database >/var/lib/YaST2/printer_ppd_database.ycp 2012-08-01 09:44:14 ... [bash] ShellCommand.cc(shellcommand):78 lpinfo: Success ----------------------------------------------------------------------------- I closed yast2-printer and restarted it and then it works and in /var/log/YaST2/y2log there is no "lpinfo:..." message. Therefore it seems even with CUPS 1.5.3 the root issue is not solved but only the lpinfo message has changed from "lpinfo: Unknown" to "lpinfo: Success" regardless that actually lpinfo was not successful to produce the PPDs/drivers listing. I change the bug status from "wontfix" to "upstream" according to https://bugzilla.novell.com/page.cgi?id=fields.html#status In my case (oS 12.2 upgraded from 12.2), printer_ppd_database.ycp was empty even after repeated attempts at refreshing the driver list. After running /usr/lib/YaST2/bin/create_printer_ppd_database >/var/lib/YaST2/printer_ppd_database.ycp as root, then yast printer module, the driver list becomes populated, after Yast generates the list again! Perhaps some timer expires too soon? Berthold, if I remember correctly you told me that this issue also happened for you with SLE11-SP2 i.e. with CUPS 1.3.9 which would mean it is an very old issue in CUPS. *** Bug 795794 has been marked as a duplicate of this bug. *** *** Bug 856796 has been marked as a duplicate of this bug. *** *** Bug 900264 has been marked as a duplicate of this bug. *** Only FYI: It seems even CUPS 2.0 still has this issue sometimes, see https://www.cups.org/str.php?L4521 *** Bug 956875 has been marked as a duplicate of this bug. *** |