Commit Graph
69 Commits
Author SHA1 Message Date
lucannez64andClaude Opus 5.5 59327fa9f0 Report the MacBookPro16,1 GPU name for Riot on AMD and Intel hosts
With DARLING_METAL_MAC_GPU_NAME=1, MTLDevice.name is the GPU the
MacBookPro16,1 that IOKit reports shipped with, from the host's vendor:
"AMD Radeon Pro 5500M" (vendor 0x1002) or "Intel UHD Graphics 630"
(0x8086). NVIDIA keeps its own name so the game never takes another
vendor's driver paths. recommendedMaxWorkingSetSize and every other value
stay the host's, which was the risky part of #61's identity.

The Riot launcher turns it on by default (0 or empty turns it off); other
Darling apps keep the host name. DARLING_METAL_GPU_NAME still wins.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-18 17:24:49 +02:00
3752d9e812 Fix Metal device edge cases; keep reporting the host GPU
From #61, without the default "AMD Radeon Pro 5500M" / 4 GB identity: the
host GPU's name and Vulkan working set stay the default for every app, and
the existing DARLING_METAL_GPU_NAME and DARLING_METAL_VRAM_MB overrides
remain the opt-in. Reporting 4 GB on a 2 GB card invites allocation
failures, and under-reports larger cards.

Kept from #61:
- registryID returns MTLDeviceInfo::kDefaultRegistryID instead of 0; a
  real Mac never reports 0 and apps key devices by it.
- Vertex buffer layout and attribute arrays release the old item after
  retiring it; the retire step read the item after the release could free it.
- newDepthStencilState, newSamplerState and the device name return nil (or
  the fallback name) when Indium throws, instead of unwinding through
  Objective-C.
- MTLDepthStencilGetIndium is declared only with DARLING_METAL_ENABLED.
- The replaceRegion trace probes at most `width` bytes, which stays inside
  the first row for every pixel format.

metal.patch is regenerated in its existing file order, so the diff is
these changes only. tests/test_metal_device_info.py compiles the host
check against MTLDeviceInfo.h as shipped in the patch and runs in CI.

Split from #61.

Co-authored-by: DevWebeloper <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-18 17:14:47 +02:00
lucannez64 57511fd5e7 Merge remote-tracking branch 'origin/main' into fix/pr58-docs 2026-10-18 15:19:05 +02:00
lucannez64 c29f2fc81d docs(launcher): scope Chromium temp failures and use standalone checks 2026-10-18 15:17:46 +02:00
David GhegheaandClaude Opus 5.5 eb17acce6e fix(launcher): give Chromium a usable temp directory
Chromium on macOS takes its temp directory from NSTemporaryDirectory(), which is
unusable under Darling. Electron opens files in app.asar asynchronously by
copying them to a temp file, and reports the failed copy as "not found", so the
Riot client showed a "Not Found" page instead of its UI. Running the client
binary as Node reproduces it: fs.readFileSync on app.asar/dist/renderer/index.html
works, fs.createReadStream fails with ENOENT, and MAC_CHROMIUM_TMPDIR fixes it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-18 14:54:25 +02:00
David GhegheaandClaude Opus 5.5 ac89ac78ed fix(nvidia): keep threaded optimizations off for driver 580
With __GL_THREADED_OPTIMIZATIONS=1, NVIDIA 580 (the last branch for Pascal
GPUs) with egl-x11 1.0.6 rejects the X11 EGLDisplay with EGL_BAD_DISPLAY on
every thread that has a context current. A native EGL program reproduces it
outside Darling. In the Riot client the main thread loses EGL after its first
window frame, so CGLCreateContext fails with error 10004 and the game window
stays black. Default the launcher to 0; setting the variable restores 1.

CGLDestroyWindow also returns early for the NULL window CGLGetWindow gives
when eglCreateWindowSurface fails, instead of passing EGL_NO_SURFACE on.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-18 14:54:03 +02:00
lucannez64 4c1f4a44c5 fix(test): let Darling initialize the private session prefix 2026-10-18 14:38:15 +02:00
lucannez64 70d2d3121f test(cfnetwork): scope probe overlays after private-prefix startup 2026-10-18 14:20:40 +02:00
lucannez64 e07cf72a15 fix(cfnetwork): preserve shared sessions and delegate-queue completions
Ignore both invalidation methods on the shared session; deliver task completion through the owning session delegate queue. Extend the standalone probe to exercise singleton reuse and a suspended custom queue. Require stable old-client process identities and complete window data before optional recovery, and continue launch after shutdown failures.
2026-10-18 14:16:32 +02:00
Daniel Souza 0087384a02 Fix Riot session aborts, CDN downloads and hidden client recovery 2026-10-18 14:09:59 +02:00
lucannez64 7ae09c6202 Merge remote-tracking branch 'origin/main' into fix/pr54-update 2026-10-18 14:02:24 +02:00
lucannez64andPirrandi a5ceabb8e8 fix(nvidia): retain readback, resize and bounded completion fixes
Rebuild the remaining NVIDIA changes on current main, preserving the merged visual, draw-buffer, descriptor ownership and mixed Metal-tree fixes. Scope native-thread forwarding to resize notifications and make completion polling per device, bounded and part of the caller timeout budget.

Co-authored-by: Pirrandi <[email protected]>
2026-10-18 13:59:49 +02:00
Hamza JermouniandClaude Opus 5.5 9a320f17cb Implement CTFontCopyLocalizedName with the canonical name
The stub returned nil and left the language output untouched. Chromium
pre-fills that output with a sentinel and reads it whenever it is
non-NULL, so the League client UI read garbage. Return CTFontCopyName
and always write NULL to the language output. The CoreText font-list
check now covers both.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-18 12:28:12 +02:00
lucannez64 0f2233304a Add stable opt-in per-prefix identity provisioning 2026-10-17 23:38:49 +02:00
lucannez64 d87ad2ce45 Implement bounded registry APIs and opt-in platform configuration 2026-10-17 23:32:01 +02:00
lucannez64 3ed48bd2ac Fix shell stream ownership and CPU frequency units 2026-10-17 23:31:23 +02:00
lucannez64 633c129a4f Extract runtime compatibility fixes from PR 41 2026-10-17 23:04:23 +02:00
lucannez64 d6199db86f Merge main into setup runtime safety, preserving certificate setup 2026-10-17 22:56:34 +02:00
lucannez64 ed5366f10b Bound submit-worker drains to work already queued 2026-10-17 22:54:50 +02:00
Nicolai Bruns 100bc8252d fix(setup): validate final runtime destinations 2026-10-17 22:24:06 +02:00
Nicolai Bruns 9adfaf010f fix(setup): use consistent runtime paths and reject incomplete installs 2026-10-17 22:09:29 +02:00
lucannez64 b38e87b039 Test merge root certificates 2026-10-17 21:08:12 +02:00
lucannez64andClaude Opus 5.5 a1c00ee884 Build Darling's system root store from the host CA bundle
Security reads the system trust domain from
/System/Library/Keychains/SystemRootCertificates.keychain and
SystemTrustSettings.plist (TrustSettingsSchema.h). Darling ships neither, so
SecTrustSettingsCopyCertificates(kSecTrustSettingsDomainSystem) returns
errSecNoTrustSettings (-25263); Chromium's known_roots_mac and Riot's
CertBundle then report that they cannot read the system roots.

ensure-darling-root-certificates.py parses each host root with a minimal DER
walker and writes the trust record keyed by the uppercase SHA-1, with the
encoded issuer Name, the serial INTEGER's content octets, modDate and an
empty (unrestricted) trustSettings array. The keychain is built with the
guest security tool in one darling shell, in a private temporary directory,
and published from inside the guest so a running Darling sees it, falling
back to the host when the guest cannot write the directory. A digest stamp
skips later runs without starting Darling. The launcher warns and continues
on failure; install-runtime.sh runs it before stopping Darling.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 21:03:32 +02:00
lucannez64andClaude Opus 5.5 2549e2b654 Report the host GPU name and VRAM from MTLDevice
-[MTLDevice name] returned "Darling Indium Device" for every GPU. It now
returns the selected Vulkan device's name in macOS Metal style: the
trailing driver note in brackets and the (R)/(TM) marks are removed, and
NVIDIA names are unchanged. The name is never replaced with another
vendor's. recommendedMaxWorkingSetSize is the device-local heap size on
discrete GPUs and all heaps on integrated/CPU devices, with the old 1 GiB
as fallback. Both are computed once per device.

hasUnifiedMemory stays YES by default: synchronizeResource:/
synchronizeTexture: are missing and Private buffers created with data
abort in Indium, so reporting NO on discrete GPUs would send apps down
unimplemented paths. DARLING_METAL_HOST_UNIFIED_MEMORY=1 opts in to the
GPU-type answer. DARLING_METAL_GPU_NAME and DARLING_METAL_VRAM_MB
override the name and working set.

The cleaning logic lives in private-include/Metal/MTLDeviceInfo.h and is
covered by the host check tools/test-metal-device-info.cpp. Metal now
links indium_private for the Vulkan properties, and the runtime build
script adds Indium's private headers before compiling MTLDevice.mm.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 20:49:42 +02:00
lucannez64 2aac45d68d Keep Metal presentation active in mixed IOSurface layer trees 2026-10-17 01:06:50 +02:00
lucannez64 e9753b3623 Merge PR #18 visible-cursor tracking with serial-aware mouse warps 2026-10-17 00:26:47 +02:00
lucannez64 ce85298c0e Merge PR #15 fullscreen transitions with runtime review fixes 2026-10-17 00:26:09 +02:00
lucannez64 3db7115c93 Fix runtime safety, Xorg mouse synchronization and fullscreen startup 2026-10-17 00:25:34 +02:00
DevWebeloperandClaude Opus 5.5 adf74bf726 Keep the relative-mode cursor on the visible pointer when warps are not honoured
League enters relative mouse mode on GNOME (Xwayland) and inside gamescope, but
keeps a visible cursor and warps it every frame at its own mouse speed. Xwayland
cannot move a visible pointer, so those warps never took effect: the virtual
cursor, where clicks land, drifted hundreds of pixels from the cursor on screen
and never reached the screen edges, which also stopped edge panning.

Where warps are not honoured, the virtual cursor now follows the physical
pointer and the game's warps leave it in place. With a hidden cursor, or on a
server that honours warps, nothing changes. The host model test gains a case
replaying the drift from an in-game trace.

Tested manually in the practice tool under gamescope 3.16.31 on GNOME 51 with
AMD RADV: clicks land on the cursor and edge panning works.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 00:49:53 +03:00
Andras Laszlo e9e9da1187 fix(input,video): restore click accuracy, prevent Alt-Tab focus steal, and eliminate 144Hz display link stutter 2026-10-16 20:38:32 +02:00
Andras Laszlo 5f494fd450 fix(launcher,display): fix desktop launcher icon, Alt-Tab grab, and 144Hz camera panning 2026-10-16 20:21:58 +02:00
Andras Laszlo 9576070e17 build: apply optimization flags to existing build trees and escape Exec path 2026-10-16 17:52:11 +02:00
Andras Laszlo a73086de74 Address code review feedback on input handling, pacing, and runtime cleanup 2026-10-16 17:50:22 +02:00
Andras Laszlo 2759adbdd9 Fix in-game keyboard input, initial fullscreen black screen, and desktop launcher icon 2026-10-16 17:40:51 +02:00
Andras Laszlo 44fc9d6111 Merge upstream/main into main 2026-10-16 17:16:20 +02:00
lucannez64 3778d518b7 Restore X11 fullscreen requests for monitor-sized borderless windows
Port the fullscreen policy omitted when adapting PR #12. Track requested fullscreen state across frame and style changes, exclude unmanaged windows, and use EWMH REMOVE when leaving fullscreen.

Extend the native geometry probe and document passive tracing for the reported vertical click offset, whose cause remains unconfirmed.
2026-10-16 17:13:11 +02:00
Andras Laszlo 30383d6462 AppKit/X11: Robust multi-monitor mouse boundary confinement and clean stale Darling/Riot state 2026-10-16 16:55:22 +02:00
ztancrellandClaude Opus 5.5 7af99c85db Return a real physical size from CGDisplayScreenSize; never return NULL display modes
CGDisplayScreenSize returned 0x0 for any display with EDID (upstream left
that branch unimplemented). League divides by it for its camera aspect
ratio, so the view-projection x row became NaN: every 3D vertex was
discarded, the scene showed only its blue clear colour, and world clicks
were ignored. Read the size from the EDID detailed timing (mm) or basic
parameters (cm), fall back to 96 dpi, and use the main display for an
unknown id.

CGDisplayCopyAllDisplayModes returned NULL for display 0 (a window off
every screen), which League passes straight to CFArrayGetCount. Fall back
to the main display, then to an empty array.

Add riot-display-modes-check covering both for the main display,
display 0 and an unknown id.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-16 10:44:04 -04:00
Andras Laszlo 6084371a67 QuartzCore/CAMetalLayer: Fix nextDrawable deadlock preventing Metal in-game rendering 2026-10-16 16:29:48 +02:00
Andras Laszlo 6e6b0d826a Merge upstream 7f0e57f: primary monitor geometry coordinates with Wayland fullscreen and mouse confinement fixes 2026-10-16 16:16:02 +02:00
Andras Laszlo 5c10b470c1 Fix black screen in Riot Client launcher and strictly confine mouse only for League in-game 2026-10-16 16:01:25 +02:00
Andras Laszlo 96ed8b4403 Fix symbol visibility in AppKit and X11 build scripts to preserve exported symbols like _NSApp 2026-10-16 15:52:49 +02:00
lucannez64andMaka 7f0e57fb5e Fix X11 primary-monitor coordinates without changing fullscreen policy
Adapt the geometry fix from PR #12 to the current relative-mouse implementation. Keep display IDs independent of primary-first screen ordering, translate window and pointer coordinates consistently, and invalidate geometry on both RandR event types.

Handle failed RandR snapshots and free EDID data. Add isolated native geometry regression coverage and use the configured SDK when linking the X11 probe.

Validated all 30 component patches, the X11 and CoreGraphics builds, six native geometry groups, and the existing relative-mouse checks. The user confirmed the installed fix works on 2026-10-16.

Co-authored-by: Maka <[email protected]>
2026-10-16 15:52:42 +02:00
Andras Laszlo 447324f232 Merge upstream changes: relative mouse mode emulation and skip redundant cursor updates 2026-10-16 15:48:29 +02:00
lucannez64andClaude Opus 5.5 426fb75ec8 Emulate macOS relative mouse mode in the X11 backend and skip redundant cursor updates
CGAssociateMouseAndMouseCursorPosition(false) used to warp the pointer to the
window center, freeze the reported position there and treat the game's own
CGWarpMouseCursorPosition calls as motion. On Xwayland, which ignores warps
while the cursor is visible, this left League's cursor stuck in the middle.
The backend now keeps a frozen virtual cursor: physical motion only produces
deltas (deltaY positive downwards), application warps move the virtual cursor
and their echoes are dropped, mouseLocation returns it, and the pointer is only
warped back where the server honours warps. The grab no longer uses the
invalid FocusChangeMask and is released and retaken across focus changes.

setCursor: no longer re-sends XDefineCursor/XFlush when the window already has
that cursor; League set it about 190 times per second.

Also carries the opt-in input trace (/tmp/rclol-input-trace in the guest).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-16 15:14:06 +02:00
Andras Laszlo b44ed53cf9 Add GNOME desktop entry and icon generator to installer and runtime tools 2026-10-16 14:41:20 +02:00
Andras Laszlo 92d724f736 Fix GNOME Wayland fullscreen top bar and mouse confinement in cocotron 2026-10-16 14:34:09 +02:00
Andras Laszlo 4ae26c8fdc Optimize library runtime builders with -O3 -march=native -mtune=native -fomit-frame-pointer 2026-10-16 14:09:00 +02:00
Andras Laszlo f0f449c3c2 Merge upstream changes: nested Metal layers and X11 cursor XFlush 2026-10-16 14:07:29 +02:00
Andras Laszlo e4f8c67151 WIP: Low-latency performance and input latency optimizations 2026-10-16 14:05:54 +02:00