-[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]>
Every install reported the same IOPlatformUUID and an Apple-format serial
(C02ZL0GVMD6N) that may belong to a real MacBook Pro. Derive both from a
SHA-256 of the host machine-id and a fixed app string: stable per host,
distinct between hosts, and the raw machine-id is not exposed. The serial
is DARLING-<8 hex>, a form no Mac uses. iokitd is built without ARC, so
the derived strings are owned for the daemon's lifetime. Fix the header
comment that said the values came from DMI.
Refs #24
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The unimplemented method returned whatever was left in a register.
Chromium forwards the style to its renderer, which rejected the
out-of-range value (VALIDATION_ERROR_DESERIALIZATION_FAILED) and left
the Riot Client window black. Report NSScrollerStyleLegacy, as macOS
does without a trackpad.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Riot's CDN has no live.lan.zip, live.las.zip or live.oce.zip (HTTP 404);
the installers are published as la1, la2 and oc1. installer.sh now maps
the friendly names to those codes and accepts the codes directly.
Refs #30
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The Riot Client (Electron) aborted with unrecognized selectors in
Cocotron's AppKit:
- -[NSOpenPanel setShowsTagField:]: Electron sets it on every file
dialog. Add the missing NSSavePanel setters it uses (showsTagField,
nameFieldLabel, extensionHidden, canSelectHiddenExtension) as no-ops,
and implement beginWithCompletionHandler: and
beginSheetModalForWindow:completionHandler: by running the panel
modally and calling the handler (the old stub never called it).
- -[MacWorkspace openURLs:withAppBundleIdentifier:options:
additionalEventParamDescriptor:launchIdentifiers:]: used by
shell.openExternal for the third-party sign-in buttons. Open each URL
through openURL: (LaunchServices).
Fixes#28
Co-Authored-By: Claude Opus 5.5 <[email protected]>
On NVIDIA the game aborts within minutes: a thread's darlingserver RPC
socket is closed behind Darling's back, and its next RPC fails with
EBADF (or ENOTSOCK once the number is reused), then __simple_abort in
mach_msg_overwrite_trap_impl (#23).
__mldr_create_rpc_socket moved each new socket onto its slot with
dup2(), which silently closes whatever already holds that number. The
slots count down from the soft RLIMIT_NOFILE read at the process's first
socket. The game starts with a soft limit of 1024 (systemd's default,
inherited from the terminal) and then holds ~5500 fds, one per NVIDIA
driver allocation, so the kernel hands numbers in the slot range
(900-1023) to the driver whenever a slot is free, for instance after a
thread exits. The next new thread's dup2() replaced the driver's fd with
its socket; when the driver later closed "its" fd, it closed the socket.
Mesa never comes near 1000 fds, which is why AMD works.
Use fcntl(F_DUPFD, slot) instead: it never replaces a descriptor. If the
slot is taken, give it back and keep the socket at the lowest free
number above it, which is above all of the bitmap's slots and owned by
nobody else; socket_bitmap_put ignores sockets above the slots. The
process lifetime pipe helper gets the same treatment.
This is the remaining case of the 2026-10-10 LeagueClient crash: that
fix stopped two Darling threads from sharing a slot, this one stops
Darling from taking a slot that belongs to someone else.
Second half of the NVIDIA black screen (#3). With the visual fix the
compositor gets a window surface and drawables recycle, but the window
stays black: after CARenderer draws, the back buffer reads back black and
even a glClear to blue changes nothing. GL_DRAW_BUFFER and GL_READ_BUFFER
are GL_NONE.
CALayerContext -setSubwindow: creates the context and then notifies the
layer tree; CAMetalLayer -_setContext: makes the context current (to
create its textures) before any window surface is attached. Per
EGL_KHR_surfaceless_context, a context first made current without a
default framebuffer starts with DRAW_BUFFER = NONE, and attaching a
window later doesn't change it. NVIDIA follows that; Mesa resets it on
bind, which is why AMD works.
After CGLContextMakeCurrentAndAttachToWindow in -renderLayer:, set the
draw and read buffers to GL_BACK.
On NVIDIA (RTX 2070 SUPER, driver 615.78, Xwayland) the game showed a
black screen and logged "Metal Device timed out giving us a Drawable to
present" every second (#3).
X11Window picked its visual with glXChooseVisual, which on NVIDIA returns
a GLX-only visual (0x304 here). NVIDIA's EGL configs only map to the
default visual (0x69) and the 32-bit one (0x99), so CGLGetWindow's
eglCreateWindowSurface failed with EGL_BAD_CONFIG for the window and its
subwindows, for every one of the 40 window configs. CGLGetWindow returns
NULL without logging, CALayerContext keeps _cglWindow == NULL, -render
returns before prepareMetalLayers, and CAMetalLayer never gets its three
drawables back. Mesa accepts the GLX visual, which is why AMD works.
Use the default visual when it is TrueColor with depth >= 24, falling
back to glXChooseVisual otherwise. This also fixes every other Darling
window on NVIDIA: plain AppKit windows (title bars included),
layer-backed views and NSOpenGLView were all black without it.
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]>
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.
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]>
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]>
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]>