dot

vizie's NixOS desktop: Hyprland, CachyOS kernel and gaming tweaks

2040204

Philly: turn off WebKit's DMA-BUF renderer

By Gustaf Granström

Philly's webview closed at once on the NVIDIA driver under Wayland with
"Error 71 (Protocol error) dispatching to Wayland display". Set
WEBKIT_DISABLE_DMABUF_RENDERER on the program itself, so it holds however
Philly is started.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

1 file changed +21 −2

@@ -1,5 +1,24 @@
11 # Programs your configs and scripts call, and your own tools.
22 { inputs, pkgs, ... }:
3+let
4+ system = pkgs.stdenv.hostPlatform.system;
5+
6+ # Philly's webview (WebKitGTK) closes at once on the NVIDIA driver under
7+ # Wayland, with "Error 71 (Protocol error) dispatching to Wayland display",
8+ # unless its DMA-BUF renderer is off. Set on the program itself, so it holds
9+ # however Philly is started (terminal, fuzzel, or as the folder handler from
10+ # an app running as a systemd service, which doesn't get hyprland.lua's env).
11+ philly = pkgs.symlinkJoin {
12+ name = "philly";
13+ paths = [ inputs.philly.packages.${system}.default ];
14+ nativeBuildInputs = [ pkgs.makeBinaryWrapper ];
15+ postBuild = ''
16+ rm $out/bin/philly
17+ makeWrapper ${inputs.philly.packages.${system}.default}/bin/philly $out/bin/philly \
18+ --set-default WEBKIT_DISABLE_DMABUF_RENDERER 1
19+ '';
20+ };
21+in
322 {
423 home.packages = with pkgs; [
524 # The Hyprland desktop: launcher, bar flyouts, notifications, idle/lock.
@@ -21,8 +40,8 @@
2140 solaar # mouse battery fallback (mouse-battery.sh)
2241
2342 # Screenshots and screen recording (imsh-shot, imsh-cast; Super+Shift+S/F/R).
24- inputs.imsh-clients.packages.${pkgs.stdenv.hostPlatform.system}.default
43+ inputs.imsh-clients.packages.${system}.default
2544 # Philly, the file browser (also the handler for folders, in mimeapps.list).
26- inputs.philly.packages.${pkgs.stdenv.hostPlatform.system}.default
45+ philly
2746 ];
2847 }