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

canon-cups-ufr2 can't find rastertoufr2 #174630

Closed
nmccarty opened this issue May 25, 2022 · 6 comments · Fixed by #180164
Closed

canon-cups-ufr2 can't find rastertoufr2 #174630

nmccarty opened this issue May 25, 2022 · 6 comments · Fixed by #180164

Comments

@nmccarty
Copy link

nmccarty commented May 25, 2022

Describe the bug

Installation of my Canon Color imageCLASS MF644Cdw results in the following error message within the cups interface, as well as a complete inability to print:

Idle - "File "/nix/store/lkgpynyyzfgg0r6bwh1l17r60vpgwq15-cups-progs/lib/cups/filter/rastertoufr2" not available: No such file or directory"

Steps To Reproduce

Steps to reproduce the behavior:

  1. Have the following in configuration.nix on either unstable or staging-22.05 (the version of canon-cups-ufr2 in 21.05 is way too old to have support for my printer)
services.printing = {
    enable = true;
    drivers = with pkgs; [
      canon-cups-ufr2
    ];
  };

  # Enable avahi for printer discovery
  services.avahi = {
    enable = true;
    nssmdns = true;
  };
  1. Attempt to install printer through cups using either autodiscovery or manually specifying the ip address, specifying canon for the make and ~Canon MF642C/643C/644C UFR II (en) for the model
  2. Attempt to print something or visit the cups printer status page

Expected behavior

Cups is able to find the required filter

Additional context

rastertoufr2 is indeed not a part of cups-progs, from what I was able to figure out, it looks like its supposed to be provided by canon-cups-ufr2 but the required binary is either not installed properly, the drivers need a patch/workaround to find it on nixos, or both

Notify maintainers

@dmayle

Metadata

 - system: `"x86_64-linux"`
 - host os: `Linux 5.17.7-zen1, NixOS, 22.05 (Quokka), 22.05.20220525.1774dcc`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.8.1`
 - channels(root): `"nixos, nixos-unstable"`
 - channels(nathan): `"nixpkgs-unstable"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
@rsa4046
Copy link

rsa4046 commented Jul 4, 2022

I have essentially the identical issue with canon-cups-ufr2 as described by @nmccarty (my portion of configuration.nix is the same): cups finds and adds the printer (an imageCLASS MF445dw) and its Canon MF440 Series UFR II driver successfully, but then fails with status,

Idle - "File "/nix/store/bj5s6j8bs4q692syp8cxi5y49yjj70hc-cups-progs/lib/cups/filter/rastertoufr2" not available: No such file or directory"

And the rastertoufr2 filter is indeed MIA:

$ find /nix/store/bj5s6j8bs4q692syp8cxi5y49yjj70hc-cups-progs | grep rasterto
/nix/store/bj5s6j8bs4q692syp8cxi5y49yjj70hc-cups-progs/lib/cups/filter/.rastertopclx-wrapped
/nix/store/bj5s6j8bs4q692syp8cxi5y49yjj70hc-cups-progs/lib/cups/filter/.rastertops-wrapped
/nix/store/bj5s6j8bs4q692syp8cxi5y49yjj70hc-cups-progs/lib/cups/filter/rastertopwg
/nix/store/bj5s6j8bs4q692syp8cxi5y49yjj70hc-cups-progs/lib/cups/filter/rastertohp
/nix/store/bj5s6j8bs4q692syp8cxi5y49yjj70hc-cups-progs/lib/cups/filter/rastertopclx
/nix/store/bj5s6j8bs4q692syp8cxi5y49yjj70hc-cups-progs/lib/cups/filter/.rastertopdf-wrapped
/nix/store/bj5s6j8bs4q692syp8cxi5y49yjj70hc-cups-progs/lib/cups/filter/rastertops
/nix/store/bj5s6j8bs4q692syp8cxi5y49yjj70hc-cups-progs/lib/cups/filter/.rastertoescpx-wrapped
/nix/store/bj5s6j8bs4q692syp8cxi5y49yjj70hc-cups-progs/lib/cups/filter/.rastertopclm-wrapped
/nix/store/bj5s6j8bs4q692syp8cxi5y49yjj70hc-cups-progs/lib/cups/filter/rastertoescpx
/nix/store/bj5s6j8bs4q692syp8cxi5y49yjj70hc-cups-progs/lib/cups/filter/rastertopdf
/nix/store/bj5s6j8bs4q692syp8cxi5y49yjj70hc-cups-progs/lib/cups/filter/rastertopclm
/nix/store/bj5s6j8bs4q692syp8cxi5y49yjj70hc-cups-progs/lib/cups/filter/rastertolabel
/nix/store/bj5s6j8bs4q692syp8cxi5y49yjj70hc-cups-progs/lib/cups/filter/rastertoepson

But I downloaded the latest driver from CANON (UFR II/UFRII LT Printer Driver for Linux V5.50) and the filter is indeed there:

$ tar --strip-components=3 -xf linux-UFRII-drv-v550-us-00.tar.gz linux-UFRII-drv-v550-us/x64/RPM/cnrdrvcups-ufr2-us-5.50-1.00.x86_64.rpm
$ rpm2targz cnrdrvcups-ufr2-us-5.50-1.00.x86_64.rpm
$ tar -tf ./cnrdrvcups-ufr2-us-5.50-1.00.x86_64.tar.gz | grep rastertoufr2
./usr/lib/cups/filter/rastertoufr2

My system:

$ sudo nix-info -m
 - system: `"x86_64-linux"`
 - host os: `Linux 5.15.49, NixOS, 22.05 (Quokka), 22.05.1257.cd90e773eae`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.8.1`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

Thanks to all --

@SuperSandro2000
Copy link
Member

I have a fix on my disk. I only need to commit it and create a PR.

@rsa4046
Copy link

rsa4046 commented Jul 4, 2022

@SuperSandro2000 awesome, thank you :-)

@jawa6988
Copy link

jawa6988 commented Aug 29, 2022

@SuperSandro2000

Sorry for my ignorance, but could you point me to something explaining how to install your patch? or what file I should edit on an existing cups install? I'm a little lost when it comes to using the source code. I've searched through cups source and everywhere I can think of trying to understand what file needs edited with your changes without asking like an idiot LOL

I think maybe my real issue is that I'm trying to get it working on a Pi-Zero (ARM not x86)

@SuperSandro2000
Copy link
Member

The easiest would be to use nixos-unstable.

@hannut
Copy link

hannut commented Mar 10, 2024

canon-cups-ufr2 needs also the gutenprintBin driver. When both are installed it just works ™️

services.printing.drivers = [ pkgs.gutenprintBin pkgs.canon-cups-ufr2 ];

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

Successfully merging a pull request may close this issue.

6 participants