Users not automatically added to "scanner" group: No scanning functions of HP multi-function in Hardy

Bug #195782 reported by Bastian Becker
68
This bug affects 5 people
Affects Status Importance Assigned to Milestone
HPLIP
Invalid
Undecided
Unassigned
hal (Ubuntu)
Invalid
High
Unassigned
hplip (Ubuntu)
Fix Released
High
Till Kamppeter

Bug Description

Hi, I have the same problems mentioned in Bug #180648. Since Hardy, my HP Deskjet F2180 supports printing but no scanning. If I start XSane, he says that he couldn't find a scanner. The same problem appears in all scansoftware which I know. Also the HP Toolbox (hplip-gui package) is affected. He found my device but say it isn't connected or offline. So in this case, only printing works.

If I try to look for a scanner via "sane-find-scanner" in a terminal, he also could not find my HP F2180.

Before Hardy. the scan-function was working very well.

Printer: HP DeskJet F2100 Foomatic/hpijs, hpijs 2.8.2

This is caused by the user not having been added to the "scanner" group. See below.

Tags: metabug scan
Revision history for this message
Bastian Becker (bastianbecker-deactivatedaccount) wrote :
description: updated
Revision history for this message
Aaron Albright (albrigha-deactivatedaccount) wrote :

Bastian,

I was unable to reproduce this using HPLIP 2.8.2 from source. I'll be testing hplip in hardy in during my test round, which will be this afternoon.

In the meanwhile, please run the printingbuginfo script and post the output.

https://wiki.ubuntu.com/PrintingBugInfoScript

My printingbuginfo:

ProblemType: printingbuginfo v2.0: printingbug (https://wiki.ubuntu.com/PrintingBugInfoScript)
CupsConfiguredDevices:
 device for Deskjet_F2100: hp:/usb/Deskjet_F2100_series?serial=CN69J4V01C04TK
 device for Deskjet_F2100_series: hp:/usb/Deskjet_F2100_series?serial=CN69J4V01C04TK
 device for PDF: cups-pdf:/
 device for Photosmart_3300: hp:/net/Photosmart_3300_series?ip=15.252.59.48
 device for Photosmart_3300_fax: hpfax:/net/Photosmart_3300_series?ip=15.252.59.48
CupsConfiguredPPDs:
 Deskjet_F2100: HP DeskJet F2100 Foomatic/hpijs, hpijs 2.8.2
 Deskjet_F2100_series: HP DeskJet F2100 Foomatic/hpijs, hpijs 2.8.2
 PDF: Generic PDF file generator
 Photosmart_3300: HP PhotoSmart 3300 Foomatic/hpijs, hpijs 2.8.2
 Photosmart_3300_fax: HP Fax
Date: Tue Feb 26 09:11:37 2008
DesktopEnvironment: GNOME
DistroRelease: Ubuntu 8.04
EtcPapersize: letter
InstalledPrintingPackages:
 ii cupsys 1.3.5-1ubuntu3 Common UNIX Printing System(tm) - server
 ii cupsys-driver-gutenprint 5.0.2-2ubuntu1 printer drivers for CUPS
 ii foo2zjs 20071205-0ubuntu1 Support for printing to ZjStream-based printers
 ii foomatic-db 20080211-0ubuntu1 OpenPrinting printer support - database
 ii foomatic-db-engine 3.0.2-20070719-0ubuntu4 OpenPrinting printer support - programs
 ii foomatic-filters 3.0.2-20071204-0ubuntu1 OpenPrinting printer support - filters
 ii ghostscript 8.61.dfsg.1-1ubuntu2 The GPL Ghostscript PostScript/PDF interpreter
 ii libgnomeprint2.2-0 2.18.4-1~hardy1 The GNOME 2.2 print architecture - runtime files
 ii min12xxw 0.0.9-1build1 Printer driver for KonicaMinolta PagePro 1[234]xxW
 ii openprinting-ppds 20080211-0ubuntu1 OpenPrinting printer support - PostScript PPD files
 ii pnm2ppa 1.12-16 PPM to PPA converter
 ii pxljr 1.1-0ubuntu1 Driver for HP's Color LaserJet 35xx/36xx color laser printers
 ii splix 1.1.1-0ubuntu1 Driver for Samsung's SPL2 (bw) and SPLc (color) laser printers
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8, LC_PAPER=en_US.UTF-8
Uname: Linux dhcp59049.vcd.hp.com 2.6.24-8-generic #1 SMP Thu Feb 14 20:13:27 UTC 2008 x86_64 GNU/Linux

Also if you installed hplip from source please run hp-check -t and post that output as well.

Thanks.

Aaron

Revision history for this message
Bastian Becker (bastianbecker-deactivatedaccount) wrote :
Download full text (3.3 KiB)

Hi Aaron,

thanks for your answer. I've run the printingbuginfo-script and it shows me this:

ProblemType: printingbuginfo v2.0: printingbug+localusb (https://wiki.ubuntu.com/PrintingBugInfoScript)
CupsConfiguredDevices:
 device for Deskjet_F2100_series: hp:/usb/Deskjet_F2100_series?serial=CN74R2Q10R04TK
 device for PDF: cups-pdf:/
CupsConfiguredPPDs:
 Deskjet_F2100_series: HP DeskJet F2100 Foomatic/hpijs, hpijs 2.8.2
 PDF: Generic PDF file generator
Date: Tue Feb 26 19:40:33 2008
DesktopEnvironment: none
DistroRelease: Ubuntu 8.04
EtcPapersize: a4
InstalledPrintingPackages:
 ii cupsys 1.3.5-2ubuntu1 Common UNIX Printing System(tm) - server
 ii cupsys-driver-gutenprint 5.0.2-2ubuntu1 printer drivers for CUPS
 ii foo2zjs 20071205-0ubuntu1 Support for printing to ZjStream-based printers
 ii foomatic-db 20080211-0ubuntu1 OpenPrinting printer support - database
 ii foomatic-db-engine 3.0.2-20070719-0ubuntu4 OpenPrinting printer support - programs
 ii foomatic-db-hpijs 20070813-0ubuntu1 OpenPrinting printer support - database for HPIJS driver
 ii foomatic-filters 3.0.2-20071204-0ubuntu1 OpenPrinting printer support - filters
 ii ghostscript 8.61.dfsg.1-1ubuntu2 The GPL Ghostscript PostScript/PDF interpreter
 ii hpijs 2.8.2+2.8.2-0ubuntu1 HP Linux Printing and Imaging - gs IJS driver (hpijs)
 ii hplip 2.8.2-0ubuntu1 HP Linux Printing and Imaging System (HPLIP)
 ii libgnomeprint2.2-0 2.18.4-1~hardy1 The GNOME 2.2 print architecture - runtime files
 ii min12xxw 0.0.9-1build1 Printer driver for KonicaMinolta PagePro 1[234]xxW
 ii openprinting-ppds 20080211-0ubuntu1 OpenPrinting printer support - PostScript PPD files
 ii pnm2ppa 1.12-16 PPM to PPA converter
 ii pxljr 1.1-0ubuntu1 Driver for HP's Color LaserJet 35xx/36xx color laser printers
 ii splix 1.1.1-0ubuntu1 Driver for Samsung's SPL2 (bw) and SPLc (color) laser printers
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8, LC_PAPER=de_DE.UTF-8
Uname: Linux BB-Satellite 2.6.24-8-generic #1 SMP Thu Feb 14 20:40:45 UTC 2008 i686 GNU/Linux
UsbPrinterDevices: lrwxrwxrwx 1 root root 7 Feb 26 19:38 /dev/usblp0 -> usb/lp0
UsbPrinterIEEE1284Id:
 /dev/usblp0: GET_DEVICE_ID string:
 MFG:HP;MDL:Deskjet F2100 series;CMD:LDL,MLC,PML,DYN;CLS:PRINTER;1284.4DL:4d,4e,1;SN:CN74R2Q10R04TK;S:0380008000020020002c1480048c2560000;Z:007,0A20000;
UsbPrinterKernelModules:
 usblp 15872 0
 usbcore 145516 7 usblp,usbhid,usb_storage,libusual,ehci_hcd,uhci_hcd
lsusb:
 Bus 007 Device 002: ID 0d49:3200 Maxtor
 Bus 007 Device 001: ID 0000:0000
 Bus 006 Device 001: ID 0000:0000
 Bus 005 Device 004: ID 03f0:7d04 Hewlett-Packard
 Bus 005 Device 002: ID 046d:c044 Logitech, Inc.
 Bus 005 Device 001: ID 0000:0000
 Bus 004 Device 001: ID 0000:0000
 Bus 003 Device 001: ID 0000:0000
 Bus 002 Device 001: ID 0000:0000
 Bus 001 Device 001: ID 0000:0000
----...

Read more...

Revision history for this message
Aaron Albright (albrigha-deactivatedaccount) wrote :

No actually I'd prefer if you didn't install hplip from source--least not yet. Seems to be a hardy hplip package thing and not a hplip from source thing. So we'll want to narrow down what's going on with hardy natively.

This is high on my list to do, so I'll have some info in a bit.

Thanks for the info!

A

Revision history for this message
Aaron Albright (albrigha-deactivatedaccount) wrote :

Bastian,

Still working on reproducing this, I've had some problems with my hardy install this afternoon and will be working on it again in the morning.

Sorry for the delay.

A

Revision history for this message
Aaron Albright (albrigha-deactivatedaccount) wrote :

Bastian,

Please run:

groups

and post the output.

If this output does not include "scanner", go to System -> Admin - > Users and Groups, click on manage groups, double click on scanner, then put a checkbox next to your username, save everything log out of all your user sessions, log back in and try to scan.

Till,

For some reason the users aren't being added to the "scanner" group by default. I'm assuming they should be?

Thanks!

Aaron

Revision history for this message
Bastian Becker (bastianbecker-deactivatedaccount) wrote :

Hi Aaron,

you're right, I wasn't a member of the scanner group. By standard, I was in this groups:

bastian adm dialout cdrom floppy audio dip video plugdev lpadmin admin

Now, after I add myself to the scanner group, it works fine BUT: For some reason (I dont know why) I can't open the hp-lip gui, but I think it is another bug?!

Revision history for this message
Aaron Albright (albrigha-deactivatedaccount) wrote :

Problem with users not being added to the 'scanner' group in hardy by default.

Changed in hplip:
status: New → Invalid
Revision history for this message
Aaron Albright (albrigha-deactivatedaccount) wrote :

Bastian,

Please run hp-toolbox -g and then post the entire output.

Thanks!

Aaron

Revision history for this message
Bastian Becker (bastianbecker-deactivatedaccount) wrote :

Hi Aaron,

this is the output of hp-toolbox -g:

HP Linux Imaging and Printing System (ver. 2.8.2)
HP Device Manager ver. 11.0

Copyright (c) 2001-7 Hewlett-Packard Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.

warning: Reportlab not installed. Fax coverpages disabled.
warning: Please install version 2.0+ of Reportlab for coverpage support.
hp-toolbox[9666]: debug: Using system locale: de_DE.UTF-8
hp-toolbox[9666]: debug: Trying to load .qm file for de_DE.UTF-8 locale.
hp-toolbox[9666]: debug: Name of .qm file: hplip_de_DE.qm
hp-toolbox[9666]: debug: Using locale: de_DE.UTF-8
hp-toolbox[9666]: debug: Startup: Trying to connect to hpssd on localhost:2207
Traceback (most recent call last):
  File "/usr/bin/hp-toolbox", line 182, in <module>
    hpssd_sock = service.startup()
  File "/usr/share/hplip/base/service.py", line 38, in startup
    hpssd_sock.connect((prop.hpssd_host, prop.hpssd_port))
  File "<string>", line 1, in connect
KeyboardInterrupt

I think it because it looks like he can't connect to localhost?!

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

New desktop users should ne added to the scanner group by default. This is a bug in the user management then.

Will reassign the bug.

description: updated
Changed in gnome-system-tools:
importance: Undecided → Critical
milestone: none → ubuntu-8.04-beta
status: Confirmed → Triaged
Revision history for this message
Bastian Becker (bastianbecker-deactivatedaccount) wrote :

Yes, I can confirm that new users are automatically added to the scanner group by default.

Revision history for this message
Bastian Becker (bastianbecker-deactivatedaccount) wrote :

The HP toolbox-Bug is now solved.

Revision history for this message
Martin Pitt (pitti) wrote :

I just tested this on current hardy, and I confirm that Ubuntu does not create the scanner group any more, since we do not need it for libsane. If hplip still needs it, it should be created there, but I think the better solution would be to change hal to make those devices accessible to the current foreground user, similar to what we do with scanners, cameras, removable drives, etc. now.

Changed in gnome-system-tools:
importance: Critical → Medium
status: Triaged → Confirmed
Steve Langasek (vorlon)
Changed in gnome-system-tools:
milestone: ubuntu-8.04-beta → ubuntu-8.04
Revision history for this message
Nanley Chery (nanoman) wrote :

I wish I'd seen this report before. I emailed the desktop list about this problem - https://lists.ubuntu.com/archives/ubuntu-desktop/2008-March/001522.html ;-s

""By default, users do not have the privilege to "Use scanners." Due to the rise of multifunction printers, this is a problem that should be fixed before the final release of 8.04.

Bug: I installed HPLIP-Toolbox and noticed errors and grayed out tabs - the app was useless. It was not until I gave myself the permission to "Use scanners" (under Users and Groups) that I was able to fully use the application....

P.S. Why are options, "Use tape drives" and "Send and receive faxes" unchecked as well? (I kinda understand the tape drives part). Why not give the admin users all privileges?""

Here are (I believe) related bugs:
https://bugs.launchpad.net/hplip/+bug/205151
https://bugs.launchpad.net/hplip/+bug/204343

Revision history for this message
Sebastien Bacher (seb128) wrote :

this is not a gnome-system-tools issue

Changed in gnome-system-tools:
status: Confirmed → Invalid
Revision history for this message
Sebastien Bacher (seb128) wrote :

did you try using the current hardy versions?

Changed in gnome-system-tools:
assignee: nobody → desktop-bugs
Revision history for this message
Nanley Chery (nanoman) wrote :

Marked as confirmed so this bug wouldn't be lost.

I have experienced this bug on a "fresh install" (hate using that phrase) of Hardy Beta.

Changed in gnome-system-tools:
status: Invalid → Confirmed
Revision history for this message
Martin Pitt (pitti) wrote :

See comment 14. We should really drop this scanner group. Can anyone with such a printer please do

  lshal > hal.txt

and attach hal.txt here? I'm curious whether these devices appear in hal at all. If they do, we can make hplip ship a hal FDI rule to make the device nodes accessible.

Revision history for this message
Martin Pitt (pitti) wrote :

Till, can you work with me to get this resolved?

Changed in hplip:
assignee: desktop-bugs → till-kamppeter
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Yes, pitti, so I will start with attaching my hal.txt with two HP multi-function devices on the USB:

- HP LaserJet 3390 (printer with toner level readout, scanner, fax)
- HP PhotoSmart A710 (printer with ink level readout, head alignment/cleaning, USB mass storage)

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

And here is the hal.txt of another Hardy box, with the

- HP PhotoSmart C5200 (printer with ink level readout, head alignment/cleaning, scanner, USB mass storage)

Revision history for this message
Martin Pitt (pitti) wrote :

Right, thanks, I see the hal entries. E. g. for your LaserJet (uninteresting properties removed):

udi = '/org/freedesktop/Hal/devices/usb_device_3f0_3517_00CNMJP81545'
  info.product = 'HP LaserJet 3390' (string)
  info.subsystem = 'usb_device' (string)
  info.vendor = 'Hewlett-Packard' (string)
  linux.device_file = '/dev/bus/usb/005/003' (string)
  linux.hotplug_type = 2 (0x2) (int)
  usb_device.product = 'HP LaserJet 3390' (string)
  usb_device.product_id = 13591 (0x3517) (int)
  usb_device.serial = '00CNMJP81545' (string)
  usb_device.vendor = 'Hewlett-Packard' (string)
  usb_device.vendor_id = 1008 (0x3f0) (int)

Does the hplip code have any kind of list which vendor/product ID it supports? If so, we should write a script to turn this into a list of hal FDIs to attach the 'scanner' property (and some other bits which are necessary to make them integrated well). If not, can we get such a list online somewhere?

This would then look similar to /usr/share/hal/fdi/preprobe/10osvendor/20-libsane.fdi.

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Please do the following test:

- Plug in and turn on your HP device on USB.
- Do "lshal > hal.txt" and search for the model name of your HP device in hal.txt. Look for the "linux.device_file" entry in the section where you have found the model name.
- Do not unplug or turn off your HP device.
- Now do "sudo chgrp <your user name> <path from "linux.device_file" entry>
- Now try to scan or try to read out the ink/toner levels. Does it work?

I have tried this after removing my user name from the "scanner" group in /etc/group and then logging out and logging in again. It works. SWo HAL must set the group ownership of the /dev/bus/usb/XXX/YYY file of the device to the user's group. Permissions must be 660.

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

The list of models supported by the installed HPLIP is always in the file

/usr/share/hplip/data/models/models.dat

Here you find USB IDs and also the model names of the IEEE-1284 device ID.

In general it is a good idea to set any USB device which is detected as a printer to the ownerships "lp:<group of current user>" and 660 permissions on both the /dev/bus/usb/XXX/YYY and /dev/usb/lpZ files as also non-HP printers can be a multi-function device or have ink level readout (like "escputil" for Epson inkjets).

Revision history for this message
Johannes Meixner (jsmeix) wrote :
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Johannes, when do you execute this script? Does HAL execute it whenever it is needed or is it executed when building the HPLIP package?

Revision history for this message
Martin Pitt (pitti) wrote :

Till: Thanks, that's exactly what I was looking for. I just wonder about this:

$ grep 'usb-pid=$' /usr/share/hplip/data/models/models.dat|wc -l
135

Why are there so many empty product IDs?

Johannes: Awesome! That's pretty much what I had in mind. What is the license for that script? Would you mind if we integrated that (or a variant) into the Debian/Ubuntu packages?

Revision history for this message
Johannes Meixner (jsmeix) wrote :

I run it during package buid in the RPM spec file as follows:

Source104: create_hal_global_fdi_from_models.dat
...
bash %{SOURCE104} data/models/models.dat >70-hpmud.fdi
install -d %{buildroot}%{_sysconfdir}/hal/fdi/policy/10osvendor
install -m644 70-hpmud.fdi %{buildroot}%{_sysconfdir}/hal/fdi/policy/10osvendor/70-hpmud.fdi

so that during package install the
/etc/hal/fdi/policy/10osvendor/70-hpmud.fdi
file gets installed.

We use hal-resmgr to grant read/write access permissions
for USB scanners only for those users who are logged in locally
(i.e. via console od XDM/KDM) i.e. those users who sit in front
of the computer where the USB scanner is connected to.

When a USB scanner is plugged, udev triggers HAL which
triggers hal-resmgr to grant read/write access permissions
for the currently locally logged in users via an ACL setting
on the scanner device file /dev/bus/usb/xxx/yyy.

When the scanner is already plugged and later a user logs
in locally, PAM triggers hal-resmgr which inspects the HAL data
if there is a device where info.capabilities contains scanner
and if yes hal-resmgr grants read/write access permissions
for this device via setting or changing the ACL on the
scanner defice file /dev/bus/usb/xxx/yyy

Unfortunalely HAL may still not notice changed fdi files
during runtime of HAL, see
https://bugzilla.novell.com/show_bug.cgi?id=218393#c28
so that it is crucial to have the fdi file in place
before the system boots (i.e. before HAL starts)
because it is not possible to restart the whole HAL
machinery only because one fdi file changed
because a restart of the whole HAL machinery could
have any unexpected side effect (e.g. umount and
remount of removable USB mass storage devices
which are currently in use).

Revision history for this message
Martin Pitt (pitti) wrote : Re: [Bug 195782] Re: Users not automatically added to "scanner" group: No scanning functions of HP multi-function in Hardy

Hi Johannes,

Johannes Meixner [2008-03-27 11:04 -0000]:
> We use hal-resmgr to grant read/write access permissions
> for USB scanners only for those users who are logged in locally
> (i.e. via console od XDM/KDM) i.e. those users who sit in front
> of the computer where the USB scanner is connected to.

Ah, we have something similar. hal and ConsoleKit upstream now offer
dynamic ACL management on device nodes, which we are using.

> Unfortunalely HAL may still not notice changed fdi files
> during runtime of HAL, see
> https://bugzilla.novell.com/show_bug.cgi?id=218393#c28
> so that it is crucial to have the fdi file in place
> before the system boots (i.e. before HAL starts)

That should be working well with current hal (0.5.11RC2). It has an
inotify watch on /usr/share/hal/fdi/ and /etc/hal/fdi and reloads the
files if anything changes.

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

pitti, about the empty product IDs, many of these printers are old models which probably do not have a USB port, but there are also some newer models which have a USB port. Then we also need to match the model name entries with the model name in the IEEE-1284 device ID to safely identify the device.

Revision history for this message
Johannes Meixner (jsmeix) wrote :

Regarding

grep 'usb-pid=$' /usr/share/hplip/data/models/models.dat|wc -l
135

see the comments at the end of /usr/share/hplip/data/models/models.dat

# io-support: (bitfield)
# 1 = parallel
# 2 = usb
# 4 = ethernet
# 8 = wireless 802.11
# 16 = bluetooth

Then run something like

egrep '^io-support|^usb-pid' /usr/share/hplip/data/models/models.dat \
 | grep -B1 '^usb-pid=$'

which results much less models which actually have USB support
but no usb-pid.

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

First, note that there are also many 'usb-pid=0000' cases. These have to be considered as empty product IDs, too.

So with

egrep '^io-support|^usb-pid' /usr/share/hplip/data/models/models.dat | egrep -B1 '^usb-pid=(|0+)$' | grep io-support | grep [2367] | wc -l

there are 62 devices with USB port but without valid product ID. So verification of the model name in the device ID is still required (but only needed for the models without valid product ID.

Revision history for this message
Johannes Meixner (jsmeix) wrote :

I think it is an upstream issue that HP provides the USB IDs
instead of let the distributions implement complicated workarounds.

Revision history for this message
David Suffield (david-suffield) wrote :

You do not need explicit usb-pids for HP printer products. You can determine if the udev event is a HP printer product by performing a wild-card compare on the idProduct. See 55-hpmud.rules file.

I am not a big fan of hal, but can't you write a hal fdi rule based on wild-cards like you can with udev rules? If not this seems like a problem with hal.

-dave

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Dave, I think this makes sense, and as UDEV triggers HAL, we can use the same rule also to trigger HAL.

Revision history for this message
Martin Pitt (pitti) wrote :

David Suffield [2008-03-27 16:59 -0000]:
> You do not need explicit usb-pids for HP printer products. You can
> determine if the udev event is a HP printer product by performing a
> wild-card compare on the idProduct. See 55-hpmud.rules file.

Ah, thanks for the hint. Unfortunately hal cannot do string-based
matching on integer properties, so we need a longer FDI rule.

But generating that should not be a problem with the data which we
have now.

Till, maybe you can start experimenting with that? Use the Perl script
from above to generate an FDI and put that into
/usr/share/hal/fdi/preprobe/10osvendor/20-hplip-scanners.fdi and check
whether it works?

Thanks all,

Martin

--
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

I have run the SUSE script

sudo sh -c 'cd /usr/share/hplip/data/models; sh /home/till/ubuntu/hplip/create_hal_global_fdi_from_models.dat > /usr/share/hal/fdi/preprobe/10osvendor/20-hplip-scanners.fdi'

and removed a spurious "models.dat" from the first line of the resulting .fdi file. Then I have replugged the printers, restarted HAL, but never got "scanner" into "info.capabilities" lines in the output of "lshal".

Revision history for this message
Johannes Meixner (jsmeix) wrote :

I am neither a big fan of HAL because since it exists
I am usually fighting with its mess until it somehow
works for me because I always find insufficiencies.

For example newest stuff like
  int_outof="0xa1b2;0xc3d4;..."
doesn't work with HAL at least not on my
openSUSE 10.3 system.
Perhaps HAL works partially and it does the stuff
only for one first device which matches to the int_outof list.
I don't know - I don't want to know - I just experiment
until it works for me.

I think HAL is not yet a useful Hardware Abstraction Layer
but still an almost useless Hardware Additional Layer
in full compliance to RFC 1925:
"It is always possible to add another level of indirection."

And don't forget that "pigs fly just fine" ;-)

Revision history for this message
Martin Pitt (pitti) wrote :

Hi Till,

Till Kamppeter [2008-03-28 8:57 -0000]:
> and removed a spurious "models.dat" from the first line of the resulting
> .fdi file. Then I have replugged the printers, restarted HAL, but never
> got "scanner" into "info.capabilities" lines in the output of "lshal".

Can you please attach the generated FDI here? Does it contain the
vendor/product ID for your printer?

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

The file contains the IDs of my printers. I attach it here. I have also checked with xmllint that the file is correct XML.

Revision history for this message
Johannes Meixner (jsmeix) wrote :

Tills file and mine on my workstation are identical.

By the way:
How can one change the attachment mime type?
This one should be text/plain because the current text/html
leads to nonsense when one views it with a browser.

Revision history for this message
Martin Pitt (pitti) wrote :

Hi Till,

Till Kamppeter [2008-03-28 12:55 -0000]:
> The file contains the IDs of my printers. I attach it here. I have also
> checked with xmllint that the file is correct XML.

Ah, that's the problem. info.bus is deprecated. Please do
s/info.bus/info.subsystem/ in the script and in the file. Does it work
then?

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Yes, that's it. Now it works.

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

My idea now for a better fdi generator script is to generate an fdi file with entries for all possibilities which match the wild cards of /etc/udev/rules.d/55-hpmud.rules. This would be 5 * 256 entries. Or would this slow down HAL a lot?

Revision history for this message
der_vegi (m-may) wrote :

Maybe bug 121082 is related to this? At least some other usb-scanners do not work, either as normal user (scanner group added) because of the lack of some usb permissions.

Revision history for this message
Martin Pitt (pitti) wrote :

I'd rather not do the full combinatorial explosion, both for performance reasons, and also to avoid accidentally covering devices which are not scanners.

Changed in hplip:
status: Confirmed → Fix Committed
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Fix is on the way. I decided to make the generator for the fdi file as I suggested, with 256 entries for each device class. This assures that really all supported HP devices will work. HP has intendedly given the model IDs this way so that one can distinguish device classes.

I have tested and the system does not get slowed down by the big (300k) fdi file.

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Note also that devices which do not have a scanner built in must also get "scanner" the info.capability, so that the current desktop user can use maintenance functions, like head cleaning, ink level check, ...

Revision history for this message
Martin Pitt (pitti) wrote :

300 KB? Ugh, that's a lot.

Till, if you really think that full combinatorial explosion is sane (pun not intended), can you then please change the script to output an XML which uses int_outof="0x3401; 0x3402;0x3403", etc? See for example /usr/share/hal/fdi/information/10freedesktop/10-modem.fdi as an example. Either use just one big block, or maybe one <match> per 256-entry-block. That should dramatically cut down file size.

Revision history for this message
Johannes Meixner (jsmeix) wrote :

Till,
I would like to follow your approach with 256 entries
for each device class because it is in sync with
the HPLIP udev rules file.
Could you attach your current script or post a URL?

Revision history for this message
Johannes Meixner (jsmeix) wrote :

Martin,
regarding int_outof, see my comment
https://bugs.launchpad.net/ubuntu/+source/hplip/+bug/195782/comments/39
In particular test int_outof with more than one HP all-in-one device.
Perhaps it works for your HAL version?

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Pitti, thanks for the tip with the int_outof, this reduced the fdi file size from 300k to 10.5k. New packages are in place.

Johannes, I have attached the new improved script with all 256 entries for each device class and only 10.5k fdi file size. So you can also use it for the SUSE package. Thanks also for your original script.

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Johannes, I have tested the new fdi file on a box with two HP devices connected to the USB. Both devices are handled correctly.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package hplip - 2.8.2-0ubuntu5

---------------
hplip (2.8.2-0ubuntu5) hardy; urgency=low

  * debian/local/scripts/create_hal_global_fdi_from_hpmud_rules.sh,
    debian/rules, debian/hplip.install: Generate fdi script to make
    HP devices accessible for the desktop user currently logged in
    (LP: #195782).
  * debian/patches/hp_oj_h470_alignment.dpatch: Fixed head alignment for
    HP OfficeJet H470 (LP: #204157).

 -- Till Kamppeter <email address hidden> Tue, 1 Apr 2008 15:28:52 +0200

Changed in hplip:
status: Fix Committed → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote :

Hi Johannes,

Johannes Meixner [2008-04-02 9:47 -0000]:
> regarding int_outof, see my comment
> https://bugs.launchpad.net/ubuntu/+source/hplip/+bug/195782/comments/39
> In particular test int_outof with more than one HP all-in-one device.
> Perhaps it works for your HAL version?

IIRC the syntax already existed in 0.5.10, but didn't work. It was
finally fixed in [1] last November. We use hal 0.5.11RC2 now, where it
works properly. Since current hal-info also uses int_outof
extensively, it's quite important to have that working.

If you need to use 0.5.10 in the current openSuSE, then maybe you
should apply above upstream patch?

Martin

[1] http://lists.freedesktop.org/archives/hal-commit/2007-November/003894.html

Revision history for this message
Johannes Meixner (jsmeix) wrote :

Many thanks for the script and for the info!

Currently I don't want to use int_outof because I want to
be backward compatible at least with openSUSE 10.3 when
I provide HPLIP packages via our openSUSE build service.

By the way:
A tiny note regarding use of "cut":
Usually I use "cut -s" to ignore non-matching lines.
Compare
echo -e "one,two\nthree\nfour,five" | cut -d ',' -f2
with
echo -e "one,two\nthree\nfour,five" | cut -s -d ',' -f2

Revision history for this message
Aaron Albright (albrigha-deactivatedaccount) wrote :

Hey guys,

This problem is causing several other problems as well.

For reference:

https://bugs.launchpad.net/ubuntu/+source/hplip/+bug/209781

The toolbox isn't working with even non-scanner printers until the user is added to the scanner group.

Aaron

Revision history for this message
Martin Pitt (pitti) wrote :

This apparently still does not work for all people. For those cases, can affected people please do

  lshal > /tmp/hal.txt
  lsusb > /tmp/usb.txt
  getfacl -R /dev/bus/usb/* > /tmp/perms.txt

while the scanner is on and plugged in, and attach /tmp/hal.txt, /tmp/usb.txt, and /tmp/perms.txt here?

Changed in hplip:
status: Fix Released → Incomplete
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Please do the steps of Martin Pitt's comment also if you have an HP printer without scanning functionality (one can at least check status and ink/toner level with the hp-toolbox then).

Changed in hplip:
assignee: till-kamppeter → pitti
importance: Medium → High
Revision history for this message
Nanley Chery (nanoman) wrote :

This doesn't work for my HP F2110 AIO. (F2100 Series)

Revision history for this message
Nanley Chery (nanoman) wrote :
Revision history for this message
Nanley Chery (nanoman) wrote :
Revision history for this message
Martin Pitt (pitti) wrote :

The problem is that the FDI generator matches against "usb_device". It needs to s/usb_device/usb/, then it works (just tested today with Till). Till, can you please prepare a new upload?

Changed in hal:
assignee: pitti → till-kamppeter
status: Incomplete → In Progress
Changed in hplip:
assignee: nobody → till-kamppeter
status: New → In Progress
importance: Undecided → High
milestone: none → ubuntu-8.04
Revision history for this message
Martin Pitt (pitti) wrote :

not a hal bug.

Changed in hal:
assignee: till-kamppeter → nobody
importance: High → Undecided
milestone: ubuntu-8.04 → none
status: In Progress → Invalid
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :
Changed in hal:
importance: Undecided → High
milestone: none → ubuntu-8.04
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package hplip - 2.8.2-0ubuntu8

---------------
hplip (2.8.2-0ubuntu8) hardy; urgency=low

  * debian/local/scripts/create_hal_global_fdi_from_hpmud_rules.sh: Corrected
    fdi script so that it actually works (LP: #195782).

 -- Till Kamppeter <email address hidden> Tue, 15 Apr 2008 13:28:52 +0200

Changed in hplip:
status: In Progress → Fix Released
Revision history for this message
stop (whoopwhoop) wrote :

Well, I got problems again in lucid 32 bit:
failed to open device 'brother2:bus2;dev1': invalid argument.
It's a brother dcp-115c, printer works, scanner does not.

Revision history for this message
Shobuz99 (shobuz99) wrote :

I have the "failed to start scanner: invalid argument" error
I have made several attempts to analyze the problem,
with very limited knowledge of debug options.
Below is some information on what I have done so far:

Xsane header: xsane 0.996 CC-570L:003
device 'epson2:libusb:002:003' is a Epson CC-570L flatbed scanner (this is also a printer)

I have installed utils using: sudo apt-get install sane-utils
I have run 'groups' and 'scanner' is listed.
I have installed extras using: sudo apt-get install libsane-extras
I have run sudo xsane and ignored the warning, and proceeded;
the output included this message multiple times:
(xsane:5424): Gtk-WARNING **: GtkSpinButton: setting an adjustment with non-zero page size is deprecated

I have run strace -o strace.out -f scanimage -T
The output is rather large and I can't determine any action to take from its results.

I still have the error whether I open xsane using sudo or not.

can anyone help me with any further advice or things to try?

Thank you for your help.

Revision history for this message
Karl Kastner (kastner-karl) wrote :

The bug still persists in cosmic cuttlefish in combination with Samsung SCX-470x, 13 years after #195782 was filed. The workaround also works still, after I installed libsane-extras, xsane miracally started up without an error. I suggest to change the package dependence so that libsane-extras is installed by default

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.