LkmPlugin
LkmPlugin.dll is the game/session execution orchestrator in GCIS. It converts session intent into concrete app actions: setup, launch, restart, stop, and prewarm/resource wiring.
File Info
| Property | Value |
|---|---|
| File | LkmPlugin.dll |
| Size | 15,868,448 bytes |
| Architecture | x64 (AMD64) |
| Build PDB Path | C:\builds\gfn\security\gcis\out\x86_64-windows-release\LkmPlugin\LkmPlugin.pdb |
| Export | NvPluginGetInfo |
Core Responsibilities
- Translate control-plane requests into runtime app lifecycle actions.
- Manage game session objects and VM/app binding metadata.
- Coordinate with content-controller and GFN guard domains before stream activation.
- Handle restart/recovery logic and return structured result codes.
Observed internal symbols:
LkmPluginPidTrackerLkmPluginPipeApiLegacyPipeApi
Request/Response API Surface
Request Types
GsServiceApi.Request.SetupAppGsServiceApi.Request.LaunchAppGsServiceApi.Request.LaunchAppV2GsServiceApi.Request.StopAppGsServiceApi.Request.RestartApp
Param/Result Types
GsServiceApi.LaunchAppParamsGsServiceApi.LaunchAppV2ParamsGsServiceApi.StopAppParamsGsServiceApi.RestartAppParamsGsServiceApi.SetupAppResponseGsServiceApi.RestartAppResponseGsServiceApi.RestartAppResult
Runtime Flow (How LKM Works)
1) Initialization
- Parses seat and service configuration.
- Starts plugin task queue.
- Registers bus handlers for app/session requests.
- Initializes process tracking (
LkmPluginPidTracker).
2) Setup Phase
- Validates session and app metadata.
- Resolves app/package and instance constraints.
- Produces setup response for downstream services.
Evidence:
setupAppResponseGsServiceApi.SetupAppResponsesdkParametersInstanceTypePriorityGroupDef.proto
3) Launch Phase
- Uses
LaunchApporLaunchAppV2depending on seat capabilities/policy. - Applies VM-bound parameters (
vmIdobserved in request fields). - Tracks launched process tree and startup completion.
Evidence:
launchAppV2SupportedGsServiceApi.Request.LaunchAppV2vmId
4) Runtime/Recovery
- Handles pause/resume impact indirectly through session APIs.
- Executes
RestartAppon recoverable crashes or policy-driven restarts.
5) Stop and Teardown
- Issues
StopAppand returns terminal result. - Coordinates final state transition to avoid hanging sessions.
Protocol Buffers
| Proto File | Purpose |
|---|---|
GameSessionDef.proto | Session model and app/runtime attachment data |
GsServiceApiDef.proto | Request/response definitions for app lifecycle APIs |
ContentControllerMessagesDef.proto | Content availability and launch coordination |
SessionShutdownSettingsDef.proto | Shutdown behavior |
InstanceTypePriorityGroupDef.proto | Capacity/instance prioritization |
GCISCommunicationMessagesDef.proto | Inter-plugin control messages |
GFNGuardMessagesDef.proto | Policy/security integration |
App Content States
| State | Description |
|---|---|
AppContentStateUnknown | Unknown state |
AppContentStateAvailable | Content available |
AppContentStateNotAvailable | Content unavailable in current seat context |
AppContentStatePatching | App patch/update in progress |
AppContentStateServerMaintenance | Platform/zone maintenance |
AppContentStateGameNotFoundInZone | App not present in selected region |
AppContentStateGameNotLinked | Account linking requirement not satisfied |
AppContentStateGameCredentialsMissing | Required credentials unavailable |
Legacy Compatibility Layer
LegacyPipeApi indicates a retained older IPC path for transitional stacks.
Associated error indicators:
GSEC_LKM_Error_LegacyPipeApiFailedToCreatePipeGSEC_LKM_Error_LegacyPipeApiFailedToReceiveDataGSEC_LKM_Error_LegacyPipeApiRequestDeniedAsOspEnabledGSEC_LKM_Error_LegacyPipeApiThreadFailedToStart
Interpretation:
- Keep this path documented for old integrations.
- Prefer modern message-bus + GS2/GCIS request paths in current deployments.
Error Codes
LkmPlugin-aligned result groups:
| Range | Category |
|---|---|
0x80030100 to 0x80030115 | Session/app lifecycle failures |
0x80030120 to 0x80030124 | Maintenance/service-side gating |
Selected SRC_* outcomes:
| Code | Description |
|---|---|
SRC_TargetAppLaunchFailure | Launch path failed |
SRC_TargetAppNotFound | App package/binary missing |
SRC_TargetAppExited | Early/unexpected process exit |
SRC_SeatInitializationFailed | Seat setup failed before stream-ready |
SRC_UnableToFindResources | Resource allocation failed |
SRC_ZoneInMaintenanceMode | Zone unavailable by policy |
Dependencies
WS2_32, IPHLPAPI, libprotobuf, VERSION, RPCRT4, KERNEL32, SHELL32, ole32, ADVAPI32, MSVCP140, VCRUNTIME140
Operational Debug Checklist
- Validate setup response payload before launch (
sdkParameters, app/vm fields). - Verify
LaunchAppvsLaunchAppV2path selection and support flags. - For restart loops, inspect
RestartAppResultand PID tracking events. - If legacy callers exist, verify whether policy intentionally blocks
LegacyPipeApi.