Commit Graph
275 Commits
Author SHA1 Message Date
lucannez64 058479a053 fix(recovery): fail closed on inspection errors and report leftovers accurately
Signed-off-by: lucannez64 <[email protected]>
2026-10-25 19:30:16 +01:00
lucannez64 2cc0c68149 Merge remote-tracking branch 'origin/main' into pr-fix-132 2026-10-25 19:14:54 +01:00
Kalah 33c5a66f70 Merge pull request #136 from Lowell137/fix/appkit-unimplemented-methods
Implement AppKit methods the League client calls as unimplemented
2026-10-25 19:14:46 +01:00
lucannez64 c38f5c29e0 fix(launchd): preserve tracked children in nested job managers
Signed-off-by: lucannez64 <[email protected]>
2026-10-25 19:13:45 +01:00
lucannez64 4c6e233928 Merge remote-tracking branch 'origin/main' into pr-fix-136 2026-10-25 19:13:12 +01:00
Kalah 00786aa404 Merge pull request #90 from lucannez64/fix/post-match-cpu
Extend idle select() backoff to LeagueClientUx (refs #82, #84)
2026-10-25 19:12:30 +01:00
lucannez64 4476761f02 Merge remote-tracking branch 'origin/main' into pr-fix-132 2026-10-25 19:10:40 +01:00
lucannez64 ae97f5f83b Merge remote-tracking branch 'origin/main' into pr-fix-136 2026-10-25 19:10:17 +01:00
lucannez64 76073e6a45 Merge remote-tracking branch 'origin/main' into pr-fix-90 2026-10-25 19:09:59 +01:00
Kalah 501fae30b0 Merge pull request #130 from 3AvisD/docs/interoperability-wording
docs: clarify interoperability and compliance wording
2026-10-25 19:09:37 +01:00
MintMachineHQ 631a8afe37 recover-stale-client: do not report a reused PID as a leftover
wait_for_exit counted any live PID with the same number as a leftover, so a
reused PID produced a misleading "still present after SIGKILL" message. Compare
the original start time and use the process state only to include the original
process while it is an unreaped zombie.
2026-10-25 11:06:55 -06:00
lowellandClaude Opus 5.5 bddd12dc7d Implement AppKit methods the League client calls as unimplemented
Each of these hit NSUnimplementedMethod and either dropped the value
or returned zero.

- NSWindow: store and return collectionBehavior; setContentMinSize and
  setShowsResizeIndicator keep their value without the warning;
  isOnActiveSpace and keyViewSelectionDirection answer.
- NSApplication activateIgnoringOtherApps: activates through the
  display backend, as NSRunningApplication activateWithOptions: does.
  With NO it does nothing, since the window server cannot tell whether
  another app is active and NO must not take focus from one.
- NSSpellChecker dismissCorrectionIndicatorForView is a no-op, as there
  is no correction indicator to dismiss.

The X11 backend's activateProcessIdentifier: now looks the process up
in the root's _NET_CLIENT_LIST before falling back to the root's
children: under a reparenting window manager those children are frames
without _NET_WM_PID, so activation found no window.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 12:28:35 +03:00
MintMachineHQ 9291d6accd fix(launchd): reap orphaned guest zombies and harden stale-client recovery
Children whose parent dies are reparented to the guest launchd, and its job
manager only reaps PIDs it has a job record for, so every leftover mldr/CEF
process from a killed client tree stayed a zombie until shutdown. Reap zombies
that launchd owns but does not track on a 5 second timer; tracked jobs keep
their exit status for job_reap(). proc_listpids() is not implemented in Darling
yet, so the scan enumerates the guest PID namespace through /proc.

recover-stale-client now signals the stale tree deepest-first so a live parent
can still reap its own children, and prepare.py repairs interrupted checkouts
and missing Git LFS objects instead of publishing pointer text as a library.
2026-10-23 23:36:20 -06:00
3AvisD adae1b8bed docs: clarify the source-audit scope
State that scripts/validate.py checks revision format, patch existence and
patch parsing but does not verify applicability to pinned revisions. Point
patch changes at the separate prepare.py --check-only workflow.

Signed-off-by: 3AvisD <[email protected]>
2026-10-23 14:13:18 -06:00
3AvisD 2fcf44eaaf docs: apply review wording corrections
Distinguish the opt-in hide helper (local window management) from the
opt-in close helper (terminates eligible League client UI processes), and
list the tracked project artwork in the distribution scope.

Scope the platform-identity statement to repository-owned code: the
repository does not pass the identifiers as Riot authentication data, but
the values are guest-visible through IOKit and the official client's later
handling is outside the repository's scope. Use US spelling for licence
consistently.

Signed-off-by: 3AvisD <[email protected]>
2026-10-23 14:03:59 -06:00
3AvisD 56285686e8 docs: add the project repository URL
Link the project repository in the interoperability scope so readers can
distinguish it from the upstream Darling repository.

Signed-off-by: 3AvisD <[email protected]>
2026-10-23 14:03:59 -06:00
3AvisD c48272aa8f docs: clarify interoperability and compliance wording
Add docs/INTEROPERABILITY.md, an English scope document that describes
the project's interoperability and responsible-use practices: what it
distributes, how it handles local platform metadata and the MAC/AMFI
probe, how it keeps copyright and licence notices, how it avoids
access/authentication/integrity shortcuts, how it presents trademarks
and handles notices, and the user's responsibility for Riot's terms.

Update README, NOTICE, COMPLIANCE and PLATFORM_IDENTITY to link the
document and to state the opt-in window-helper and synthetic-identity
behaviour accurately. Add CONTRIBUTING with DCO sign-off and a scope
checklist.

Documentation-only change: no launcher, patch, build or test behaviour
changes.

Signed-off-by: 3AvisD <[email protected]>
2026-10-23 14:03:59 -06:00
Kalah 24276b91c6 Merge pull request #123 from 3AvisD/fix/recover-stale-client
fix(launcher): recover a stale client tree without restarting Darling
2026-10-23 14:19:34 +02:00
lucannez64andClaude Opus 5.5 a11a144767 Merge main into fix/recover-stale-client
Resolve conflicts with #122: keep both feature docs and CI steps, and drop
this branch's copy of the close-helper block, which main now starts after
the installed-client check.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-23 14:18:33 +02:00
Kalah 4889b99533 Merge pull request #122 from 3AvisD/feat/hide-client-in-game
feat(launcher): select close/hide client handling from League preferences
2026-10-23 14:17:39 +02:00
Kalah 6bf8d63f55 Merge branch 'main' into feat/hide-client-in-game 2026-10-23 14:16:58 +02:00
3AvisD 9194beef2f fix(launcher): harden stale-client recovery
- fail closed when X11 omits _NET_CLIENT_LIST or WM_CLASS, and recognize the
  RiotClientServices window class;
- require stale client processes to be at least 60 seconds old;
- recheck process identity before SIGTERM and SIGKILL and recheck the window
  before signalling;
- document the age and window-detection guards.
2026-10-23 06:08:45 -06:00
3AvisD f8bb14624e fix(launcher): address in-game helper review
- restore hidden windows even when the launcher output pipe is closed;
- exit the hide watcher after ten idle minutes and start it only after the
  installed-client check;
- reject missing, malformed or invalid close-during-game preferences instead
  of silently selecting hide;
- document the preference contract and idle behavior.
2026-10-23 06:08:45 -06:00
Kalah 97fcdce089 Merge pull request #115 from ekisu/perf/indium-cpu-shadow
perf(indium): cache buffer address-table keys in CPU memory
2026-10-23 13:42:26 +02:00
Kalah a0b152f53c Merge branch 'main' into perf/indium-cpu-shadow 2026-10-23 13:35:33 +02:00
3AvisD 0a04d4e16c fix(launcher): remove orphaned client-in-game helpers
A launcher can exit while its long-lived close/hide helper remains. The next
run then starts another watcher, so several copies watch the same prefix.

Add an opt-in RCLOL_CLEAN_STALE_HELPERS=1 preflight that removes only helper
processes of this prefix reparented to init/systemd. Helpers of a live
launcher, other prefixes, the game, Riot/League/CEF, darlingserver and the
runtime are preserved. Unreadable or relative process data leaves a process
alone.

Validated across repeated launcher starts: the cleanup removed four, then one,
then one orphaned watcher; a subsequent dry run reported no orphaned helpers.
Zombie reaping after partial recovery is tracked separately in #124.
2026-10-22 15:50:38 -06:00
3AvisD 732e9c8881 fix(launcher): handle YAML comments and log failures
- strip inline YAML comments from preference values, including quoted values;
- keep a successfully unmapped window tracked when the success log raises
  BrokenPipeError, while still discarding a window whose unmap failed;
- cover both cases with tests.
2026-10-22 15:30:45 -06:00
3AvisD c8dd3886fc fix(launcher): recover a stale client tree without restarting Darling
Darlingserver normally stays alive after the Riot Client or game is closed.
If the client window disappears but Riot/League/CEF processes remain,
restarting via run.sh reuses a half-dead runtime and can fail to open a
window.

Add an opt-in RCLOL_RECOVER_STALE_CLIENT=1 preflight. When a darlingserver is
alive, no game is running, no managed client window is visible and stale
client processes belong to this prefix, stop only that client/CEF tree.
Preserve darlingserver, launchd/mldr, sockets and .init.pid, then continue
with the normal product launch.

The helper fails closed when X11 is unavailable, never touches a running game
or a visible client window, and does not patch client binaries, CEF or assets.
It saves the Darling bootstrap, but not Riot Client/CEF startup; a full runtime
restart remains the fallback if no window appears.
2026-10-22 15:27:33 -06:00
3AvisD 5a06f34725 fix(launcher): fail closed on automatic mode edge cases
- restrict preference reads to the lol-user-experience section;
- distinguish a failed close-preference read from a missing key;
- reject xprop's 'not found' text as a WM_CLASS value;
- track a window before unmap so an interrupting signal still restores it;
- report the tricks-mode opt-out in the hide helper's startup message;
- cover the new cases with preference, window and interruption tests.
2026-10-22 15:07:47 -06:00
3AvisD 4faa622336 feat(launcher): select client-in-game mode from preferences
Add RCLOL_CLIENT_IN_GAME_TRICKS=1 as the practical launcher switch. It reads
lol-user-experience from LCULocalPreferences.yaml:

- potatoModeEnabled false or unreadable: no action;
- closeLeagueClientDuringGame true: close the client UI;
- closeLeagueClientDuringGame false: hide the client windows.

The existing close and hide switches remain low-level options when the
automatic switch is not set. The hide helper accepts the master switch, and
the resolver plus preference cases are covered by tests and documentation.

The local .desktop entry was validated with the master switch; the installed
preferences select hide on this machine.
2026-10-22 14:56:03 -06:00
3AvisD 3c046252a7 fix(launcher): address hide-client review findings
- associate target windows with the selected prefix through the guest PID,
  X11 _NET_WM_PID, NSpid and the loader socket; fail closed when ownership is
  unknown;
- let --once run without either opt-in gate, matching the documented
  diagnostic;
- route SIGHUP through the restore handler;
- cache non-empty WM_CLASS results per window and prune stale entries;
- cover unreadable /proc, host PID mapping and prefix ownership in tests.
2026-10-22 12:32:03 -06:00
3AvisD 415aa7a949 feat(launcher): hide the League client UI while a match runs
Add an opt-in alternative to closing LeagueClientUx: hide the managed
LeagueClientUx and Riot Client X11 windows while the game process runs and
show them again when it exits. The client stays open; the game window is
never touched.

Detection is attributed to the launcher prefix through __mldr_sockpath and
fails closed when proc, ownership or window state is unreadable. The helper
requires X11/Xwayland, restores the window on end, signal or error, and is
mutually exclusive with RCLOL_CLOSE_CLIENT_IN_GAME=1.

Document the flag, compliance scope and limits. A local 30-second test on an
i5-3470/RX 550 reduced summed client/CEF CPU from 120.7% to 93.4%; this is a
CPU-bound-host measurement, not a universal FPS claim.

No client binaries, CEF, assets or anti-cheat are modified.
2026-10-22 12:15:35 -06:00
Kalah a4da79011f Merge pull request #120 from lucannez64/lucannez64-patch-1
Add donations section to README
2026-10-22 13:02:37 +02:00
Kalah 1b43e8f38c Add donations section to README
Added a donations section with a link to Ko-Fi.
2026-10-22 13:01:57 +02:00
Kalah 3c3f4f63e7 Merge pull request #118 from lucannez64/fix/launcher-entry-cleanup
fix(launcher): only remove launcher artifacts this project created
2026-10-21 17:46:46 +02:00
Kalah bb5320e167 Merge pull request #117 from 3AvisD/chore/launcher-name
launcher: use a neutral Darling Launcher name and icon
2026-10-21 17:45:18 +02:00
lucannez64 e00ee99522 fix(launcher): only remove launcher artifacts this project created
Match the legacy entry against this checkout's desktop-run.sh instead of any
desktop-run.sh, and delete the legacy icon files only after that entry or the
old artwork proves ownership.  Quote and escape Exec arguments as the Desktop
Entry specification requires, so a checkout path with reserved characters no
longer produces an invalid entry, and escape the Path value.

Use StartupWMClass=RiotClientServices in both entries: Darling derives WM_CLASS
from -[NSProcessInfo processName], the basename of argv[0], and the launcher
starts .../RiotClientServices.  "Riot Client" is only the bundle display name,
so the checkout entry never matched the window.  Both entries now share
Name/GenericName/Comment/Icon/Keywords/Categories and a test keeps them in
sync; Terminal stays different because the checkout entry logs to
build/desktop-launch.log while the packaged entry runs the session in a
terminal.

Also drop the stray top-level icon copies, handle dangling legacy symlinks,
name the icon for assistive technology, document the alias and menu entry, and
cover the helper with disposable-HOME tests.
2026-10-21 17:38:42 +02:00
3AvisD 0947a9f20d launcher: use a neutral Darling Launcher name and icon
Use a project-owned identity for the visible desktop entry while keeping the existing binary, package and window-matching identifiers working. The helper now copies the project's original icon instead of extracting one from the client, and the old game-named entry and icons it created are removed. Extend the packaging check to assert the neutral fields.
2026-10-20 23:49:39 -06:00
ekisu fb520d4d71 test(indium): run accepted address shadow regression in CI 2026-10-20 15:47:20 -03:00
ekisu e46890adb4 perf(indium): cache buffer address keys in CPU memory 2026-10-20 15:47:20 -03:00
Kalah cde860ab49 Merge pull request #114 from nicolai455/fix/nix-fhs-fontconfig
fix(nix): harden fontconfig compatibility across host setups
2026-10-20 13:58:44 +02:00
lucannez64 c686798ddb test(nix): run font compatibility regressions in CI 2026-10-20 13:57:05 +02:00
Nicolai Bruns eb962b8c9f docs(tests): document fontconfig regression helpers 2026-10-20 13:43:22 +02:00
Nicolai Bruns a089a23072 fix(nix): harden fontconfig compatibility across host setups 2026-10-20 13:31:02 +02:00
nbandlucannez64 0d8da88894 fix: preserve ambiguous guest processes during prefix cleanup (#111)
* fix: preserve ambiguous guest processes during prefix cleanup

* fix: warn only for matching runtime cleanup candidates

---------

Co-authored-by: lucannez64 <[email protected]>
2026-10-20 13:02:29 +02:00
nbandKalah 0a9a75e820 fix(appkit): add NSSavePanel tag-name compatibility (#112)
Co-authored-by: Kalah <[email protected]>
2026-10-20 12:24:10 +02:00
Kalah e727049d67 Fix Nix FHS text fonts and fontconfig aliases (#113) 2026-10-20 12:14:32 +02:00
Kalah 913dd74a09 Merge pull request #105 from WolfBlack879/fix/trustd-keepalive
security: keep trustd running from boot (fixes black Riot Client window)
2026-10-20 12:02:15 +02:00
Kalah fda57219a2 Merge branch 'main' into fix/trustd-keepalive 2026-10-20 12:00:48 +02:00
Kalah c5828424f2 Merge pull request #107 from DavidutzDev/fix/darlingserver-fd-limit
Raise darlingserver's soft fd limit when the hard limit is fixed
2026-10-20 11:58:17 +02:00