Printer ppdOptions have no effect (printer works, though)

Hi,

I’m having a weirdly frustrating situation with my printer (surprise surprise…) where the printer itself, declaratively configured like this:

{ pkgs, ... }:
{
  services.printing.enable = true;
  services.printing.drivers = [ pkgs.brlaser ];

  services.avahi = {
    enable = true;
    nssmdns4 = true;
    openFirewall = true;
  };

  hardware.printers = {
    ensurePrinters = [
      {
        name = "Drucker";
        location = "Home";
        description = "Brother HL-L2375DW";
        deviceUri = "ipp://192.168.50.101";
        model = "drv:///brlaser.drv/brl2375w.ppd";
        ppdOptions = {
          PageSize = "A5"; # just for testing
          Duplex = "DuplexNoTumble";
        };
      }
    ];
    ensureDefaultPrinter = "Drucker";
  };
}

works perfectly, except for the ppdOptions, which seemingly get discarded / ignored.

The following is the output of lpoptions -l -p Drucker:

PageSize/Media Size: *A4 A5 A6 B5 B6 EnvC5 EnvMonarch EnvDL Executive Legal Letter
Resolution/Resolution: *600dpi 1200dpi
InputSlot/Media Source: *Auto Tray1 Tray2 Tray3 MPTray Manual
MediaType/Media Type: *PLAIN THIN THICK THICKER BOND TRANS ENV ENV-THICK ENV-THIN
brlaserEconomode/Toner save mode: *False True
Duplex/2-Sided Printing: *None DuplexNoTumble DuplexTumble

I have tried using "Duplex/2-Sided Printing" or just "2-Sided Printing" as a key as well, no luck. Just to reiterate, the printer itself works perfectly fine, and if I use the system dialog to print and change the duplex option there, the printer will indeed print 2-sided.

I feel like I’m missing something obvious here, can someone help me out? :see_no_evil:

Interesting, I have the reverse problem, so to speak (but using a Brother HL-2270DW): no matter what I change in my config or manually set in print dialogs (global GNOME settings or application specific settings), the printer always prints duplex.

$ lpoptions -l
PageSize/Media Size: *A4 A5 A6 B5 B6 EnvC5 EnvMonarch EnvDL Executive Legal Letter
Resolution/Resolution: *600dpi 1200dpi 300dpi
InputSlot/Media Source: *Auto Tray1 Tray2 Tray3 MPTray Manual
MediaType/Media Type: *PLAIN THIN THICK THICKER BOND TRANS ENV ENV-THICK ENV-THIN
brlaserEconomode/Toner save mode: False *True
Duplex/2-Sided Printing: *None DuplexNoTumble DuplexTumble

The only workaround for the moment is to create a print job for each page separately, which is very tedious.

Huh, interesting! I just tried (because I realized I had not actually tried printing non-duplex yet), but in my case two separate sheets come out of the printer, and the print dialog options do work.

This has to be connected somehow though :sweat_smile: