Closed MatthewCroughan closed 3 years ago
Note that as a workaround you can likely use the USB-to-serial device directly as a serial interface without going through CUPS - I'm pretty sure that's the setup in https://github.com/bibliotheekdeventer/makersplaats/blob/master/images/configuration.nix / https://github.com/bibliotheekdeventer/makersplaats/blob/master/images/inkcut.device.json .
We should still fix it so it also works via CUPS, of course :)
In my case, your workaround is not as nice as using cups, since Inkcut improperly handles the lp0 (parallel) and serial is not an option for my cutter. Cups handles the jobs properly, if the vinyl cutter is powered off half-way through a job it will not continue to send and buffer the job, it will halt the job and consider it done. So it's just a better method than to give Inkcut direct access to lp0.
I tried this, and under 'Setup' I do see my CUPS printers, so it looks like at least something works.
However, indeed when I send the job to the device, indeed I see nothing show up in the print queue. Looking at the inkcut logs, however, all looks fine:
2021-07-19 21:34:23,609 | INFO | inkcut | device | Connecting to device
2021-07-19 21:34:23,609 | INFO | inkcut | device | Processing job
2021-07-19 21:34:23,610 | DEBUG | inkcut | device | connect
2021-07-19 21:34:23,622 | DEBUG | inkcut | -> HP-LaserJet-4100 | IN;
2021-07-19 21:34:23,624 | DEBUG | inkcut | HP-LaserJet-4100 | opened
2021-07-19 21:34:23,626 | INFO | inkcut | device | Working...
2021-07-19 21:34:23,633 | DEBUG | inkcut | -> HP-LaserJet-4100 | PU1376,1412;
2021-07-19 21:34:23,637 | DEBUG | inkcut | -> HP-LaserJet-4100 | PD852,1362;
2021-07-19 21:34:23,639 | DEBUG | inkcut | -> HP-LaserJet-4100 | PD446,1698;
2021-07-19 21:34:23,640 | DEBUG | inkcut | -> HP-LaserJet-4100 | PD396,2222;
2021-07-19 21:34:23,641 | DEBUG | inkcut | -> HP-LaserJet-4100 | PD732,2628;
2021-07-19 21:34:23,643 | DEBUG | inkcut | -> HP-LaserJet-4100 | PD1256,2678;
2021-07-19 21:34:23,644 | DEBUG | inkcut | -> HP-LaserJet-4100 | PD1662,2343;
2021-07-19 21:34:23,645 | DEBUG | inkcut | -> HP-LaserJet-4100 | PD1712,1818;
2021-07-19 21:34:23,646 | DEBUG | inkcut | -> HP-LaserJet-4100 | PD1376,1412;
2021-07-19 21:34:23,647 | DEBUG | inkcut | -> HP-LaserJet-4100 | PU1217,120;
2021-07-19 21:34:23,649 | DEBUG | inkcut | -> HP-LaserJet-4100 | PD577,113;
2021-07-19 21:34:23,649 | DEBUG | inkcut | -> HP-LaserJet-4100 | PD120,560;
2021-07-19 21:34:23,651 | DEBUG | inkcut | -> HP-LaserJet-4100 | PD113,1200;
2021-07-19 21:34:23,652 | DEBUG | inkcut | -> HP-LaserJet-4100 | PD560,1657;
2021-07-19 21:34:23,653 | DEBUG | inkcut | -> HP-LaserJet-4100 | PD1200,1664;
2021-07-19 21:34:23,654 | DEBUG | inkcut | -> HP-LaserJet-4100 | PD1657,1217;
2021-07-19 21:34:23,655 | DEBUG | inkcut | -> HP-LaserJet-4100 | PD1664,577;
2021-07-19 21:34:23,655 | DEBUG | inkcut | -> HP-LaserJet-4100 | PD1217,120;
2021-07-19 21:34:23,657 | DEBUG | inkcut | -> HP-LaserJet-4100 | PU0,0;
2021-07-19 21:34:23,657 | DEBUG | inkcut | device | finish
2021-07-19 21:34:23,657 | DEBUG | inkcut | -> HP-LaserJet-4100 | IN;
2021-07-19 21:34:23,657 | DEBUG | inkcut | device | disconnect
2021-07-19 21:34:23,657 | DEBUG | inkcut | HP-LaserJet-4100 | closed
Showing the 'completed jobs' in CUPS doesn't show this one, though - not as 'cancelled' either.
Adding some more diagnostic logging (https://github.com/inkcut/inkcut/pull/312) revealed that twisted is trying to run /usr/bin/lpr, which is of course not where that tool is located in NixOS. Making that an absolute path into the nix store seemed to help (at least things showed up in my CUPS queue, haven't tested with an actual plotter).
Well, that should be it. I always assumed patchShebangs
was ran automatically in most cases to fix the issue of hardcoded /usr/bin
references, Is this not the case here?
Well, that should be it. I always assumed
patchShebangs
was ran automatically in most cases to fix the issue of hardcoded/usr/bin
references, Is this not the case here?
That should indeed run automatically, but only covers the #!
line of executable scripts. In this case 'lpr'
was just passed as a parameter to reactor.spawnProcess
somewhere inside the python plugin, so that's hard to detect automatically ;)
Describe the bug Inkcut is unable to print to a cups printer.
To Reproduce Steps to reproduce the behavior:
services.printing.enable = true;
to your config127.0.0.1:631
and add a printer that points to a local vinyl cutter or printer device via its USB device name, for exampleusb://Roland/GX-300?serial=0001
Raw > Raw Print Queue
Setup
and make a profile for your printer that points to this new printerExpected behavior Inkcut would start a print job in cups
Notify maintainers @raboof
Metadata
"x86_64-linux"
Linux 5.13.0, NixOS, 21.11.20210704.20887e4 (Porcupine)
yes
yes
nix-env (Nix) 2.4pre20210601_5985b8b
"2009-20.09.4393.068984c00e0, nixos-21.11pre301985.23cd13167a1, nixpkgs-21.11pre302045.90cbe95037f"
""
/nix/var/nix/profiles/per-user/root/channels/nixos
Maintainer information: