Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

usb is not accessible #31

Open
ThierryHFR opened this issue May 11, 2020 · 14 comments
Open

usb is not accessible #31

ThierryHFR opened this issue May 11, 2020 · 14 comments

Comments

@ThierryHFR
Copy link

ippusbxd is responsible for several bugs on printers and scanners.
HPLIP does not recognize USB devices.
PIXMA cannot find a device.
To solve the problem just remove ippusbxd.

@tillkamppeter
Copy link
Member

@Ordissimo, it would be great if one could modify ippusbxd somehow so that classic USB can still be used, at least if not all channels are occupied by ongoing IPP-over-USB connections. Would this perhaps be possible? Is this possible with ipp-usb?

@tillkamppeter
Copy link
Member

@Ordissimo, also note that if a device has an IPP-over-USB (7/1/4) interface, that it always supports driverless printing and scanning through this interface (and also through its network interface), so that HPLIP or "pixma" are not needed. Scanning should work via "airscan" or at least "airscan-wsd".

@ThierryHFR
Copy link
Author

@Ordissimo, it would be great if one could modify ippusbxd somehow so that classic USB can still be used, at least if not all channels are occupied by ongoing IPP-over-USB connections. Would this perhaps be possible? Is this possible with ipp-usb?

I didn't try, the french forum is flooded with ippusbxd related problems since the release of focal.
A lot of problem appeared also on the sane queue which is solved by the removal of ippusbxd.

@ThierryHFR
Copy link
Author

@Ordissimo, also note that if a device has an IPP-over-USB (7/1/4) interface, that it always supports driverless printing and scanning through this interface (and also through its network interface), so that HPLIP or "pixma" are not needed. Scanning should work via "airscan" or at least "airscan-wsd".

I don't think that's a good option. If there's a native pilot, there's no point in going through a gateway.
It should be the ultimate solution.

@tillkamppeter
Copy link
Member

The advantage of using eSCL or WSD protocols for scanning, compared to native, manufacturer/model-specific drivers is, that first eSCL and WSD are easier to reverse-engineer, and second, they are used by many manufacturers, on 1000s of devices, so there are many more users testing the driver code, simple see the list of positively-tested devices in the "airscan-wsd" project, and third, the "airscan-wsd" SANE backend is totally free software, whereas manufacturer-supplied software, like HPLIP, often contains proprietary, closed-source parts.
ipp-usb is already stable and reliable enough so that one should not consider it as an inferior solution. It even gives access to the printer's web admin interface, which the native SANE backends do not do.

@ThierryHFR
Copy link
Author

I share this opinion, but the fact remains that native backends (PIXMA or HPLIP) often offer more options than the eSCL backends.
For the device in example below I checked, the Linart option is not available.

Backend eSCL

Options specific to device `escl:http://127.0.0.1:60000':
  Scan mode:
    --mode Gray|Color [Gray]
        Selects the scan mode (e.g., lineart, monochrome, or color).
    --resolution 75|100|200|300|600|1200dpi [75]
        Sets the resolution of the scanned image.
    --preview[=(yes|no)] [no]
        Request a preview-quality scan.
    --preview-in-gray[=(yes|no)] [no]
        Request that all previews are done in monochrome mode.  On a
        three-pass scanner this cuts down the number of passes to one and on a
        one-pass scanner, it reduces the memory requirements and scan-time of
        the preview.
  Geometry:
    -l 0.677322..215.9mm [0]
        Top-left x position of scan area.
    -t 0.677322..297.011mm [0]
        Top-left y position of scan area.
    -x 0.677322..215.9mm [0]
        Width of scan-area.
    -y 0.677322..297.011mm [0]
        Height of scan-area.

Backend hpaio

Options specific to device `hpaio:/net/officejet_4630_series?ip=192.168.1.106':
  Scan mode:
    --mode Lineart|Gray|Color [Lineart]
        Selects the scan mode (e.g., lineart, monochrome, or color).
    --resolution 75|100|200|300|600dpi [75]
        Sets the resolution of the scanned image.
    --source Flatbed|ADF [Flatbed]
        Selects the scan source (such as a document-feeder).
  Advanced:
    --brightness 0..2000 [1000]
        Controls the brightness of the acquired image.
    --contrast 0..2000 [1000]
        Controls the contrast of the acquired image.
    --compression None|JPEG [None]
        Selects the scanner compression method for faster scans, possibly at
        the expense of image quality.
    --jpeg-quality 0..100 [inactive]
        Sets the scanner JPEG compression factor. Larger numbers mean better
        compression, and smaller numbers mean better image quality.
  Geometry:
    -l 0..215.9mm [0]
        Top-left x position of scan area.
    -t 0..297.011mm [0]
        Top-left y position of scan area.
    -x 0..215.9mm [215.9]
        Width of scan-area.
    -y 0..297.011mm [297.011]
        Height of scan-area.

@alexpevzner
Copy link
Member

@tillkamppeter,

different devices have different wiring of their USB interfaces. On some devices IPP over USB is shared with USB printer, using the same USB interface with different "alt setting". On other devices USB printer has its own, dedicated interface.

As far as I remember, ipp-usb doesn't claim USB interface, if the interface doesn't implement IPP over USB protocol. Otherwise it claims it unconditionally and switches into the IPP over USB mode.

In theory, I can provide an option to reserve printer interface, if it is shared with IPP over USB. But I don't like this approach: if one channel is busy with scan job, second with print job, there is no third channel to send cancel command.

WSD, unfortunately, not supported with IPP over USB, I've investigated this question.

@Ordissimo, I believe lineart mode is useless. If somebody really needs it, I can easily emulate it in software, on a top of grayscale or RGB. But I believe, actually this conversion should be done in GUI client, not in HW driver.

@ThierryHFR
Copy link
Author

I understand what you're saying and my example is limited to Lineart (that's why you're right).
The PIXMA driver is much more complete than the eSCL :

  • PIXMA
scanimage -A
Output format is not set, using pnm as a default.

All options specific to device `pixma:04A918A2_831026':
  Scan mode:
    --resolution auto||75|150|300|600|1200dpi [75]
        Sets the resolution of the scanned image.
    --mode auto|Color|Gray|Lineart [Color]
        Selects the scan mode (e.g., lineart, monochrome, or color).
    --source Flatbed [Flatbed]
        Selects the scan source (such as a document-feeder). Set source before
        mode and resolution. Resets mode and resolution to auto values.
    --button-controlled[=(yes|no)] [no]
        When enabled, scan process will not start immediately. To proceed,
        press "SCAN" button (for MP150) or "COLOR" button (for other models).
        To cancel, press "GRAY" button.
  Gamma:
    --custom-gamma[=(auto|yes|no)] [yes]
        Determines whether a builtin or a custom gamma-table should be used.
    --gamma-table auto|0..255,...
        Gamma-correction table.  In color mode this option equally affects the
        red, green, and blue channels simultaneously (i.e., it is an intensity
        gamma table).
    --gamma auto|0.299988..5 [2.2]
        Changes intensity of midtones
  Geometry:
    -l auto|0..216.069mm [0]
        Top-left x position of scan area.
    -t auto|0..297.011mm [0]
        Top-left y position of scan area.
    -x auto|0..216.069mm [216.069]
        Width of scan-area.
    -y auto|0..297.011mm [297.011]
        Height of scan-area.
  Buttons:
    --button-update
        Update button state
    --button-1 <int> [0] [read-only]
        Button 1
    --button-2 <int> [0] [read-only]
        Button 2
    --original <int> [0] [read-only]
        Type of original to scan
    --target <int> [0] [read-only]
        Target operation type
    --scan-resolution <int> [0] [read-only]
        Scan resolution
  Extras:
    --threshold auto|0..100% (in steps of 1) [inactive]
        Select minimum-brightness to get a white point
    --threshold-curve auto|0..127 (in steps of 1) [inactive]
        Dynamic threshold curve, from light to dark, normally 50-65
    --adf-wait auto|0..3600 (in steps of 1) [inactive]
        When set, the scanner waits upto the specified time in seconds for a
        new document inserted into the automatic document feeder.
  • eSCL protocol
All options specific to device `escl:http://192.168.14.133:80':
  Scan mode:
    --mode Gray|Color [Gray]
        Selects the scan mode (e.g., lineart, monochrome, or color).
    --resolution 75|100|150|200|300|600dpi [75]
        Sets the resolution of the scanned image.
    --preview[=(yes|no)] [no]
        Request a preview-quality scan.
    --preview-in-gray[=(yes|no)] [no]
        Request that all previews are done in monochrome mode.  On a
        three-pass scanner this cuts down the number of passes to one and on a
        one-pass scanner, it reduces the memory requirements and scan-time of
        the preview.
  Geometry:
    -l 0..215.815mm [0]
        Top-left x position of scan area.
    -t 0..296.926mm [0]
        Top-left y position of scan area.
    -x 0.0846558..215.9mm [215.9]
        Width of scan-area.
    -y 0.0846558..297.011mm [297.011]
        Height of scan-area.
    --source Flatbed [Flatbed]
        Selects the scan source (such as a document-feeder).

@alexpevzner
Copy link
Member

I see 4 missed features:

  • Gamma correction. I bet it is implemented in firmware and doesn't affect hardware. Can be emulated, but I believe GIMP does it better.
  • Threshold, which affects how RGB is converted to lineart. As we both agreed, lineart is useless feature
  • ADF wait on device without ADF.
  • Buttons. Well, buttons can't be implemented over sECL

The major advantage of eSCL that it "just works", unlike most proprietary solutions. eSCL is polished by HW vendors under Apple pressure, bugs in the proprietary protocol are fixed in Windows driver and nobody bothers to propagate these fixes into the proprietary Linux driver.

As for me, I easily trade off buttons for overall stability.

@ThierryHFR
Copy link
Author

It's not a question of stability but of restriction, the PIXMA backend is stable and works very well in USB.
We know how to turn a color image into black and white, not everyone does.
I want to scan a document. I do not ask myself the question of PIXMA, WSD or eSCL.
ESCL works very well with HP LASER JET MFP 178 NW, but, CUPS does not print. HPLIP works again when you uninstall ippusbxd.
A multifunction device provides a scanner and a printer.

@tillkamppeter
Copy link
Member

@Ordissimo, if ippusbxd is used with a device, BOTH printing and scanning have to be done driverless, so in case of the HP, scanning is usually working via eSCL, in some cases WSD is required (see compatibility list of the "airscan-wsd" backend project), printing is done via driverless IPP (AirPrint or IPP Everywhere). So do not use HPLIP. Network printing/scanning can also be done without HPLIP.

@ThierryHFR
Copy link
Author

ThierryHFR commented May 15, 2020

Hi @tillkamppeter
That's what I was expecting. But it's not.
The French Ubuntu forum has been filling up since Ubuntu 20.04.
https://forum.ubuntu-fr.org/viewtopic.php?pid=22282112#p22282112

@tillkamppeter
Copy link
Member

So ask the user on that forum for the DNS-SD records (via avahi-discover or avahi-browse). Is the printing part (_tcp._ipp) correctly advertised? Does the driverless command show the printer when ippusbxd is in use? Is it possible to create a print queue via

lpadmin -p QUEUE -E -v URI -m everywhere

QUEUE must be a new print queue name, URI must be the printer's URI as shown by the driverless command.
Does printing work using this new print queue?
When this works, one can remove the old, HPLIP-based print queue.

@ThierryHFR
Copy link
Author

These tests have not been done, these are not experienced users, just good times who with ubuntu 18.04 had a device in working condition.
The HP which I spoke higher up personally posed me a problem.
I asked the customer to lend it to me. I am waiting for his answer.
I will do these tests if he allows me to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants