[sane-devel] Sane and HAL

Johannes Meixner jsmeix at suse.de
Thu Jan 4 16:29:11 CET 2007


Hello,

On Jan 3 20:40 abel deuring wrote (shortened):
> > https://bugzilla.novell.com/show_bug.cgi?id=160899#c20
> 
> So the Suse team is already doing basically the same as I proposed.
> Seems that I am a bit too late ;) But I think it makes sense to add
> information like the sane backend(s) that are "useful" for a
> specific scanner to the data in the fdi file.

Of course you are not late because currently all what we do
is to use udev->HAL->resmgr to set access permissions.
For this it is currently sufficient for us to mark
a HAL device as a "scanner".

What is needed for the future is an agreement which HAL keys
with which possible values must/should/can be added to a HAL
device which is a "scanner" so that applications know which keys
they must/should/can query and which values HAL may return.


> > For some already known problems have a look at
> > https://bugzilla.novell.com/show_bug.cgi?id=218393#c19
> > starting at comment #19
> 
> I think this is a HAL problem; hald might need some way to re-read
> the fdi files, when it receives a signal.

Yes, see
https://bugzilla.novell.com/show_bug.cgi?id=218393#c30
"Watching the directories with Inotify is the way to go"


> > https://bugzilla.novell.com/show_bug.cgi?id=226044
... 
> That's a problem with the SCSI bus: At least its simple variants, as
> used by scanners, are not hotplugging-aware, so there is no way to
> detect if a device is powered on or off.

Many thanks for the info!


> A simple solution would be to restart hald

No! (As far as I know.)
Reason:
Stopping and restarting the comlpete HAL service may cause that
all those zillions of actions are re-done which happened since
HAL was running (e.g. umount and mount of whatever hotpluggable
storage devices which may interrupt an ongoing file transfer)
because HAL is not only there for scanners but for whatever
arbitrary (unexpected) other stuff.


> > My personal opinion is that I do not like it when my computer
> > launches whatever program it thinks to be useful for me
> > automatically (perhaps I don't want to use any graphical
> > frontend at all or I prefer xscanimage).
> 
> I agree -- but the automatic start of an application seems to become
> quite fashionable: When I plug in a USB memory stick, KDE starts a
> file browser.

Thanks to remind me why I do no longer use any desktop at all
since a longer time - I use only a windowmanager.


> What I forgot to mention in my first mail: I asked also on the HAL
> mailing list for comments about HAL support by Sane
> (http://lists.freedesktop.org/archives/hal/2006-December/006826.html).
>  Today, David Zeuthen writes over there: "Parallel port (and serial
> port) support isn't really in HAL". So we should probably put
> parport support aside for the moment.

Yes.
When HAL is not required it doesn't hurt if it is not supported
for some kind of connections (i.e. I think it is perfectly
sufficient when HAL supports only USB scanners).


By the way:
"HAL support in SANE" versus "SANE support in HAL":

Wouldn't it be even better to have a fdi file for scanners
in the HAL package so that HAL knows on its own which devices
are a scanner and for which there is support via SANE and/or
via whatever external backend?
Then whatever software installation tools could ask HAL
which software must be installed to get this hardware running.
I.e. the user would not have to know that there is a package
SANE (or whatever external backend) required to get his
hardware running.

But this results an update problem:
When SANE is updated, the fdi file for scanners in HAL
would be outdated and at the moment I have no good idea how
during installation of SANE the fdi file for scanners in HAL
could be updated - except to simply overwrite it via RPM
postinstall script - but then SANE may overwrite info about
non-SANE software in the original fdi file from HAL.

Another question is how can various hardware manufacturers
provide various fdi files for their scanners?

Having multiple fdi files for scanners may result a problem
with multiple entries for the same piece of hardware.
I don't know if HAL can deal with it but I fear there
are problems, see for example
https://bugzilla.novell.com/show_bug.cgi?id=205669

Think about a fdi file from Epson Avasys for their scanners
which is included in their driver and the same scanners
are also already listed in the HAL or SANE fdi file(s).


Kind Regards
Johannes Meixner
-- 
SUSE LINUX Products GmbH, Maxfeldstrasse 5      Mail: jsmeix at suse.de
90409 Nuernberg, Germany                    WWW: http://www.suse.de/



More information about the sane-devel mailing list