Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1772698
Summary: | Can't setup printer (HP LJ 2200): no attributes found in model.dat | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | azrdev <azrdev> | ||||||
Component: | hplip | Assignee: | Zdenek Dohnal <zdohnal> | ||||||
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||
Severity: | unspecified | Docs Contact: | |||||||
Priority: | unspecified | ||||||||
Version: | 30 | CC: | jridky, tkorbar, twaugh, zdohnal | ||||||
Target Milestone: | --- | Keywords: | Reopened | ||||||
Target Release: | --- | ||||||||
Hardware: | All | ||||||||
OS: | Unspecified | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | Doc Type: | If docs needed, set a value | |||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2020-10-04 20:23:51 UTC | Type: | Bug | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Attachments: |
|
Description
azrdev
2019-11-14 22:12:13 UTC
Hi, thank you for reporting the issue and investigating it! io/hpmud/model.c does the exact comparison of model and section, but it ignores the case - the problem is there is no section hp_laserjet_2200, but only hp_laserjet_2200_series, so it finds nothing. Would you mind testing the build https://koji.fedoraproject.org/koji/taskinfo?taskID=39012164 ? The patch there should take care of hpmud error message, but I'm not quite sure if it helps with installation - IMO prnt/drv/hpcups.drv.in will need to be patched too, but I would rather have smaller patch, if it will work. Thank you, the new build fixed the issue! After installing from https://koji.fedoraproject.org/koji/taskinfo?taskID=39012167 the packages hplip-3.19.10-2.fc30.x86_64.rpm hplip-common-3.19.10-2.fc30.x86_64.rpm hplip-libs-3.19.10-2.fc30.x86_64.rpm libsane-hpaio-3.19.10-2.fc30.x86_64.rpm the printer turns up as option "HP LaserJet 2200 USB 00FRHRC15973 HPLIP (HP LaserJet 2200)", all the logged errors (about models.dat) are gone. Reported upstream https://bugs.launchpad.net/hplip/+bug/1853002 . Thank you for the testing! The fix will be in the next hplip update. FEDORA-2019-722e4e3f0c has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2019-722e4e3f0c hplip-3.19.10-2.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-69e684dd40 hplip-3.19.10-2.fc31 has been pushed to the Fedora 31 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-722e4e3f0c hplip-3.19.10-2.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report. hplip-3.19.10-2.fc31 has been pushed to the Fedora 31 stable repository. If problems still persist, please make note of it in this bug report. This bug reappeared exactly as described above on fedora32 with packets: $ rpm -q hplip{,-common,-libs} libsane-hpaio hplip-3.20.6-1.fc32.x86_64 hplip-common-3.20.6-1.fc32.x86_64 hplip-libs-3.20.6-1.fc32.x86_64 libsane-hpaio-3.20.6-1.fc32.x86_64 setting to NEW, hope that's correct since there's no REOPENED. Hi, thank you for letting me know! Are you sure you are getting the same error messages? I tried to fake a device uri: hp:/usb/LaserJet_2200?serial=00FRHRC15973 with `hp-setup -i`, but I didn't get the error messages. Are you again not able to install printer via cups web ui and there are the same logs in journal? Would you mind trying 'hp-setup -i -ldebug' if it installs the printer? Please attach the logs after following steps here https://fedoraproject.org/wiki/How_to_debug_printing_problems#I_have_HP_printer_and_have_a_problem_with_HPLIP_script . Thank you in advance! @Zdenek thank you for getting back to me so quickly! Yes, the cups web interface doesn't list the printer in the "add printer" dialog. `hp-setup -i -ldebug` fails to recognize the printer, ans spews the following into the journal: > python3[2769773]: io/hpmud/model.c 546: no HP_LaserJet_2200 attributes found in /usr/share/hplip/data/models/models.dat > python3[2769773]: io/hpmud/model.c 557: no HP_LaserJet_2200 attributes found in /usr/share/hplip/data/models/unreleased/unreleased.dat > python3[2769773]: io/hpmud/musb.c 2129: ignoring hp:/usb/HP_LaserJet_2200?serial=00FRHRC15973 support=0 > python3[2769773]: io/hpmud/model.c 546: no HP_LaserJet_2200 attributes found in /usr/share/hplip/data/models/models.dat > python3[2769773]: io/hpmud/model.c 557: no HP_LaserJet_2200 attributes found in /usr/share/hplip/data/models/unreleased/unreleased.dat > python3[2769773]: io/hpmud/musb.c 2129: ignoring hp:/usb/HP_LaserJet_2200?serial=00FRHRC15973 support=0 > python3[2769773]: io/hpmud/model.c 546: no HP_LaserJet_2200 attributes found in /usr/share/hplip/data/models/models.dat > python3[2769773]: io/hpmud/model.c 557: no HP_LaserJet_2200 attributes found in /usr/share/hplip/data/models/unreleased/unreleased.dat > python3[2769773]: io/hpmud/musb.c 2129: ignoring hp:/usb/HP_LaserJet_2200?serial=00FRHRC15973 support=0 > /hp-setup[2769773]: hp-setup[2769773]: error: No device selected/specified or that supports this functionality. And the models.dat file still contains the section with _series suffix: > # grep -ri HP_LaserJet_2200 /usr/share/hplip/data/models :( > /usr/share/hplip/data/models/models.dat:[hp_laserjet_2200_series] I have no unreleased.dat file, if I (as a debugging hack) extract the [hp_laserjet_2200_series] section from models.dat into it under [hp_laserjet_2200] the printer is found by the web ui. @azrdev I have a testing build prepared - https://koji.fedoraproject.org/koji/taskinfo?taskID=49535010 Would you mind testing it? It is a scratch build, so it will be removed after 2-3 days, so please download rpms at least if you don't have time to test at the moment. FEDORA-2020-388083cf4d has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-388083cf4d FEDORA-2020-0fe6dfcdbf has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2020-0fe6dfcdbf FEDORA-2020-388083cf4d has been pushed to the Fedora 32 testing repository. In short time you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-388083cf4d` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-388083cf4d See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates. FEDORA-2020-0fe6dfcdbf has been pushed to the Fedora 31 testing repository. In short time you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-0fe6dfcdbf` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-0fe6dfcdbf See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates. The previous patch used uninitialized value as an index. Fixing again. FEDORA-2020-4967d78730 has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-4967d78730 FEDORA-2020-5109b7fe70 has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2020-5109b7fe70 FEDORA-2020-4967d78730 has been pushed to the Fedora 32 testing repository. In short time you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-4967d78730` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-4967d78730 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates. FEDORA-2020-5109b7fe70 has been pushed to the Fedora 31 testing repository. In short time you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-5109b7fe70` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-5109b7fe70 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates. FEDORA-2020-4967d78730 has been pushed to the Fedora 32 stable repository. If problem still persists, please make note of it in this bug report. FEDORA-2020-5109b7fe70 has been pushed to the Fedora 31 stable repository. If problem still persists, please make note of it in this bug report. Hello @Zdenek, sorry that it took me a while to get back to this, but I downloaded your scratch build from comment 12 in time. However, neither that build nor the now-current hplip-3.20.6-9.fc32.x86_64 do fix the issue: `sudo hp-setup -i -b usb` for both says "error: No device selected/specified or that supports this functionality." As before, adding the following file makes the command recognize the printer and proposing to add a queue: $ head /usr/share/hplip/data/models/unreleased/unreleased.dat [hp_laserjet_2200] align-type=0 clean-type=0 color-cal-type=0 copy-type=0 embedded-server-type=1 fax-type=0 fw-download=False ... Hi @azrdev, thank you for letting me know - I'll look into it. I would appreciate if you get here once a week at least, to answer my questions or test the builds - because it seems I'm not able to fake that I have your device :( . Please do following (have python3-debuginfo, python3-debugsource, hplip-debuginfo, hplip-libs-debuginfo, hplip-debugsource installed): 1) $ gdb /usr/bin/python3 Then in gdb: (gdb) set logging file gdb_log (gdb) set logging on (gdb) b hpmud_get_model_attributes (gdb) b ParseFile (gdb) r /usr/bin/hp-setup -i -b usb (gdb) c (gdb) p model (gdb) b 423 if strncmp(rcbuf, "[hp_laserjet_2200_series]\n", strlen("[hp_laserjet_2200_series]")) (gdb) c (gdb) p rcbuf (gdb) fin (gdb) q and please attach created gdb_log as an attachment. I tried to set 'model' in ParseFile() function to 'HP_LaserJet_2200' (model name from your logs) and then ParseFile() finds the entry... Hello Zdenek, I'll try to. I'm attaching the log as you requested. Created attachment 1716149 [details]
gdb_log of hp-setup
Damn me... (never rush thing before holidays...): 1) probably you will need glibc debuginfo installed too - otherwise I'm not sure about the message from the log: "Error in testing breakpoint condition: '__strlen_sse2' has unknown return type; cast the call to its declared return type" 2) from the steps I provided: The current - incorrect command: ... (gdb) b 423 if strncmp(rcbuf, "[hp_laserjet_2200_series]\n", strlen("[hp_laserjet_2200_series]")) ... The new correct one (we need to compare to 0, because we need to break when the string IS in the buffer): (gdb) b 423 if strncmp(rcbuf, "[hp_laserjet_2200_series]\n", strlen("[hp_laserjet_2200_series]")) == 0 I'm really sorry about this, would you mind correcting those two mistakes and reupload the debug log? Your corrected break condition also doesn't fire. I tried with `b 423 if strstr(rcbuf, "_2200")` and got the attached result. "value returned is 1" looks to me like it's correctly matching my printer to the models.dat entry, so the error has to be somewhere else. `dnf debuginfo-install glibc` was correct to get rid of the strlen_sse2 warning, though. Created attachment 1718003 [details]
gdb_log of hp-setup no.2
Hmm... if I run it in gdb, strncmp works for that breakpoint... anyway, thanks for finding out strstr() works!
Then it is really confusing... the return value of ParseFile() is checked in hpmud_get_model_attributes() and if the model isn't found, then the following message is generated:
> python3[2769773]: io/hpmud/model.c 546: no HP_LaserJet_2200 attributes found in /usr/share/hplip/data/models/models.dat
Do you still get such error messages in journal?
Indeed, sorry for not cross checking that! That message doesn't turn up in journal, but the printer appears on the "new printer" dialog on cups admin interface. So thank your for caring, this issue appears to be fixed now. |