Files
punktfunk/packaging/linux/50-punktfunk-nice.conf
enricobuehler 52df9c59af pkg(linux): nice-limit headroom on every channel, so the renice also works without rtkit
A new shared drop-in, packaging/linux/50-punktfunk-nice.conf
(user@.service.d, LimitNICE=-15), raises the user-session nice hard
limit so the direct setpriority() path works on rtkit-less boxes — a
limit, not a grant, effective from the next login. Shipped by rpm
(%files + install, flows into the Bazzite sysext via rpm2cpio), Arch,
and deb; the Steam Deck installer writes it to
/etc/systemd/system/user@.service.d instead (SteamOS /usr is
read-only), following its existing sudo-to-/etc pattern.

rpm and deb gain a weak Recommends: rtkit and Arch an optdepends hint —
with rtkit the fix needs no relogin at all. The NixOS module instead
sets security.rtkit.enable = mkDefault true (rtkit is not a given
there; mkDefault keeps it operator-overridable).

It remains true on every channel that the host binary must never carry
a file capability — the spec's no-caps note now names the two fallback
rungs instead of calling the thread nice a best-effort no-op.
2026-08-14 20:59:52 +02:00

14 lines
799 B
Plaintext

# Punktfunk: let the streaming host's data-plane threads renice themselves.
#
# The host raises its capture/encode/send and audio threads to nice -10/-5 so a CPU-saturating
# game (or its shader-compile storm at launch) cannot deschedule them mid-stream. That call needs
# CAP_SYS_NICE or a raised RLIMIT_NICE — and the host binary must never carry a file capability
# (it would make the process unidentifiable to KWin and kill desktop streaming), so the limit is
# the right lever. Desktops with RealtimeKit don't need this file (the host falls back to rtkit);
# it covers rtkit-less installs, from the next login onward.
#
# This raises only the LIMIT for user sessions. Nothing is reprioritized by itself: a process
# still has to call setpriority(), exactly as before.
[Service]
LimitNICE=-15