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

[driverless] Canon TS6150 missing feed selection option (CUPS 2.2.7) #351

Closed
DavideRossi opened this issue Mar 11, 2021 · 13 comments
Closed

Comments

@DavideRossi
Copy link

The printer has a rear feed and a bottom tray but there is no way to select the active one (and no feed selection-related option appears with lpoptions). Details @ https://forums.linuxmint.com/viewtopic.php?f=51&t=344642

@tillkamppeter
Copy link
Member

First, your printer can be used without proprietary drivers, as it fulfills the driverless IPP printing standards. This one sees with your printers response to a get-printer-attributes IPP request which you got already with ipptool and attached to your original forum thread:
printer.attrs.txt
Important is following line in the output (line 79):

media-source-supported (1setOf keyword) = auto,main,rear

This tells CUPS that there are three choices for the input tray, one being "rear". So the PPD generated for the CUPS queue should contain an "InputSlot" option with these three choices.

Could you attach the PPD file of your print queue (It is in /etc/cups/ppd/). Make sure you rename it adding .txt to the end of the file name so that you can attach it here.

@DavideRossi
Copy link
Author

Here it is.
testq.ppd.txt

@tillkamppeter
Copy link
Member

It is missing out on the "InputSlot" option, but the PPD is generated by CUPS and not by cups-filters. So could you report it on CUPS?

Also please try the following:

Run the command

driverless

This gives you a line of output, your printer's URI. If there is more than one line only one of them is from your printer which we are talking about here. You find the right one easily as it contains the model name.

Then run

driverless URI > ppdfile.txt

and replace URI by the URI from the first command. Attach the file ppdfile.txt. This is the PPD file created by cups-filters and not by CUPS. Perhaps this one will have an "InputSlot" option.

To create a print queue with this PPD, run

lpadmin -p printer -E -v URI -m driverless:URI

Replace URI on both places in this command line with your printer's URI from the beginning. Does this queue give you the possibility to choose the input tray now?

@DavideRossi
Copy link
Author

Nope, still no InputSlot even with this PDD
ts6150.pdd.txt
Should I still report that to CUPS too?

@tillkamppeter
Copy link
Member

As it appears also when CUPS generates the PPD, please report it also to CUPS.

@surajkulriya
Copy link
Contributor

@tillkamppeter @DavideRossi another thing to note is that MediaType option is also missing in PPD file although media-type-supported attribute is there in attributes files on line 78. Maybe it does not create any problem for now, but it should be there in PPD file as per expected behaviour.

@surajkulriya
Copy link
Contributor

hello @DavideRossi
Did you tried using the latest version of cups and cups-filters as recommended by @michaelrsweet ?
Are you still facing the issue?
Thanks

@DavideRossi
Copy link
Author

DavideRossi commented Mar 14, 2021

Hi @surajkulriya I did not update cups and cups-filters. When my new laptop arrives I will update the OS (I'm using Mint) and I will test it all again and eventually report here to close this issue (if it's still open). This could take a bit tho, it's in back order now...
BTW: I tried with a live CD from a VM but driverless does not detect the printer.

@tillkamppeter
Copy link
Member

@DavideRossi note that most VM managers create their own virtual subnet for the VMs they are managing. This makes the VMs and the printer not being in the same subnet and so auto-discovery, like by driverless does not work.

To test bleeding-edge CUPS and cups-filters do the following:

On your real machine install the CUPS Snap without uninstalling or de-activating your system's CUPS. This way the bleeding-edge CUPS/cups-filters combo is run in parallel to your system's CUPS, on an alternative port and UNIX socket.

Run the command

sudo snap install --edge cups

Then take your browser and go to

http://localhost:10631/

You will get the web interface of CUPS 2.4.0, a version which is not yet released. You can try to create a print queue for your printer via this web interface (select the IPP version of your printer under the discovered network printers and under the drivers the "driverless" option WITHOUT "fax"). Then when you comne to the page to manage this printer, check whether you can set media source and/or media type.

Command line approach:

Generally, add cups. to the beginning of each command you run, to talk with the CUPS in the Snap instead of with your system's CUPS.

cups.driverless

will show available driverless IPP printers, yours should be under them, as ipps://... if it supports IPPS, and if it is connected via USB also in a (usb) incarnation.
Take one of these lines which is corresponding to your printer and substitute URI in the following commands with it:

cups.driverless 'URI' > from-snap-driverless.ppd.txt

Check from-snap-driverless.ppd.txt. Does it contain InputSlot and MediaSource options? Attach the file to this bug report. If the PPD has said options, you can later use it to create a print queue with your system's CUPS.

Now try also

cups.lpadmin -p snap-test -E -v 'URI' -m everywhere

This creates a print queue in the CUPS Snap. List the options of it and paste the result here. Use the command

cups.lpoptions -p snap-test -l

Does it show InputSlot and MediaSource options?

You can print on this queue via

cups.lp -d snap-test FILE

where FILE is the file which you want to print.

Grab the PPD file of this queue via

sudo cp /var/snap/cups/common/etc/cups/ppd/snap-test.ppd snap-test.ppd.txt
sudo chmod 644 snap-test.ppd.txt

Please attach this PPD also to this bug report. If it has the needed option it is also a candidate for creating a queue with your standard CUPS.

Now you do not need the CUPS Snap any more and you can remove it via

sudo snap remove --purge cups

Does at least one of the PPDs which you generated with the CUPS Snap contain the InputSlot and MediaSource options? If so, use it to create a queue under your system's CUPS (substitute PPD with the file name of the PPD file):

lpadmin -p printer -E -v 'URI' -P PPD

Can you print with this queue? Can you choose the input tray?

@DavideRossi
Copy link
Author

Sorry for the delay, for a couple of days I could not install the edge snap because of timeouts, then I gave up and I just got back to it. The snap is now installed but nothing is listening at port 10631.
cups.driverless shows the URI for the printer but cups.driverless 'URI' returns ERROR: Unable to create PPD file: Could not poll sufficient capability info from the printer.

@tillkamppeter
Copy link
Member

First, note that the way how the CUPS Snap works has changed. If yiou have a classically installed CUPS on your system (the Snap determines this by your system having an /etc/cups/cupsd.conf file) the CUPS Snap's CUPS goes into a proxy mode mirroring the queues of the system's classically installed CUPS (this mode is needed for confined Snaps to print, see README.md).

To suppress this mode and continue in with the Snap's CUPS running independently on port 10631, run

sudo touch /var/snap/cups/common/no-proxy
sudo snap stop cups
sudo snap start cups

After that, once cups-browsed will start to create print queues and you can also create print queues. When this is working please do the tests I asked you for in my previous message.

@DavideRossi
Copy link
Author

DavideRossi commented Apr 21, 2021

OK, apart from cups.lpoptions -p snap-test -l returning lpoptions: Unable to get PPD file for snap-test: The printer or class does not exist. everything else works. cups.driverless correctly lists *InputSlot Rear/Rear: "<</MediaPosition 18>>setpagedevice" but no MediaSource.
The option to use the rear tray now appears in CUPS' web interface and in the system's printing dialogs. I'm attaching the PPD file, let me know if you need anything else.
snap-test.ppd.txt
And thanks for the support.

@tillkamppeter
Copy link
Member

tillkamppeter commented Apr 21, 2021

"MediaSource" does not exist in PPD files, this option is "InputSlot" there and this one is present, as you also told in your post. Perhaps you mean "MediaType", but this is also present in the PPD you attached. This (and the fact that you have the options in your print dialogs) means that the current CUPS and cups-filters (as of the Snap) generate the PPD file correctly. Therefore I will close this issue.

I cannot reproduce that

cups.lpoptions -p snap-test -l

errors on a correctly created print queue in the Snap. If it continues to happen for you, feel free to post an issue in the cups-snap project.

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