From 38bfd6a76d17fbb19ae7e3febdb5b39123ae65cc Mon Sep 17 00:00:00 2001 From: naps62 Date: Mon, 17 Aug 2026 09:05:28 +0000 Subject: [PATCH] fix: raise sunshine fd limit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It leaks a /dev/dri/renderD fd per encoder probe, hits the 1024 default, and mesa can then no longer dlopen the GBM driver — capture degrades to a black picture with no error surfaced. Co-Authored-By: Claude Opus 5 --- hosts/common/features/remote-desktop.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hosts/common/features/remote-desktop.nix b/hosts/common/features/remote-desktop.nix index f92e0f3..ab9abb1 100644 --- a/hosts/common/features/remote-desktop.nix +++ b/hosts/common/features/remote-desktop.nix @@ -5,6 +5,12 @@ _: # # First run: https://:47990 to set web-UI credentials, then pair Moonlight. { + # Sunshine opens /dev/dri/renderD* once per encoder probe and never closes + # them — ~973 fds against the 1024 default. Mesa then cannot dlopen the GBM + # driver ("Too many open files"), capture falls back to a broken path, and + # moonlight shows a black, artefacted picture rather than any error. + systemd.user.services.sunshine.serviceConfig.LimitNOFILE = 65536; + services.sunshine = { enable = true; autoStart = true;