Commit Graph
476 Commits
Author SHA1 Message Date
Raphael Derosso Pereira 8ca9dbfcd3 fix(linux): close the DRM render-node fd owned by wl::dmabuf_t
`dmabuf_t::init_gbm()` opens the render node and hands the descriptor to
`gbm_create_device()`; the destructor destroys the GBM device but never
closes the descriptor, on the assumption that GBM owns it. It does not:
libgbm leaves the fd to the caller (`gbm_device_destroy()` does not close
it).

Every capture (re)initialisation constructs a new `dmabuf_t` -- one per
streaming session start, plus one per output mode change and per encoder
validation pass that reaches a real capture -- so the process keeps one
open `/dev/dri/renderD*` descriptor per (re)init for its lifetime.
Measured on a long-running host (Hyprland, `capture = wlr`, `encoder =
nvenc`, NVIDIA 610.57.04, v2026.516.143833; unchanged on master):
`/dev/dri` descriptors went 4 -> 8 across three Moonlight connect /
disconnect cycles and only a restart of Sunshine returned them.

Own the descriptor together with the device in a small RAII type,
`wl::gbm_device_t`, whose `reset()` destroys the device and then closes
the descriptor (and which closes it when device creation fails); open it
with `O_CLOEXEC` so prep/do commands do not inherit it. The open/create/
destroy calls are injectable (`gbm_device_accessors_t`, same shape as
`gbm_bo_accessors_t`) so the lifecycle is covered by unit tests that need
no GPU: the descriptor is closed on reset, on the failure path and on
destruction.

Signed-off-by: Raphael Derosso Pereira <raphael@insignis.com.br>
2026-10-09 09:56:06 -04:00
Alex Ford fd45d2dd85 feat(windows): add externally managed audio capture (#5647) 2026-10-09 09:21:47 -04:00
eastginza 31da0d8db9 fix(windows): correct shader selection for sRGB-encoded FP16 framebuffer (Win11 SDR) (#5106) 2026-10-09 00:38:48 -04:00
Dave Lane db1e08d5b7 fix(input): target mouse input at the streamed display (#5739) 2026-10-08 22:54:42 -04:00
neatnoise 3f2e767a7b feat(linux/wlr): enable Vulkan encoding for wlroots capture (#5734) 2026-10-07 12:20:41 -04:00
Conn O'Griofa 5e13eb6799 fix(linux): radv: don't force video_encode on autoprobe (#5849) 2026-10-03 18:16:27 -04:00
Conn O'Griofa efe624ffc7 fix(linux/vaapi): adjust balanced preset; don't try to override default quality (#5847) 2026-10-03 11:12:22 -04:00
neatnoise d41a2a32ca feat(vulkan): add vk_quality config option (#5783) 2026-09-28 23:44:53 -04:00
Dave Lane 2435fb421d fix(input): honor extended keyboard modifier (#5821) 2026-09-28 21:43:24 -04:00
Dave Lane 052b413216 feat(permissions): expose platform access and restart after grants (#5820) 2026-09-28 21:42:59 -04:00
Conn O'Griofa 1222ff62ab fix(linux/portalgrab): don't use TaskPool for xdg_worker thread. (#5822) 2026-09-28 09:35:35 -04:00
Dave Lane 8fc40974c9 feat(macos): add gamepad support using libvirtualhid (#5807) 2026-09-27 16:20:34 -04:00
Conn O'Griofa e1e6700bbb feat(linux/pipewire): add pts passthrough whitelist, cleanups (#5791) 2026-09-25 16:24:14 -04:00
Conn O'Griofa 55d6c0f878 feat(linux): Portal capture fallback support, misc fixes (#5774) 2026-09-25 14:47:58 -04:00
Dave LaneandAndy Grundman 6d4a95955e build(macOS): remove zero-initialization (#5744)
Co-authored-by: Andy Grundman <105828+andygrundman@users.noreply.github.com>
2026-09-17 14:56:47 -04:00
Dave Lane f54f9dfc57 chore(deps): move boost to CPM and bump to 1.92 (#5730) 2026-09-15 20:14:58 -04:00
Conn O'Griofa 7a987eecf1 feat(linux): use privileged EGL worker thread (#5709) 2026-09-14 19:34:24 -04:00
Conn O'Griofa 3745a35930 fix(pipewire): gate variable rate to KWin 5.x.x - 6.7.79 (up to stable 6.7 series) (#5705) 2026-09-13 21:07:25 -04:00
Dave Lane d64016a464 fix(linux): repair privileged DRM worker build (#5706) 2026-09-13 19:34:04 -04:00
c553565b98 Merge commit from fork
Sanitize GUI loader and plugin environment variables before privileged initialization, failing closed when the environment cannot be cleaned.

Retain CAP_SYS_ADMIN only on a dedicated DRM worker, route KMS and CUDA DRM access through it, reject queued work safely during overflow or shutdown, and drop the worker privileges when DRM access is no longer needed.

Add Linux regression coverage for the sanitizer and document the new privileged-worker interfaces.

Co-authored-by: Conn O'Griofa <749000+psyke83@users.noreply.github.com>
Co-authored-by: Kishi <41839133+Kishi85@users.noreply.github.com>
2026-09-13 16:37:49 -04:00
Conn O'Griofa 8c74826f2e fix(pipewire): extend KWin version check to handle 6.8 beta/RC versions (#5704) 2026-09-13 11:51:08 -04:00
Dave Lane fb925302d0 fix(linux): export all Wayland DMA-BUF planes (#5699) 2026-09-13 09:31:45 -04:00
Dave Lane 2ebaae37d2 fix(linux): handle NVENC in builds without CUDA (#5698) 2026-09-12 16:30:01 -04:00
Cameron Gutman fbf12d019c fix: missing initializers and incorrect default for native_pen_touch (#5693) 2026-09-12 10:32:04 -04:00
Cameron Gutman 48fca7ab64 fix(nvapi,nvenc): Load ARM64 DLLs on RTX Spark (#5682) 2026-09-10 22:57:13 -04:00
solidv a903885281 fix(linux/vulkan): use vkGetDeviceQueue2 with FFmpeg 9.0 queue flags (#5675) 2026-09-10 14:59:09 -04:00
Dave Lane f7e550d4ab feat(config): add gamepad_driver option (#5653) 2026-09-08 19:27:07 -04:00
Conn O'Griofa cb72dffa32 feat(linux/pipewire): add support for unpaced capture when appropriate (#5629) 2026-09-06 18:25:25 -04:00
Dave Lane 73ccd68f3c fix(macOS): enable microphone permission flow (#5621) 2026-09-06 08:37:08 -04:00
Dave Lane aa92000dc6 refactor: pairing flow, pairing tests, and inline struct comments (#5602) 2026-09-03 08:51:02 -04:00
tonyctalopeandReenigneArcher f111d6a4af fix(windows): capture the configured audio sink instead of the default device (#5408)
Co-authored-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com>
2026-09-01 15:27:48 -04:00
Conn O'Griofa 22310da7d9 fix(linux/pipewire): try variable rate for non-KWin compositors (#5569) 2026-08-30 07:51:51 -04:00
Dave Lane c75d5d769b feat(input): update libvirtualhid integration (#5563) 2026-08-29 21:09:02 -04:00
Conn O'GriofaandKishi85 f273ce8f45 fix(pipewire): gate variable rate capture and fix fractional framerates (#5538)
Co-authored-by: Kishi85 <41839133+Kishi85@users.noreply.github.com>
2026-08-25 20:18:04 -04:00
nikzasel e5759171f1 fix(linux/publish): release the Avahi client when the poll loop stops (#5545) 2026-08-23 23:03:05 -04:00
Dave Lane 05b49f0d87 chore: update Virtual HID requirements and mouse refresh (#5547) 2026-08-23 14:44:37 -04:00
Zach DentonandReenigneArcher 3dfbfe0906 fix(wayland): use the current wl_output mode (#5150)
Signed-off-by: Zach Denton <z@chdenton.com>
Co-authored-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com>
2026-08-20 23:00:50 -04:00
Dave Lane d3c5e2c85e fix(input): preserve aux gamepad data and bump libvirtualhid (#5531) 2026-08-20 17:00:44 -04:00
Eduardo Mozart de Oliveira f0a46d759d fix(macOS): System tray icon disappears when restarting Sunshine (#5504) 2026-08-20 12:51:31 -04:00
Conn O'Griofa 9e1f089e1f fix(linux/freebsd): truncate thread names to 15 characters (#5527) 2026-08-19 23:31:03 -04:00
luanweslley77andluanweslley77 6ad5f9735d fix(linux/pipewire): restore dummy buffer for software encoders and fix buffer ownership (#5495)
Co-authored-by: luanweslley77 <luanweslley77@users.noreply.github.com>
2026-08-18 11:59:30 -04:00
Dave Lane 687e12d013 feat(input): implement libvirtualhid adding new gamepad styles (#5368) 2026-08-16 15:24:58 -04:00
Kishi 3cba9baeba fix(linux/kms)!: Use connector type index from KMS instead of self calculation (#5489) 2026-08-10 14:38:43 -04:00
dependabot[bot]andReenigneArcher 965c91a428 build(deps): bump third-party/lizardbyte-common from 06cd442 to 011ad2b (#5457)
* build(deps): bump third-party/lizardbyte-common

Bumps [third-party/lizardbyte-common](https://github.com/LizardByte/lizardbyte-common) from `06cd442` to `011ad2b`.
- [Release notes](https://github.com/LizardByte/lizardbyte-common/releases)
- [Commits](https://github.com/LizardByte/lizardbyte-common/compare/06cd442b808f02f1674f3192a84d25b9a503c482...011ad2bb139083dcf4ec21f9c09f07470891a668)

---
updated-dependencies:
- dependency-name: third-party/lizardbyte-common
  dependency-version: 011ad2bb139083dcf4ec21f9c09f07470891a668
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* style: run clang-format across C++ sources

Reformatted conditionals, loops, and long function calls across core, platform, NVENC, and test helper code to match updated formatting rules, including minor spacing normalization in type declarations. These are style-only edits with no intended behavior changes.

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com>
2026-07-28 08:08:12 -04:00
Dave Lane fb3d85cff4 fix(nvenc): dynamic nv codec sdk selection (#5451) 2026-07-26 21:06:28 -04:00
Kishi 4b74548578 fix(linux/kms): use same methodology for display name matching and list generation (#5448) 2026-07-25 20:06:33 -04:00
Kishi a55d2d99c4 feat(linux): use connector name as default display name on linux (#5423) 2026-07-21 20:11:30 -04:00
Conn O'Griofa 71acfc57ec feat(linux/vaapi): VAAPI encoder improvements (#5388) 2026-07-15 10:41:22 -04:00
Dave Lane 24cbf6f833 chore(sonar): change NOSONAR comment style (#5410) 2026-07-13 17:31:55 -04:00
neatnoise 1d9ab7b8d8 fix(linux): avoid memory leak from unnecessary encoder re-probing (#5404) 2026-07-12 18:32:18 -04:00