feat(host/linux): NVIDIA clock hygiene — P2-cap driver profile + opt-in NVML clock floor
Two halves of the easy-scene p99 lever (host-latency plan Tier 1B): CudaNoStablePerfLimit application profile (no root; NVIDIA's supported opt-out of the CUDA/NVENC P2 memory-clock clamp, raw key 0x166c5e=0 per open-gpu-kernel-modules#333, shipped for obs/Discord in R595) installed into ~/.nv/nvidia-application-profiles-rc.d/ keyed on procname, opt-out PUNKTFUNK_NV_PROFILE=0; and PUNKTFUNK_PIN_CLOCKS=1 arming an NVML SetGpuLockedClocks(TDP, UNLIMITED) core-clock floor (base floor, boost headroom — never a max pin) held for the host lifetime, reset-on-start self-healing a crashed run's stale pin, NO_PERMISSION degrading to a logged sudoers/oneshot recipe. libnvidia-ml is dlopen'd like libcuda — no link-time dependency, clean no-op off NVIDIA. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -45,6 +45,9 @@ mod library;
|
||||
mod mgmt;
|
||||
mod mgmt_token;
|
||||
mod native_pairing;
|
||||
#[cfg(target_os = "linux")]
|
||||
#[path = "linux/nvclocks.rs"]
|
||||
mod nvclocks;
|
||||
mod pipeline;
|
||||
mod punktfunk1;
|
||||
mod pwinit;
|
||||
@@ -127,6 +130,15 @@ fn real_main() -> Result<()> {
|
||||
#[cfg(target_os = "windows")]
|
||||
crate::capture::dxgi::install_gpu_pref_hook();
|
||||
|
||||
// NVIDIA clock hygiene (Linux, host subcommands only): install the P2-cap driver profile and,
|
||||
// under PUNKTFUNK_PIN_CLOCKS, hold the NVML core-clock floor for the host lifetime (reset on
|
||||
// exit via the guard's Drop). No-op off NVIDIA / on the tool subcommands.
|
||||
#[cfg(target_os = "linux")]
|
||||
let _nv_clocks = match args.first().map(String::as_str) {
|
||||
Some("serve") | Some("punktfunk1-host") => nvclocks::on_host_start(),
|
||||
_ => None,
|
||||
};
|
||||
|
||||
match args.first().map(String::as_str) {
|
||||
// The host: the native punktfunk/1 plane + management API by default (secure), and — with
|
||||
// --gamestream — the GameStream/Moonlight-compat planes too (opt-in; #5/#9 trusted-LAN caveat).
|
||||
|
||||
Reference in New Issue
Block a user