[Bug 469721] New: scanner found because hplip provides wrong fdi files
https://bugzilla.novell.com/show_bug.cgi?id=469721 Summary: scanner found because hplip provides wrong fdi files Classification: openSUSE Product: openSUSE 11.1 Version: Final Platform: Other OS/Version: openSUSE 11.1 Status: NEW Severity: Normal Priority: P5 - None Component: Printing AssignedTo: jsmeix@novell.com ReportedBy: cstender@novell.com QAContact: jsmeix@novell.com Found By: --- User-Agent: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.0.5) Gecko/2008121300 SUSE/3.0.5-1.1 Firefox/3.0.5 When I boot into a fresh installed openSUSE 11.1 and connect my HP Deskjet 6540 I get two SusePlugger popup windows. Strangely the first one says that a scanner was found and asks me if I want to configure it. The HP is a printer only and no all-in-on device or something like this. I searched for 'scanner' in the output of lshal and found the following: udi = '/org/freedesktop/Hal/devices/usb_device_3f0_8204_MY47D2R0X7040N_if0' access_control.file = '/dev/bus/usb/001/008' (string) access_control.type = 'scanner' (string) info.callouts.add = {'hal-acl-tool --add-device'} (string list) info.callouts.remove = {'hal-acl-tool --remove-device'} (string list) info.capabilities = {'scanner', 'access_control'} (string list) info.linux.driver = 'usblp' (string) info.parent = '/org/freedesktop/Hal/devices/usb_device_3f0_8204_MY47D2R0X7040N' (string) info.product = 'USB Printer Interface' (string) info.subsystem = 'usb' (string) ... The culprit seems to be the following entry in /usr/share/hal/fdi/information/20thirdparty/70-hpmud.fdi: <match key="info.subsystem" string="usb"> <match key="usb.vendor_id" int="0x03f0"> <match key="usb.product_id" int="0x8204"> <append key="info.capabilities" type="strlist">scanner</append> </match> </match> </match> These are exactly the vendor and product ids for my printer.. Reproducible: Always Steps to Reproduce: 1. Install a fresh openSUSE 11.1 2. Connect the HP Deskjet 6540 to your computer -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=469721 User jsmeix@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=469721#c1 Johannes Meixner <jsmeix@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |WONTFIX --- Comment #1 from Johannes Meixner <jsmeix@novell.com> 2009-01-27 06:44:26 MST --- Simply ignore unwanted SusePlugger popups. As far as I know it does not use 70-hpmud.fdi. As far as I know it works on whatever else data. As far as I know the SusePlugger stuff is basically only a best-guess and cannot work correctly in any case. For all HP devices you do want to have read/write permissions for "desktop" users by default (whic is granted via 70-hpmud.fdi) because even for a plain printer a usual "desktop" user may like to get the device status via hp-toolbox, see https://bugs.launchpad.net/ubuntu/+source/hal/+bug/195782/comments/58 For background information have a look at https://bugs.launchpad.net/bugs/195782 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=469721 User cstender@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=469721#c2 --- Comment #2 from Christopher Stender <cstender@novell.com> 2009-01-27 09:46:45 MST --- Well, I guess that SusePlugger get this information from hal and the data in hal is not correct because of the wrong fdi file. I've no clue why the info.capabilities is always set to 'scanner'. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=469721 User jsmeix@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=469721#c3 --- Comment #3 from Johannes Meixner <jsmeix@novell.com> 2009-01-28 01:31:30 MST --- info.capabilities is always set to 'scanner' because this is the only working value which is currently available for me (nothing would happen if I set info.capabilities to 'printer') and because I do not know which device is - a plain printer - a plain scanner - a printer + scanner all-in-one device - a printer + scanner + fax all-in-one device - a printer + scanner + cardreader all-in-one device - a printer + scanner + fax + cardreader all-in-one device and because there are devices which are basically a plain printer but an extension scanner unit is available which makes it a printer + scanner all-in-one device but the USB ID would not change so that it is not possible to add 'scanner' automatically when such a plain 'printer' device was upgraded to a printer + scanner all-in-one device. I appreciate your help to generate better HAL fdi files where all devices get the exact right info.capabilities assigned - just have a look at the sane-backends and hplip packages how it is done now so that you could povide patches how to generate better HAL files. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=469721 User jsmeix@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=469721#c5 --- Comment #5 from Johannes Meixner <jsmeix@novell.com> 2009-01-28 01:39:13 MST --- I wonder if SusePlugger knows if a device is already configured or not to avoid an annoying usless popup for already configured devices. For scanners we have the sane-backends-autoconfig RPM and /etc/udev/rules.d/55-hpmud.rules in the hplip RPM which do a full automated setup for many USB scanner models. For printers we have cups-autoconfig which does a full automated setup for any USB printer model if it can find a matching driver for it automatically. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=469721 User dkukawka@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=469721#c6 Danny Kukawka <dkukawka@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|WONTFIX | --- Comment #6 from Danny Kukawka <dkukawka@novell.com> 2009-01-28 08:10:30 MST --- (In reply to comment #1)
Simply ignore unwanted SusePlugger popups. As far as I know it does not use 70-hpmud.fdi. As far as I know it works on whatever else data. As far as I know the SusePlugger stuff is basically only a best-guess and cannot work correctly in any case.
That's not correct. If you take a look at the source (kdebase3-suse) suseplugger ask hal to find out what kind of device was added to the machine. In this case the information in 70-hpmud.fdi is used and it's clearly wrong, since the device is a printer and not a scanner. (In reply to comment #3)
info.capabilities is always set to 'scanner' because this is the only working value which is currently available for me (nothing would happen if I set info.capabilities to 'printer')
There is already a printer namespace in HAL (http://people.freedesktop.org/~dkukawka/hal-spec-git/hal-spec.html#device-pr...). The only problem was that there was no ACL/PolicyKit rule/policy. I've added the needed stuff to git (which grand access for active users to printer.device, which need to be set via a fdi file (e.g. copy it from the parent device)) and it will be in the next SLE11/openSUSE hal package/update. IMO the 70-hpmud.fdi is plain incorrect/buggy if there is no way to differ between pure scanner and printer devices (not sure atm what to do with combo devices, depends if there are different /dev/* devices for the scanner and the printer). -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=469721 User jsmeix@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=469721#c7 Johannes Meixner <jsmeix@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution| |WONTFIX --- Comment #7 from Johannes Meixner <jsmeix@novell.com> 2009-01-28 08:43:42 MST --- As long as we are not "sure what to do with combo devices" I cannot do anything here. I get the data from the upstream projects as is. I can only use it as is. I cannot do anything else here. I am not a mastermind who magically knows which exact sub-devices whatever USB ID provides. All I can do is to replace the too specific value 'scanner' with a value (choose what you like) which is o.k. for the superset of - a plain printer - a plain scanner - a printer + scanner all-in-one device - a printer + scanner + fax all-in-one device - a printer + scanner + cardreader all-in-one device - a printer + scanner + fax + cardreader all-in-one device If you provide me such a value e.g. 'desktop-peripheral' which gets an ACL set as currently for a 'scanner', I can replace 'scanner' with it. This matches that all those 'desktop-peripheral' devices get the group "lp" assigned (i.e. are treated the same on the traditional group layer) see sane-backends.spec: ------------------------------------------------------------- There is no group "scanner" in /etc/group for openSUSE. For all-in-one devices (i.e. printer + scanner, e.g. "EPSON Stylus" devices) the group must be "lp" so that the CUPS usb backend which runs as user "lp" (who is member of the group "lp") can send printing data to the printer unit (i.e. the printer interface of the USB device). It is sufficiently secure and reasonable easy to use by default the same group "lp" for printers and scanners because both kind of devices usually require physical user access (to get the printed paper or to place a paper on the scanner) so that both kind of devices should usually require the same kind of security. ------------------------------------------------------------- I close it again as WONTFIX in openSUSE 11.1 (what we might do for openSUSE 11.2 is another issue) because: --------------------------------------------------------- The problem could be fixed, but the cost for the fix (the amount of work involved) would be enormous. It would be an economic nightmare to do the fix. This would really be a status TOOEXPENSIVE that Bugzilla does not provide. --------------------------------------------------------- compare http://en.opensuse.org/Bug_Status_WONTFIX -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=469721 User dkukawka@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=469721#c8 --- Comment #8 from Danny Kukawka <dkukawka@novell.com> 2009-01-28 09:44:40 MST --- IMO there should be a way to fix at least those devices which are reported to be a pure printer (and not a scanner) since the information the fdi file provides has been proven to be invalid/wrong. I guess atm there will be no superset for those combo devices. It makes IMO no sense to simply replace all scanner devices in this file with some kind of superset which mark them as desktop-peripheral while we can know that they are pure scanner or printer. You can add the scanner _and_ printer capabilities (and also the related namespace information) to the hal device for a combo device. If they have different USB devices for the scanner and the printer (and e.g. different /dev/* devices) in HAL there should be absolutely no problem. The only little problem is may info.category and the ACL rules (ACL shouldn't be a problem since they have both the same default settings), but we can find a solution for this. IMO the fax or cardreader stuff shouldn't be a problem, I guess they get exposed as extra devices which can get identified as cardreader and modem. If I check the libsane hpaio backend info (sane-backends-1.0.19/doc/descriptions-external/hpaio.desc), I can guess all these devices are at least scanner or combo devices which have a scanner (since sane is for scanner). This mean there is a big chance that all other devices in 70-hpmud.fdi are plain printer, or is this assumption wrong? There should be a way to diff them and mark them as printer. Btw. There should be a way to get in contact with HP (or to search the web) to find out which devices are pure printer, scanner ... . -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=469721 User jsmeix@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=469721#c9 Johannes Meixner <jsmeix@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jsmeix@novell.com, | |lnussel@novell.com --- Comment #9 from Johannes Meixner <jsmeix@novell.com> 2009-01-29 01:38:22 MST --- Again and again (read my comments above!): I do not know if a USB ID is - a plain printer - a plain scanner - a printer + scanner all-in-one device - a printer + scanner + fax all-in-one device - a printer + scanner + cardreader all-in-one device - a printer + scanner + fax + cardreader all-in-one device I get the data from the upstream projects as is. I can only use it as is. I cannot do anything else here. According to comment #8 it seems you can distinguish it? Because you wrote "we can know that they are pure scanner or printer" and as I already wrote that I do not know this, it must be you who knows it? None of the all-in-one devices which I have ever seen has multiple USB devices (i.e. multiple /dev/bus/usb/*/* device nodes). Epson all-in-one devices usually provide their different units as different USB interfaces so that on USB interface level one can theoretically distinguish the printer unit from the scanner unit from whatever else unit. But I do not have any information on the USB interface level about this devices (except the one Epson all-in-one device which I have for my tests where I can run "lsusb -v"). HP all-in-one devices do not provide their different units via different USB interfaces. For HP all-in-one devices the access happens via the MLC/1284.4 transport protocol which was developed as an enhancement for the parallel port to access multiple units of a all-in-one device via parallel port which requires the ECP mode for the parallel port, see http://hplipopensource.com/node/128 HP all-in-one device access via USB is done as some kind of "emulated parallel port access via USB". HP all-in-one devices also provide different USB interfaces but those differ regarding the parallel port mode, for example my HP LaserJet 1220 printer + scanner has: --------------------------------------------------------------------- idVendor 0x03f0 Hewlett-Packard idProduct 0x0417 LaserJet 1200 series .. bInterfaceClass 7 Printer bInterfaceSubClass 1 Printer bInterfaceProtocol 3 IEEE 1284.4 compatible bidirectional .. bInterfaceClass 7 Printer bInterfaceSubClass 1 Printer bInterfaceProtocol 2 Bidirectional .. bInterfaceClass 7 Printer bInterfaceSubClass 1 Printer bInterfaceProtocol 1 Unidirectional --------------------------------------------------------------------- I.e. there are only "Printer" interfaces even when this particular device has actually also a scanner unit. The device access happens always via a "Printer" interface to the "full device" and the MLC/1284.4 transport protocol distinguishes then if the printer unit or the scanner unit (or whatever else unit) is actually meant. Therefore it is not possible at all to distinguish the different units in a HP all-in-one device via whatever USB information. Regarding access policy: (I added Ludwig Nussel to Cc for expert knowledge if needed) When we used resmgr in the past there was actually only one kind of access: The "desktop" access which grants read/write access to the whole device for locally logged in users. Regardless that resmgr knows about different group names or device types (or whatever this stuff was called) in the end all was mapped to the "desktop" access policy. It is exactly what a normal user expects regarding default out-of-the-box device access permissions: When he has a device on his desktop (USB devices are usually located next to the computer) he expects to have access permissions for the whole device by default. A user would not understand if he would be only allowed to print but not allowed to get the printer device status (see above - even plain HP printers need by default read/write access for the whole device according to our default access policy - i.e. for "desktop" users). And this is exactly what I can provide with my knowledge and what the upstream projects provide with their data: The USB IDs for the whole devices and nothing more. Therefore I can generate lists in any syntax you like (I only would really like if the syntax was stable) which provide the USB IDs for the whole devices. Then whatever subsystem you like (I don't care if it is resmgr or HAL or whatever successor of HAL) can provide our default out-of-the-box device access permissions. Note the difference: It is perfectly fine when resmgr or HAL or whatever else provides functionality to do a manual fine-tuning of the device access permissions via manual editing of whatever config files. But in contrast it would be a horrible overcomplicated oversophisticated nightmare when I should provide fine-tuned default out-of-the-box device access rules. Actually this would be totally impossible for me (see my comments above!). Regarding HAL: I would really like to understand why HAL related issues become too often horrible complicated nightmares, e.g.: bug #462639: After long and laborious work it was in the end a bug in hal which is solved by a simple hal update. bug #438867: Also long and laborious work and I was unable to find the reason in HAL because it is so complicated. See the "More precisely" part at https://bugzilla.novell.com/show_bug.cgi?id=438867#c54 what I would like to have. Unfortunately HAL does not provide this. HAL provides something else which is from my point of view (as a user of the HAL system) oversophisticated and overcomplicated (I mean HAL's user interface not whatever internals of HAL - I am not interested in HAL's internals) - regardless if the root cause is actually HAL or the kernel - from my point of view this "thingy" is a nightmare. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=469721 User jsmeix@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=469721#c10 --- Comment #10 from Johannes Meixner <jsmeix@novell.com> 2009-01-29 03:11:28 MST --- Of course I am in contact with the HPLIP team also with the people of the SANE project since a very long time and of course I do not work on my own ignoring the outside world. "search the web" for each individual device is wishful thinking and totally impossible for me with the working time I have. But perhaps the HAL people can do it so that they can provide correct readymade HAL files which would remove a big workload from me when I would no longer have to generate them, but note https://bugzilla.novell.com/show_bug.cgi?id=462639#c28 Regarding HPLIP see /etc/udev/rules.d/55-hpmud.rules that HPLIP sets ENV{sane_hpaio}="yes" (i.e. scanner support is activated) for all devices which are supported by HPLIP. HPLIP does not distinguish plain printers from the rest. One reason is - as already mentioned in comment #3: ----------------------------------------------------------- there are devices which are basically a plain printer but an extension scanner unit is available which makes it a printer + scanner all-in-one device but the USB ID would not change ----------------------------------------------------------- -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com