Commit Graph
122 Commits
Author SHA1 Message Date
Daniel Souza 0087384a02 Fix Riot session aborts, CDN downloads and hidden client recovery 2026-10-18 14:09:59 +02:00
Kalah a3e19d882a Merge pull request #54 from hamzajer/fix/ubuntu-24.04-build-and-coretext-name
Fix darlingserver build on Ubuntu 24.04 and implement CTFontCopyLocalizedName
2026-10-18 14:03:00 +02:00
lucannez64 7ae09c6202 Merge remote-tracking branch 'origin/main' into fix/pr54-update 2026-10-18 14:02:24 +02:00
Kalah 0f204f8685 Merge pull request #29 from pirrandi/fix/nvidia-support
fix(nvidia): CPU readback, native resize signals and bounded completion polling
2026-10-18 14:00:57 +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
Kalah 1125666cf2 Merge pull request #56 from nicolai455/review/nix-packaging
feat(nix): add experimental rootless package with guided setup and desktop launcher
2026-10-18 13:55:38 +02:00
lucannez64 8dc17b8e80 test(nix): cover region routing, stable readiness and lost terminals 2026-10-18 13:54:18 +02:00
Nicolai Bruns 6909c7f83b fix(nix): address review feedback on setup and runtime safety 2026-10-18 13:51:58 +02:00
Nicolai Bruns 57223d4c0a fix(nix): simplify compiler setup and complete rootless session lifecycle 2026-10-18 13:35:15 +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
Hamza JermouniandClaude Opus 5.5 d898703fca Define PROCMAP_QUERY when the kernel headers lack it
Ubuntu 24.04 ships Linux 6.8 headers, which predate the PROCMAP_QUERY
ioctl (6.11), so darlingserver failed to build. The ioctl ABI is fixed,
so define it locally; on an older running kernel the ioctl fails and
the /proc/<pid>/maps text parser is used as before.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-18 12:28:12 +02:00
Nicolai Bruns f5e65e3cf1 feat(nix): add experimental rootless FHS package and desktop launcher 2026-10-18 00:30:14 +02:00
Kalah e287abb5d6 Merge pull request #52 from lucannez64/lucannez64-patch-1
Update README with contact info and project goals
2026-10-18 00:11:57 +02:00
Kalah 8b24ecbcd3 Update README with contact info and project goals
Added contact information for job opportunities and clarified project goals regarding Linux compatibility.
2026-10-18 00:11:42 +02:00
Kalah 5880c9219d Merge pull request #47 from lucannez64/fix/pr41-deferred
Implement deferred shell, CPU, registry and platform configuration fixes
2026-10-17 23:41:10 +02:00
Kalah 4ad2857dbb Merge branch 'main' into fix/pr41-deferred 2026-10-17 23:40:55 +02:00
Kalah a332a0d699 Merge pull request #44 from lucannez64/fix/pr41-compatibility
Extract tested runtime compatibility fixes from #41
2026-10-17 23:40:44 +02:00
Kalah 50ec67e978 Merge branch 'main' into fix/pr41-compatibility 2026-10-17 23:40:22 +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
Kalah 7cfd3fee12 Merge pull request #45 from lucannez64/lucannez64-patch-1
Add warning about 3-Day Suspension and project takedown
2026-10-17 23:17:58 +02:00
Kalah 2642e276e1 Add warning about 3-Day Suspension and project takedown 2026-10-17 23:17:35 +02:00
lucannez64 633c129a4f Extract runtime compatibility fixes from PR 41 2026-10-17 23:04:23 +02:00
Kalah 1ce5f0db43 Merge pull request #42 from nicolai455/fix/setup-runtime-safety
fix(setup): use consistent runtime paths and reject incomplete installs
2026-10-17 22:58:37 +02:00
lucannez64 d6199db86f Merge main into setup runtime safety, preserving certificate setup 2026-10-17 22:56:34 +02:00
Kalah 8ab256c9f4 Merge pull request #43 from lucannez64/test-batch-2
Merge tested runtime, GPU reporting, certificate, and frame-wait fixes
2026-10-17 22:55:17 +02:00
lucannez64 ed5366f10b Bound submit-worker drains to work already queued 2026-10-17 22:54:50 +02:00
Nicolai Bruns 445ec26a1a test(setup): isolate missing guest validation 2026-10-17 22:40:53 +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
lucannez64 aa10bd026f Test merge metal device name 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
Kalah 057f0f06d1 Merge pull request #33 from ztancrell/fix/installer-region-codes
Map LAN, LAS and OCE to Riot's installer codes
2026-10-17 20:37:20 +02:00
lucannez64 40ac013175 Test merge #37 2026-10-17 20:36:55 +02:00
lucannez64 113fddb82f Test merge #32 2026-10-17 20:36:54 +02:00
lucannez64 e2551ca85d Test merge #36 2026-10-17 20:36:54 +02:00
lucannez64 22c8ac5ae0 Test merge #25 2026-10-17 20:36:53 +02:00
Kalah 69ac89c027 Merge branch 'main' into fix/installer-region-codes 2026-10-17 20:36:32 +02:00
lucannez64andClaude Opus 5.5 3d55221ab6 Merge PR #22 NVIDIA black screen fix onto #20 compositor changes
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 20:28:58 +02:00
Kalah f265de7e6f Merge pull request #20 from lucannez64/fix/metal-iosurface-drawable-starvation
Fix Metal drawable starvation in mixed IOSurface layer trees
2026-10-17 20:27:49 +02:00
ztancrellandClaude Opus 5.5 dd7e151fbb Derive IOPlatformUUID and serial per host instead of hardcoding them
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]>
2026-10-17 11:05:28 -04:00
ztancrellandClaude Opus 5.5 83b4694aad Return a valid NSScroller preferredScrollerStyle
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]>
2026-10-17 08:20:34 -04:00
ztancrellandClaude Opus 5.5 66ad2339c8 Map LAN, LAS and OCE to Riot's installer codes
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]>
2026-10-17 08:06:05 -04:00
ztancrellandClaude Opus 5.5 5dbfbe2ccb Fix Riot Client crashes on sign-in buttons and file dialogs
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]>
2026-10-17 07:59:09 -04:00
Polar 792b4cce13 mldr: never replace another owner's descriptor with an RPC socket
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.
2026-10-17 01:19:28 +00:00
Polar f230dd8b9e Point the layer compositor's GL context at the window's back buffer
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.
2026-10-17 00:14:31 +00:00
Polar 0d78eaf0ff Create X11 windows with an EGL-compatible visual (NVIDIA black screen)
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.
2026-10-17 00:14:31 +00:00