I’ve been trying to get my wireless networked printer (a Canon ImageCLASS MF445dw) working under NixOS
for over half a year, and am about to give up and move to another distribution, as my workflow now absolutely demands that I be able to print (scanning would be nice too, but that’s another hill). I’ve installed the device’s driver using the following within configuration.nix
,
services = {
printing = {
enable = true;
browsing = true;
drivers = [ pkgs.canon-cups-ufr2 ];
};
avahi = {
enable = true;
nssmdns = true;
publish.enable = true;
publish.workstation = true;
publish.addresses = true;
};
};
I’m on unstable:
$ nix-info -m
- system: `"x86_64-linux"`
- host os: `Linux 5.15.86, NixOS, 23.05 (Stoat), 23.05pre440068.a518c771485`
- multi-user?: `yes`
- sandbox: `yes`
- version: `nix-env (Nix) 2.12.0`
- channels(root): `"home-manager, nixos"`
- nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
NixOS CUPS
has no problem finding the networked printer, although there is always a curious hiccup in printing a test page, in which CUPS
announces it can’t then locate the device it previously found,
"Unable to locate printer "Canon7603ea.local"."
This is the same error as detailed here in a previous post. I don’t know what to make of this apparent communication error, as after a while, CUPS
does report completion — without printing anything: CUPS
just blithely swallows job after job, reports instant success with a silent printer, not even reporting an error. Perhaps the real issue lies with CUPS/NixOS
's implementation of the driver itself?
In frustration, I even went so far as to
- create a
qemu/kvm
Debian 11 image on this NixOS host; - install the network printer within that virtual guest machine using Canon’s latest install script, and lo and behold successfully print stuff from within the container;
- if I share the above functioning printer within the virtual machine,
CUPS
running underNixOS
can find the shared printer OK – although I still must elect to use the Canon driver (supplied bypkgs.canon-cups-ufr2
, v. 5.40) – but this route also fails to print anything. Regardless of where it finds the printer,NixOS CUPS
just swallows jobs, reports completion, but nothing ever appears at the printer, nor does the printer’s service web page report these job even appearing, whereas successful activity is recorded from print jobs sent within the Debian virtual machine. I had thought that sharing the printer within the container (from which I can print just fine) would work, but native printing fromNixOS CUPS
doesn’t seem to be possible, only from within a container running within NixOS.
Can anyone suggest what might be happening here? Everything else works great under NixOS, but lacking a printer is turning out to be a real show-stopper, and it seems silly to be limited to printing via software running from within a virtual machine. To repeat – at the risk of extending an already-too-long post – the problem does not appear to be finding the printer, the problem appears to reside within either how the driver is accessed, or some sort of communication issue with the printer itself – i.e., where CUPS believes it’s printing stuff OK, when it’s obviously not.
Sorry again for the long, long post, am just really frustrated with this problem. With every previous distro I’ve used, printing via this device has never ever been an issue. I would be very grateful to any wisdom anyone can provide.
Edited grammar, typos