GTK based software freezes when trying to print - a fix is coming

I believe this needs to be posted in the forum, as it’s a major issue for many users. In fact, I reinstalled my NixOS from scratch a few days ago, hoping the printer woes would go away - only to find them again on a fresh install.

There is a major bug in CUPS 2.4.15 that caused GTK-based programs (Chromium in particular) to hang when asked to print (Firefox is not affected). The bug has been fixed in CUPS 2.4.16. However, NixOS 25.11 is still using CUPS 2.4.15.

There is an open request to update CUPS: Update Request: cups 2.4.15 → 2.4.16 · Issue #473491 · NixOS/nixpkgs · GitHub

That thread contains useful tips on how to work around the issue for now while avoiding extensive local rebuilds (credit: michalrus):

Since a simple override of cups would cause a lot of local rebuilding, as a workaround you can depend on older nixos-25.11, c8cfcd6 – the most recent one without the faulty CUPS 2.4.15 according to https://releases.nixos.org/?prefix=nixos/25.11/

Adding following to /etc/nixos/configuration.nix worked for me and did not require a long rebuild:

  services.printing.package =
    let
      oldnixpkgs =
        import
          (builtins.fetchTarball {
            url = "https://github.com/NixOS/nixpkgs/archive/c8cfcd6ccd422e41cc631a0b73ed4d5a925c393d.tar.gz";
            sha256 = "1fdjh5jd5jx246fhfq13q5752nw9il5dwv36nqbcj4pa6kzwq9fy";
          })
          {
            config = config.nixpkgs.config;
            system = pkgs.stdenv.hostPlatform.system;
          };
    in
    oldnixpkgs.cups;
5 Likes

I tried using this configuration on another computer, and it didn’t appear to work. That system used Chrome as the browser. Both Chrome and Evince were freezing. But then I installed Chromium, and it didn’t freeze. I went back to Chrome, and it could open the print dialog, but it would still hang in “Page Setup” in the system print dialog. So it’s trickier than I would like. Let’s hope the fix would come soon.

I’m afraid that my fix probably has no effect. The hang is somewhat probabilistic, which confused me. I ended up installing kdePackages.okular to print PDFs.

I keep checking release-25.11 and nixos-25.11 branches every day - still no sign of cups 2.4.16 :frowning:

1 Like

@proski instead of checking release branches, you can just subscribe to Update Request: cups 2.4.15 → 2.4.16 · Issue #473491 · NixOS/nixpkgs · GitHub — nothing will happen before it’s merged, I think. And after it’s merged, there’s `Making sure you're not a bot!` (e.g. Making sure you're not a bot! ) that tracks how merged PRs progress through auxiliary branches to the release branches.

Thanks for opening this thread: I also experience this unfortunate bug after upgrading to 25.11…

1 Like

Indeed. :smiling_face_with_tear: What I meant in this fragment:

Since a simple override of cups would cause a lot of local rebuilding, as a workaround you can depend on older nixos-25.11, c8cfcd6 – the most recent one without the faulty CUPS 2.4.15 according to Channels for NixOS project(s) .

… was not to just override the services.printing.package, but to base your entire 25.11 system off of this commit. I.e. nix-channel, flake inputs or whatever you use – set the source to c8cfcd6. :crossed_fingers:

1 Like

If you don’t want to downgrade, you can try to upgrade to staging-next-25.11 which has the fixed package.

1 Like

ha, I guess Update Request: cups 2.4.15 → 2.4.16 · Issue #473491 · NixOS/nixpkgs · GitHub was superseeded by https://github.com/NixOS/nixpkgs/pull/468507 well, it shouldn’t be to long before we see it in 25.11 hopefull

There is also this issue xdg-desktop-portal-gtk: 100% cpu usage and no print-dialog shown · Issue #477826 · NixOS/nixpkgs · GitHub, which may or may not be related.

The fix is merged [Backport staging-25.11] cups: 2.4.15 -> 2.4.16 by nixpkgs-ci[bot] · Pull Request #468820 · NixOS/nixpkgs · GitHub . However two weeks later it’s still not part of NixOS 25.11, yet. Does anybody know, why?

It takes time to rebuild all packages. And we’re doing that for two different branches periodically. And of course, various regressions happen during that (and not many people participate in fixing them).

2 Likes

If you don’t want to downgrade, you can try to upgrade to staging-next-25.11 which has the fixed package.

But no binary cache, so, considering how many things depend on cups, you’ll have to rebuild the world locally.

That’s wrong. It was all in binary cache already. And now it’s also merged in release-25.11 (but not in nixos-25.11 channel yet, only in -small so far)

1 Like

It’s great to hear that! So it must’ve not been there when I was trying back then. Thanks for all the good work.

Well, depends on timing. At the beginning of this week it would be worse with the amount in cache.

1 Like

The fix is finally on the nixos-25.11 branch. I switched to it, and everything is working. Thanks to everyone who made it happen!