Skip to content

LD_PRELOAD Hooks

The Hooks tab in the instance config editor manages LD_PRELOAD libraries — native .so files that are loaded into the QLDS process before it starts.

Why LD_PRELOAD Hooks

Some low-level behaviors in Quake Live can only be changed by patching the running process. LD_PRELOAD lets a small native library intercept or replace specific C functions inside qzeroded.x64 at launch time. QLSM uses this mechanism for 99k LAN rate and exposes the same mechanism to you for custom use.

Two Kinds Of Hooks

System Hooks

System hooks are managed by QLSM and are read-only. They appear in the Hooks tab but cannot be removed or reordered by you — they are always loaded when their associated feature is enabled.

The only current system hook is force_rate.so, which is automatically registered when 99k LAN rate is enabled for an instance.

User Hooks

User hooks are .so files you upload yourself. They are fully under your control: you can upload, enable/disable, reorder, and delete them.

QLSM validates that uploaded files are ELF binaries (checks the magic bytes). Non-ELF files are rejected at upload time.

Managing User Hooks

Upload A Hook

  1. Open an instance config editor (Actions → Edit Config).
  2. Click the Hooks tab.
  3. Click Upload and select your .so file.

After uploading, the hook appears in the list in disabled state.

Enable Or Disable A Hook

Toggle the switch on the hook row. The change takes effect on the next instance restart (or immediately if "Restart after saving" is enabled).

Reorder Hooks

Drag hook rows to change the load order. Hooks are passed to LD_PRELOAD in top-to-bottom order. System hooks always load before user hooks regardless of position.

Delete A Hook

Click the delete (trash) icon on the hook row and confirm in the modal. Deleting a hook removes it from the host on the next sync.

Missing Hooks

If a hook file exists in the database but its binary is missing from the host filesystem, QLSM shows a warning row with the filename highlighted. Click the remove button on that row to delete the stale entry. This can happen if host files were deleted out-of-band.

Load Order

When an instance starts, QLSM builds the LD_PRELOAD value in this order:

  1. Enabled system hooks (e.g. force_rate.so when 99k LAN rate is on)
  2. Enabled user hooks in the order shown in the Hooks tab