sunshine fixes

This commit is contained in:
Miguel Palhas
2026-07-06 09:54:23 +01:00
parent c4a5515297
commit eea9bdb095
5 changed files with 48 additions and 6 deletions
+4 -1
View File
@@ -41,7 +41,10 @@
"WebFetch(domain:bugs.chromium.org)",
"WebFetch(domain:gitlab.freedesktop.org)",
"Bash(python3 -c ' *)",
"Bash(statix check *)"
"Bash(statix check *)",
"Read(//home/naps62/.config/sunshine/**)",
"Read(//home/naps62/**)",
"Read(//home/naps62/Games/**)"
]
},
"sandbox": {
Generated
+4 -4
View File
@@ -1070,11 +1070,11 @@
"nixpkgs": "nixpkgs_6"
},
"locked": {
"lastModified": 1782972507,
"narHash": "sha256-4rg384vnJCYUq6IHNOv0xvanI5u/rVwwoGKZd1DfuoQ=",
"lastModified": 1783264766,
"narHash": "sha256-1iD8gdvxBYBfffHhNsnZPnPGDDttYVRUhghLbAa1Mho=",
"ref": "refs/heads/main",
"rev": "76d41e5bb57fc97b283a8ab6e3a8acc809cecafe",
"revCount": 64,
"rev": "515ab16c76fc0779a1c6be93cfa1424a901373cb",
"revCount": 67,
"type": "git",
"url": "ssh://git@github.com/ZePedroResende/yogurt"
},
@@ -92,6 +92,10 @@ in
cursor = {
no_hardware_cursors = "yes";
# Auto-hide the pointer after 3s of no movement so a parked cursor
# doesn't sit on top of a game (visible in the stream too). It
# reappears the instant the mouse moves.
inactive_timeout = 3;
};
general = {
@@ -211,6 +215,11 @@ in
"size 1200 1200, match:class org\\.pulseaudio\\.pavucontrol"
"move (cursor_x-(window_w*0.5)) (cursor_y-(window_h*0.5)), match:class org\\.pulseaudio\\.pavucontrol"
# wine / game installers (Inno Setup temp windows, e.g. Heroic/GOG).
# Their class is the random "setup_*.tmp" filename, so match by suffix.
"float on, match:class .*\\.tmp"
"center 1, match:class .*\\.tmp"
# metamask
"float on, match:class chrome-nkbihfbeogaeaoehlefnkodbefgpgknn-.*"
+15 -1
View File
@@ -82,10 +82,24 @@
# stands in for the literal spaces to keep the rule string unambiguous.
"workspace 3, match:title Steam.Big.Picture.Mode"
"fullscreen on, match:title Steam.Big.Picture.Mode"
# Heroic (GOG/Epic launcher) streamed via Moonlight — `heroic --console`.
# Tile it on ws3 (DP-1, the captured screen) rather than letting it float
# or land on whatever monitor the cursor is on. Games it launches are
# Proton titles → caught by the steam_app_ rules above; native ones need
# their own class added here.
"workspace 3, match:class heroic"
"tile on, match:class heroic"
];
render = {
direct_scanout = true;
# Experiment: was `true`. With a fullscreen game direct-scanning-out,
# Sunshine starting a capture forces the compositor off the direct path,
# and that surface/context churn is a suspected trigger for Chromium's
# `EGL_CONTEXT_LOST` crash (Big Picture drops to software rendering mid-
# stream). Disabled to test whether the crashes stop. If it makes no
# difference, flip back to `true` for the local fullscreen latency win.
direct_scanout = false;
};
};
+16
View File
@@ -46,4 +46,20 @@
# Let Sunshine find the NVIDIA driver's libcuda.so.1 for NVENC. Merges into
# the module's own systemd.user.services.sunshine definition.
systemd.user.services.sunshine.environment.LD_LIBRARY_PATH = "/run/opengl-driver/lib";
# DualSense/DualShock emulation. Sunshine presents a *real* PS5 HID (touchpad,
# motion, LEDs, rumble) via /dev/uhid, not plain uinput — a uinput pad can't
# carry those features. The kernel uhid node is root-only (0600) with no udev
# rule, so Sunshine (a user service) can't open it and silently falls back to
# an Xbox pad: "Unable to create virtual DualShock 5 controller: Permission
# denied".
#
# NOTE: `uaccess` does NOT work for uhid — unlike uinput it isn't attached to
# the seat (no `seat` tag), so logind never grants the ACL. Use a group grant
# instead, mirroring Sunshine's upstream uinput rule: group `input`, mode 0660
# (naps62 is already in `input`). Deterministic, no seat/session dependency.
boot.kernelModules = [ "uhid" ];
services.udev.extraRules = ''
KERNEL=="uhid", SUBSYSTEM=="misc", MODE="0660", GROUP="input"
'';
}